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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/zotplus-rakehelper.rb +18 -17
- data/lib/zotplus-rakehelper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0bbc6d60681483676126d906616d93d9eee32d3
|
4
|
+
data.tar.gz: 877cc0b2a0a6d056ae0b585d10faa862494634fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381358a0d4c395549a497668173e086fed832c36be2a554b90fcedbe304c95ac7901475312b29440958b98b6cdb41bb4b46209f514a0feadecf165607497d50a
|
7
|
+
data.tar.gz: c93c830a7d61b1741d004f8b6c7e5905d329deaa1b88fdfcad32d8fd9228e55a46ceb9873760aa1448c12ded7b0d982a1c74d0434d3c4eebaa28d58f22defda2
|
data/Gemfile.lock
CHANGED
data/lib/zotplus-rakehelper.rb
CHANGED
@@ -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
|
-
|
120
|
-
|
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
|
|