prawn 2.2.2 → 2.3.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.
Files changed (199) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/GPLv2 +20 -21
  5. data/Gemfile +2 -0
  6. data/Rakefile +10 -3
  7. data/lib/prawn.rb +9 -3
  8. data/lib/prawn/document.rb +40 -18
  9. data/lib/prawn/document/bounding_box.rb +9 -4
  10. data/lib/prawn/document/column_box.rb +2 -0
  11. data/lib/prawn/document/internals.rb +6 -4
  12. data/lib/prawn/document/span.rb +2 -0
  13. data/lib/prawn/encoding.rb +4 -1
  14. data/lib/prawn/errors.rb +2 -0
  15. data/lib/prawn/font.rb +34 -17
  16. data/lib/prawn/font_metric_cache.rb +8 -3
  17. data/lib/prawn/{font → fonts}/afm.rb +14 -7
  18. data/lib/prawn/{font → fonts}/dfont.rb +3 -1
  19. data/lib/prawn/fonts/otf.rb +11 -0
  20. data/lib/prawn/{font → fonts}/ttc.rb +3 -1
  21. data/lib/prawn/{font → fonts}/ttf.rb +23 -12
  22. data/lib/prawn/graphics.rb +24 -26
  23. data/lib/prawn/graphics/blend_mode.rb +2 -0
  24. data/lib/prawn/graphics/cap_style.rb +2 -0
  25. data/lib/prawn/graphics/color.rb +8 -3
  26. data/lib/prawn/graphics/dash.rb +3 -1
  27. data/lib/prawn/graphics/join_style.rb +2 -0
  28. data/lib/prawn/graphics/patterns.rb +7 -2
  29. data/lib/prawn/graphics/transformation.rb +5 -1
  30. data/lib/prawn/graphics/transparency.rb +2 -0
  31. data/lib/prawn/grid.rb +39 -38
  32. data/lib/prawn/image_handler.rb +2 -0
  33. data/lib/prawn/images.rb +21 -19
  34. data/lib/prawn/images/image.rb +2 -0
  35. data/lib/prawn/images/jpg.rb +2 -0
  36. data/lib/prawn/images/png.rb +9 -9
  37. data/lib/prawn/measurement_extensions.rb +2 -0
  38. data/lib/prawn/measurements.rb +5 -0
  39. data/lib/prawn/outline.rb +2 -0
  40. data/lib/prawn/repeater.rb +2 -0
  41. data/lib/prawn/security.rb +26 -24
  42. data/lib/prawn/security/arcfour.rb +2 -0
  43. data/lib/prawn/soft_mask.rb +3 -1
  44. data/lib/prawn/stamp.rb +4 -1
  45. data/lib/prawn/text.rb +14 -12
  46. data/lib/prawn/text/box.rb +3 -1
  47. data/lib/prawn/text/formatted.rb +2 -0
  48. data/lib/prawn/text/formatted/arranger.rb +12 -12
  49. data/lib/prawn/text/formatted/box.rb +23 -13
  50. data/lib/prawn/text/formatted/fragment.rb +2 -0
  51. data/lib/prawn/text/formatted/line_wrap.rb +10 -8
  52. data/lib/prawn/text/formatted/parser.rb +8 -10
  53. data/lib/prawn/text/formatted/wrap.rb +4 -2
  54. data/lib/prawn/transformation_stack.rb +5 -2
  55. data/lib/prawn/utilities.rb +2 -2
  56. data/lib/prawn/version.rb +3 -1
  57. data/lib/prawn/view.rb +15 -7
  58. data/manual/basic_concepts/adding_pages.rb +2 -0
  59. data/manual/basic_concepts/basic_concepts.rb +4 -2
  60. data/manual/basic_concepts/creation.rb +2 -0
  61. data/manual/basic_concepts/cursor.rb +2 -0
  62. data/manual/basic_concepts/measurement.rb +3 -1
  63. data/manual/basic_concepts/origin.rb +2 -0
  64. data/manual/basic_concepts/other_cursor_helpers.rb +2 -0
  65. data/manual/basic_concepts/view.rb +2 -0
  66. data/manual/bounding_box/bounding_box.rb +4 -2
  67. data/manual/bounding_box/bounds.rb +6 -4
  68. data/manual/bounding_box/canvas.rb +2 -0
  69. data/manual/bounding_box/creation.rb +2 -0
  70. data/manual/bounding_box/indentation.rb +2 -0
  71. data/manual/bounding_box/nesting.rb +2 -0
  72. data/manual/bounding_box/russian_boxes.rb +6 -4
  73. data/manual/bounding_box/stretchy.rb +2 -0
  74. data/manual/contents.rb +2 -0
  75. data/manual/cover.rb +10 -7
  76. data/manual/document_and_page_options/background.rb +2 -0
  77. data/manual/document_and_page_options/document_and_page_options.rb +4 -2
  78. data/manual/document_and_page_options/metadata.rb +2 -0
  79. data/manual/document_and_page_options/page_margins.rb +2 -0
  80. data/manual/document_and_page_options/page_size.rb +2 -0
  81. data/manual/document_and_page_options/print_scaling.rb +2 -0
  82. data/manual/example_helper.rb +5 -2
  83. data/manual/graphics/blend_mode.rb +6 -4
  84. data/manual/graphics/circle_and_ellipse.rb +2 -0
  85. data/manual/graphics/color.rb +2 -0
  86. data/manual/graphics/common_lines.rb +2 -0
  87. data/manual/graphics/fill_and_stroke.rb +2 -0
  88. data/manual/graphics/fill_rules.rb +2 -0
  89. data/manual/graphics/gradients.rb +2 -0
  90. data/manual/graphics/graphics.rb +4 -2
  91. data/manual/graphics/helper.rb +2 -0
  92. data/manual/graphics/line_width.rb +3 -0
  93. data/manual/graphics/lines_and_curves.rb +2 -0
  94. data/manual/graphics/polygon.rb +2 -0
  95. data/manual/graphics/rectangle.rb +2 -0
  96. data/manual/graphics/rotate.rb +2 -0
  97. data/manual/graphics/scale.rb +2 -0
  98. data/manual/graphics/soft_masks.rb +2 -0
  99. data/manual/graphics/stroke_cap.rb +3 -1
  100. data/manual/graphics/stroke_dash.rb +2 -0
  101. data/manual/graphics/stroke_join.rb +3 -1
  102. data/manual/graphics/translate.rb +2 -0
  103. data/manual/graphics/transparency.rb +2 -0
  104. data/manual/how_to_read_this_manual.rb +2 -0
  105. data/manual/images/absolute_position.rb +2 -0
  106. data/manual/images/fit.rb +2 -0
  107. data/manual/images/horizontal.rb +3 -1
  108. data/manual/images/images.rb +4 -2
  109. data/manual/images/plain_image.rb +2 -0
  110. data/manual/images/scale.rb +2 -0
  111. data/manual/images/vertical.rb +3 -1
  112. data/manual/images/width_and_height.rb +2 -0
  113. data/manual/layout/boxes.rb +2 -0
  114. data/manual/layout/content.rb +2 -0
  115. data/manual/layout/layout.rb +4 -2
  116. data/manual/layout/simple_grid.rb +2 -0
  117. data/manual/outline/add_subsection_to.rb +2 -0
  118. data/manual/outline/insert_section_after.rb +2 -0
  119. data/manual/outline/outline.rb +4 -2
  120. data/manual/outline/sections_and_pages.rb +2 -0
  121. data/manual/repeatable_content/alternate_page_numbering.rb +2 -0
  122. data/manual/repeatable_content/page_numbering.rb +2 -0
  123. data/manual/repeatable_content/repeatable_content.rb +4 -2
  124. data/manual/repeatable_content/repeater.rb +2 -0
  125. data/manual/repeatable_content/stamp.rb +2 -0
  126. data/manual/security/encryption.rb +2 -0
  127. data/manual/security/permissions.rb +2 -0
  128. data/manual/security/security.rb +4 -2
  129. data/manual/table.rb +2 -0
  130. data/manual/text/alignment.rb +2 -0
  131. data/manual/text/color.rb +2 -0
  132. data/manual/text/column_box.rb +4 -2
  133. data/manual/text/fallback_fonts.rb +4 -2
  134. data/manual/text/font.rb +2 -0
  135. data/manual/text/font_size.rb +2 -0
  136. data/manual/text/font_style.rb +4 -2
  137. data/manual/text/formatted_callbacks.rb +2 -0
  138. data/manual/text/formatted_text.rb +3 -1
  139. data/manual/text/free_flowing_text.rb +2 -0
  140. data/manual/text/inline.rb +2 -0
  141. data/manual/text/kerning_and_character_spacing.rb +2 -0
  142. data/manual/text/leading.rb +2 -0
  143. data/manual/text/line_wrapping.rb +4 -1
  144. data/manual/text/paragraph_indentation.rb +2 -0
  145. data/manual/text/positioned_text.rb +2 -0
  146. data/manual/text/registering_families.rb +4 -2
  147. data/manual/text/rendering_and_color.rb +2 -0
  148. data/manual/text/right_to_left_text.rb +2 -0
  149. data/manual/text/rotation.rb +3 -1
  150. data/manual/text/single_usage.rb +2 -0
  151. data/manual/text/text.rb +4 -3
  152. data/manual/text/text_box_excess.rb +2 -0
  153. data/manual/text/text_box_extensions.rb +2 -0
  154. data/manual/text/text_box_overflow.rb +3 -1
  155. data/manual/text/utf8.rb +3 -1
  156. data/manual/text/win_ansi_charset.rb +6 -3
  157. data/prawn.gemspec +14 -11
  158. data/spec/extensions/encoding_helpers.rb +4 -2
  159. data/spec/prawn/document/bounding_box_spec.rb +8 -8
  160. data/spec/prawn/document/column_box_spec.rb +2 -0
  161. data/spec/prawn/document/security_spec.rb +12 -9
  162. data/spec/prawn/document_annotations_spec.rb +2 -0
  163. data/spec/prawn/document_destinations_spec.rb +2 -0
  164. data/spec/prawn/document_grid_spec.rb +3 -0
  165. data/spec/prawn/document_reference_spec.rb +2 -0
  166. data/spec/prawn/document_span_spec.rb +2 -0
  167. data/spec/prawn/document_spec.rb +59 -14
  168. data/spec/prawn/font_metric_cache_spec.rb +2 -0
  169. data/spec/prawn/font_spec.rb +45 -16
  170. data/spec/prawn/graphics/blend_mode_spec.rb +4 -2
  171. data/spec/prawn/graphics/transparency_spec.rb +2 -0
  172. data/spec/prawn/graphics_spec.rb +40 -20
  173. data/spec/prawn/graphics_stroke_styles_spec.rb +2 -0
  174. data/spec/prawn/image_handler_spec.rb +2 -0
  175. data/spec/prawn/images/jpg_spec.rb +2 -0
  176. data/spec/prawn/images/png_spec.rb +2 -0
  177. data/spec/prawn/images_spec.rb +56 -2
  178. data/spec/prawn/measurements_extensions_spec.rb +2 -0
  179. data/spec/prawn/outline_spec.rb +6 -2
  180. data/spec/prawn/repeater_spec.rb +6 -4
  181. data/spec/prawn/soft_mask_spec.rb +2 -0
  182. data/spec/prawn/stamp_spec.rb +11 -7
  183. data/spec/prawn/text/box_spec.rb +26 -27
  184. data/spec/prawn/text/formatted/arranger_spec.rb +30 -28
  185. data/spec/prawn/text/formatted/box_spec.rb +78 -57
  186. data/spec/prawn/text/formatted/fragment_spec.rb +10 -8
  187. data/spec/prawn/text/formatted/line_wrap_spec.rb +8 -5
  188. data/spec/prawn/text/formatted/parser_spec.rb +32 -2
  189. data/spec/prawn/text_draw_text_spec.rb +5 -3
  190. data/spec/prawn/text_rendering_mode_spec.rb +7 -1
  191. data/spec/prawn/text_spacing_spec.rb +6 -4
  192. data/spec/prawn/text_spec.rb +9 -7
  193. data/spec/prawn/text_with_inline_formatting_spec.rb +3 -1
  194. data/spec/prawn/transformation_stack_spec.rb +2 -0
  195. data/spec/prawn/view_spec.rb +18 -0
  196. data/spec/{manual_spec.rb → prawn_manual_spec.rb} +6 -4
  197. data/spec/spec_helper.rb +9 -10
  198. metadata +86 -73
  199. 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 Style/AccessorMethodName
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(*_a)
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 Style/AccessorMethodName
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
- it 'should not draw the text rendering mode to the document' \
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 'should not draw the character spacing to the document' \
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 seven 10-pt character spaces.
54
- expect(pdf.width_of(str)).to be_within(0.001).of(raw_width + (10 * 7))
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 'should draw the word spacing to the document' \
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')
@@ -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 Prawn::Text::NBSP do
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 'should return the height that would be required to print a' \
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 'should omit the gap below the last descender if :final_gap => false ' \
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.each { |str| expect(str).to match(/\A\s*\z/) }
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 'should correctly render strings ending with empty paragraphs and ' \
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 'should correctly render a string with higher bit characters across ' \
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 'should call move_past_bottom when printing more text than can fit' \
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 'should automatically move to a new page if the tallest fragment' \
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"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Prawn::TransformationStack do
@@ -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
- 'b55f154c9093c60f38051c75920c8157c775b946b0c77ffafc0a8a634ad5401e8ceafd0b96942839f82bacd726a690af3fdd1fd9e185616f67c6c0edfcfd0460'
9
+ 'b38bd8aaa7b419a2f594ee8837cd62f813141000393995b0c0456644b823a62a'\
10
+ '2f8031b2db0fc9e7c544b3946a9b0e60570d510564e6fed3931e0717dd49188a'
9
11
  when 'jruby'
10
- 'd2eb71ea3ddc35acb185de671a6fa48862ebad5727ce372e3a742f45d31447765c4004fbe5fbfdc1f5a32903ac87182c75e6abe021ab003c8af6e6cc33e0d01e'
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
@@ -1,7 +1,6 @@
1
- puts "Prawn specs: Running on Ruby Version: #{RUBY_VERSION}"
1
+ # frozen_string_literal: true
2
2
 
3
- require 'bundler'
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::Font::AFM.hide_m17n_warning = true
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.dirname(__FILE__) + '/extensions/**/*.rb'].each { |f| require f }
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
- module Graphics
47
- public :map_to_absolute
48
- end
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.2.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
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARhbGV4
18
- MRkwFwYKCZImiZPyLGQBGRYJcG9pbnRsZXNzMRMwEQYKCZImiZPyLGQBGRYDb25l
19
- MB4XDTE3MDEwNDExNDAzM1oXDTE4MDEwNDExNDAzM1owPzENMAsGA1UEAwwEYWxl
20
- eDEZMBcGCgmSJomT8ixkARkWCXBvaW50bGVzczETMBEGCgmSJomT8ixkARkWA29u
21
- ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM85Us8YQr55o/rMl+J+
22
- ula89ODiqjdc0kk+ibzRLCpfaFUJWxEMrhFiApRCopFDMeGXHXjBkfBYsRMFVs0M
23
- Zfe6rIKdNZQlQqHfJ2JlKFek0ehX81buGERi82wNwECNhOZu9c6G5gKjRPP/Q3Y6
24
- K6f/TAggK0+/K1j1NjT+WSVaMBuyomM067ejwhiQkEA3+tT3oT/paEXCOfEtxOdX
25
- 1F8VFd2MbmMK6CGgHbFLApfyDBtDx+ydplGZ3IMZg2nPqwYXTPJx+IuRO21ssDad
26
- gBMIAvL3wIeezJk2xONvhYg0K5jbIQOPB6zD1/9E6Q0LrwSBDkz5oyOn4PRZxgZ/
27
- OiMCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFE+A
28
- jBJVt6ie5r83L/znvqjF1RuuMB0GA1UdEQQWMBSBEmFsZXhAcG9pbnRsZXNzLm9u
29
- ZTAdBgNVHRIEFjAUgRJhbGV4QHBvaW50bGVzcy5vbmUwDQYJKoZIhvcNAQEFBQAD
30
- ggEBAEmhsdVfgxHfXtOG6AP3qe7/PBjJPdUzNOkE/elj6TgpdvvJkOZ6QNyyqvpl
31
- CsoDWL0EXPM5pIETaj5z9iBRK9fAi8YNS3zckhBJwhR78cb4+MiCPIBC+iiGx5bw
32
- BFER2ASPeeY4uC0AHWHnURDLdxyZr+xp6pb/TitTAaCm18Kvkk1u60lOa4Jtdb+9
33
- 2U1KICEBoX6UAzdT3N0nZ3VKq/vHVrvV2oePYCMIlNkghWp+VUE91OTBDMjnjjj8
34
- wxx1aB3kGoI0T6JXywKpPnzUt/qji/qpzCNiVJ0RZxzDHyZuL8NEoA9ORZnAIGiW
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: 2017-03-17 00:00:00.000000000 Z
36
+ date: 2020-08-01 00:00:00.000000000 Z
38
37
  dependencies:
39
38
  - !ruby/object:Gem::Dependency
40
- name: ttfunk
39
+ name: pdf-core
41
40
  requirement: !ruby/object:Gem::Requirement
42
41
  requirements:
43
42
  - - "~>"
44
43
  - !ruby/object:Gem::Version
45
- version: '1.5'
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: '1.5'
51
+ version: 0.8.1
53
52
  - !ruby/object:Gem::Dependency
54
- name: pdf-core
53
+ name: ttfunk
55
54
  requirement: !ruby/object:Gem::Requirement
56
55
  requirements:
57
56
  - - "~>"
58
57
  - !ruby/object:Gem::Version
59
- version: 0.7.0
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: 0.7.0
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: yard
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: '0'
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: '0'
105
+ version: 1.4.1
101
106
  - !ruby/object:Gem::Dependency
102
- name: rspec
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: '3.0'
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: '3.0'
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: simplecov
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: prawn-manual_builder
149
+ name: rubocop
145
150
  requirement: !ruby/object:Gem::Requirement
146
151
  requirements:
147
- - - ">="
152
+ - - "~>"
148
153
  - !ruby/object:Gem::Version
149
- version: 0.2.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.2.0
161
+ version: 0.84.0
157
162
  - !ruby/object:Gem::Dependency
158
- name: pdf-reader
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.4'
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.4'
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: 0.47.1
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: 0.47.1
189
+ version: '1.32'
191
190
  - !ruby/object:Gem::Dependency
192
- name: rubocop-rspec
191
+ name: simplecov
193
192
  requirement: !ruby/object:Gem::Requirement
194
193
  requirements:
195
- - - "~>"
194
+ - - ">="
196
195
  - !ruby/object:Gem::Version
197
- version: '1.10'
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: '1.10'
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.1'
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
- rubyforge_project:
452
- rubygems_version: 2.6.10
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: []