phantom_svg 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +42 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +11 -0
  5. data/.travis.yml +9 -0
  6. data/Gemfile +16 -0
  7. data/Guardfile +12 -0
  8. data/LICENSE +165 -0
  9. data/README.md +6 -0
  10. data/lib/phantom/frame.rb +71 -0
  11. data/lib/phantom/parser/abstract_animation_reader.rb +117 -0
  12. data/lib/phantom/parser/json_animation_reader.rb +42 -0
  13. data/lib/phantom/parser/raster.rb +115 -0
  14. data/lib/phantom/parser/svg_reader.rb +131 -0
  15. data/lib/phantom/parser/svg_writer.rb +163 -0
  16. data/lib/phantom/parser/xml_animation_reader.rb +32 -0
  17. data/lib/phantom/svg.rb +139 -0
  18. data/lib/phantom_svg.rb +1 -0
  19. data/phantom_svg.gemspec +25 -0
  20. data/spec/images/apngasm.png +0 -0
  21. data/spec/images/ninja.svg +63 -0
  22. data/spec/images/stuck_out_tongue/0.svg +103 -0
  23. data/spec/images/stuck_out_tongue/1.svg +103 -0
  24. data/spec/images/stuck_out_tongue/10.svg +103 -0
  25. data/spec/images/stuck_out_tongue/11.svg +103 -0
  26. data/spec/images/stuck_out_tongue/2.svg +103 -0
  27. data/spec/images/stuck_out_tongue/3.svg +103 -0
  28. data/spec/images/stuck_out_tongue/4.svg +103 -0
  29. data/spec/images/stuck_out_tongue/5.svg +103 -0
  30. data/spec/images/stuck_out_tongue/6.svg +103 -0
  31. data/spec/images/stuck_out_tongue/7.svg +103 -0
  32. data/spec/images/stuck_out_tongue/8.svg +103 -0
  33. data/spec/images/stuck_out_tongue/9.svg +103 -0
  34. data/spec/images/stuck_out_tongue/loops_test.json +9 -0
  35. data/spec/images/stuck_out_tongue/loops_test.xml +4 -0
  36. data/spec/images/stuck_out_tongue/skip_first_test.json +10 -0
  37. data/spec/images/stuck_out_tongue/skip_first_test.xml +5 -0
  38. data/spec/images/stuck_out_tongue/test1.json +20 -0
  39. data/spec/images/stuck_out_tongue/test1.xml +15 -0
  40. data/spec/images/stuck_out_tongue/test2.json +13 -0
  41. data/spec/images/stuck_out_tongue/test2.xml +4 -0
  42. data/spec/phantom/svg_spec.rb +421 -0
  43. data/spec/spec_helper.rb +81 -0
  44. metadata +170 -0
@@ -0,0 +1,81 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ SPEC_ROOT_DIR = File.dirname(__FILE__)
19
+ SPEC_SOURCE_DIR = SPEC_ROOT_DIR + '/images'
20
+ SPEC_TEMP_DIR = SPEC_ROOT_DIR + '/../tmp'
21
+ # The settings below are suggested to provide a good initial experience
22
+ # with RSpec, but feel free to customize to your heart's content.
23
+ =begin
24
+ # These two settings work together to allow you to limit a spec run
25
+ # to individual examples or groups you care about by tagging them with
26
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
27
+ # get run.
28
+ config.filter_run :focus
29
+ config.run_all_when_everything_filtered = true
30
+
31
+ # Many RSpec users commonly either run the entire suite or an individual
32
+ # file, and it's useful to allow more verbose output when running an
33
+ # individual spec file.
34
+ if config.files_to_run.one?
35
+ # Use the documentation formatter for detailed output,
36
+ # unless a formatter has already been configured
37
+ # (e.g. via a command-line flag).
38
+ config.default_formatter = 'doc'
39
+ end
40
+
41
+ # Print the 10 slowest examples and example groups at the
42
+ # end of the spec run, to help surface which specs are running
43
+ # particularly slow.
44
+ config.profile_examples = 10
45
+
46
+ # Run specs in random order to surface order dependencies. If you find an
47
+ # order dependency and want to debug it, you can fix the order by providing
48
+ # the seed, which is printed after each run.
49
+ # --seed 1234
50
+ config.order = :random
51
+
52
+ # Seed global randomization in this process using the `--seed` CLI option.
53
+ # Setting this allows you to use `--seed` to deterministically reproduce
54
+ # test failures related to randomization by passing the same `--seed` value
55
+ # as the one that triggered the failure.
56
+ Kernel.srand config.seed
57
+
58
+ # rspec-expectations config goes here. You can use an alternate
59
+ # assertion/expectation library such as wrong or the stdlib/minitest
60
+ # assertions if you prefer.
61
+ config.expect_with :rspec do |expectations|
62
+ # Enable only the newer, non-monkey-patching expect syntax.
63
+ # For more details, see:
64
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
65
+ expectations.syntax = :expect
66
+ end
67
+
68
+ # rspec-mocks config goes here. You can use an alternate test double
69
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
70
+ config.mock_with :rspec do |mocks|
71
+ # Enable only the newer, non-monkey-patching expect syntax.
72
+ # For more details, see:
73
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
74
+ mocks.syntax = :expect
75
+
76
+ # Prevents you from mocking or stubbing a method that does not exist on
77
+ # a real object. This is generally recommended.
78
+ mocks.verify_partial_doubles = true
79
+ end
80
+ =end
81
+ end
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phantom_svg
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Rika Yoshida
8
+ - Rei Kagetsuki
9
+ - Naoki Iwakawa
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-07-12 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: cairo
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.12'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.12'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rapngasm
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '3.1'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.1'
43
+ - !ruby/object:Gem::Dependency
44
+ name: gdk3
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.2'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.2'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rsvg2
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '2.2'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '2.2'
71
+ description: Hight end SVG manipulation tools for Ruby.\nIncludes chained keyframe
72
+ generation, (A)PNG conversion and more.
73
+ email: info@genshin.org
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - ".gitignore"
79
+ - ".rspec"
80
+ - ".rubocop.yml"
81
+ - ".travis.yml"
82
+ - Gemfile
83
+ - Guardfile
84
+ - LICENSE
85
+ - README.md
86
+ - lib/phantom/frame.rb
87
+ - lib/phantom/parser/abstract_animation_reader.rb
88
+ - lib/phantom/parser/json_animation_reader.rb
89
+ - lib/phantom/parser/raster.rb
90
+ - lib/phantom/parser/svg_reader.rb
91
+ - lib/phantom/parser/svg_writer.rb
92
+ - lib/phantom/parser/xml_animation_reader.rb
93
+ - lib/phantom/svg.rb
94
+ - lib/phantom_svg.rb
95
+ - phantom_svg.gemspec
96
+ - spec/images/apngasm.png
97
+ - spec/images/ninja.svg
98
+ - spec/images/stuck_out_tongue/0.svg
99
+ - spec/images/stuck_out_tongue/1.svg
100
+ - spec/images/stuck_out_tongue/10.svg
101
+ - spec/images/stuck_out_tongue/11.svg
102
+ - spec/images/stuck_out_tongue/2.svg
103
+ - spec/images/stuck_out_tongue/3.svg
104
+ - spec/images/stuck_out_tongue/4.svg
105
+ - spec/images/stuck_out_tongue/5.svg
106
+ - spec/images/stuck_out_tongue/6.svg
107
+ - spec/images/stuck_out_tongue/7.svg
108
+ - spec/images/stuck_out_tongue/8.svg
109
+ - spec/images/stuck_out_tongue/9.svg
110
+ - spec/images/stuck_out_tongue/loops_test.json
111
+ - spec/images/stuck_out_tongue/loops_test.xml
112
+ - spec/images/stuck_out_tongue/skip_first_test.json
113
+ - spec/images/stuck_out_tongue/skip_first_test.xml
114
+ - spec/images/stuck_out_tongue/test1.json
115
+ - spec/images/stuck_out_tongue/test1.xml
116
+ - spec/images/stuck_out_tongue/test2.json
117
+ - spec/images/stuck_out_tongue/test2.xml
118
+ - spec/phantom/svg_spec.rb
119
+ - spec/spec_helper.rb
120
+ homepage: http://github.com/Genshin/phantom_svg
121
+ licenses:
122
+ - LGPL-3.0
123
+ metadata: {}
124
+ post_install_message:
125
+ rdoc_options: []
126
+ require_paths:
127
+ - lib
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 2.0.0
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ requirements:
139
+ - libapngasm
140
+ rubyforge_project:
141
+ rubygems_version: 2.2.2
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: Hight end SVG manipulation tools for Ruby
145
+ test_files:
146
+ - spec/images/apngasm.png
147
+ - spec/images/ninja.svg
148
+ - spec/images/stuck_out_tongue/0.svg
149
+ - spec/images/stuck_out_tongue/1.svg
150
+ - spec/images/stuck_out_tongue/10.svg
151
+ - spec/images/stuck_out_tongue/11.svg
152
+ - spec/images/stuck_out_tongue/2.svg
153
+ - spec/images/stuck_out_tongue/3.svg
154
+ - spec/images/stuck_out_tongue/4.svg
155
+ - spec/images/stuck_out_tongue/5.svg
156
+ - spec/images/stuck_out_tongue/6.svg
157
+ - spec/images/stuck_out_tongue/7.svg
158
+ - spec/images/stuck_out_tongue/8.svg
159
+ - spec/images/stuck_out_tongue/9.svg
160
+ - spec/images/stuck_out_tongue/loops_test.json
161
+ - spec/images/stuck_out_tongue/loops_test.xml
162
+ - spec/images/stuck_out_tongue/skip_first_test.json
163
+ - spec/images/stuck_out_tongue/skip_first_test.xml
164
+ - spec/images/stuck_out_tongue/test1.json
165
+ - spec/images/stuck_out_tongue/test1.xml
166
+ - spec/images/stuck_out_tongue/test2.json
167
+ - spec/images/stuck_out_tongue/test2.xml
168
+ - spec/phantom/svg_spec.rb
169
+ - spec/spec_helper.rb
170
+ has_rdoc: