roger_themes 0.2.1 → 0.2.2

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: 813735f3247d0d51701f134aef48190d7b36bcdd
4
- data.tar.gz: 9f8f4424ba9daf3d74f09c54ff8d7eb56314e9dd
3
+ metadata.gz: 4d54eb2f4c59f60e0b7fc3e773b34f556b7b7316
4
+ data.tar.gz: a753831fc33622b5b94f6ce05de780adc9039555
5
5
  SHA512:
6
- metadata.gz: bd89effd5d00d03c485beb4f55dadc734282187d63dfd3e62995df26cfb5aaf7106ee3b76e6fb66d8a0924aaccd677abb33971fae9539fe36c4e9e7e2ad8642b
7
- data.tar.gz: e8bc5d88c38b0be225854e7ce3bf8f53aa5462947bad7e1e40e9e22b1638076e6defdb4e8646b25875d28f81d0850e3448c6dbac9c37a35e02367a76ecbe98ca
6
+ metadata.gz: 21c8f1b1516399afa85b98c939202ae07e03c196a2deb27b66ab1a9d4c4bb51b5625f91b3ca70deb5b8ba7abe213ac6a41877ffc2e80cae3a3fb92ee2e1dc948
7
+ data.tar.gz: b300d3edde063b45e551c358740ae29260a2b26fb60eb7cbfdb1b3d6bd83c56c184726da5a3e7be42429fb6cc7c3c10f5f1189146698f791502b9e9ee9bbd2da
@@ -1,3 +1,3 @@
1
1
  module RogerThemes
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -8,13 +8,13 @@ module RogerThemes
8
8
  #
9
9
  # @param [Release] release
10
10
  # @param [Hash] options Options hash
11
- # @option options [String] :prefix ("html") The name to prefix the zipfile with (before version)
11
+ # @option options [String, nil] :prefix (nil) The name to prefix the zipfile with (before version)
12
12
  # @option options [String] :zip ("zip") The ZIP command to use
13
- # @option options [String] :source_path (release.build_path + "themes/*") The paths to zip
14
- # @option options [String] :target_path (release.build_path + "themes/zips") The path to the zips
13
+ # @option options [String, Pathname] :source_path (release.build_path + "themes/*") The paths to zip
14
+ # @option options [String, Pathname] :target_path (release.build_path + "themes/zips") The path to the zips
15
15
  def call(release, options = {})
16
16
  options = {
17
- :prefix => "html",
17
+ :prefix => nil,
18
18
  :zip => "zip",
19
19
  :source_path => release.build_path + "themes/*",
20
20
  :target_path => release.build_path + "themes/zips"
@@ -22,13 +22,11 @@ module RogerThemes
22
22
 
23
23
  dirs = Dir.glob(options[:source_path].to_s)
24
24
 
25
- releasename = [(options[:prefix] || "html"), release.scm.version].join("-")
26
-
27
- zipdir = options[:target_path]
25
+ zipdir = Pathname.new(options[:target_path])
28
26
  FileUtils.mkdir_p(zipdir) unless zipdir.exist?
29
27
 
30
28
  dirs.each do |dir|
31
- name = File.basename(dir)
29
+ name = [options[:prefix], File.basename(dir), release.scm.version].compact.join("-")
32
30
  path = Pathname.new(dir)
33
31
 
34
32
  begin
@@ -38,7 +36,7 @@ module RogerThemes
38
36
  end
39
37
 
40
38
  ::Dir.chdir(path) do
41
- `#{options[:zip]} -r -9 "#{zipdir + name}-#{release.scm.version}.zip" rel js`
39
+ `#{options[:zip]} -r -9 "#{zipdir + name}.zip" rel js`
42
40
  end
43
41
 
44
42
  release.log(self, "Creating zip for custom #{name}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger_themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edwin van der Graaf