phantom_svg 1.1.2 → 1.1.3

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.
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "DSLR",
3
+ "loops": 0,
4
+ "skip_first": false,
5
+ "default_delay": "100/1000",
6
+ "frames": [
7
+ {"0": 100},
8
+ {"1": 100},
9
+ {"2": 100},
10
+ {"3": 100},
11
+ {"4": 100},
12
+ {"5": 100},
13
+ {"6": 100},
14
+ {"7": 1000}
15
+ ]
16
+ }
@@ -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
- @loader.run_gc
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.2
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-10-29 00:00:00.000000000 Z
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.2.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