badge 0.12.0 → 0.13.0

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
  SHA256:
3
- metadata.gz: 9f352f9dd1f8b38ee80a7a4d047c2344bb827a03a4f8a15d00207172949f7491
4
- data.tar.gz: a97066b187f968895e957724cd5de7ec9648f7f06406c40e727ba9f3d1cd2a4a
3
+ metadata.gz: cde282fe94dedab5bdc9545d4e9b1519268a3cef9b1653b23bd7356c6cd03c89
4
+ data.tar.gz: 86bc387e9bdddf2d7015f13917895db8d12f0608db2e1543b2b69d90fca485e2
5
5
  SHA512:
6
- metadata.gz: 3c8961c9b60dc5a036408a1583e3b49e13eacc921a67f773181d00883ca6e6eb43e76141211a0eecaa7685da4782794b992b5a1bf98aef46873428123f985cfa
7
- data.tar.gz: fcdb04c1e0cba18ff95bd710aca0c4c1b8129d7d475df38da1ab174cab6dd6e98e4cae4e978abf54317d2d238c6757000ac835b4ada5d241967f7e4f2a6de138
6
+ metadata.gz: 1da1500396eaf05ffb16208af5dc5d48f269f43254cff36f59ec8adfab7ba650866ef4af8ea88d6dad779e707ebd65448b0d259c9b62bf62ef216ab7a16ebd61
7
+ data.tar.gz: 9ebfcdd75567fbddf15a4c72c9e8e6b1e65b13aff0e66bfb3a7274a947ef189cce38f886f4843d4c49e4e2f5f32c37eda3890ce31a64d084e8294ae5d48bff0b
data/README.md CHANGED
@@ -106,7 +106,7 @@ Sometimes the response from shields.io takes a long time and can timeout. You ca
106
106
 
107
107
  `--shield_parameters "colorA=abcdef&style=flat"` changes the parameters of the shield image. It uses a string of key-value pairs separated by ampersand as specified on shields.io, eg: colorA=abcdef&style=flat.
108
108
 
109
- In version [0.4.0](https://github.com/HazAT/badge/releases/tag/0.4.0) the default behavior of the shield graphic has been changed. The shield graphic will always be resized to **aspect fill** the icon instead of just adding the shield on the icon. The disable to new behaviour use `--shield_no_resize` which now only puts the shield on the icon again.
109
+ In version [0.4.0](https://github.com/HazAT/badge/releases/tag/0.4.0) the default behavior of the shield graphic has been changed. The shield graphic will always be resized to **aspect fill** the icon instead of just adding the shield on the icon. To disable the new behaviour use `--shield_no_resize` which now only puts the shield on the icon again.
110
110
 
111
111
  Add ```--no_badge``` as an option to hide the beta badge completely if you just want to add a shield.
112
112
 
data/lib/badge/base.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Badge
2
2
 
3
- VERSION = "0.12.0"
3
+ VERSION = "0.13.0"
4
4
  DESCRIPTION = "Add a badge overlay to your app icon"
5
5
 
6
6
  def self.root
data/lib/badge/options.rb CHANGED
@@ -11,7 +11,7 @@ module Badge
11
11
  optional: true),
12
12
 
13
13
  FastlaneCore::ConfigItem.new(key: :alpha,
14
- description: "Uses the work alpha instead of beta",
14
+ description: "Uses the word alpha instead of beta",
15
15
  is_string: false,
16
16
  optional: true),
17
17
 
@@ -45,7 +45,7 @@ module Badge
45
45
  optional: true),
46
46
 
47
47
  FastlaneCore::ConfigItem.new(key: :shield_io_timeout,
48
- description: "The timeout in seconds we should wait the get a response from shields.io",
48
+ description: "The timeout in seconds we should wait to get a response from shields.io",
49
49
  type: Integer,
50
50
  optional: true),
51
51
 
@@ -65,12 +65,12 @@ module Badge
65
65
  optional: true),
66
66
 
67
67
  FastlaneCore::ConfigItem.new(key: :shield_no_resize,
68
- description: "Shield image will no longer be resized to aspect fill the full icon. Instead it will only be shrinked to not exceed the icon graphic",
68
+ description: "Shield image will no longer be resized to aspect fill the full icon. Instead it will only be shrunk to not exceed the icon graphic",
69
69
  is_string: false,
70
70
  optional: true),
71
71
 
72
72
  FastlaneCore::ConfigItem.new(key: :glob,
73
- description: "Glob pattern for finding image files Default: CURRENT_PATH/**/*.appiconset/*.{png,PNG}",
73
+ description: "Glob pattern for finding image files. Default: CURRENT_PATH/**/*.appiconset/*.{png,PNG}",
74
74
  optional: true),
75
75
 
76
76
  FastlaneCore::ConfigItem.new(key: :grayscale,
data/lib/badge/runner.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'fastimage'
2
2
  require 'timeout'
3
3
  require 'mini_magick'
4
- require 'curb'
4
+ require 'open-uri'
5
5
 
6
6
  module Badge
7
7
  class Runner
@@ -39,7 +39,7 @@ module Badge
39
39
  end
40
40
  rescue Timeout::Error
41
41
  UI.error "Error loading image from shields.io timeout reached. Use --verbose for more info".red
42
- rescue Curl::Err::CurlError => error
42
+ rescue OpenURI::HTTPError => error
43
43
  response = error.io
44
44
  UI.error "Error loading image from shields.io response Error. Use --verbose for more info".red
45
45
  UI.verbose response.status if FastlaneCore::Globals.verbose?
@@ -90,12 +90,6 @@ module Badge
90
90
  else
91
91
  UI.message "Did nothing... Enable --verbose for more info.".red
92
92
  end
93
-
94
- if shield
95
- File.delete(shield) if File.exist?(shield)
96
- File.delete("#{shield.path}.png") if File.exist?("#{shield.path}.png")
97
- end
98
-
99
93
  else
100
94
  UI.error "Could not find any app icons...".red
101
95
  end
@@ -137,15 +131,11 @@ module Badge
137
131
  if shield_parameters
138
132
  url = url + "?" + shield_parameters
139
133
  end
140
- file_name = shield_string + (@@rsvg_enabled ? ".svg" : ".png")
141
134
 
142
135
  UI.verbose "Trying to load image from shields.io. Timeout: #{Badge.shield_io_timeout}s".blue
143
136
  UI.verbose "URL: #{url}".blue
144
137
 
145
- Curl::Easy.download(url, file_name)
146
- MiniMagick::Image.open(file_name) unless @@rsvg_enabled
147
-
148
- File.open(file_name)
138
+ MiniMagick::Image.open(url)
149
139
  end
150
140
 
151
141
  def check_tools!
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: badge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Griesser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2021-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: curb
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.9'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: fastlane
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +58,7 @@ dependencies:
72
58
  - - "<"
73
59
  - !ruby/object:Gem::Version
74
60
  version: 5.0.0
75
- description: 0.12.0
61
+ description: 0.13.0
76
62
  email:
77
63
  - daniel.griesser.86@gmail.com
78
64
  executables: