prawn-svg 0.12.0.8 → 0.12.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prawn/svg/parser/path.rb +2 -2
- data/lib/prawn/svg/version.rb +1 -1
- data/spec/lib/path_spec.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 794edc93815eb1be1232a47f423a2674e3954ef2
|
4
|
+
data.tar.gz: 32b09e40134dfe543a9a4ca1fcf8f4d23264d307
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b96820f0566d903c2fa4234ab8a400c022fa34f77685912c17deb864bab7236918d57acf4bc8b03caca304e07b973e5c6eff07d84f5fdcfe38397419122d3fbe
|
7
|
+
data.tar.gz: 4e013c2b63dbe5472117c820f342668e79e38bcbeb5551088ffebe23293aeecd87207a722822ae906ab05e752eacedbd2bc4f6a9c444143366391f298a7069cb
|
@@ -15,13 +15,13 @@ module Prawn
|
|
15
15
|
@calls = []
|
16
16
|
|
17
17
|
data.each_char do |c|
|
18
|
-
if c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'
|
18
|
+
if c >= 'A' && c <= 'Z' || (c >= 'a' && c <= 'z' && c != 'e')
|
19
19
|
values << value.to_f if value != ""
|
20
20
|
run_path_command(cmd, values) if cmd
|
21
21
|
cmd = c
|
22
22
|
values = []
|
23
23
|
value = ""
|
24
|
-
elsif c >= '0' && c <= '9' || c == '.' ||
|
24
|
+
elsif c >= '0' && c <= '9' || c == '.' || c == "-" || c == "e" # handle scientific notation, e.g. 10e-4
|
25
25
|
unless cmd
|
26
26
|
raise InvalidError, "Numerical value specified before character command in SVG path data"
|
27
27
|
end
|
data/lib/prawn/svg/version.rb
CHANGED
data/spec/lib/path_spec.rb
CHANGED
@@ -9,11 +9,12 @@ describe Prawn::Svg::Parser::Path do
|
|
9
9
|
it "correctly parses a valid path" do
|
10
10
|
calls = []
|
11
11
|
@path.stub!(:run_path_command) {|*args| calls << args}
|
12
|
-
@path.parse("A12.34 -56.78 89B4 5
|
12
|
+
@path.parse("A12.34 -56.78 89B4 5 c31,-2e-5C 6,7 T QX 0 Z")
|
13
13
|
|
14
14
|
calls.should == [
|
15
15
|
["A", [12.34, -56.78, 89]],
|
16
16
|
["B", [4, 5]],
|
17
|
+
["c", [31, -2e-5]],
|
17
18
|
["C", [6, 7]],
|
18
19
|
["T", []],
|
19
20
|
["Q", []],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-svg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.0.
|
4
|
+
version: 0.12.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.0.
|
141
|
+
rubygems_version: 2.0.3
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: SVG renderer for Prawn PDF library
|