zotplus-rakehelper 0.0.145 → 0.0.146

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f897fb1717d13e228997c57bf4d911ed04688209
4
- data.tar.gz: dca63c2b7b3c544e3892ddaffda2abb18d883c98
3
+ metadata.gz: a0bbc6d60681483676126d906616d93d9eee32d3
4
+ data.tar.gz: 877cc0b2a0a6d056ae0b585d10faa862494634fa
5
5
  SHA512:
6
- metadata.gz: 36152b91380d10561b7835293c0842b5cf59074741be3b32849092aeae6f65a05e70b57135e96b6ae3d1466d972edef70910ae09b91234423ab96f86993439a6
7
- data.tar.gz: cb187aa2b35bb648c9c5bf34769405937e02edf8741f3c1d20a08f97d2fcced61f4ce23cb241fe3c0c3e34bb7c51e6a759771ce053a7837ded64f2dadcb1b327
6
+ metadata.gz: 381358a0d4c395549a497668173e086fed832c36be2a554b90fcedbe304c95ac7901475312b29440958b98b6cdb41bb4b46209f514a0feadecf165607497d50a
7
+ data.tar.gz: c93c830a7d61b1741d004f8b6c7e5905d329deaa1b88fdfcad32d8fd9228e55a46ceb9873760aa1448c12ded7b0d982a1c74d0434d3c4eebaa28d58f22defda2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zotplus-rakehelper (0.0.145)
4
+ zotplus-rakehelper (0.0.146)
5
5
  front_matter_parser
6
6
  github_api
7
7
  nokogiri
@@ -72,7 +72,7 @@ rule '.js' => '.coffee' do |t|
72
72
  sh "#{NODEBIN}/coffee -bc #{t.source.shellescape}"
73
73
  end
74
74
 
75
- task :bump, :what do |t, args|
75
+ task :bump, :what => 'README.md' do |t, args|
76
76
  modified = `git ls-files -m`.split(/\n/).reject{|f| f == 'www' || f == 'wiki'}
77
77
  throw "#{modified.length} modified files not checked in" unless modified.length == 0
78
78
  release = Nokogiri::XML(File.open('install.rdf')).at('//em:version').inner_text
@@ -85,20 +85,6 @@ task :bump, :what do |t, args|
85
85
  end
86
86
  release = release.collect{|n| n.to_s}.join('.')
87
87
 
88
- ## README.MD
89
- config = YAML.load_file('site/_config.yml')
90
- readme = FrontMatterParser.parse_file('site/index.md')
91
- md = readme.content
92
- md.gsub!(/\[([^!\]]+)\]\(([^\)]+)\)/) {
93
- title = $1
94
- url = $2
95
- url = "/#{url}" unless url =~ /^https?:/ || url =~ /^\//
96
- url = "#{config['baseurl']}#{url}" unless url =~ /^https?:/
97
- "[#{title}](#{url})"
98
- }
99
- md = "# #{readme['title']} [![Build Status](#{config['travis']['status']})](#{config['travis']['build']})\n\n#{md.strip}"
100
- open('README.md', 'w'){|f| f.write(md) }
101
-
102
88
  ## INSTALL.RDF
103
89
  install_rdf = Nokogiri::XML(File.open('install.rdf'))
104
90
  install_rdf.at('//em:version').content = release
@@ -116,8 +102,23 @@ task :bump, :what do |t, args|
116
102
  sh "git subtree push --prefix site/ origin gh-pages"
117
103
  end
118
104
 
119
- task :site do
120
- sh "git add site"
105
+ file 'README.md' => ['site/index.md', 'site/_config.yml'] do |t|
106
+ readme = FrontMatterParser.parse_file(t.sources[0])
107
+ config = YAML.load_file(t.sources[1])
108
+ md = readme.content
109
+ md.gsub!(/\[([^!\]]+)\]\(([^\)]+)\)/) {
110
+ title = $1
111
+ url = $2
112
+ url = "/#{url}" unless url =~ /^https?:/ || url =~ /^\//
113
+ url = "#{config['baseurl']}#{url}" unless url =~ /^https?:/
114
+ "[#{title}](#{url})"
115
+ }
116
+ md = "# #{readme['title']} [![Build Status](#{config['travis']['status']})](#{config['travis']['build']})\n\n#{md.strip}"
117
+ open(t.name, 'w'){|f| f.write(md) }
118
+ end
119
+
120
+ task :site => 'README.md' do
121
+ sh "git add site README.md"
121
122
  sh "git subtree push --prefix site/ origin gh-pages"
122
123
  end
123
124
 
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.145"
3
+ VERSION = "0.0.146"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zotplus-rakehelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.145
4
+ version: 0.0.146
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns