From 3df8494ce70e120d39e8163f9555ad2f8b632459 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 26 Feb 2015 10:39:26 -0500 Subject: [PATCH 01/12] Track next release --- CHANGELOG.md | 6 ++++-- lib/prawn/version.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 890f0f405..973399610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -## PrawnPDF version 2.0.0, not yet released. +## Unreleased changes -*Note: This release is still under development.The notes below are subject to change!* +*The notes below describe unreleased changes, and are subject to change!* + +## PrawnPDF version 2.0.0 ### Changes to supported Ruby versions diff --git a/lib/prawn/version.rb b/lib/prawn/version.rb index cd7e33ac1..3d06aa531 100644 --- a/lib/prawn/version.rb +++ b/lib/prawn/version.rb @@ -1,5 +1,5 @@ # encoding: utf-8 module Prawn - VERSION = "2.0.0" + VERSION = "2.0.1" end From 49b4a020c5fd66d3f4dcd93b61f488f5b64639ad Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 26 Feb 2015 10:40:11 -0500 Subject: [PATCH 02/12] Track next release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 973399610..674b59952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased changes +## PrawnPDF master branch *The notes below describe unreleased changes, and are subject to change!* From ac4045ba91a890366ffcc6949f71daacc7c09e6b Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 26 Feb 2015 10:40:52 -0500 Subject: [PATCH 03/12] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 674b59952..5e8da5059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## PrawnPDF master branch -*The notes below describe unreleased changes, and are subject to change!* +... ## PrawnPDF version 2.0.0 From 10b2027048c62fa287e291ccd92595aea9132aa9 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 26 Feb 2015 11:08:27 -0500 Subject: [PATCH 04/12] Tweak changelog format and add to YARD --- .yardopts | 1 + CHANGELOG.md | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.yardopts b/.yardopts index 8525a9936..e3fcddd6c 100644 --- a/.yardopts +++ b/.yardopts @@ -7,3 +7,4 @@ CONTRIBUTING.md COPYING LICENSE README.md +CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8da5059..530e4f612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ... -## PrawnPDF version 2.0.0 +## PrawnPDF 2.0.0 -- 2015-02-26 ### Changes to supported Ruby versions @@ -178,7 +178,7 @@ for more details. (Jesse Doyle, [#797](https://github.com/prawnpdf/prawn/issues/797), [#825](https://github.com/prawnpdf/prawn/pull/825)) -## PrawnPDF 1.3.0 -- September 28, 2014 +## PrawnPDF 1.3.0 -- 2014-09-28 ### Added the Prawn::View mixin for using Prawn's DSL in your own classes. @@ -255,7 +255,7 @@ or its dependencies. ([TTFunk #21](https://github.com/prawnpdf/ttfunk/pull/21) -- Jesse Doyle) -## PrawnPDF 1.2.1 -- July 27, 2014 +## PrawnPDF 1.2.1 -- 2014-07-27 This release includes all changes from 1.2.0, which was yanked due to a packaging error. @@ -328,7 +328,7 @@ When we extracted Prawn::ManualBuilder, we accidentally broke its support for Ruby 1.9.3. That issue has been resolved, and a new version of the `prawn-manual_builder` gem has been released. -## PrawnPDF 1.1.0 -- June 27, 2014 +## PrawnPDF 1.1.0 -- 2014-06-27 In addition to the notes below, please see the [Prawn 1.1 blog post](http://elmcitycraftworks.org/post/90062338793/prawn-1-1-0-released"). @@ -402,7 +402,7 @@ This is a fix for yet another edge case in cell width calculations. See tickets ([#710](https://github.com/prawnpdf/prawn/issues/710), [#712](https://github.com/prawnpdf/prawn/pull/712) Hartwig Brandl) -## PrawnPDF 1.0.0 -- March 16, 2014 +## PrawnPDF 1.0.0 -- 2014-03-16 In addition to the notes below, please see the [Prawn 1.0 blog post.][1-0-blog-post] From eab2a6b4c42f3154fcb70f1e5abb22e488358611 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 27 Feb 2015 13:05:41 +0100 Subject: [PATCH 05/12] CHANGELOG.md: Fix typo in `:shrink_to_fit` Fix up commit cde833ef (Add missing CHANGELOG.md file). --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 530e4f612..cb00a596d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -275,7 +275,7 @@ for more information. ### Text box now has an option to disable wrapping by character. This feature is useful for preventing mid-word breaks when used in combination with the -`:shink_to_fit` overflow option. See the following example practical use case: +`:shrink_to_fit` overflow option. See the following example practical use case: ```ruby # An example shared by Simon Mansfield From b6b6d822ffdf07bdfe0eaa405f3f789268f8f32e Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 27 Feb 2015 17:06:51 +0100 Subject: [PATCH 06/12] manual/text/positioned_text.rb: Improve wording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix up commit c709a25f (Added positioned text examples.) by replacing *Given that said, …* by *Given that, …*. *That said, …* would have been fine too. --- manual/text/positioned_text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/text/positioned_text.rb b/manual/text/positioned_text.rb index 79a92e020..6ccdb5666 100644 --- a/manual/text/positioned_text.rb +++ b/manual/text/positioned_text.rb @@ -15,7 +15,7 @@ # accordingly. Even if you don't provide a :width option the text # will flow to a new line if it reaches the right border. # -# Given that said, text_box is the better option available. +# Given that, text_box is the better option available. # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) From eebd0f5862eafe4289b33b0af9108a2e6b974bb8 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 12 Mar 2015 11:38:22 -0400 Subject: [PATCH 07/12] Add failing test to cover rotate bug in PDF::Core --- spec/text_at_spec.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/spec/text_at_spec.rb b/spec/text_at_spec.rb index 834bf64f7..f07e790eb 100644 --- a/spec/text_at_spec.rb +++ b/spec/text_at_spec.rb @@ -36,10 +36,39 @@ it "should allow setting a default font size" do @pdf.font_size = 16 @pdf.draw_text("Blah", :at => [0, 0]) + text = PDF::Inspector::Text.analyze(@pdf.render) text.font_settings[0][:size].should == 16 end + rotated_text_inspector = Class.new(PDF::Inspector) do + attr_reader :tm_operator_used + + def initialize + @tm_operator_used = false + end + + def set_text_matrix_and_text_line_matrix(*a) + @tm_operator_used = true + end + end + + it "should allow rotation" do + @pdf.draw_text("Test", :at => [100, 100], :rotate => 90) + + text = rotated_text_inspector.analyze(@pdf.render) + + text.tm_operator_used.should(be_true) + end + + it "should not use rotation matrix by default" do + @pdf.draw_text("Test", :at => [100, 100]) + + text = rotated_text_inspector.analyze(@pdf.render) + + text.tm_operator_used.should(be_false) + end + it "should allow overriding default font for a single instance" do @pdf.font_size = 16 From b2e321c29c1cb2dfac4e4dc81afefe657f43685c Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 12 Mar 2015 11:45:18 -0400 Subject: [PATCH 08/12] Bump minimum PDF::Core version to fix rotate issue --- prawn.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prawn.gemspec b/prawn.gemspec index 728918c1f..1ce9f3d25 100644 --- a/prawn.gemspec +++ b/prawn.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| spec.licenses = ['RUBY', 'GPL-2', 'GPL-3'] spec.add_dependency('ttfunk', '~> 1.4.0') - spec.add_dependency('pdf-core', "~> 0.5.0") + spec.add_dependency('pdf-core', "~> 0.5.1") spec.add_development_dependency('pdf-inspector', '~> 1.2.0') spec.add_development_dependency('yard') From 4f1d6911fe5616dc56226456e1c0078b27749764 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 12 Mar 2015 11:45:31 -0400 Subject: [PATCH 09/12] Update CHANGELOG --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb00a596d..a2574df94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ ## PrawnPDF master branch -... +### Fix regression in draw_text() with rotation + +Due to missing tests, a typo snuck into the `draw_text()` method in PDF::Core, +preventing it from working properly when called with the `:rotate` option. + +This issue has been resolved, and a test has been added to Prawn's test suite. +Speaking more generally, we need to improve the condition of the tests for +`PDF::Core`, and make a clear separation between Prawn's test suite and +PDF::Core's tests. Currently there are lots of little gaps that can lead +to this sort of problem. ## PrawnPDF 2.0.0 -- 2015-02-26 From 8ad87139ba4c06e2659da572bc55f62dafc6a654 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 12 Mar 2015 11:47:48 -0400 Subject: [PATCH 10/12] Add acknowledgement for @arachnist --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2574df94..d2bd7f9ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Speaking more generally, we need to improve the condition of the tests for PDF::Core's tests. Currently there are lots of little gaps that can lead to this sort of problem. +[Roberto S. Gerus, [pdf-core#15](https://github.com/prawnpdf/pdf-core/pull/15)] + ## PrawnPDF 2.0.0 -- 2015-02-26 ### Changes to supported Ruby versions From a4e1d29210e5bc24063acf6014864c38dbab4a59 Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Thu, 12 Mar 2015 12:03:04 -0400 Subject: [PATCH 11/12] Fix acknowledgement for @arachnist --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2bd7f9ad..744bdfc86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Speaking more generally, we need to improve the condition of the tests for PDF::Core's tests. Currently there are lots of little gaps that can lead to this sort of problem. -[Roberto S. Gerus, [pdf-core#15](https://github.com/prawnpdf/pdf-core/pull/15)] +[Robert S. Gerus, [pdf-core#15](https://github.com/prawnpdf/pdf-core/pull/15)] ## PrawnPDF 2.0.0 -- 2015-02-26 From 03800a9d3b42759e3f2c4156b0b809750e555d32 Mon Sep 17 00:00:00 2001 From: Nicolas Leger Date: Sun, 22 Mar 2015 13:20:11 +0100 Subject: [PATCH 12/12] Test on Ruby 2 patched versions --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c9909a49..c786b3aa1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: ruby rvm: - - 2.0.0 - - 2.1.4 - - 2.2.0 + - 2.0 + - 2.1 + - 2.2 - rbx-2 - jruby env: