phantom_svg 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phantom/parser/phantom_xmldecl.rb +4 -3
- data/lib/phantom/parser/svg_writer.rb +33 -1
- data/lib/phantom/svg.rb +0 -8
- data/phantom_svg.gemspec +1 -1
- data/spec/images/gradation_test/0.svg +1155 -0
- data/spec/images/gradation_test/1.svg +1155 -0
- data/spec/images/gradation_test/2.svg +1161 -0
- data/spec/images/gradation_test/3.svg +1168 -0
- data/spec/images/gradation_test/4.svg +1168 -0
- data/spec/images/gradation_test/5.svg +1162 -0
- data/spec/images/gradation_test/6.svg +1162 -0
- data/spec/images/gradation_test/7.svg +920 -0
- data/spec/images/gradation_test/animation.json +16 -0
- data/spec/phantom/svg_spec.rb +19 -1
- metadata +21 -3
data/spec/phantom/svg_spec.rb
CHANGED
@@ -463,6 +463,7 @@ describe Phantom::SVG::Base do
|
|
463
463
|
expect(@loader.width).to eq('64px')
|
464
464
|
expect(@loader.height).to eq('64px')
|
465
465
|
expect(@loader.loops).to eq(0)
|
466
|
+
expect(@loader.skip_first).to eq(true)
|
466
467
|
end
|
467
468
|
|
468
469
|
it 'loads an animation spec from a JSON.' do
|
@@ -561,8 +562,25 @@ describe Phantom::SVG::Base do
|
|
561
562
|
expect(write_size).not_to eq(0)
|
562
563
|
write_size = @loader.save_apng("#{@destination_dir}/#{test_name}.png")
|
563
564
|
expect(write_size).not_to eq(0)
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
568
|
+
describe 'output test' do
|
569
|
+
before(:all) do
|
570
|
+
@source_dir = SPEC_SOURCE_DIR
|
571
|
+
@destination_dir = SPEC_TEMP_DIR
|
572
|
+
end
|
564
573
|
|
565
|
-
|
574
|
+
before do
|
575
|
+
@loader = Phantom::SVG::Base.new
|
576
|
+
end
|
577
|
+
|
578
|
+
it 'output animation svg has gradation.' do
|
579
|
+
test_name = 'gradation_test'
|
580
|
+
source = "#{@source_dir}/#{test_name}/animation.json"
|
581
|
+
destination = "#{@destination_dir}/#{test_name}.svg"
|
582
|
+
@loader.add_frame_from_file(source)
|
583
|
+
@loader.save_svg(destination)
|
566
584
|
end
|
567
585
|
end
|
568
586
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantom_svg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rika Yoshida
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cairo
|
@@ -102,6 +102,15 @@ files:
|
|
102
102
|
- spec/images/apngasm.gif
|
103
103
|
- spec/images/apngasm.png
|
104
104
|
- spec/images/compiled.svg
|
105
|
+
- spec/images/gradation_test/0.svg
|
106
|
+
- spec/images/gradation_test/1.svg
|
107
|
+
- spec/images/gradation_test/2.svg
|
108
|
+
- spec/images/gradation_test/3.svg
|
109
|
+
- spec/images/gradation_test/4.svg
|
110
|
+
- spec/images/gradation_test/5.svg
|
111
|
+
- spec/images/gradation_test/6.svg
|
112
|
+
- spec/images/gradation_test/7.svg
|
113
|
+
- spec/images/gradation_test/animation.json
|
105
114
|
- spec/images/jpeg_test/1.jpg
|
106
115
|
- spec/images/jpeg_test/10.jpg
|
107
116
|
- spec/images/jpeg_test/11.jpg
|
@@ -182,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
191
|
requirements:
|
183
192
|
- libapngasm
|
184
193
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.2
|
186
195
|
signing_key:
|
187
196
|
specification_version: 4
|
188
197
|
summary: Hight end SVG manipulation tools for Ruby
|
@@ -190,6 +199,15 @@ test_files:
|
|
190
199
|
- spec/images/apngasm.gif
|
191
200
|
- spec/images/apngasm.png
|
192
201
|
- spec/images/compiled.svg
|
202
|
+
- spec/images/gradation_test/0.svg
|
203
|
+
- spec/images/gradation_test/1.svg
|
204
|
+
- spec/images/gradation_test/2.svg
|
205
|
+
- spec/images/gradation_test/3.svg
|
206
|
+
- spec/images/gradation_test/4.svg
|
207
|
+
- spec/images/gradation_test/5.svg
|
208
|
+
- spec/images/gradation_test/6.svg
|
209
|
+
- spec/images/gradation_test/7.svg
|
210
|
+
- spec/images/gradation_test/animation.json
|
193
211
|
- spec/images/jpeg_test/1.jpg
|
194
212
|
- spec/images/jpeg_test/10.jpg
|
195
213
|
- spec/images/jpeg_test/11.jpg
|