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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12bdcc77d39e8bae88b62e6189001a9bf2866018
4
- data.tar.gz: 0122b7fd57d24d4b96e02d260e6b4798710dffbc
3
+ metadata.gz: 794edc93815eb1be1232a47f423a2674e3954ef2
4
+ data.tar.gz: 32b09e40134dfe543a9a4ca1fcf8f4d23264d307
5
5
  SHA512:
6
- metadata.gz: 724bce8dc386296b958884367576a82e689f7cacaa875d513a105081031be5e59ce6f77cbfee0649b1bc24cffe9c3bc6d4c4f732e8a3f74abd7a06c0ad6f69f8
7
- data.tar.gz: 6444246d4244458412f8b631ef4b24831ef38bd538d12bf5987540ab94f474420146ff048cb517c63629b5de39e2a3f9aac389d6d5f50e3f6b2ece207d85639b
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 == '.' || (c == "-" && value == "")
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
@@ -1,5 +1,5 @@
1
1
  module Prawn
2
2
  module Svg
3
- VERSION = '0.12.0.8'
3
+ VERSION = '0.12.0.9'
4
4
  end
5
5
  end
@@ -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 C 6,7 T QX 0 Z")
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.8
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-10-02 00:00:00.000000000 Z
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.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