zotplus-rakehelper 0.0.115 → 0.0.117

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 012ac1bb66d5f875889049148fbf24f82caa79ef
4
- data.tar.gz: 07bfd332ac19b23d704b33725114e27b03cc1821
3
+ metadata.gz: d72118b21197640bd84008d3b9733836662f7816
4
+ data.tar.gz: 1c40478902c9a17e600587ad1daf52d4fd57f2db
5
5
  SHA512:
6
- metadata.gz: 07200e4ea320ac5d2a80e3e47060115a53c68e70ff62cce5323b0104a1554cfd65d70d9cc1cb2642198784136d9a7df3285afd3b0275fa3ad9af7f49027e8598
7
- data.tar.gz: acfacea9dda64cc6d51c0cd090c2ec8ea4808086b6ed3bdbc0bb547c681b5eba3c87689fbac71e4ff2781d6952bd48d7a65c71c2943fa3fa29a00229d2cc80ac
6
+ metadata.gz: 7527cefb8172ae9ecc64bbe37cd41519c2b1214160c285941ed2b5c2b9159d385091e07facfffe32c171489185b879f8c44a245d32d96968b1c66c65fd0ee92c
7
+ data.tar.gz: c44330a4140de25cef5a8985c553db73121df5ee950068d92be3ad607a9cdea446639981cad4825b493afd84a231a8c73f6aca8bc0d47e3ef2a04e8e76ee43b2
@@ -6,12 +6,13 @@ require 'uri'
6
6
  require 'fileutils'
7
7
  require 'open-uri'
8
8
  require 'ostruct'
9
- require 'httparty'
10
9
  require 'open-uri'
11
10
 
11
+ DEBUGBUILD = ENV['DEBUGBUILD'] == 'true' ? '-' + Time.now.to_i.to_s : ''
12
+
12
13
  ID = Nokogiri::XML(File.open('install.rdf')).at('//em:id').inner_text
13
14
  EXTENSION = ID.gsub(/@.*/, '')
14
- RELEASE = Nokogiri::XML(File.open('install.rdf')).at('//em:version').inner_text
15
+ RELEASE = Nokogiri::XML(File.open('install.rdf')).at('//em:version').inner_text + DEBUGBUILD
15
16
  XPI = "zotero-#{EXTENSION}-#{RELEASE}.xpi"
16
17
  NODEBIN="node_modules/.bin"
17
18
 
@@ -23,8 +24,18 @@ task XPI => ZIPFILES do
23
24
  Dir["*.xpi"].each{|f| File.unlink(f) }
24
25
 
25
26
  Zip::File.open(XPI, 'w') do |zipfile|
26
- ZIPFILES.uniq.sort.each{|file|
27
- zipfile.add(file, file)
27
+ ZIPFILES.uniq.sort.each{|src|
28
+ if DEBUGBUILD != '' && File.basename(src) == 'install.rdf'
29
+ Tempfile.open('install.rdf') {|f|
30
+ install_rdf = Nokogiri::XML(File.open(src))
31
+ install_rdf.at('//em:version').content = RELEASE
32
+ install_rdf.at('//em:updateURL').content = "https://zotplus.github.io/#{EXTENSION}/update.rdf"
33
+ install_rdf.write_xml_to f
34
+ zipfile.add(src, f.path)
35
+ }
36
+ else
37
+ zipfile.add(src, src)
38
+ end
28
39
  }
29
40
  end
30
41
  end
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.115"
3
+ VERSION = "0.0.117"
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.115
4
+ version: 0.0.117
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-11-18 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler