badge 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/badge/base.rb +1 -1
  3. data/lib/badge/runner.rb +19 -1
  4. metadata +25 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 307f9b7edfd352b5479fee083ea69abd4eab7ebd
4
- data.tar.gz: 2c9ad804cce291c8928eff21b21be6b018dd3acb
3
+ metadata.gz: 798012dc707cc3bfccbe84db1706ca736eb5d039
4
+ data.tar.gz: 60c07dacab5bbe97088d6a1329ba13cbc38e9e68
5
5
  SHA512:
6
- metadata.gz: ea3a4cd5ea6888fef9eaea2cfa6247e7ddfc9b157d1588f512a4046931c2aac1c64ed86f4ff94a7093ea2d81448b42765fc634430ed41e0c2c5da03043f43099
7
- data.tar.gz: 4b2c2fcea5a95c25d1d47d9fad1c90657ad693961f0880642d6211bb972f4adc0e8c618e9e48d1fd6d1af746f63bfe15a9a24ffa6658028b71e78317b9725eee
6
+ metadata.gz: 1b2071a143a661331a5e8fc2fa57c74a62b99a02dab109596915c9a181afc5255080c793d412b90fcbc82c34f62d1d11f31fe5794191e1c866fc3bf87c790c7a
7
+ data.tar.gz: 6adef7ae54872bbb0f6331b6d26be574fc8fdb1b7691b160e9e1c4ce562c02293f3e2568f9b6f11ac8fd0ba4834b76005d9cd0f8a484bb96a5241e315515b748
data/lib/badge/base.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Badge
2
2
 
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  DESCRIPTION = "Add a badge overlay to your ios app icon"
5
5
 
6
6
  def self.root
data/lib/badge/runner.rb CHANGED
@@ -7,6 +7,7 @@ module Badge
7
7
  @@retry_count = Badge.shield_io_retries
8
8
 
9
9
  def run(path, options)
10
+ check_imagemagick!
10
11
  glob = "/**/*.appiconset/*.{png,PNG}"
11
12
  glob = options[:glob] if options[:glob]
12
13
 
@@ -107,7 +108,24 @@ module Badge
107
108
  file.close
108
109
  end
109
110
  end
110
-
111
+
112
+ def check_imagemagick!
113
+ return if `which convert`.include?('convert')
114
+ return if `which gm`.include?('gm')
115
+
116
+ UI.error("You have to install ImageMagick or GraphicsMagick to use `badge`")
117
+ UI.error("")
118
+ UI.error("Install it using (ImageMagick):")
119
+ UI.command("brew update && brew install imagemagick")
120
+ UI.error("")
121
+ UI.error("Install it using (GraphicsMagick):")
122
+ UI.command("brew update && brew install graphicsmagick")
123
+ UI.error("")
124
+ UI.error("If you don't have homebrew, visit http://brew.sh")
125
+
126
+ UI.user_error!("Install ImageMagick and start your lane again!")
127
+ end
128
+
111
129
  def add_badge(custom_badge, dark_badge, icon, alpha_badge, alpha_channel, badge_gravity)
112
130
  UI.message "'#{icon.path}'"
113
131
  UI.verbose "Adding badge image ontop of icon".blue
metadata CHANGED
@@ -1,64 +1,64 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: badge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Griesser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-26 00:00:00.000000000 Z
11
+ date: 2016-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.44.0
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.44.0
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: fastimage
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 1.6.3
39
+ version: '1.6'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 1.6.3
46
+ version: '1.6'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mini_magick
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 4.5.1
53
+ version: '4.5'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 4.5.1
61
- description: 0.5.0
60
+ version: '4.5'
61
+ description: 0.5.1
62
62
  email:
63
63
  - daniel.griesser.86@gmail.com
64
64
  executables:
@@ -66,16 +66,16 @@ executables:
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - lib/badge/base.rb
70
- - lib/badge/runner.rb
71
- - lib/badge.rb
72
- - bin/badge
73
- - README.md
74
69
  - LICENSE
75
- - assets/beta_badge_dark.png
76
- - assets/beta_badge_light.png
70
+ - README.md
77
71
  - assets/alpha_badge_dark.png
78
72
  - assets/alpha_badge_light.png
73
+ - assets/beta_badge_dark.png
74
+ - assets/beta_badge_light.png
75
+ - bin/badge
76
+ - lib/badge.rb
77
+ - lib/badge/base.rb
78
+ - lib/badge/runner.rb
79
79
  homepage: https://github.com/HazAT/badge
80
80
  licenses:
81
81
  - MIT
@@ -86,17 +86,17 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: 2.0.0
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.0.6
99
+ rubygems_version: 2.5.1
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Add a badge overlay to your ios app icon