prawn 2.2.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/GPLv2 +20 -21
- data/Gemfile +2 -0
- data/Rakefile +10 -3
- data/lib/prawn.rb +9 -3
- data/lib/prawn/document.rb +40 -18
- data/lib/prawn/document/bounding_box.rb +9 -4
- data/lib/prawn/document/column_box.rb +2 -0
- data/lib/prawn/document/internals.rb +6 -4
- data/lib/prawn/document/span.rb +2 -0
- data/lib/prawn/encoding.rb +4 -1
- data/lib/prawn/errors.rb +2 -0
- data/lib/prawn/font.rb +34 -17
- data/lib/prawn/font_metric_cache.rb +8 -3
- data/lib/prawn/{font → fonts}/afm.rb +14 -7
- data/lib/prawn/{font → fonts}/dfont.rb +3 -1
- data/lib/prawn/fonts/otf.rb +11 -0
- data/lib/prawn/{font → fonts}/ttc.rb +3 -1
- data/lib/prawn/{font → fonts}/ttf.rb +23 -12
- data/lib/prawn/graphics.rb +24 -26
- data/lib/prawn/graphics/blend_mode.rb +2 -0
- data/lib/prawn/graphics/cap_style.rb +2 -0
- data/lib/prawn/graphics/color.rb +8 -3
- data/lib/prawn/graphics/dash.rb +3 -1
- data/lib/prawn/graphics/join_style.rb +2 -0
- data/lib/prawn/graphics/patterns.rb +7 -2
- data/lib/prawn/graphics/transformation.rb +5 -1
- data/lib/prawn/graphics/transparency.rb +2 -0
- data/lib/prawn/grid.rb +39 -38
- data/lib/prawn/image_handler.rb +2 -0
- data/lib/prawn/images.rb +21 -19
- data/lib/prawn/images/image.rb +2 -0
- data/lib/prawn/images/jpg.rb +2 -0
- data/lib/prawn/images/png.rb +9 -9
- data/lib/prawn/measurement_extensions.rb +2 -0
- data/lib/prawn/measurements.rb +5 -0
- data/lib/prawn/outline.rb +2 -0
- data/lib/prawn/repeater.rb +2 -0
- data/lib/prawn/security.rb +26 -24
- data/lib/prawn/security/arcfour.rb +2 -0
- data/lib/prawn/soft_mask.rb +3 -1
- data/lib/prawn/stamp.rb +4 -1
- data/lib/prawn/text.rb +14 -12
- data/lib/prawn/text/box.rb +3 -1
- data/lib/prawn/text/formatted.rb +2 -0
- data/lib/prawn/text/formatted/arranger.rb +12 -12
- data/lib/prawn/text/formatted/box.rb +23 -13
- data/lib/prawn/text/formatted/fragment.rb +2 -0
- data/lib/prawn/text/formatted/line_wrap.rb +10 -8
- data/lib/prawn/text/formatted/parser.rb +8 -10
- data/lib/prawn/text/formatted/wrap.rb +4 -2
- data/lib/prawn/transformation_stack.rb +5 -2
- data/lib/prawn/utilities.rb +2 -2
- data/lib/prawn/version.rb +3 -1
- data/lib/prawn/view.rb +15 -7
- data/manual/basic_concepts/adding_pages.rb +2 -0
- data/manual/basic_concepts/basic_concepts.rb +4 -2
- data/manual/basic_concepts/creation.rb +2 -0
- data/manual/basic_concepts/cursor.rb +2 -0
- data/manual/basic_concepts/measurement.rb +3 -1
- data/manual/basic_concepts/origin.rb +2 -0
- data/manual/basic_concepts/other_cursor_helpers.rb +2 -0
- data/manual/basic_concepts/view.rb +2 -0
- data/manual/bounding_box/bounding_box.rb +4 -2
- data/manual/bounding_box/bounds.rb +6 -4
- data/manual/bounding_box/canvas.rb +2 -0
- data/manual/bounding_box/creation.rb +2 -0
- data/manual/bounding_box/indentation.rb +2 -0
- data/manual/bounding_box/nesting.rb +2 -0
- data/manual/bounding_box/russian_boxes.rb +6 -4
- data/manual/bounding_box/stretchy.rb +2 -0
- data/manual/contents.rb +2 -0
- data/manual/cover.rb +10 -7
- data/manual/document_and_page_options/background.rb +2 -0
- data/manual/document_and_page_options/document_and_page_options.rb +4 -2
- data/manual/document_and_page_options/metadata.rb +2 -0
- data/manual/document_and_page_options/page_margins.rb +2 -0
- data/manual/document_and_page_options/page_size.rb +2 -0
- data/manual/document_and_page_options/print_scaling.rb +2 -0
- data/manual/example_helper.rb +5 -2
- data/manual/graphics/blend_mode.rb +6 -4
- data/manual/graphics/circle_and_ellipse.rb +2 -0
- data/manual/graphics/color.rb +2 -0
- data/manual/graphics/common_lines.rb +2 -0
- data/manual/graphics/fill_and_stroke.rb +2 -0
- data/manual/graphics/fill_rules.rb +2 -0
- data/manual/graphics/gradients.rb +2 -0
- data/manual/graphics/graphics.rb +4 -2
- data/manual/graphics/helper.rb +2 -0
- data/manual/graphics/line_width.rb +3 -0
- data/manual/graphics/lines_and_curves.rb +2 -0
- data/manual/graphics/polygon.rb +2 -0
- data/manual/graphics/rectangle.rb +2 -0
- data/manual/graphics/rotate.rb +2 -0
- data/manual/graphics/scale.rb +2 -0
- data/manual/graphics/soft_masks.rb +2 -0
- data/manual/graphics/stroke_cap.rb +3 -1
- data/manual/graphics/stroke_dash.rb +2 -0
- data/manual/graphics/stroke_join.rb +3 -1
- data/manual/graphics/translate.rb +2 -0
- data/manual/graphics/transparency.rb +2 -0
- data/manual/how_to_read_this_manual.rb +2 -0
- data/manual/images/absolute_position.rb +2 -0
- data/manual/images/fit.rb +2 -0
- data/manual/images/horizontal.rb +3 -1
- data/manual/images/images.rb +4 -2
- data/manual/images/plain_image.rb +2 -0
- data/manual/images/scale.rb +2 -0
- data/manual/images/vertical.rb +3 -1
- data/manual/images/width_and_height.rb +2 -0
- data/manual/layout/boxes.rb +2 -0
- data/manual/layout/content.rb +2 -0
- data/manual/layout/layout.rb +4 -2
- data/manual/layout/simple_grid.rb +2 -0
- data/manual/outline/add_subsection_to.rb +2 -0
- data/manual/outline/insert_section_after.rb +2 -0
- data/manual/outline/outline.rb +4 -2
- data/manual/outline/sections_and_pages.rb +2 -0
- data/manual/repeatable_content/alternate_page_numbering.rb +2 -0
- data/manual/repeatable_content/page_numbering.rb +2 -0
- data/manual/repeatable_content/repeatable_content.rb +4 -2
- data/manual/repeatable_content/repeater.rb +2 -0
- data/manual/repeatable_content/stamp.rb +2 -0
- data/manual/security/encryption.rb +2 -0
- data/manual/security/permissions.rb +2 -0
- data/manual/security/security.rb +4 -2
- data/manual/table.rb +2 -0
- data/manual/text/alignment.rb +2 -0
- data/manual/text/color.rb +2 -0
- data/manual/text/column_box.rb +4 -2
- data/manual/text/fallback_fonts.rb +4 -2
- data/manual/text/font.rb +2 -0
- data/manual/text/font_size.rb +2 -0
- data/manual/text/font_style.rb +4 -2
- data/manual/text/formatted_callbacks.rb +2 -0
- data/manual/text/formatted_text.rb +3 -1
- data/manual/text/free_flowing_text.rb +2 -0
- data/manual/text/inline.rb +2 -0
- data/manual/text/kerning_and_character_spacing.rb +2 -0
- data/manual/text/leading.rb +2 -0
- data/manual/text/line_wrapping.rb +4 -1
- data/manual/text/paragraph_indentation.rb +2 -0
- data/manual/text/positioned_text.rb +2 -0
- data/manual/text/registering_families.rb +4 -2
- data/manual/text/rendering_and_color.rb +2 -0
- data/manual/text/right_to_left_text.rb +2 -0
- data/manual/text/rotation.rb +3 -1
- data/manual/text/single_usage.rb +2 -0
- data/manual/text/text.rb +4 -3
- data/manual/text/text_box_excess.rb +2 -0
- data/manual/text/text_box_extensions.rb +2 -0
- data/manual/text/text_box_overflow.rb +3 -1
- data/manual/text/utf8.rb +3 -1
- data/manual/text/win_ansi_charset.rb +6 -3
- data/prawn.gemspec +14 -11
- data/spec/extensions/encoding_helpers.rb +4 -2
- data/spec/prawn/document/bounding_box_spec.rb +8 -8
- data/spec/prawn/document/column_box_spec.rb +2 -0
- data/spec/prawn/document/security_spec.rb +12 -9
- data/spec/prawn/document_annotations_spec.rb +2 -0
- data/spec/prawn/document_destinations_spec.rb +2 -0
- data/spec/prawn/document_grid_spec.rb +3 -0
- data/spec/prawn/document_reference_spec.rb +2 -0
- data/spec/prawn/document_span_spec.rb +2 -0
- data/spec/prawn/document_spec.rb +59 -14
- data/spec/prawn/font_metric_cache_spec.rb +2 -0
- data/spec/prawn/font_spec.rb +45 -16
- data/spec/prawn/graphics/blend_mode_spec.rb +4 -2
- data/spec/prawn/graphics/transparency_spec.rb +2 -0
- data/spec/prawn/graphics_spec.rb +40 -20
- data/spec/prawn/graphics_stroke_styles_spec.rb +2 -0
- data/spec/prawn/image_handler_spec.rb +2 -0
- data/spec/prawn/images/jpg_spec.rb +2 -0
- data/spec/prawn/images/png_spec.rb +2 -0
- data/spec/prawn/images_spec.rb +56 -2
- data/spec/prawn/measurements_extensions_spec.rb +2 -0
- data/spec/prawn/outline_spec.rb +6 -2
- data/spec/prawn/repeater_spec.rb +6 -4
- data/spec/prawn/soft_mask_spec.rb +2 -0
- data/spec/prawn/stamp_spec.rb +11 -7
- data/spec/prawn/text/box_spec.rb +26 -27
- data/spec/prawn/text/formatted/arranger_spec.rb +30 -28
- data/spec/prawn/text/formatted/box_spec.rb +78 -57
- data/spec/prawn/text/formatted/fragment_spec.rb +10 -8
- data/spec/prawn/text/formatted/line_wrap_spec.rb +8 -5
- data/spec/prawn/text/formatted/parser_spec.rb +32 -2
- data/spec/prawn/text_draw_text_spec.rb +5 -3
- data/spec/prawn/text_rendering_mode_spec.rb +7 -1
- data/spec/prawn/text_spacing_spec.rb +6 -4
- data/spec/prawn/text_spec.rb +9 -7
- data/spec/prawn/text_with_inline_formatting_spec.rb +3 -1
- data/spec/prawn/transformation_stack_spec.rb +2 -0
- data/spec/prawn/view_spec.rb +18 -0
- data/spec/{manual_spec.rb → prawn_manual_spec.rb} +6 -4
- data/spec/spec_helper.rb +9 -10
- metadata +86 -73
- metadata.gz.sig +4 -2
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::Text do
|
@@ -42,7 +44,7 @@ describe Prawn::Text do
|
|
42
44
|
expect(text.font_settings[0][:size]).to eq(16)
|
43
45
|
end
|
44
46
|
|
45
|
-
# rubocop: disable
|
47
|
+
# rubocop: disable Naming/AccessorMethodName
|
46
48
|
rotated_text_inspector = Class.new(PDF::Inspector) do
|
47
49
|
attr_reader :tm_operator_used
|
48
50
|
|
@@ -50,11 +52,11 @@ describe Prawn::Text do
|
|
50
52
|
@tm_operator_used = false
|
51
53
|
end
|
52
54
|
|
53
|
-
def set_text_matrix_and_text_line_matrix(*
|
55
|
+
def set_text_matrix_and_text_line_matrix(*_arguments)
|
54
56
|
@tm_operator_used = true
|
55
57
|
end
|
56
58
|
end
|
57
|
-
# rubocop: enable
|
59
|
+
# rubocop: enable Naming/AccessorMethodName
|
58
60
|
|
59
61
|
it 'allows rotation' do
|
60
62
|
pdf.draw_text('Test', at: [100, 100], rotate: 90)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::Text do
|
@@ -11,7 +13,8 @@ describe Prawn::Text do
|
|
11
13
|
contents = PDF::Inspector::Text.analyze(pdf.render)
|
12
14
|
expect(contents.text_rendering_mode.first).to eq(1)
|
13
15
|
end
|
14
|
-
|
16
|
+
|
17
|
+
it 'does not draw the text rendering mode to the document' \
|
15
18
|
' when the new mode matches the old' do
|
16
19
|
pdf.text_rendering_mode(:fill) do
|
17
20
|
pdf.text('hello world')
|
@@ -19,6 +22,7 @@ describe Prawn::Text do
|
|
19
22
|
contents = PDF::Inspector::Text.analyze(pdf.render)
|
20
23
|
expect(contents.text_rendering_mode).to be_empty
|
21
24
|
end
|
25
|
+
|
22
26
|
it 'restores character spacing to 0' do
|
23
27
|
pdf.text_rendering_mode(:stroke) do
|
24
28
|
pdf.text('hello world')
|
@@ -26,6 +30,7 @@ describe Prawn::Text do
|
|
26
30
|
contents = PDF::Inspector::Text.analyze(pdf.render)
|
27
31
|
expect(contents.text_rendering_mode).to eq([1, 0])
|
28
32
|
end
|
33
|
+
|
29
34
|
it 'functions as an accessor when no parameter given' do
|
30
35
|
pdf.text_rendering_mode(:fill_stroke) do
|
31
36
|
pdf.text('hello world')
|
@@ -33,6 +38,7 @@ describe Prawn::Text do
|
|
33
38
|
end
|
34
39
|
expect(pdf.text_rendering_mode).to eq(:fill)
|
35
40
|
end
|
41
|
+
|
36
42
|
it 'raise_errors an exception when passed an invalid mode' do
|
37
43
|
expect { pdf.text_rendering_mode(-1) }.to raise_error(ArgumentError)
|
38
44
|
expect { pdf.text_rendering_mode(8) }.to raise_error(ArgumentError)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::Text do
|
@@ -12,7 +14,7 @@ describe Prawn::Text do
|
|
12
14
|
expect(contents.character_spacing.first).to eq(10.5556)
|
13
15
|
end
|
14
16
|
|
15
|
-
it '
|
17
|
+
it 'does not draw the character spacing to the document' \
|
16
18
|
' when the new character spacing matches the old' do
|
17
19
|
pdf.character_spacing(0) do
|
18
20
|
pdf.text('hello world')
|
@@ -50,8 +52,8 @@ describe Prawn::Text do
|
|
50
52
|
end
|
51
53
|
|
52
54
|
pdf.character_spacing(10) do
|
53
|
-
# the new width should include
|
54
|
-
expect(pdf.width_of(str)).to be_within(0.001).of(raw_width + (10 *
|
55
|
+
# the new width should include six 10-pt character spaces.
|
56
|
+
expect(pdf.width_of(str)).to be_within(0.001).of(raw_width + (10 * 6))
|
55
57
|
end
|
56
58
|
end
|
57
59
|
end
|
@@ -65,7 +67,7 @@ describe Prawn::Text do
|
|
65
67
|
expect(contents.word_spacing.first).to eq(10.5556)
|
66
68
|
end
|
67
69
|
|
68
|
-
it '
|
70
|
+
it 'draws the word spacing to the document' \
|
69
71
|
' when the new word spacing matches the old' do
|
70
72
|
pdf.word_spacing(0) do
|
71
73
|
pdf.text('hello world')
|
data/spec/prawn/text_spec.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::Text do
|
4
|
-
describe
|
6
|
+
describe 'NBSP' do
|
5
7
|
it 'is defined' do
|
6
8
|
expect(Prawn::Text::NBSP).to eq("\u00a0")
|
7
9
|
end
|
@@ -10,7 +12,7 @@ describe Prawn::Text do
|
|
10
12
|
describe '#height_of' do
|
11
13
|
let(:pdf) { create_pdf }
|
12
14
|
|
13
|
-
it '
|
15
|
+
it 'returns the height that would be required to print a' \
|
14
16
|
'particular string of text' do
|
15
17
|
original_y = pdf.y
|
16
18
|
pdf.text('Foo')
|
@@ -18,7 +20,7 @@ describe Prawn::Text do
|
|
18
20
|
expect(pdf.height_of('Foo')).to be_within(0.0001).of(original_y - new_y)
|
19
21
|
end
|
20
22
|
|
21
|
-
it '
|
23
|
+
it 'omits the gap below the last descender if :final_gap => false ' \
|
22
24
|
'is given' do
|
23
25
|
original_y = pdf.y
|
24
26
|
pdf.text('Foo', final_gap: false)
|
@@ -66,7 +68,7 @@ describe Prawn::Text do
|
|
66
68
|
pdf.text ' '
|
67
69
|
text = PDF::Inspector::Text.analyze(pdf.render)
|
68
70
|
# If anything is rendered to the page, it should be whitespace.
|
69
|
-
text.strings
|
71
|
+
expect(text.strings).to all(match(/\A\s*\z/))
|
70
72
|
end
|
71
73
|
|
72
74
|
it 'ignores call when string is nil' do
|
@@ -87,7 +89,7 @@ describe Prawn::Text do
|
|
87
89
|
expect(text.strings.reject(&:empty?)).to eq(%w[text text])
|
88
90
|
end
|
89
91
|
|
90
|
-
it '
|
92
|
+
it 'correctly renders strings ending with empty paragraphs and ' \
|
91
93
|
':inline_format and :indent_paragraphs' do
|
92
94
|
pdf.text "text\n\n", inline_format: true, indent_paragraphs: 5
|
93
95
|
text = PDF::Inspector::Text.analyze(pdf.render)
|
@@ -311,7 +313,7 @@ describe Prawn::Text do
|
|
311
313
|
expect(pages[1][:strings]).to eq([str])
|
312
314
|
end
|
313
315
|
|
314
|
-
it '
|
316
|
+
it 'correctly renders a string with higher bit characters across ' \
|
315
317
|
'a page break when using a built-in font and :indent_paragraphs option' do
|
316
318
|
str = '©'
|
317
319
|
pdf.move_cursor_to(pdf.font.height)
|
@@ -339,7 +341,7 @@ describe Prawn::Text do
|
|
339
341
|
pdf.text(sjis_str)
|
340
342
|
end
|
341
343
|
|
342
|
-
it '
|
344
|
+
it 'calls move_past_bottom when printing more text than can fit' \
|
343
345
|
' between the current document.y and bounds.bottom' do
|
344
346
|
pdf.y = pdf.font.height
|
345
347
|
pdf.text 'Hello'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::Text do
|
@@ -15,7 +17,7 @@ describe Prawn::Text do
|
|
15
17
|
end
|
16
18
|
|
17
19
|
describe '#text with inline styling' do
|
18
|
-
it '
|
20
|
+
it 'automatically moves to a new page if the tallest fragment' \
|
19
21
|
" on the next line won't fit in the available space" do
|
20
22
|
pdf.move_cursor_to(pdf.font.height)
|
21
23
|
formatted = "this contains <font size='24'>sized</font> text"
|
data/spec/prawn/view_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Prawn::View do
|
@@ -42,4 +44,20 @@ describe Prawn::View do
|
|
42
44
|
view_object.save_as('foo.pdf')
|
43
45
|
expect(doc).to have_received(:render_file)
|
44
46
|
end
|
47
|
+
|
48
|
+
describe '#respond_to?', issue: 1064 do
|
49
|
+
subject { view_object.respond_to?(method) }
|
50
|
+
|
51
|
+
context 'when called with an existing method from Prawn::Document' do
|
52
|
+
let(:method) { :text }
|
53
|
+
|
54
|
+
it { is_expected.to be_truthy }
|
55
|
+
end
|
56
|
+
|
57
|
+
context 'when called with a non-existing method' do
|
58
|
+
let(:method) { :non_existing_method }
|
59
|
+
|
60
|
+
it { is_expected.to be_falsey }
|
61
|
+
end
|
62
|
+
end
|
45
63
|
end
|
@@ -1,15 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
require 'digest/sha2'
|
3
5
|
|
4
|
-
# rubocop: disable Metrics/LineLength
|
5
6
|
MANUAL_HASH =
|
6
7
|
case RUBY_ENGINE
|
7
8
|
when 'ruby'
|
8
|
-
'
|
9
|
+
'b38bd8aaa7b419a2f594ee8837cd62f813141000393995b0c0456644b823a62a'\
|
10
|
+
'2f8031b2db0fc9e7c544b3946a9b0e60570d510564e6fed3931e0717dd49188a'
|
9
11
|
when 'jruby'
|
10
|
-
'
|
12
|
+
'b38bd8aaa7b419a2f594ee8837cd62f813141000393995b0c0456644b823a62a'\
|
13
|
+
'2f8031b2db0fc9e7c544b3946a9b0e60570d510564e6fed3931e0717dd49188a'
|
11
14
|
end
|
12
|
-
# rubocop: enable Metrics/LineLength
|
13
15
|
|
14
16
|
RSpec.describe Prawn do
|
15
17
|
describe 'manual' do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
Bundler.setup
|
3
|
+
puts "Prawn specs: Running on Ruby Version: #{RUBY_VERSION}"
|
5
4
|
|
6
5
|
if ENV['COVERAGE']
|
7
6
|
require 'simplecov'
|
@@ -13,7 +12,7 @@ end
|
|
13
12
|
require_relative '../lib/prawn'
|
14
13
|
|
15
14
|
Prawn.debug = true
|
16
|
-
Prawn::
|
15
|
+
Prawn::Fonts::AFM.hide_m17n_warning = true
|
17
16
|
|
18
17
|
require 'rspec'
|
19
18
|
require 'pdf/reader'
|
@@ -21,7 +20,7 @@ require 'pdf/inspector'
|
|
21
20
|
|
22
21
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
23
22
|
# in spec/extensions/ and its subdirectories.
|
24
|
-
Dir[File.
|
23
|
+
Dir[File.join(__dir__, 'extensions', '**', '*.rb')].sort.each { |f| require f }
|
25
24
|
|
26
25
|
RSpec.configure do |config|
|
27
26
|
config.include EncodingHelpers
|
@@ -42,8 +41,8 @@ RSpec::Matchers.define :have_parseable_xobjects do
|
|
42
41
|
end
|
43
42
|
|
44
43
|
# Make some methods public to assist in testing
|
45
|
-
module Prawn
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
44
|
+
# module Prawn
|
45
|
+
# module Graphics
|
46
|
+
# public :map_to_absolute
|
47
|
+
# end
|
48
|
+
# end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Brown
|
@@ -9,61 +9,60 @@ authors:
|
|
9
9
|
- Daniel Nelson
|
10
10
|
- Jonathan Greenberg
|
11
11
|
- James Healy
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain:
|
15
15
|
- |
|
16
16
|
-----BEGIN CERTIFICATE-----
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
5u3JK+T0toNEYkMuV6W8NU+gVyo=
|
17
|
+
MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhhbGV4
|
18
|
+
L0RDPXBvaW50bGVzcy9EQz1vbmUwHhcNMjAwODAxMTQxMjE1WhcNMjEwODAxMTQx
|
19
|
+
MjE1WjAjMSEwHwYDVQQDDBhhbGV4L0RDPXBvaW50bGVzcy9EQz1vbmUwggEiMA0G
|
20
|
+
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPOVLPGEK+eaP6zJfifrpWvPTg4qo3
|
21
|
+
XNJJPom80SwqX2hVCVsRDK4RYgKUQqKRQzHhlx14wZHwWLETBVbNDGX3uqyCnTWU
|
22
|
+
JUKh3ydiZShXpNHoV/NW7hhEYvNsDcBAjYTmbvXOhuYCo0Tz/0N2Oiun/0wIICtP
|
23
|
+
vytY9TY0/lklWjAbsqJjNOu3o8IYkJBAN/rU96E/6WhFwjnxLcTnV9RfFRXdjG5j
|
24
|
+
CughoB2xSwKX8gwbQ8fsnaZRmdyDGYNpz6sGF0zycfiLkTttbLA2nYATCALy98CH
|
25
|
+
nsyZNsTjb4WINCuY2yEDjwesw9f/ROkNC68EgQ5M+aMjp+D0WcYGfzojAgMBAAGj
|
26
|
+
dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBRPgIwSVbeonua/
|
27
|
+
Ny/8576oxdUbrjAdBgNVHREEFjAUgRJhbGV4QHBvaW50bGVzcy5vbmUwHQYDVR0S
|
28
|
+
BBYwFIESYWxleEBwb2ludGxlc3Mub25lMA0GCSqGSIb3DQEBCwUAA4IBAQAzhGxF
|
29
|
+
M0bXJ9GWD9vdVHOyzBQBJcJAvnsz2yV3+r4eJBsQynFIscsea8lHFL/d1eHYP0mN
|
30
|
+
k0fhK+WDcPlrj0Sn/Ezhk2qogTIekwDOK6pZkGRQzD45leJqQMnYd+/TXK3ri485
|
31
|
+
Gi4oJ6NitnnUT59SQnjD5JcENfc0EcRzclmVRFE8W4O+ORgo4Dypq1rwYUzxeyUk
|
32
|
+
mP5jNBWtH+hGUph28GQb0Hph6YnQb8zEFB88Xq80PK1SzkIPHpbTBk9mwPf6ypeX
|
33
|
+
Un1TJEahAlgENVml6CyDXSwk0H8N1V3gm1mb9Fe1T2Z/kAzvjo0qTDEtMVLU7Bxh
|
34
|
+
uqMUrdETjTnRYCVq
|
36
35
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
36
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
38
37
|
dependencies:
|
39
38
|
- !ruby/object:Gem::Dependency
|
40
|
-
name:
|
39
|
+
name: pdf-core
|
41
40
|
requirement: !ruby/object:Gem::Requirement
|
42
41
|
requirements:
|
43
42
|
- - "~>"
|
44
43
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
44
|
+
version: 0.8.1
|
46
45
|
type: :runtime
|
47
46
|
prerelease: false
|
48
47
|
version_requirements: !ruby/object:Gem::Requirement
|
49
48
|
requirements:
|
50
49
|
- - "~>"
|
51
50
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
51
|
+
version: 0.8.1
|
53
52
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
53
|
+
name: ttfunk
|
55
54
|
requirement: !ruby/object:Gem::Requirement
|
56
55
|
requirements:
|
57
56
|
- - "~>"
|
58
57
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
58
|
+
version: '1.6'
|
60
59
|
type: :runtime
|
61
60
|
prerelease: false
|
62
61
|
version_requirements: !ruby/object:Gem::Requirement
|
63
62
|
requirements:
|
64
63
|
- - "~>"
|
65
64
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
65
|
+
version: '1.6'
|
67
66
|
- !ruby/object:Gem::Dependency
|
68
67
|
name: pdf-inspector
|
69
68
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,33 +84,39 @@ dependencies:
|
|
85
84
|
- !ruby/object:Gem::Version
|
86
85
|
version: 2.0.a
|
87
86
|
- !ruby/object:Gem::Dependency
|
88
|
-
name:
|
87
|
+
name: pdf-reader
|
89
88
|
requirement: !ruby/object:Gem::Requirement
|
90
89
|
requirements:
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '1.4'
|
91
93
|
- - ">="
|
92
94
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
95
|
+
version: 1.4.1
|
94
96
|
type: :development
|
95
97
|
prerelease: false
|
96
98
|
version_requirements: !ruby/object:Gem::Requirement
|
97
99
|
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.4'
|
98
103
|
- - ">="
|
99
104
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
105
|
+
version: 1.4.1
|
101
106
|
- !ruby/object:Gem::Dependency
|
102
|
-
name:
|
107
|
+
name: prawn-manual_builder
|
103
108
|
requirement: !ruby/object:Gem::Requirement
|
104
109
|
requirements:
|
105
|
-
- - "
|
110
|
+
- - ">="
|
106
111
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
112
|
+
version: 0.3.0
|
108
113
|
type: :development
|
109
114
|
prerelease: false
|
110
115
|
version_requirements: !ruby/object:Gem::Requirement
|
111
116
|
requirements:
|
112
|
-
- - "
|
117
|
+
- - ">="
|
113
118
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
119
|
+
version: 0.3.0
|
115
120
|
- !ruby/object:Gem::Dependency
|
116
121
|
name: rake
|
117
122
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,81 +132,89 @@ dependencies:
|
|
127
132
|
- !ruby/object:Gem::Version
|
128
133
|
version: '12.0'
|
129
134
|
- !ruby/object:Gem::Dependency
|
130
|
-
name:
|
135
|
+
name: rspec
|
131
136
|
requirement: !ruby/object:Gem::Requirement
|
132
137
|
requirements:
|
133
|
-
- - "
|
138
|
+
- - "~>"
|
134
139
|
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
140
|
+
version: '3.0'
|
136
141
|
type: :development
|
137
142
|
prerelease: false
|
138
143
|
version_requirements: !ruby/object:Gem::Requirement
|
139
144
|
requirements:
|
140
|
-
- - "
|
145
|
+
- - "~>"
|
141
146
|
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
147
|
+
version: '3.0'
|
143
148
|
- !ruby/object:Gem::Dependency
|
144
|
-
name:
|
149
|
+
name: rubocop
|
145
150
|
requirement: !ruby/object:Gem::Requirement
|
146
151
|
requirements:
|
147
|
-
- - "
|
152
|
+
- - "~>"
|
148
153
|
- !ruby/object:Gem::Version
|
149
|
-
version: 0.
|
154
|
+
version: 0.84.0
|
150
155
|
type: :development
|
151
156
|
prerelease: false
|
152
157
|
version_requirements: !ruby/object:Gem::Requirement
|
153
158
|
requirements:
|
154
|
-
- - "
|
159
|
+
- - "~>"
|
155
160
|
- !ruby/object:Gem::Version
|
156
|
-
version: 0.
|
161
|
+
version: 0.84.0
|
157
162
|
- !ruby/object:Gem::Dependency
|
158
|
-
name:
|
163
|
+
name: rubocop-performance
|
159
164
|
requirement: !ruby/object:Gem::Requirement
|
160
165
|
requirements:
|
161
166
|
- - "~>"
|
162
167
|
- !ruby/object:Gem::Version
|
163
|
-
version: '1.
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 1.4.1
|
168
|
+
version: '1.1'
|
167
169
|
type: :development
|
168
170
|
prerelease: false
|
169
171
|
version_requirements: !ruby/object:Gem::Requirement
|
170
172
|
requirements:
|
171
173
|
- - "~>"
|
172
174
|
- !ruby/object:Gem::Version
|
173
|
-
version: '1.
|
174
|
-
- - ">="
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: 1.4.1
|
175
|
+
version: '1.1'
|
177
176
|
- !ruby/object:Gem::Dependency
|
178
|
-
name: rubocop
|
177
|
+
name: rubocop-rspec
|
179
178
|
requirement: !ruby/object:Gem::Requirement
|
180
179
|
requirements:
|
181
180
|
- - "~>"
|
182
181
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
182
|
+
version: '1.32'
|
184
183
|
type: :development
|
185
184
|
prerelease: false
|
186
185
|
version_requirements: !ruby/object:Gem::Requirement
|
187
186
|
requirements:
|
188
187
|
- - "~>"
|
189
188
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
189
|
+
version: '1.32'
|
191
190
|
- !ruby/object:Gem::Dependency
|
192
|
-
name:
|
191
|
+
name: simplecov
|
193
192
|
requirement: !ruby/object:Gem::Requirement
|
194
193
|
requirements:
|
195
|
-
- - "
|
194
|
+
- - ">="
|
196
195
|
- !ruby/object:Gem::Version
|
197
|
-
version: '
|
196
|
+
version: '0'
|
198
197
|
type: :development
|
199
198
|
prerelease: false
|
200
199
|
version_requirements: !ruby/object:Gem::Requirement
|
201
200
|
requirements:
|
202
|
-
- - "
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
- !ruby/object:Gem::Dependency
|
205
|
+
name: yard
|
206
|
+
requirement: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
203
209
|
- !ruby/object:Gem::Version
|
204
|
-
version: '
|
210
|
+
version: '0'
|
211
|
+
type: :development
|
212
|
+
prerelease: false
|
213
|
+
version_requirements: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
205
218
|
description: " Prawn is a fast, tiny, and nimble PDF generator for Ruby\n"
|
206
219
|
email:
|
207
220
|
- gregory.t.brown@gmail.com
|
@@ -244,11 +257,12 @@ files:
|
|
244
257
|
- lib/prawn/encoding.rb
|
245
258
|
- lib/prawn/errors.rb
|
246
259
|
- lib/prawn/font.rb
|
247
|
-
- lib/prawn/font/afm.rb
|
248
|
-
- lib/prawn/font/dfont.rb
|
249
|
-
- lib/prawn/font/ttc.rb
|
250
|
-
- lib/prawn/font/ttf.rb
|
251
260
|
- lib/prawn/font_metric_cache.rb
|
261
|
+
- lib/prawn/fonts/afm.rb
|
262
|
+
- lib/prawn/fonts/dfont.rb
|
263
|
+
- lib/prawn/fonts/otf.rb
|
264
|
+
- lib/prawn/fonts/ttc.rb
|
265
|
+
- lib/prawn/fonts/ttf.rb
|
252
266
|
- lib/prawn/graphics.rb
|
253
267
|
- lib/prawn/graphics/blend_mode.rb
|
254
268
|
- lib/prawn/graphics/cap_style.rb
|
@@ -388,7 +402,6 @@ files:
|
|
388
402
|
- prawn.gemspec
|
389
403
|
- spec/data/curves.pdf
|
390
404
|
- spec/extensions/encoding_helpers.rb
|
391
|
-
- spec/manual_spec.rb
|
392
405
|
- spec/prawn/document/bounding_box_spec.rb
|
393
406
|
- spec/prawn/document/column_box_spec.rb
|
394
407
|
- spec/prawn/document/security_spec.rb
|
@@ -426,6 +439,7 @@ files:
|
|
426
439
|
- spec/prawn/text_with_inline_formatting_spec.rb
|
427
440
|
- spec/prawn/transformation_stack_spec.rb
|
428
441
|
- spec/prawn/view_spec.rb
|
442
|
+
- spec/prawn_manual_spec.rb
|
429
443
|
- spec/spec_helper.rb
|
430
444
|
homepage: http://prawnpdf.org
|
431
445
|
licenses:
|
@@ -433,7 +447,7 @@ licenses:
|
|
433
447
|
- GPL-2.0
|
434
448
|
- GPL-3.0
|
435
449
|
metadata: {}
|
436
|
-
post_install_message:
|
450
|
+
post_install_message:
|
437
451
|
rdoc_options: []
|
438
452
|
require_paths:
|
439
453
|
- lib
|
@@ -441,16 +455,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
441
455
|
requirements:
|
442
456
|
- - "~>"
|
443
457
|
- !ruby/object:Gem::Version
|
444
|
-
version: '2.
|
458
|
+
version: '2.5'
|
445
459
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
446
460
|
requirements:
|
447
461
|
- - ">="
|
448
462
|
- !ruby/object:Gem::Version
|
449
463
|
version: 1.3.6
|
450
464
|
requirements: []
|
451
|
-
|
452
|
-
|
453
|
-
signing_key:
|
465
|
+
rubygems_version: 3.1.2
|
466
|
+
signing_key:
|
454
467
|
specification_version: 4
|
455
468
|
summary: A fast and nimble PDF generator for Ruby
|
456
469
|
test_files: []
|