zotplus-rakehelper 0.0.27 → 0.0.28

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: 2c83f995bfb5003d4c5a687d9cbe53f561ecd8cd
4
- data.tar.gz: 045fdcf88039d9f6037db285ca74dd57de4597b3
3
+ metadata.gz: df675b448f191f80dda232caff38d4013da4e9a7
4
+ data.tar.gz: 48c1ea9f34800b5d943de6d7a84be6473ae4126b
5
5
  SHA512:
6
- metadata.gz: 6f0e0e1cccd7e03c51eb4deb948c355520e15c6df759500e29247dbbaa73b8a695e10865413d937a8b47bfe471dcc41fe8b8bb3b1d435227ad47d5ae5c77c19a
7
- data.tar.gz: 55b40719c912f0bb366df855e198fc68add5b2d4d242bc4a1371fe3e8ffedce9cdd1f8b049d0d6d9f288c34f30beeb37a5c4a0b38c975bee6d80d7d17bc47a83
6
+ metadata.gz: ba6e5b4c858006ce6527dea5b59fea8632dc6913aec42af07349da33f81aa1f8ab65fb662c3a057bf1a131a045f3ad0097e361c0aa1eb4b094080eae9d56445b
7
+ data.tar.gz: 587ecd40948069177f1d0aa2a5749ff54dfe0972f1e5df8e88c921c34f92afd8e5aaa11fec7597f06de07b2c959201f5f0248369822cf6864f424e8549aae3b8
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zotplus-rakehelper (0.0.27)
4
+ zotplus-rakehelper (0.0.28)
5
5
  nokogiri
6
6
  rake
7
+ rickshaw
7
8
  rubyzip (>= 1.0.0)
8
9
  typhoeus
9
10
 
@@ -17,6 +18,7 @@ GEM
17
18
  nokogiri (1.6.3.1)
18
19
  mini_portile (= 0.6.0)
19
20
  rake (10.3.2)
21
+ rickshaw (0.0.2)
20
22
  rubyzip (1.1.6)
21
23
  typhoeus (0.6.9)
22
24
  ethon (>= 0.7.1)
@@ -36,12 +36,21 @@ end
36
36
  task :default => XPI do
37
37
  end
38
38
 
39
- task 'update.rdf' => 'install.rdf' do
39
+ task 'update.rdf' => [XPI, 'install.rdf'] do
40
40
  rdf = Nokogiri::XML(File.open(t.name))
41
41
  rdf.at('//em:version').content = RELEASE
42
42
  rdf.at('//RDF:Description')['about'] = "urn:mozilla:extension:#{ID}"
43
43
  rdf.xpath('//em:updateLink').each{|link| link.content = "https://zotplus.github.io/#{EXTENSION}/#{XPI}" }
44
44
  rdf.xpath('//em:updateInfoURL').each{|link| link.content = "https://zotplus.github.io/#{EXTENSION}" }
45
+ rdf.xpath('//RDF:Description').each{|desc|
46
+ hash = desc.at('./em:updateHash')
47
+ if !hash
48
+ hash = Nokogiri::XML::Node.new('updateHash', rdf)
49
+ hash.namespace = rdf.root.namespace_definitions.find{|ns| ns.prefix=='em' }
50
+ desc.add_child(hash)
51
+ end
52
+ hash.content = "sha1:#{Rickshaw::SHA1.hash(XPI)}"
53
+ }
45
54
  File.open(t.name) {|f| rdf.write_xml_to f}
46
55
  end
47
56
 
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.27"
3
+ VERSION = "0.0.28"
4
4
  end
5
5
  end
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency 'typhoeus'
26
26
  spec.add_runtime_dependency 'nokogiri'
27
27
  spec.add_runtime_dependency 'rubyzip', '>= 1.0.0' # will load new rubyzip version
28
+ spec.add_runtime_dependency 'rickshaw'
28
29
  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.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rickshaw
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: ZotPlus rake helper
84
98
  email:
85
99
  - Emiliano.Heyns@iris-advies.com