zotplus-rakehelper 0.0.141 → 0.0.142
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zotplus-rakehelper/version.rb +1 -1
- data/lib/zotplus-rakehelper.rb +19 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 574b6737a3411e84f772f3b4c748f9cee47b1d93
|
4
|
+
data.tar.gz: 8491cedd4fda7755d6d71cb0087073bef6b6ac16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db435345e00264c84f7706d1ca4af16b507fb035341c4f3746edb7d98d5a89ecc20d589bd6b52a474c75ef942aba6f02a45c64a95ba50c34a88c2eaf38b862a6
|
7
|
+
data.tar.gz: b5b846a0bb50a42cab6f1ea58485d3408418c89b235dfc8cb267ea67dc192fa5d2b8e3bd6c0d0fc083fb3ff35fb895e06e7c0c27f3026928df5e10a2a8d96c34
|
data/lib/zotplus-rakehelper.rb
CHANGED
@@ -85,25 +85,34 @@ task :bump, :what do |t, args|
|
|
85
85
|
end
|
86
86
|
release = release.collect{|n| n.to_s}.join('.')
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
md = open("https://raw.githubusercontent.com/ZotPlus/ZotPlus.github.io/master/#{EXTENSION}/index.md").read
|
93
|
-
md.sub!(/^---(.|\n)+---\n/, '')
|
94
|
-
md.gsub!(/{% include ([^\s]+) %}/){ release }
|
88
|
+
## README.MD
|
89
|
+
config = YAML.load_file('site/_config.yml')
|
90
|
+
md = open('site/index.md').read
|
91
|
+
md.sub!(/^---(.|\n)+---\n/, '') # remove yaml header
|
95
92
|
md.gsub!(/\[([^!\]]+)\]\(([^\)]+)\)/) {
|
96
93
|
title = $1
|
97
94
|
url = $2
|
98
|
-
url = "/#{
|
99
|
-
url = "
|
95
|
+
url = "/#{url}" unless url =~ /^https?:/ || url =~ /^\//
|
96
|
+
url = "#{config['url']}#{url}" unless url =~ /^https?:/
|
100
97
|
"[#{title}](#{url})"
|
101
98
|
}
|
102
99
|
open('README.md', 'w'){|f| f.write(md) }
|
103
100
|
|
104
|
-
|
101
|
+
## INSTALL.RDF
|
102
|
+
install_rdf = Nokogiri::XML(File.open('install.rdf'))
|
103
|
+
install_rdf.at('//em:version').content = release
|
104
|
+
File.open('install.rdf','w') {|f| install_rdf.write_xml_to f}
|
105
|
+
|
106
|
+
## UPDATE.RDF
|
107
|
+
update = Nokogiri::XML(open('site/update.rdf'))
|
108
|
+
update.at('//em:version').content = release
|
109
|
+
update.xpath('//em:updateLink').each{|link| link.content = "https://github.com/ZotPlus/zotero-#{EXTENSION}/releases/download/#{release}/zotero-#{EXTENSION}-#{release}.xpi" }
|
110
|
+
open('site/update.rdf', 'w'){|f| update.write_xml_to f }
|
111
|
+
|
112
|
+
sh "git add site install.rdf README.md"
|
105
113
|
sh "git commit -m 'release: zotero-#{EXTENSION}-#{release}.xpi'"
|
106
114
|
sh "git tag #{release}"
|
115
|
+
sh "git subtree push --prefix site/ origin gh-pages"
|
107
116
|
end
|
108
117
|
|
109
118
|
def sign
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zotplus-rakehelper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.142
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emiliano Heyns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|