emojidex-converter 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: a5cd2c03d99c8b2235189043092449c21b4b4dff
4
- data.tar.gz: 865f7aa27189251852a78413db26baf296d12d00
3
+ metadata.gz: 2eb89b10bfb751cdd91acdabe61860bea5360fc6
4
+ data.tar.gz: '039d1aff77537d2f256c14f6f21286d4fc6ebb63'
5
5
  SHA512:
6
- metadata.gz: 30fbcec13207ceade07e5660f140d1cd037f93e71fbd707e12ae90e975e1312432550788d74e632aa2559699845fdc215092ccad0540954b063167013c6e04a9
7
- data.tar.gz: ff0fdf6cc68e1fb237440de05bc40e87611939a298e5cf9ff11a8007f43c391911b7c3da2e99b005e9b8e94dd177b4dfbca6d697cfe9ea2c630871e391465eaa
6
+ metadata.gz: db17f849929fdecb97bcc0975221420ec4b647b9cb832d8e746233a291f39a0700693d84cc672017b12e85f2711f06e0e0863284ab136aefac9cd27d43d1cb2d
7
+ data.tar.gz: 5061c5a52a8c7475ee177bda52e3afa2345ed91fed00103b63eed889a631fd4876d8630ab983a1690032a4499711b452f419d555c6d7104f34fb353525958a50
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'emojidex-converter'
3
- s.version = '0.4.0'
3
+ s.version = '0.4.1'
4
4
  s.license = 'emojiOL'
5
5
  s.summary = 'Image conversion modules for emojidex'
6
6
  s.description = 'Adds the convert method to Emojidex::Collection and Emojidex::Emoji, which\
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
12
12
  ['emojidex-converter.gemspec']
13
13
  s.homepage = 'https://github.com/emojidex/emojidex-converter'
14
14
 
15
- s.add_dependency 'rsvg2'
16
- s.add_dependency 'rmagick'
15
+ s.add_dependency 'rsvg2', '~> 3.1', '~> 3.1.6'
16
+ s.add_dependency 'rmagick', '~> 2.16'
17
17
  s.add_dependency 'ruby-filemagic'
18
- s.add_dependency 'rapngasm'
19
- s.add_dependency 'nokogiri'
20
- s.add_dependency 'cairo'
21
- s.add_dependency 'emojidex', '~> 0.5', '~> 0.5.0'
22
- s.add_dependency 'phantom_svg'
18
+ s.add_dependency 'rapngasm', '~> 3.2', '~> 3.2.0'
19
+ s.add_dependency 'nokogiri', '~> 1.8', '~> 1.8.0'
20
+ s.add_dependency 'cairo', '~> 1.15', '~> 1.15.9'
21
+ s.add_dependency 'emojidex', '~> 0.5', '~> 0.5.1'
22
+ s.add_dependency 'phantom_svg', '~> 1.2', '~> 1.2.7'
23
23
  end
@@ -16,6 +16,7 @@ module Emojidex
16
16
  @noisy = override[:noisy] || false
17
17
  @max_threads = override[:max_threads] || @sizes.length
18
18
  @skip_components = override[:skip_components] || false
19
+ @retry_count = override[:retry_count] || 8
19
20
  puts "Converting to #{@sizes.length} sizes with #{@max_threads}, outputting to #{@destination}." if @noisy
20
21
  end
21
22
 
@@ -35,7 +36,7 @@ module Emojidex
35
36
  print "\r[#{@processed_count} / #{full_total}](" +
36
37
  "#{((@processed_count.to_f / (full_total).to_f) * 100.0).to_i}%)" +
37
38
  " ⚙ \"#{@emoji_in_processing.first}\"... TC:{#{@emoji_in_processing.length}}" +
38
- "⌚ #{(Time.now - start_time).to_i}s\033[K"
39
+ "⌚ #{(Time.now - start_time).to_i}秒\033[K"
39
40
  sleep 3
40
41
  end
41
42
  end
@@ -104,7 +105,20 @@ module Emojidex
104
105
  phantom_svg.width = phantom_svg.height = size.to_i
105
106
  # Render PNGs
106
107
  #puts "Converting: #{out_dir}/#{moji.code}.png" if @noisy
107
- phantom_svg.save_apng("#{out_dir}/#{moji.code}.png")
108
+
109
+ retry_counter = 0
110
+ begin
111
+ phantom_svg.save_apng("#{out_dir}/#{moji.code}.png")
112
+ rescue Rsvg::Error::Failed
113
+ puts "\nAn error occurred when converting #{moji.code} @ #{size_code}"
114
+ retry_counter += 1
115
+ if retry_counter <= @retry_count
116
+ puts "Retry ##{retry_counter}"
117
+ retry
118
+ else
119
+ puts "FATAL! Could not convert #{moji.code} in #{size_code}! Please check the source SVG"
120
+ end
121
+ end
108
122
  phantom_svg.reset
109
123
  phantom_svg = nil
110
124
  moji.paths[:png][size_code] = "#{out_dir}/#{moji.code}.png"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emojidex-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
@@ -9,36 +9,42 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-09 00:00:00.000000000 Z
12
+ date: 2017-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rsvg2
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: '3.1'
21
+ - - "~>"
22
+ - !ruby/object:Gem::Version
23
+ version: 3.1.6
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - ">="
28
+ - - "~>"
26
29
  - !ruby/object:Gem::Version
27
- version: '0'
30
+ version: '3.1'
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.6
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: rmagick
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
- - - ">="
38
+ - - "~>"
33
39
  - !ruby/object:Gem::Version
34
- version: '0'
40
+ version: '2.16'
35
41
  type: :runtime
36
42
  prerelease: false
37
43
  version_requirements: !ruby/object:Gem::Requirement
38
44
  requirements:
39
- - - ">="
45
+ - - "~>"
40
46
  - !ruby/object:Gem::Version
41
- version: '0'
47
+ version: '2.16'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: ruby-filemagic
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -57,44 +63,62 @@ dependencies:
57
63
  name: rapngasm
58
64
  requirement: !ruby/object:Gem::Requirement
59
65
  requirements:
60
- - - ">="
66
+ - - "~>"
61
67
  - !ruby/object:Gem::Version
62
- version: '0'
68
+ version: '3.2'
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: 3.2.0
63
72
  type: :runtime
64
73
  prerelease: false
65
74
  version_requirements: !ruby/object:Gem::Requirement
66
75
  requirements:
67
- - - ">="
76
+ - - "~>"
68
77
  - !ruby/object:Gem::Version
69
- version: '0'
78
+ version: '3.2'
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 3.2.0
70
82
  - !ruby/object:Gem::Dependency
71
83
  name: nokogiri
72
84
  requirement: !ruby/object:Gem::Requirement
73
85
  requirements:
74
- - - ">="
86
+ - - "~>"
75
87
  - !ruby/object:Gem::Version
76
- version: '0'
88
+ version: '1.8'
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: 1.8.0
77
92
  type: :runtime
78
93
  prerelease: false
79
94
  version_requirements: !ruby/object:Gem::Requirement
80
95
  requirements:
81
- - - ">="
96
+ - - "~>"
82
97
  - !ruby/object:Gem::Version
83
- version: '0'
98
+ version: '1.8'
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: 1.8.0
84
102
  - !ruby/object:Gem::Dependency
85
103
  name: cairo
86
104
  requirement: !ruby/object:Gem::Requirement
87
105
  requirements:
88
- - - ">="
106
+ - - "~>"
89
107
  - !ruby/object:Gem::Version
90
- version: '0'
108
+ version: '1.15'
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 1.15.9
91
112
  type: :runtime
92
113
  prerelease: false
93
114
  version_requirements: !ruby/object:Gem::Requirement
94
115
  requirements:
95
- - - ">="
116
+ - - "~>"
96
117
  - !ruby/object:Gem::Version
97
- version: '0'
118
+ version: '1.15'
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: 1.15.9
98
122
  - !ruby/object:Gem::Dependency
99
123
  name: emojidex
100
124
  requirement: !ruby/object:Gem::Requirement
@@ -104,7 +128,7 @@ dependencies:
104
128
  version: '0.5'
105
129
  - - "~>"
106
130
  - !ruby/object:Gem::Version
107
- version: 0.5.0
131
+ version: 0.5.1
108
132
  type: :runtime
109
133
  prerelease: false
110
134
  version_requirements: !ruby/object:Gem::Requirement
@@ -114,21 +138,27 @@ dependencies:
114
138
  version: '0.5'
115
139
  - - "~>"
116
140
  - !ruby/object:Gem::Version
117
- version: 0.5.0
141
+ version: 0.5.1
118
142
  - !ruby/object:Gem::Dependency
119
143
  name: phantom_svg
120
144
  requirement: !ruby/object:Gem::Requirement
121
145
  requirements:
122
- - - ">="
146
+ - - "~>"
123
147
  - !ruby/object:Gem::Version
124
- version: '0'
148
+ version: '1.2'
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: 1.2.7
125
152
  type: :runtime
126
153
  prerelease: false
127
154
  version_requirements: !ruby/object:Gem::Requirement
128
155
  requirements:
129
- - - ">="
156
+ - - "~>"
130
157
  - !ruby/object:Gem::Version
131
- version: '0'
158
+ version: '1.2'
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: 1.2.7
132
162
  description: |-
133
163
  Adds the convert method to Emojidex::Collection and Emojidex::Emoji, which\
134
164
  allows you to convert an emoji collection or a single emoji to the specified\