emojidex-converter 0.0.8 → 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 +4 -4
- data/Gemfile +2 -0
- data/emojidex-converter.gemspec +1 -1
- data/lib/emojidex/converter.rb +2 -2
- data/spec/converter_spec.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7a3a0894690c59ebf738947e4f25888abef2ce6
|
|
4
|
+
data.tar.gz: 93192fee11dd9a9fe10715d54006a60296b2ea34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e86107ca256223921042d666fa202f2d84c334f160f0e756f4af8d207087d221bcd021836472b7eb911349c963d26109f48c9e5737cbee71c425e030289c41b
|
|
7
|
+
data.tar.gz: db624f665cc8882411074c892d374b9671682aadfae02176388e5bf4690a5175e80ee37c5f568449cd768a7c7de94589b8bb06ac05e108c9ca006a87d33ac915
|
data/Gemfile
CHANGED
data/emojidex-converter.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'emojidex-converter'
|
|
3
|
-
s.version = '0.0
|
|
3
|
+
s.version = '0.2.0'
|
|
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\
|
data/lib/emojidex/converter.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Emojidex
|
|
|
8
8
|
attr_accessor :sizes, :destination, :last_run_time
|
|
9
9
|
|
|
10
10
|
def initialize(override = {})
|
|
11
|
-
@sizes = override[:sizes] || Emojidex::Defaults.sizes
|
|
11
|
+
@sizes = override[:sizes] || Emojidex::Data::Defaults.sizes
|
|
12
12
|
@destination = File.expand_path(override[:destination] || ENV['EMOJI_CACHE'] || './')
|
|
13
13
|
@noisy = override[:noisy] || false
|
|
14
14
|
end
|
|
@@ -32,7 +32,7 @@ module Emojidex
|
|
|
32
32
|
phantom_svg = nil
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
|
-
render_threads.each {|th| th.join }
|
|
35
|
+
render_threads.each { |th| th.join }
|
|
36
36
|
GC.start
|
|
37
37
|
end
|
|
38
38
|
|
data/spec/converter_spec.rb
CHANGED
|
@@ -16,7 +16,7 @@ describe Emojidex::Converter do
|
|
|
16
16
|
describe '.sizes' do
|
|
17
17
|
it 'is a hash of size codes and sizes in px' do
|
|
18
18
|
expect(converter.sizes).to be_an_instance_of(Hash)
|
|
19
|
-
expect(converter.sizes.size).to eq(Emojidex::Defaults.sizes.size)
|
|
19
|
+
expect(converter.sizes.size).to eq(Emojidex::Data::Defaults.sizes.size)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it 'overrides sizes when passed in initialization' do
|
|
@@ -37,7 +37,8 @@ describe Emojidex::Converter do
|
|
|
37
37
|
it 'converts base SVG from the source directory to PNG in the destination directory' do
|
|
38
38
|
setup_working_collection
|
|
39
39
|
converter.preprocess("#{@support_dir}/tmp/collection")
|
|
40
|
-
converter.rasterize([Emojidex::Emoji.new(code: 'kiss')],
|
|
40
|
+
converter.rasterize([Emojidex::Data::Emoji.new(code: 'kiss')],
|
|
41
|
+
"#{@support_dir}/tmp/collection")
|
|
41
42
|
|
|
42
43
|
expect(File.exist?("#{@destination}/ldpi/kiss.png")).to be_truthy
|
|
43
44
|
expect(File.exist?("#{@destination}/mdpi/kiss.png")).to be_truthy
|
|
@@ -56,7 +57,7 @@ describe Emojidex::Converter do
|
|
|
56
57
|
it 'converts an emojidex collection' do
|
|
57
58
|
setup_working_collection
|
|
58
59
|
converter.preprocess("#{@support_dir}/tmp/collection")
|
|
59
|
-
collection = Emojidex::Collection.new
|
|
60
|
+
collection = Emojidex::Data::Collection.new
|
|
60
61
|
collection.load_local_collection("#{@support_dir}/tmp/collection")
|
|
61
62
|
converter.rasterize_collection(collection)
|
|
62
63
|
|
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.0
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rei Kagetsuki
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-03
|
|
12
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rsvg2
|
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
200
200
|
version: '0'
|
|
201
201
|
requirements: []
|
|
202
202
|
rubyforge_project:
|
|
203
|
-
rubygems_version: 2.4.
|
|
203
|
+
rubygems_version: 2.4.8
|
|
204
204
|
signing_key:
|
|
205
205
|
specification_version: 4
|
|
206
206
|
summary: Image conversion modules for emojidex
|