Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-prawn-svg for
openSUSE:Factory checked in at 2021-06-25 15:01:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-prawn-svg (Old)
and /work/SRC/openSUSE:Factory/.rubygem-prawn-svg.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-prawn-svg"
Fri Jun 25 15:01:23 2021 rev:2 rq:902199 version:0.32.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-prawn-svg/rubygem-prawn-svg.changes
2021-01-21 21:55:07.157787583 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-prawn-svg.new.2625/rubygem-prawn-svg.changes
2021-06-25 15:02:05.972207317 +0200
@@ -1,0 +2,6 @@
+Thu Jun 24 17:47:10 UTC 2021 - Stephan Kulow <[email protected]>
+
+updated to version 0.32.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
prawn-svg-0.31.0.gem
New:
----
prawn-svg-0.32.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-prawn-svg.spec ++++++
--- /var/tmp/diff_new_pack.pfUS8u/_old 2021-06-25 15:02:06.332207756 +0200
+++ /var/tmp/diff_new_pack.pfUS8u/_new 2021-06-25 15:02:06.332207756 +0200
@@ -24,12 +24,12 @@
#
Name: rubygem-prawn-svg
-Version: 0.31.0
+Version: 0.32.0
Release: 0
%define mod_name prawn-svg
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: %{ruby >= 2.1.0}
+BuildRequires: %{ruby >= 2.3.0}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
URL: http://github.com/mogest/prawn-svg
++++++ prawn-svg-0.31.0.gem -> prawn-svg-0.32.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.github/workflows/test.yml
new/.github/workflows/test.yml
--- old/.github/workflows/test.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/.github/workflows/test.yml 2021-03-08 00:37:56.000000000 +0100
@@ -0,0 +1,18 @@
+name: test
+on: [push, pull_request]
+jobs:
+ rake:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0']
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: ${{ matrix.ruby }}
+ - name: Run tests
+ run: bundle exec rake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2020-10-24 22:46:28.000000000 +0200
+++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-language: ruby
-rvm:
- - 2.2.10
- - 2.3.8
- - 2.4.10
- - 2.5.8
- - 2.6.6
- - 2.7.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2020-10-24 22:46:28.000000000 +0200
+++ new/README.md 2021-03-08 00:37:56.000000000 +0100
@@ -1,7 +1,7 @@
# prawn-svg
[](https://badge.fury.io/rb/prawn-svg)
-[](https://travis-ci.org/mogest/prawn-svg)
+
An SVG renderer for the Prawn PDF library.
@@ -10,7 +10,7 @@
http://github.com/prawnpdf/prawn
prawn-svg is compatible with all versions of Prawn from 0.11.1 onwards,
including the 1.x and 2.x series.
-The minimum Ruby version required is 2.1.0.
+The minimum Ruby version required is 2.3.0.
## Using prawn-svg
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/prawn/svg/elements/base.rb
new/lib/prawn/svg/elements/base.rb
--- old/lib/prawn/svg/elements/base.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/lib/prawn/svg/elements/base.rb 2021-03-08 00:37:56.000000000 +0100
@@ -91,12 +91,12 @@
parse_xml_space_attribute
end
- def add_call(name, *arguments)
- @calls << [name.to_s, arguments, []]
+ def add_call(name, *arguments, **kwarguments)
+ @calls << [name.to_s, arguments, kwarguments, []]
end
- def add_call_and_enter(name, *arguments)
- @calls << [name.to_s, arguments, []]
+ def add_call_and_enter(name, *arguments, **kwarguments)
+ @calls << [name.to_s, arguments, kwarguments, []]
@calls = @calls.last.last
end
@@ -168,7 +168,7 @@
command = stroke ? 'fill_and_stroke' : 'fill'
if computed_properties.fill_rule == 'evenodd'
- add_call_and_enter(command, {fill_rule: :even_odd})
+ add_call_and_enter(command, fill_rule: :even_odd)
else
add_call_and_enter(command)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/prawn/svg/elements/call_duplicator.rb
new/lib/prawn/svg/elements/call_duplicator.rb
--- old/lib/prawn/svg/elements/call_duplicator.rb 2020-10-24
22:46:28.000000000 +0200
+++ new/lib/prawn/svg/elements/call_duplicator.rb 2021-03-08
00:37:56.000000000 +0100
@@ -12,7 +12,7 @@
end
def duplicate_call(call)
- [call[0], duplicate_array(call[1]), duplicate_calls(call[2])]
+ [call[0], duplicate_array(call[1]), duplicate_hash(call[2]),
duplicate_calls(call[3])]
end
def duplicate_array(array)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/prawn/svg/elements/text_component.rb
new/lib/prawn/svg/elements/text_component.rb
--- old/lib/prawn/svg/elements/text_component.rb 2020-10-24
22:46:28.000000000 +0200
+++ new/lib/prawn/svg/elements/text_component.rb 2021-03-08
00:37:56.000000000 +0100
@@ -146,10 +146,10 @@
end
if remaining
- add_call 'draw_text', text[0..0], opts.dup
+ add_call 'draw_text', text[0..0], **opts.dup
text = text[1..-1]
else
- add_call 'draw_text', text, opts.dup
+ add_call 'draw_text', text, **opts.dup
# we can get to this path with rotations still pending
# solve this by shifting them out by the number of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/prawn/svg/interface.rb
new/lib/prawn/svg/interface.rb
--- old/lib/prawn/svg/interface.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/lib/prawn/svg/interface.rb 2021-03-08 00:37:56.000000000 +0100
@@ -109,10 +109,10 @@
end
def issue_prawn_command(prawn, calls)
- calls.each do |call, arguments, children|
+ calls.each do |call, arguments, kwarguments, children|
skip = false
- rewrite_call_arguments(prawn, call, arguments) do
+ rewrite_call_arguments(prawn, call, arguments, kwarguments) do
issue_prawn_command(prawn, children) if children.any?
skip = true
end
@@ -120,21 +120,29 @@
if skip
# the call has been overridden
elsif children.empty? && call != 'transparent' # some prawn calls
complain if they aren't supplied a block
- prawn.send(call, *arguments)
+ if RUBY_VERSION >= '2.7' || !kwarguments.empty?
+ prawn.send(call, *arguments, **kwarguments)
+ else
+ prawn.send(call, *arguments)
+ end
else
- prawn.send(call, *arguments, &proc_creator(prawn, children))
+ if RUBY_VERSION >= '2.7' || !kwarguments.empty?
+ prawn.send(call, *arguments, **kwarguments, &proc_creator(prawn,
children))
+ else
+ prawn.send(call, *arguments, &proc_creator(prawn, children))
+ end
end
end
end
- def rewrite_call_arguments(prawn, call, arguments)
+ def rewrite_call_arguments(prawn, call, arguments, kwarguments)
case call
when 'text_group'
@cursor = [0, document.sizing.output_height]
yield
when 'draw_text'
- text, options = arguments
+ text, options = arguments.first, kwarguments
at = options.fetch(:at)
@@ -208,7 +216,7 @@
# prawn (as at 2.0.1 anyway) uses 'b' for its fill_and_stroke. 'b'
is 'h' (closepath) + 'B', and we
# never want closepath to be automatically run as it stuffs up many
drawing operations, such as dashes
# and line caps, and makes paths close that we didn't ask to be
closed when fill is specified.
- even_odd = arguments[0].is_a?(Hash) && arguments[0][:fill_rule] ==
:even_odd
+ even_odd = kwarguments[:fill_rule] == :even_odd
content = even_odd ? 'B*' : 'B'
prawn.add_content content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/prawn/svg/version.rb new/lib/prawn/svg/version.rb
--- old/lib/prawn/svg/version.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/lib/prawn/svg/version.rb 2021-03-08 00:37:56.000000000 +0100
@@ -1,5 +1,5 @@
module Prawn
module SVG
- VERSION = '0.31.0'
+ VERSION = '0.32.0'
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2020-10-24 22:46:28.000000000 +0200
+++ new/metadata 2021-03-08 00:37:56.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: prawn-svg
version: !ruby/object:Gem::Version
- version: 0.31.0
+ version: 0.32.0
platform: ruby
authors:
- Roger Nesbitt
autorequire:
bindir: bin
cert_chain: []
-date: 2020-10-24 00:00:00.000000000 Z
+date: 2021-03-07 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: prawn
@@ -45,6 +45,20 @@
- !ruby/object:Gem::Version
version: '1.6'
- !ruby/object:Gem::Dependency
+ name: rexml
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - "~>"
+ - !ruby/object:Gem::Version
+ version: '3.2'
+ type: :runtime
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - "~>"
+ - !ruby/object:Gem::Version
+ version: '3.2'
+- !ruby/object:Gem::Dependency
name: rspec
requirement: !ruby/object:Gem::Requirement
requirements:
@@ -80,9 +94,9 @@
extensions: []
extra_rdoc_files: []
files:
+- ".github/workflows/test.yml"
- ".gitignore"
- ".rspec"
-- ".travis.yml"
- Gemfile
- LICENSE
- README.md
@@ -256,14 +270,14 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: 2.1.0
+ version: 2.3.0
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.0.3
+rubygems_version: 3.2.3
signing_key:
specification_version: 4
summary: SVG renderer for Prawn PDF library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/prawn-svg.gemspec new/prawn-svg.gemspec
--- old/prawn-svg.gemspec 2020-10-24 22:46:28.000000000 +0200
+++ new/prawn-svg.gemspec 2021-03-08 00:37:56.000000000 +0100
@@ -17,10 +17,11 @@
gem.name = "prawn-svg"
gem.require_paths = ["lib"]
- gem.required_ruby_version = '>= 2.1.0'
+ gem.required_ruby_version = '>= 2.3.0'
gem.add_runtime_dependency "prawn", ">= 0.11.1", "< 3"
gem.add_runtime_dependency "css_parser", "~> 1.6"
+ gem.add_runtime_dependency "rexml", "~> 3.2"
gem.add_development_dependency "rspec", "~> 3.0"
gem.add_development_dependency "rake", "~> 13.0"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/integration_spec.rb new/spec/integration_spec.rb
--- old/spec/integration_spec.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/spec/integration_spec.rb 2021-03-08 00:37:56.000000000 +0100
@@ -28,34 +28,34 @@
element.process
expect(element.calls).to eq [
- ["fill_color", ["000000"], []],
- ["transformation_matrix", [1, 0, 0, 1, 0, 0], []],
- ["transformation_matrix", [1, 0, 0, 1, 0, 0], []],
- ["save", [], []], ["restore", [], []],
- ["save", [], []],
- ["fill_color", ["0000ff"], []],
- ["fill", [], [
- ["rectangle", [[0.0, 200.0], 10.0, 10.0], []]
+ ["fill_color", ["000000"], {}, []],
+ ["transformation_matrix", [1, 0, 0, 1, 0, 0], {}, []],
+ ["transformation_matrix", [1, 0, 0, 1, 0, 0], {}, []],
+ ["save", [], {}, []], ["restore", [], {}, []],
+ ["save", [], {}, []],
+ ["fill_color", ["0000ff"], {}, []],
+ ["fill", [], {}, [
+ ["rectangle", [[0.0, 200.0], 10.0, 10.0], {}, []]
]],
- ["restore", [], []],
- ["save", [], []],
- ["fill_color", ["008000"], []],
- ["fill", [], [
- ["rectangle", [[10.0, 200.0], 10.0, 10.0], []]
+ ["restore", [], {}, []],
+ ["save", [], {}, []],
+ ["fill_color", ["008000"], {}, []],
+ ["fill", [], {}, [
+ ["rectangle", [[10.0, 200.0], 10.0, 10.0], {}, []]
]],
- ["restore", [], []],
- ["save", [], []],
- ["fill_color", ["ff0000"], []],
- ["fill", [], [
- ["rectangle", [[20.0, 200.0], 10.0, 10.0], []]
+ ["restore", [], {}, []],
+ ["save", [], {}, []],
+ ["fill_color", ["ff0000"], {}, []],
+ ["fill", [], {}, [
+ ["rectangle", [[20.0, 200.0], 10.0, 10.0], {}, []]
]],
- ["restore", [], []],
- ["save", [], []],
- ["fill_color", ["ffff00"], []],
- ["fill", [], [
- ["rectangle", [[30.0, 200.0], 10.0, 10.0], []]
+ ["restore", [], {}, []],
+ ["save", [], {}, []],
+ ["fill_color", ["ffff00"], {}, []],
+ ["fill", [], {}, [
+ ["rectangle", [[30.0, 200.0], 10.0, 10.0], {}, []]
]],
- ["restore", [], []]
+ ["restore", [], {}, []]
]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/css/stylesheets_spec.rb
new/spec/prawn/svg/css/stylesheets_spec.rb
--- old/spec/prawn/svg/css/stylesheets_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/css/stylesheets_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -68,25 +68,7 @@
[4, [["fill", "#ff0000", false], ["fill", "#330000", false], ["fill",
"#440000", false], ["fill", "#00ff00", false]]],
]
- #
- # Under ruby < 2.6, a bug in REXML causes the /following-sibling
selector to
- # only pick the first matching sibling. This means the + CSS combinator
behaves
- # incorrectly in the following example:
- #
- # <a>
- # <b a="1" />
- # <b a="2" />
- # <b a="3" />
- # </a>
- #
- # The css selector `a b + b` will only pick the second <b>, whereas it
should
- # pick both the second and third <b> elements.
- #
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
- expected << [5, [["fill", "#ff0000", false], ["fill", "#330000",
false], ["fill", "#330000", false], ["fill", "#00ff00", false]]]
- else
- expected << [5, [["fill", "#ff0000", false], ["fill", "#330000",
false], ["fill", "#330000", false], ["fill", "#440000", false], ["fill",
"#00ff00", false]]]
- end
+ expected << [5, [["fill", "#ff0000", false], ["fill", "#330000", false],
["fill", "#330000", false], ["fill", "#440000", false], ["fill", "#00ff00",
false]]]
expected.concat [
[6, [["fill", "#ff0000", false], ["fill", "#441234", false], ["fill",
"#0000ff", false]]],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/base_spec.rb
new/spec/prawn/svg/elements/base_spec.rb
--- old/spec/prawn/svg/elements/base_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/elements/base_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -32,12 +32,12 @@
it "appends the relevant calls" do
element.process
expect(element.base_calls).to eq [
- ["transformation_matrix", [2, 0, 0, 2, 0, 0], [
- ["transparent", [0.5, 1], [
- ["fill_color", ["ff0000"], []],
- ["stroke_color", ["0000ff"], []],
- ["line_width", [5.0], []],
- ["fill_and_stroke", [], []]
+ ["transformation_matrix", [2, 0, 0, 2, 0, 0], {}, [
+ ["transparent", [0.5, 1], {}, [
+ ["fill_color", ["ff0000"], {}, []],
+ ["stroke_color", ["0000ff"], {}, []],
+ ["line_width", [5.0], {}, []],
+ ["fill_and_stroke", [], {}, []]
]]
]]
]
@@ -50,37 +50,37 @@
context "with neither fill nor stroke" do
let(:svg) { '<rect style="fill: none;"></rect>' }
- it { is_expected.to eq ['end_path', [], []] }
+ it { is_expected.to eq ['end_path', [], {}, []] }
end
context "with a fill only" do
let(:svg) { '<rect style="fill: black;"></rect>' }
- it { is_expected.to eq ['fill', [], []] }
+ it { is_expected.to eq ['fill', [], {}, []] }
end
context "with a stroke only" do
let(:svg) { '<rect style="fill: none; stroke: black;"></rect>' }
- it { is_expected.to eq ['stroke', [], []] }
+ it { is_expected.to eq ['stroke', [], {}, []] }
end
context "with fill and stroke" do
let(:svg) { '<rect style="fill: black; stroke: black;"></rect>' }
- it { is_expected.to eq ['fill_and_stroke', [], []] }
+ it { is_expected.to eq ['fill_and_stroke', [], {}, []] }
end
context "with fill with evenodd fill rule" do
let(:svg) { '<rect style="fill: black; fill-rule: evenodd;"></rect>' }
- it { is_expected.to eq ['fill', [{fill_rule: :even_odd}], []] }
+ it { is_expected.to eq ['fill', [], {fill_rule: :even_odd}, []]
}
end
end
it "appends calls to the parent element" do
expect(element).to receive(:apply) do
- element.send :add_call, "test", "argument"
+ element.send :add_call, "test", "argument", kw: 'argument'
end
element.process
- expect(element.parent_calls).to eq [["fill", [], [["test", ["argument"],
[]]]]]
+ expect(element.parent_calls).to eq [["fill", [], {}, [["test",
["argument"], {kw: 'argument'}, []]]]]
end
it "quietly absorbs a SkipElementQuietly exception" do
@@ -149,8 +149,8 @@
it "uses the parent's color element if 'currentColor' fill attribute
provided" do
element.process
- expect(flattened_calls).to include ['fill_color', ['ff0000']]
- expect(flattened_calls).not_to include ['fill_color', ['00ff00']]
+ expect(flattened_calls).to include ['fill_color', ['ff0000'], {}]
+ expect(flattened_calls).not_to include ['fill_color', ['00ff00'], {}]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/line_spec.rb
new/spec/prawn/svg/elements/line_spec.rb
--- old/spec/prawn/svg/elements/line_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/elements/line_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -13,10 +13,10 @@
it "renders the line" do
subject.process
expect(subject.base_calls).to eq [
- ["stroke_color", ["000000"], []],
- ["stroke", [], [
- ["move_to", [[5.0, 590.0]], []],
- ["line_to", [[15.0, 580.0]], []]]
+ ["stroke_color", ["000000"], {}, []],
+ ["stroke", [], {}, [
+ ["move_to", [[5.0, 590.0]], {}, []],
+ ["line_to", [[15.0, 580.0]], {}, []]]
]
]
end
@@ -28,9 +28,9 @@
it "outlines a path from 0,0 to 0,0" do
subject.process
expect(subject.base_calls).to eq [
- ["end_path", [], [
- ["move_to", [[0, 600]], []],
- ["line_to", [[0, 600]], []]]
+ ["end_path", [], {}, [
+ ["move_to", [[0, 600]], {}, []],
+ ["line_to", [[0, 600]], {}, []]]
]
]
end
@@ -43,11 +43,11 @@
subject.process
expect(subject.base_calls).to eq [
- ["fill_color", ["0000ff"], []],
- ["stroke_color", ["ff0000"], []],
- ["stroke", [], [
- ["move_to", [[0, 600]], []],
- ["line_to", [[15.0, 580.0]], []]]
+ ["fill_color", ["0000ff"], {}, []],
+ ["stroke_color", ["ff0000"], {}, []],
+ ["stroke", [], {}, [
+ ["move_to", [[0, 600]], {}, []],
+ ["line_to", [[15.0, 580.0]], {}, []]]
]
]
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/marker_spec.rb
new/spec/prawn/svg/elements/marker_spec.rb
--- old/spec/prawn/svg/elements/marker_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/elements/marker_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -54,41 +54,41 @@
# in section 11.6.3.
expect(line_element.base_calls).to eq [
- ["stroke_color", ["000000"], []],
- ["line_width", [100.0], []],
- ["stroke", [], [
- ["move_to", [[0.0, 600.0]], []],
- ["line_to", [[10.0, 590.0]], []]
+ ["stroke_color", ["000000"], {}, []],
+ ["line_width", [100.0], {}, []],
+ ["stroke", [], {}, [
+ ["move_to", [[0.0, 600.0]], {}, []],
+ ["line_to", [[10.0, 590.0]], {}, []]
]
],
- ["save", [], []],
- ["transformation_matrix", [1, 0, 0, 1, 10, -10], []],
- ["rotate", [-45, {origin: [0, 600.0]}], [
- ["transformation_matrix", [100.0, 0, 0, 100.0, 0, 0], []],
- ["transformation_matrix", [1, 0, 0, 1, -0.0, 1.5], []],
- ["rectangle", [[-0.5, 600.0], 4.0, 3.0], []],
- ["clip", [], []],
- ["transformation_matrix", [0.3, 0, 0, 0.3, 0, 0], []],
- ["transparent", [1.0, 1.0], [
- ["stroke_color", ["000000"], []],
- ["line_width", [100.0], []],
- ["cap_style", [:butt], []],
- ["undash", [], []],
- ["save", [], []],
- ["fill", [], [
- ["join_style", [:bevel], []],
- ["move_to", [[0.0, 600.0]], []],
- ["line_to", [[10.0, 595.0]], []],
- ["line_to", [[0.0, 590.0]], []],
- ["close_path", [], []]
+ ["save", [], {}, []],
+ ["transformation_matrix", [1, 0, 0, 1, 10, -10], {}, []],
+ ["rotate", [-45], {origin: [0, 600.0]}, [
+ ["transformation_matrix", [100.0, 0, 0, 100.0, 0, 0], {}, []],
+ ["transformation_matrix", [1, 0, 0, 1, -0.0, 1.5], {}, []],
+ ["rectangle", [[-0.5, 600.0], 4.0, 3.0], {}, []],
+ ["clip", [], {}, []],
+ ["transformation_matrix", [0.3, 0, 0, 0.3, 0, 0], {}, []],
+ ["transparent", [1.0, 1.0], {}, [
+ ["stroke_color", ["000000"], {}, []],
+ ["line_width", [100.0], {}, []],
+ ["cap_style", [:butt], {}, []],
+ ["undash", [], {}, []],
+ ["save", [], {}, []],
+ ["fill", [], {}, [
+ ["join_style", [:bevel], {}, []],
+ ["move_to", [[0.0, 600.0]], {}, []],
+ ["line_to", [[10.0, 595.0]], {}, []],
+ ["line_to", [[0.0, 590.0]], {}, []],
+ ["close_path", [], {}, []]
]
],
- ["restore", [], []],
+ ["restore", [], {}, []],
]
]
]
],
- ["restore", [], []]
+ ["restore", [], {}, []]
]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/polygon_spec.rb
new/spec/prawn/svg/elements/polygon_spec.rb
--- old/spec/prawn/svg/elements/polygon_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/elements/polygon_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -13,11 +13,11 @@
it "renders the polygon" do
subject.process
expect(subject.base_calls).to eq [
- ["fill", [], [
- ["move_to", [[10.0, 590.0]], []],
- ["line_to", [[20.0, 580.0]], []],
- ["line_to", [[30.0, 570.0]], []],
- ["close_path", [], []]]
+ ["fill", [], {}, [
+ ["move_to", [[10.0, 590.0]], {}, []],
+ ["line_to", [[20.0, 580.0]], {}, []],
+ ["line_to", [[30.0, 570.0]], {}, []],
+ ["close_path", [], {}, []]]
]
]
end
@@ -29,10 +29,10 @@
it "ignores the last one" do
subject.process
expect(subject.base_calls).to eq [
- ["fill", [], [
- ["move_to", [[10.0, 590.0]], []],
- ["line_to", [[20.0, 580.0]], []],
- ["close_path", [], []]]
+ ["fill", [], {}, [
+ ["move_to", [[10.0, 590.0]], {}, []],
+ ["line_to", [[20.0, 580.0]], {}, []],
+ ["close_path", [], {}, []]]
]
]
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/polyline_spec.rb
new/spec/prawn/svg/elements/polyline_spec.rb
--- old/spec/prawn/svg/elements/polyline_spec.rb 2020-10-24
22:46:28.000000000 +0200
+++ new/spec/prawn/svg/elements/polyline_spec.rb 2021-03-08
00:37:56.000000000 +0100
@@ -13,10 +13,10 @@
it "renders the polyline" do
subject.process
expect(subject.base_calls).to eq [
- ["fill", [], [
- ["move_to", [[10.0, 590.0]], []],
- ["line_to", [[20.0, 580.0]], []],
- ["line_to", [[30.0, 570.0]], []]]
+ ["fill", [], {}, [
+ ["move_to", [[10.0, 590.0]], {}, []],
+ ["line_to", [[20.0, 580.0]], {}, []],
+ ["line_to", [[30.0, 570.0]], {}, []]]
]
]
end
@@ -28,9 +28,9 @@
it "ignores the last one" do
subject.process
expect(subject.base_calls).to eq [
- ["fill", [], [
- ["move_to", [[10.0, 590.0]], []],
- ["line_to", [[20.0, 580.0]], []]]
+ ["fill", [], {}, [
+ ["move_to", [[10.0, 590.0]], {}, []],
+ ["line_to", [[20.0, 580.0]], {}, []]]
]
]
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/elements/text_spec.rb
new/spec/prawn/svg/elements/text_spec.rb
--- old/spec/prawn/svg/elements/text_spec.rb 2020-10-24 22:46:28.000000000
+0200
+++ new/spec/prawn/svg/elements/text_spec.rb 2021-03-08 00:37:56.000000000
+0100
@@ -15,7 +15,7 @@
it "converts newlines and tabs to spaces, and preserves spaces" do
element.process
- expect(flatten_calls(element.calls)).to include ["draw_text", ["some
text", {:size=>16, :style=>:normal, :text_anchor=>'start', :at=>[:relative,
:relative], :offset=>[0,0]}]]
+ expect(flatten_calls(element.calls)).to include ["draw_text", ["some
text"], {:size=>16, :style=>:normal, :text_anchor=>'start', :at=>[:relative,
:relative], :offset=>[0,0]}]
end
end
@@ -25,7 +25,7 @@
it "strips space" do
element.process
- expect(flatten_calls(element.calls)).to include ["draw_text", ["some
text", {:size=>16, :style=>:normal, :text_anchor=>'start', :at=>[:relative,
:relative], :offset=>[0,0]}]]
+ expect(flatten_calls(element.calls)).to include ["draw_text", ["some
text"], {:size=>16, :style=>:normal, :text_anchor=>'start', :at=>[:relative,
:relative], :offset=>[0,0]}]
end
end
end
@@ -78,10 +78,10 @@
element.process
expect(element.base_calls).to eq [
- ["text_group", [], [
- ["font", ["Helvetica", {style: :normal}], []],
- ["character_spacing", [5.0], [
- ["draw_text", ["spaced", default_style], []]
+ ["text_group", [], {}, [
+ ["font", ["Helvetica"], {style: :normal}, []],
+ ["character_spacing", [5.0], {}, [
+ ["draw_text", ["spaced"], default_style, []]
]]
]]
]
@@ -95,9 +95,9 @@
element.process
expect(element.base_calls).to eq [
- ["text_group", [], [
- ["font", ["Helvetica", {:style=>:normal}], []],
- ["draw_text", ["underlined", default_style.merge(decoration:
'underline')], []]
+ ["text_group", [], {},[
+ ["font", ["Helvetica"], {:style=>:normal}, []],
+ ["draw_text", ["underlined"], default_style.merge(decoration:
'underline'), []]
]]
]
end
@@ -111,11 +111,11 @@
element.process
expect(element.base_calls).to eq [
- ["text_group", [], [
- ["stroke_color", ["ff0000"], []],
- ["font", ["Helvetica", {style: :normal}], []],
- ["text_rendering_mode", [:stroke], [
- ["draw_text", ["stroked", default_style], []]
+ ["text_group", [], {}, [
+ ["stroke_color", ["ff0000"], {}, []],
+ ["font", ["Helvetica"], {style: :normal}, []],
+ ["text_rendering_mode", [:stroke], {}, [
+ ["draw_text", ["stroked"], default_style, []]
]]
]]
]
@@ -129,24 +129,24 @@
element.process
expect(element.base_calls).to eq [
- ["text_group", [], [
- ["stroke_color", ["ff0000"], []],
- ["font", ["Helvetica", {style: :normal}], []],
- ["text_rendering_mode", [:stroke], [
- ["draw_text", ["stroked ", default_style], []],
- ["save", [], []],
- ["fill_color", ["000000"], []],
- ["font", ["Helvetica", {style: :normal}], []],
- ["text_rendering_mode", [:fill_stroke], [
- ["draw_text", ["both", default_style], []]
+ ["text_group", [], {}, [
+ ["stroke_color", ["ff0000"], {}, []],
+ ["font", ["Helvetica"], {style: :normal}, []],
+ ["text_rendering_mode", [:stroke], {}, [
+ ["draw_text", ["stroked "], default_style, []],
+ ["save", [], {}, []],
+ ["fill_color", ["000000"], {}, []],
+ ["font", ["Helvetica"], {style: :normal}, []],
+ ["text_rendering_mode", [:fill_stroke], {}, [
+ ["draw_text", ["both"], default_style, []]
]],
- ["restore", [], []],
- ["save", [], []],
- ["font", ["Helvetica", {style: :normal}], []],
- ["text_rendering_mode", [:invisible], [
- ["draw_text", ["neither", default_style], []]
+ ["restore", [], {}, []],
+ ["save", [], {}, []],
+ ["font", ["Helvetica"], {style: :normal}, []],
+ ["text_rendering_mode", [:invisible], {}, [
+ ["draw_text", ["neither"], default_style, []]
]],
- ["restore", [], []],
+ ["restore", [], {}, []],
]]
]]
]
@@ -160,7 +160,7 @@
it "finds the font and uses it" do
element.process
- expect(flatten_calls(element.base_calls)).to include ['font',
['Courier', {style: :normal}]]
+ expect(flatten_calls(element.base_calls)).to include ['font',
['Courier'], {style: :normal}]
end
end
@@ -169,7 +169,7 @@
it "uses the fallback font" do
element.process
- expect(flatten_calls(element.base_calls)).to include ['font',
['Times-Roman', {style: :normal}]]
+ expect(flatten_calls(element.base_calls)).to include ['font',
['Times-Roman'], {style: :normal}]
end
context "when there is no fallback font" do
@@ -191,9 +191,9 @@
it "references the text" do
element.process
expect(flatten_calls(element.base_calls)[9..11]).to eq [
- ["fill_color", ["ff0000"]],
- ["font", ["Helvetica", {:style=>:normal}]],
- ["draw_text", ["my reference text", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[10.0, :relative], :offset=>[0,0]}]],
+ ["fill_color", ["ff0000"], {}],
+ ["font", ["Helvetica"], {:style=>:normal}],
+ ["draw_text", ["my reference text"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[10.0, :relative], :offset=>[0,0]}],
]
end
end
@@ -205,11 +205,11 @@
element.process
expect(flatten_calls(element.base_calls)).to eq [
- ["text_group", []],
- ["font", ["Helvetica", {:style=>:normal}]],
- ["draw_text", ["H", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[10.0, :relative], :offset=>[30.0, 2.0]}]],
- ["draw_text", ["i", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[20.0, :relative], :offset=>[50.0, 0]}]],
- ["draw_text", [" there, this is a good test", {:size=>16,
:style=>:normal, :text_anchor=>"start", :at=>[:relative, :relative],
:offset=>[80.0, 0]}]]
+ ["text_group", [], {}],
+ ["font", ["Helvetica"], {:style=>:normal}],
+ ["draw_text", ["H"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[10.0, :relative], :offset=>[30.0, 2.0]}],
+ ["draw_text", ["i"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[20.0, :relative], :offset=>[50.0, 0]}],
+ ["draw_text", [" there, this is a good test"], {:size=>16,
:style=>:normal, :text_anchor=>"start", :at=>[:relative, :relative],
:offset=>[80.0, 0]}]
]
end
end
@@ -221,19 +221,19 @@
element.process
expect(flatten_calls(element.base_calls)).to eq [
- ["text_group", []],
- ["font", ["Helvetica", {:style=>:normal}]],
- ["draw_text", ["H", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-10.0}]],
- ["draw_text", ["i", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-20.0}]],
- ["draw_text", [" ", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-30.0}]],
- ["save", []],
- ["font", ["Helvetica", {:style=>:normal}]],
- ["draw_text", ["this", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0]}]],
- ["restore", []],
- ["draw_text", [" ", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-80.0}]],
- ["draw_text", ["o", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-90.0}]],
- ["draw_text", ["k", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-100.0}]],
- ["draw_text", ["!", {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-100.0}]]
+ ["text_group", [], {}],
+ ["font", ["Helvetica"], {:style=>:normal}],
+ ["draw_text", ["H"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-10.0}],
+ ["draw_text", ["i"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-20.0}],
+ ["draw_text", [" "], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-30.0}],
+ ["save", [], {}],
+ ["font", ["Helvetica"], {:style=>:normal}],
+ ["draw_text", ["this"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0]}],
+ ["restore", [], {}],
+ ["draw_text", [" "], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-80.0}],
+ ["draw_text", ["o"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-90.0}],
+ ["draw_text", ["k"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-100.0}],
+ ["draw_text", ["!"], {:size=>16, :style=>:normal,
:text_anchor=>"start", :at=>[:relative, :relative], :offset=>[0, 0],
:rotate=>-100.0}]
]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/prawn/svg/pathable_spec.rb
new/spec/prawn/svg/pathable_spec.rb
--- old/spec/prawn/svg/pathable_spec.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/spec/prawn/svg/pathable_spec.rb 2021-03-08 00:37:56.000000000 +0100
@@ -40,10 +40,10 @@
subject.apply_commands
expect(subject.base_calls).to eq [
- ["move_to", [[10.0, 590.0]], []],
- ["line_to", [[20.0, 580.0]], []],
- ["curve_to", [[30.0, 570.0], {bounds: [[25.0, 580.0], [25.0,
575.0]]}], []],
- ["close_path", [], []]
+ ["move_to", [[10.0, 590.0]], {}, []],
+ ["line_to", [[20.0, 580.0]], {}, []],
+ ["curve_to", [[30.0, 570.0]], {bounds: [[25.0, 580.0], [25.0,
575.0]]}, []],
+ ["close_path", [], {}, []]
]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb 2020-10-24 22:46:28.000000000 +0200
+++ new/spec/spec_helper.rb 2021-03-08 00:37:56.000000000 +0100
@@ -10,8 +10,8 @@
[].tap do |flattened_calls|
add = -> (local_calls) do
local_calls.each do |call|
- flattened_calls << call[0..1]
- add.call call[2]
+ flattened_calls << call[0..2]
+ add.call call[3]
end
end