svg_pathify 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +77 -0
- data/lib/svg_pathify/shapes/ellipse.rb +1 -1
- data/svg_pathify.gemspec +17 -0
- data/test/svg_pathify_test.rb +2 -2
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e3cb70a8e349231fc0d6d5202a52cd89e4f29a
|
4
|
+
data.tar.gz: eb9755bad40b886d8a1678ef3fd80dfdb3bf5df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60404404036fcc415025b40fd3feb119e9882a9db65415c5830ab4a662924b05ede845c2eb24aa44982561bc4ee42612cdc3bed4846b85a05910e2466aa6ea08
|
7
|
+
data.tar.gz: 07ee87f10e8c84aa0c39c05fa95e496dc3e2c6d9979d1aa3513cae7aa9b48c7c2ba951c04bc7afdd57c6aed22ed9dd4ca1090341ed82721f9e32ab093c7e3387
|
data/README.md
CHANGED
data/Rakefile
ADDED
@@ -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
|
data/svg_pathify.gemspec
ADDED
@@ -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
|
data/test/svg_pathify_test.rb
CHANGED
@@ -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
|
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
|
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.
|
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:
|
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/
|
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/
|
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.
|
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.
|