fastlane-plugin-droidicon 0.1.0 → 0.2.0

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: 782e653f46a90a50c51d0f1828136b9d797f9f14
4
- data.tar.gz: 4ddd581eb0878b2977110f1eb951ed0c973d2321
3
+ metadata.gz: 870d1bc8198d6c5374c8bc51c2c1f4472f35b5f2
4
+ data.tar.gz: 60e0b80efaebf6157d7ec56dde1f8fff35cc4f11
5
5
  SHA512:
6
- metadata.gz: fdd8a0be8f5fe05717de18d0e80fd31259bd812165c671870ee2feecbacb7f20e6455fc398164938da4141d54ae809758cbd011165e159d6bf701d40cc0fe832
7
- data.tar.gz: 9d6bfe925eb8d4ff92cd0673735ce8c8b26b1e7a0be5e0dcc85a7e9c4731f67ef76c2a07d1ff5b52c8c3c3035b291c87f20322b5cd5ab53fdddfbaeca9c322cd
6
+ metadata.gz: a2456101abb44789940cb667751a0f36ccb04ed14daeb686732b543ad66e23b8ce8a990737f7770d26c3c00ee8cfc877fede90f7ac8fac1d4bf35a20de0100bc
7
+ data.tar.gz: 96ba74b36a35d61e606ee70708728e21c5b7164ce77bda8f198e3f4494ba1eb6e12c4c687abddadeaaf0eab92ec134217c722b5a2a7e4b648fc9770bd4128aa6
@@ -25,14 +25,22 @@ module Fastlane
25
25
 
26
26
  FileUtils.mkdir_p(basepath)
27
27
 
28
- self.needed_icons[:android].each do |scale, size|
28
+ process = lambda do | size, path |
29
29
  width, height = size.split('x').map { |v| v.to_f }
30
30
 
31
- FileUtils.mkdir_p(File.join(basepath, scale))
31
+ FileUtils.mkdir_p(path)
32
32
  image = MiniMagick::Image.open(fname)
33
33
  image.format 'png'
34
34
  image.resize "#{width}x#{height}"
35
- image.write File.join(basepath, scale, params[:generated_file_name])
35
+ image.write File.join(path, params[:generated_file_name])
36
+ end
37
+
38
+ if params[:size]
39
+ process.call(params[:size], basepath)
40
+ else
41
+ self.needed_icons[:android].each do |scale, size|
42
+ process.call(size, File.join(basepath, scale))
43
+ end
36
44
  end
37
45
 
38
46
  UI.success("Successfully stored app icon at '#{basepath}'")
@@ -63,6 +71,12 @@ module Fastlane
63
71
  env_name: "RES_PATH",
64
72
  default_value: File.join("app", "src", "main", "res"),
65
73
  description: "Path to the Resouce for the generated iconset",
74
+ optional: true,
75
+ type: String),
76
+ FastlaneCore::ConfigItem.new(key: :size,
77
+ env_name: "SIZE",
78
+ default_value: "512x512",
79
+ description: "Assign a size option",
66
80
  optional: true,
67
81
  type: String)
68
82
  ]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Droidicon
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-droidicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@chrhsmt"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-18 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick