zotplus-rakehelper 0.0.102 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zotplus-rakehelper/version.rb +1 -1
- data/lib/zotplus-rakehelper.rb +6 -5
- 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: cc43473f849ba8509ecba6a34bac1b6d3533f6b6
|
|
4
|
+
data.tar.gz: fde527bdb7534d9c11d92ac3496a8c646b3cda7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 581023f674b466b10183967d5f059b97400e97d25f4b2766d42f9c30bcc67b7e01b75628ca51f28cf40cd7242877f43fc428c40a9638df25d0c8f7b9db012622
|
|
7
|
+
data.tar.gz: afa872cf2b2d361089ff969754aaea6a608305c33ed1f47e7605e83233ef48a65eaab9bbb1d6c0c27b1d97bfe4ba3073056a7e2e2d54ca777c51f62830699300
|
data/lib/zotplus-rakehelper.rb
CHANGED
|
@@ -172,10 +172,10 @@ module ZotPlus
|
|
|
172
172
|
url = final_uri.to_s
|
|
173
173
|
elsif source =~ /^https:\/\/github\.com\/zotero\/([^\/]+)\/zipball\/master$/
|
|
174
174
|
url = source
|
|
175
|
-
|
|
176
|
-
Dir.chdir(
|
|
175
|
+
src = $1
|
|
176
|
+
Dir.chdir(src) {
|
|
177
177
|
rev = `git log -n 1 --pretty=format:"%h"`
|
|
178
|
-
xpi = "#{
|
|
178
|
+
xpi = "#{src}-master-#{rev}.xpi"
|
|
179
179
|
}
|
|
180
180
|
elsif source =~ /^file:/ || source =~ /\.xpi(\?|$)/
|
|
181
181
|
url = source
|
|
@@ -203,9 +203,10 @@ module ZotPlus
|
|
|
203
203
|
sources.reject{|s| installed.include?(s.xpi) && s.url !~ /^file:/ }.each{|s|
|
|
204
204
|
if s.xpi =~ /(.*)-master-.*.xpi$/
|
|
205
205
|
src = $1
|
|
206
|
-
|
|
206
|
+
tgt = "#{dir}/#{s.xpi}"
|
|
207
|
+
STDERR.puts "Zipping #{s.xpi} to #{tgt}"
|
|
207
208
|
Dir.chdir(src){|path|
|
|
208
|
-
Zip::File.open(
|
|
209
|
+
Zip::File.open(tgt, 'w') do |zipfile|
|
|
209
210
|
Dir["**/*"].sort.each{|file|
|
|
210
211
|
zipfile.add(file, file)
|
|
211
212
|
}
|