svg_pathify 0.1.2 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a1d571f84ba0e717943ec4e0a197653300b3919
4
- data.tar.gz: 4c67c76ee4d84bbbde29fa711279be827cd3a218
3
+ metadata.gz: d8e3cb70a8e349231fc0d6d5202a52cd89e4f29a
4
+ data.tar.gz: eb9755bad40b886d8a1678ef3fd80dfdb3bf5df6
5
5
  SHA512:
6
- metadata.gz: f37738bdeca9ed81f1d3437a58b0e2de69c7434592cf371c5fb95199509060ec545f77d86e14eb6610e5a5fb4efc95dafa1215c4dc0cb36d1da0980bd5d6639a
7
- data.tar.gz: da4fe3492c6dd3e43d0c5e88d342ddb2f32de638da0b197f99a27bcb58225d05c2a982fc808b25785ed5978755b733e42a5e9a63a096b9cecadd868ecad2e3d4
6
+ metadata.gz: 60404404036fcc415025b40fd3feb119e9882a9db65415c5830ab4a662924b05ede845c2eb24aa44982561bc4ee42612cdc3bed4846b85a05910e2466aa6ea08
7
+ data.tar.gz: 07ee87f10e8c84aa0c39c05fa95e496dc3e2c6d9979d1aa3513cae7aa9b48c7c2ba951c04bc7afdd57c6aed22ed9dd4ca1090341ed82721f9e32ab093c7e3387
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- **svg_pathify** turns svg [basic shapes](http://www.w3.org/TR/SVG/shapes.html) into path svg elements.
1
+ **svg_pathify** turns svg [basic shapes](http://www.w3.org/TR/SVG/shapes.html) into `<path>` svg elements.
2
2
 
3
3
  ## install
4
4
 
@@ -0,0 +1,77 @@
1
+ require "rubygems"
2
+ require "rubygems/package_task"
3
+ require "rdoc/task"
4
+
5
+ task :default => :package do
6
+ puts "Don't forget to write some tests!"
7
+ end
8
+
9
+ # This builds the actual gem. For details of what all these options
10
+ # mean, and other ones you can add, check the documentation here:
11
+ #
12
+ # http://rubygems.org/read/chapter/20
13
+ #
14
+ spec = Gem::Specification.new do |s|
15
+
16
+ # Change these as appropriate
17
+ s.name = "svg_pathify"
18
+ s.version = "0.1.3"
19
+ s.summary = "turn svg shape tags into <path> tag."
20
+ s.author = "qhwa"
21
+ s.email = "qhwa@163.com"
22
+ s.homepage = "https://github.com/qhwa/svg_pathify"
23
+
24
+ s.has_rdoc = false
25
+ # You should probably have a README of some kind. Change the filename
26
+ # as appropriate
27
+ # s.extra_rdoc_files = %w(README)
28
+ # s.rdoc_options = %w(--main README)
29
+
30
+ # Add any extra files to include in the gem (like your README)
31
+ s.files = %w(README.md Rakefile svg_pathify.gemspec) + Dir.glob("{lib,test}/**/*")
32
+ s.require_paths = ["lib"]
33
+ s.license = "MIT"
34
+
35
+ # If you want to depend on other gems, add them here, along with any
36
+ # relevant versions
37
+ # s.add_dependency("some_other_gem", "~> 0.1.0")
38
+
39
+ # If your tests use any gems, include them here
40
+ # s.add_development_dependency("mocha") # for example
41
+ end
42
+
43
+ # This task actually builds the gem. We also regenerate a static
44
+ # .gemspec file, which is useful if something (i.e. GitHub) will
45
+ # be automatically building a gem for this project. If you're not
46
+ # using GitHub, edit as appropriate.
47
+ #
48
+ # To publish your gem online, install the 'gemcutter' gem; Read more
49
+ # about that here: http://gemcutter.org/pages/gem_docs
50
+ Gem::PackageTask.new(spec) do |pkg|
51
+ pkg.gem_spec = spec
52
+ end
53
+
54
+ desc "Build the gemspec file #{spec.name}.gemspec"
55
+ task :gemspec do
56
+ file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
57
+ File.open(file, "w") {|f| f << spec.to_ruby }
58
+ end
59
+
60
+ # If you don't want to generate the .gemspec file, just remove this line. Reasons
61
+ # why you might want to generate a gemspec:
62
+ # - using bundler with a git source
63
+ # - building the gem without rake (i.e. gem build blah.gemspec)
64
+ # - maybe others?
65
+ task :package => :gemspec
66
+
67
+ # Generate documentation
68
+ RDoc::Task.new do |rd|
69
+
70
+ rd.rdoc_files.include("lib/**/*.rb")
71
+ rd.rdoc_dir = "rdoc"
72
+ end
73
+
74
+ desc 'Clear out RDoc and generated packages'
75
+ task :clean => [:clobber_rdoc, :clobber_package] do
76
+ rm "#{spec.name}.gemspec"
77
+ end
@@ -9,7 +9,7 @@ module SvgPathify
9
9
  def path_commands
10
10
  [
11
11
  "M#{cx-rx} #{cy}",
12
- "a#{rx},#{ry},0,1,1,#{cx-rx},#{cy+1}",
12
+ "A#{rx},#{ry},0,1,1,#{cx-rx},#{cy+1}",
13
13
  "Z"
14
14
  ].join
15
15
  end
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "svg_pathify"
5
+ s.version = "0.1.3"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["qhwa"]
9
+ s.date = "2013-11-12"
10
+ s.email = "qhwa@163.com"
11
+ s.files = ["README.md", "Rakefile", "svg_pathify.gemspec", "lib/svg_pathify.rb", "lib/svg_pathify", "lib/svg_pathify/to_short_f.rb", "lib/svg_pathify/shapes", "lib/svg_pathify/shapes/rect.rb", "lib/svg_pathify/shapes/polygon.rb", "lib/svg_pathify/shapes/line.rb", "lib/svg_pathify/shapes/circle.rb", "lib/svg_pathify/shapes/ellipse.rb", "lib/svg_pathify/shape.rb", "test/svg_pathify_test.rb"]
12
+ s.homepage = "https://github.com/qhwa/svg_pathify"
13
+ s.licenses = ["MIT"]
14
+ s.require_paths = ["lib"]
15
+ s.rubygems_version = "2.0.3"
16
+ s.summary = "turn svg shape tags into <path> tag."
17
+ end
@@ -54,7 +54,7 @@ class SvgPathifyTest < Test::Unit::TestCase
54
54
  input = %Q{<ellipse
55
55
  rx="250" ry="100"
56
56
  fill="none" stroke="blue" stroke-width="20" />}
57
- output = %Q{<path d="M-250 0a250,100,0,1,1,-250,1Z"
57
+ output = %Q{<path d="M-250 0A250,100,0,1,1,-250,1Z"
58
58
  stroke-width="20"
59
59
  fill="none"
60
60
  stroke="blue" />}
@@ -66,7 +66,7 @@ class SvgPathifyTest < Test::Unit::TestCase
66
66
  input = %Q{<g><ellipse
67
67
  rx="250" ry="100"
68
68
  fill="none" stroke="blue" stroke-width="20" /></g>}
69
- output = %Q{<g><path d="M-250 0a250,100,0,1,1,-250,1Z"
69
+ output = %Q{<g><path d="M-250 0A250,100,0,1,1,-250,1Z"
70
70
  stroke-width="20"
71
71
  fill="none"
72
72
  stroke="blue" /></g>}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_pathify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - qhwa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: qhwa@163.com
@@ -17,14 +17,16 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - README.md
20
+ - Rakefile
20
21
  - lib/svg_pathify.rb
21
- - lib/svg_pathify/to_short_f.rb
22
- - lib/svg_pathify/shapes/rect.rb
23
- - lib/svg_pathify/shapes/polygon.rb
24
- - lib/svg_pathify/shapes/line.rb
22
+ - lib/svg_pathify/shape.rb
25
23
  - lib/svg_pathify/shapes/circle.rb
26
24
  - lib/svg_pathify/shapes/ellipse.rb
27
- - lib/svg_pathify/shape.rb
25
+ - lib/svg_pathify/shapes/line.rb
26
+ - lib/svg_pathify/shapes/polygon.rb
27
+ - lib/svg_pathify/shapes/rect.rb
28
+ - lib/svg_pathify/to_short_f.rb
29
+ - svg_pathify.gemspec
28
30
  - test/svg_pathify_test.rb
29
31
  homepage: https://github.com/qhwa/svg_pathify
30
32
  licenses:
@@ -36,17 +38,17 @@ require_paths:
36
38
  - lib
37
39
  required_ruby_version: !ruby/object:Gem::Requirement
38
40
  requirements:
39
- - - '>='
41
+ - - ">="
40
42
  - !ruby/object:Gem::Version
41
43
  version: '0'
42
44
  required_rubygems_version: !ruby/object:Gem::Requirement
43
45
  requirements:
44
- - - '>='
46
+ - - ">="
45
47
  - !ruby/object:Gem::Version
46
48
  version: '0'
47
49
  requirements: []
48
50
  rubyforge_project:
49
- rubygems_version: 2.0.3
51
+ rubygems_version: 2.2.2
50
52
  signing_key:
51
53
  specification_version: 4
52
54
  summary: turn svg shape tags into <path> tag.