badge 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/lib/badge/base.rb +5 -1
- data/lib/badge/runner.rb +10 -5
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90c6a2e45f7e646c1dfde64ab05f1997ea47a05d
|
4
|
+
data.tar.gz: 9d2487e8b4432d02db3f9fa4318b0d2665f99398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94546da2fb5aa6720ee0b28ef32ceb4a879bc2d2a464dfe092f1eb5de3e5e6add5139b8a6e2f138c48ad29532a648b39bfa5eda47a050c8db7fad3f895e1a6a9
|
7
|
+
data.tar.gz: 14fa1a96e5323f2b9f54001b0bee5d4ec3c6afe2d81ed90d7aca21ae8ca60820bb1c83aefda5d7180e15f1819af1a9996032d5d615d1d5d30613761e9ed48c86
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2019 Daniel Griesser <daniel.griesser.86@gmail.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/badge/base.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Badge
|
2
2
|
|
3
|
-
VERSION = "0.
|
3
|
+
VERSION = "0.11.0"
|
4
4
|
DESCRIPTION = "Add a badge overlay to your app icon"
|
5
5
|
|
6
6
|
def self.root
|
@@ -28,6 +28,10 @@ module Badge
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.shield_base_url
|
31
|
+
'https://raster.shields.io'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.shield_svg_base_url
|
31
35
|
'https://img.shields.io'
|
32
36
|
end
|
33
37
|
|
data/lib/badge/runner.rb
CHANGED
@@ -109,10 +109,15 @@ module Badge
|
|
109
109
|
|
110
110
|
if @@rsvg_enabled
|
111
111
|
new_path = "#{shield.path}.png"
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
begin
|
113
|
+
if shield_no_resize
|
114
|
+
`rsvg-convert #{shield.path} -z #{shield_scale} -o #{new_path}`
|
115
|
+
else
|
116
|
+
`rsvg-convert #{shield.path} -w #{(icon.width * shield_scale).to_i} -a -o #{new_path}`
|
117
|
+
end
|
118
|
+
rescue Exception => error
|
119
|
+
UI.error "Other error occured. Use --verbose for more info".red
|
120
|
+
UI.verbose error if FastlaneCore::Globals.verbose?
|
116
121
|
end
|
117
122
|
new_shield = MiniMagick::Image.open(new_path)
|
118
123
|
else
|
@@ -128,7 +133,7 @@ module Badge
|
|
128
133
|
end
|
129
134
|
|
130
135
|
def load_shield(shield_string, shield_parameters)
|
131
|
-
url = Badge.shield_base_url + Badge.shield_path + shield_string + (@@rsvg_enabled ? ".svg" : ".png")
|
136
|
+
url = (@@rsvg_enabled ? Badge.shield_svg_base_url : Badge.shield_base_url) + Badge.shield_path + shield_string + (@@rsvg_enabled ? ".svg" : ".png")
|
132
137
|
if shield_parameters
|
133
138
|
url = url + "?" + shield_parameters
|
134
139
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: badge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.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:
|
11
|
+
date: 2019-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -56,17 +56,17 @@ dependencies:
|
|
56
56
|
name: mini_magick
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 4.9.5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
description: 0.
|
68
|
+
version: 4.9.5
|
69
|
+
description: 0.11.0
|
70
70
|
email:
|
71
71
|
- daniel.griesser.86@gmail.com
|
72
72
|
executables:
|