zotplus-rakehelper 0.0.97 → 0.0.98

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: d6a678cde3e49fd40942aa0138d5c507087efbb6
4
- data.tar.gz: 77ef6be92862e376dd2d43126cb973f2b2146922
3
+ metadata.gz: 8af5f68c8121807d2e6157ed20fcb230cd2dc9a1
4
+ data.tar.gz: 342e3c79453604cc0708a1628dc242e4cc08d67a
5
5
  SHA512:
6
- metadata.gz: 98dfe45d2a4b48ecae2cb60638ef301b8318f175500d41a4df44a869009ccc9a584f14d2483928caa94fab7af358443551c27190fe8ca1717945052a9d075dab
7
- data.tar.gz: f2a1e21b81cefe8bb0432f44f1929f25f2f0ce8f980c739a6935881f848373a759339ddf388f0f6ba845b148eb8d32148148dfbb9f58efad21d2cd14e183e7e5
6
+ metadata.gz: a4c42237ef9ca34a3a91a8f94c3efae2747064036662c43f434ea04b0400244f9341cb84a952f7f5f9bfc04e25e7b94b1f8d543106a49bea66ef9306783eda5f
7
+ data.tar.gz: 91e6ccaca328ec25ce3968d9bd9a752f5d0444085751e7fed1cae014bdc54bd45505704009442b6901d372d8736cdffc846f2014ab76273de4b2e0132627e0e1
@@ -113,14 +113,19 @@ task :deploy => [XPI, GR] do
113
113
  end
114
114
  end
115
115
 
116
- task :plugins do
116
+ task :plugins, :zotero do |t, args|
117
117
  if File.file?('features/plugins.yml')
118
118
  plugins = YAML.load_file('features/plugins.yml')
119
119
  else
120
120
  plugins = []
121
121
  end
122
122
  plugins << 'https://zotplus.github.io/debug-bridge/update.rdf'
123
- plugins << 'https://www.zotero.org/download/update.rdf'
123
+
124
+ if args[:zotero] == 'master'
125
+ plugins << 'https://github.com/zotero/zotero/zipball/master'
126
+ else
127
+ plugins << 'https://www.zotero.org/download/update.rdf'
128
+ end
124
129
  plugins.uniq!
125
130
  ZotPlus::RakeHelper.getxpis(plugins, 'test/fixtures/plugins')
126
131
  end
@@ -144,6 +149,8 @@ module ZotPlus
144
149
  def self.resolvexpi(source)
145
150
  STDERR.puts "Resolving #{source}"
146
151
 
152
+ xpi = nil
153
+
147
154
  if source =~ /update\.rdf$/
148
155
  update_rdf = Nokogiri::XML(self.geturl(source))
149
156
  update_rdf.remove_namespaces!
@@ -163,14 +170,18 @@ module ZotPlus
163
170
  final_uri = h.base_uri
164
171
  end
165
172
  url = final_uri.to_s
173
+ elsif source =~ /^https:\/\/github\.com\/zotero/([^\/]+)\/zipball\/master$/
174
+ url = source
175
+ xpi = "#{$1}-master.xpi"
166
176
  elsif source =~ /^file:/ || source =~ /\.xpi(\?|$)/
167
177
  url = source
168
178
  else
169
179
  throw "Unsupported XPI source #{source}"
170
180
  end
171
181
 
182
+ xpi ||= url.sub(/.*\//, '').sub(/\?.*$/, '')
172
183
  STDERR.puts "Resolved to #{url}"
173
- return OpenStruct.new(url: url, xpi: url.sub(/.*\//, '').sub(/\?.*$/, ''))
184
+ return OpenStruct.new(url: url, xpi: xpi)
174
185
  end
175
186
 
176
187
  def self.getxpis(sources, dir)
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.97"
3
+ VERSION = "0.0.98"
4
4
  end
5
5
  end
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.97
4
+ version: 0.0.98
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler