prawn-svg 0.12.0.12 → 0.15.0.0
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 +4 -4
- data/README.md +12 -16
- data/lib/prawn/svg/parser/image.rb +2 -0
- data/lib/prawn/svg/version.rb +1 -1
- data/prawn-svg.gemspec +1 -1
- data/spec/lib/parser_spec.rb +1 -4
- data/spec/lib/path_spec.rb +1 -1
- data/spec/prawn/svg/element_spec.rb +1 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61181b453d5e28bba30c87c430975b21e5e9876d
|
4
|
+
data.tar.gz: c1c1d6ec4e6bb4d60af290a836ed25574dbca760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 766a6cb2dc207b26e433509f1dbdce22055106c05806ff327f4203dc478d6ecfe99308502f2b1964c442d8ac2ecba1df5739593144ff2328e3c5e94aad74d440
|
7
|
+
data.tar.gz: 2281ec02f05246f40f4c68497d23f34da10b51ba16c60e76bd1e6d2467b0e1d80326ff76cc05aa244b794784be855f2996ceeeb6ce28465ffcecf66bee469b50
|
data/README.md
CHANGED
@@ -28,29 +28,25 @@ If this value is set to <tt>nil</tt>, prawn-svg will ignore a request for an unk
|
|
28
28
|
|
29
29
|
prawn-svg does not support the full SVG specification. It currently supports:
|
30
30
|
|
31
|
-
- <tt
|
31
|
+
- <tt><line></tt>, <tt><polyline></tt>, <tt><polygon></tt>, <tt><circle></tt> and <tt><ellipse></tt>
|
32
32
|
|
33
|
-
- <tt
|
33
|
+
- <tt><rect></tt>. Rounded rects are supported, but only one radius is applied to all corners.
|
34
34
|
|
35
|
-
- <tt
|
36
|
-
|
35
|
+
- <tt><path></tt> supports all commands defined in SVG 1.1, although the
|
36
|
+
implementation of elliptical arc is a bit rough at the moment.
|
37
37
|
|
38
|
-
- <tt>
|
39
|
-
|
40
|
-
does not support elliptical arc
|
38
|
+
- <tt><text></tt> and <tt><tspan></tt> with attributes
|
39
|
+
<tt>size</tt>, <tt>text-anchor</tt>, <tt>font-family</tt>, <tt>font-weight</tt>, <tt>dx</tt>, <tt>dy</tt>
|
41
40
|
|
42
|
-
- <tt
|
43
|
-
attributes: size, text-anchor, font-family, font-weight, dx, dy
|
41
|
+
- <tt><svg></tt>, <tt><g></tt> and <tt><symbol></tt>
|
44
42
|
|
45
|
-
- <tt
|
43
|
+
- <tt><use></tt>
|
46
44
|
|
47
|
-
- <tt
|
45
|
+
- <tt><style></tt>, if css_parser gem is installed on the system (see CSS section below)
|
48
46
|
|
49
|
-
- <tt
|
47
|
+
- <tt><image></tt> with <tt>http:</tt>, <tt>https:</tt> and <tt>data:image/*;base64</tt> schemes
|
50
48
|
|
51
|
-
- <tt
|
52
|
-
|
53
|
-
- <tt>clipPath</tt> tag
|
49
|
+
- <tt><clipPath></tt>
|
54
50
|
|
55
51
|
- attributes/styles: <tt>fill</tt>, <tt>stroke</tt>, <tt>stroke-width</tt>, <tt>opacity</tt>, <tt>fill-opacity</tt>, <tt>stroke-opacity</tt>, <tt>transform</tt>, <tt>clip-path</tt>
|
56
52
|
|
@@ -69,7 +65,7 @@ so do not expect too much of it.
|
|
69
65
|
|
70
66
|
## Not supported
|
71
67
|
|
72
|
-
prawn-svg does
|
68
|
+
prawn-svg does not support external references, measurements in <tt>en</tt> or <tt>em</tt>, sub-viewports, gradients/patterns or markers.
|
73
69
|
|
74
70
|
## Configuration
|
75
71
|
|
data/lib/prawn/svg/version.rb
CHANGED
data/prawn-svg.gemspec
CHANGED
data/spec/lib/parser_spec.rb
CHANGED
@@ -32,10 +32,7 @@ describe Prawn::Svg::Parser do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def mock_element(name, attributes = {})
|
35
|
-
e =
|
36
|
-
e.stub!(:name).and_return(name)
|
37
|
-
e.stub!(:attributes).and_return(attributes)
|
38
|
-
|
35
|
+
e = double(:name => name, :attributes => attributes)
|
39
36
|
Prawn::Svg::Element.new(@document, e, [], {})
|
40
37
|
end
|
41
38
|
|
data/spec/lib/path_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe Prawn::Svg::Parser::Path do
|
|
8
8
|
describe "command parsing" do
|
9
9
|
it "correctly parses a valid path" do
|
10
10
|
calls = []
|
11
|
-
@path.stub
|
11
|
+
@path.stub(:run_path_command) {|*args| calls << args}
|
12
12
|
@path.parse("A12.34 -56.78 89B4 5 12-34 -.5.7+3 2.3e3 4e4 4e+4 c31,-2e-5C 6,7 T QX 0 Z")
|
13
13
|
|
14
14
|
calls.should == [
|
@@ -2,8 +2,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
2
2
|
|
3
3
|
describe Prawn::Svg::Element do
|
4
4
|
before :each do
|
5
|
-
e =
|
6
|
-
e.stub!(:attributes).and_return({})
|
5
|
+
e = double(:attributes => {})
|
7
6
|
|
8
7
|
@document = Struct.new(:fallback_font_name, :css_parser, :warnings).new("Courier", nil, [])
|
9
8
|
@element = Prawn::Svg::Element.new(@document, e, [], {})
|
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.
|
4
|
+
version: 0.15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Nesbitt
|
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
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.14.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.14.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|