prawn-markup 0.2.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2a68c2f0773fd3769437fcee6aed0cba929e95808c6618b8e36dc2f7624c8fe
4
- data.tar.gz: d379eb9ed4e28cbdbeca6048b06019d5dd4d8e741cb41ebd304a65a3a05be034
3
+ metadata.gz: 064fb432004ce75eb3de1f626e08b1b5eba66de34fee0c1279eeb658d761a055
4
+ data.tar.gz: 0ea8ce592534b0b4f10480981374c66ff1ba09c9deb799f3e9f53214a9a3b831
5
5
  SHA512:
6
- metadata.gz: 0da58a2bcd5b700753ae0f59f0c68c4014af194c74d2946e61e5028e29e8263fba91b255b023f2e9db5246a44a05cf5798b6808831309936091c7cdf53ff6c8f
7
- data.tar.gz: 9129eaba7c308464c68c501dab041e2e54f79618734b0fd29c53554320b12cb6b2c18c25aa02bd77108eb3c17728720f95dce3412a4664f5fcc1d9c37beefccf
6
+ metadata.gz: 534a234950b2df218bb111563730b18b9e1e2cb22c3393da53ae3d70412283139e9bec5e57e7aeb2ae0638132a6ab023b602c7cb9c9dcedf97e27e92371a8565
7
+ data.tar.gz: 8d7e1f43b928f9861b9b885eaf39692f8678b6e955845daf8859da60a95cdd76da72f1f2062dff8ef461dd0a9bd614509fb3903ba0ecada86546af7b1771460b
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Prawn::Markup
2
2
 
3
- [![Build Status](https://travis-ci.org/puzzle/prawn-markup.svg?branch=master)](https://travis-ci.org/puzzle/prawn-markup)
3
+ [![Build Status](https://github.com/puzzle/prawn-markup/actions/workflows/build.yml/badge.svg)](https://github.com/puzzle/prawn-markup/actions/workflows/build.yml)
4
4
  [![Maintainability](https://api.codeclimate.com/v1/badges/52a462f9d65e33352d4e/maintainability)](https://codeclimate.com/github/puzzle/prawn-markup/maintainability)
5
5
  [![Test Coverage](https://api.codeclimate.com/v1/badges/52a462f9d65e33352d4e/test_coverage)](https://codeclimate.com/github/puzzle/prawn-markup/test_coverage)
6
6
 
@@ -33,6 +33,27 @@ doc = Prawn::Document.new
33
33
  doc.markup('<p>Hello World</p><hr/><p>KTHXBYE</p>')
34
34
  ```
35
35
 
36
+ ## Supported HTML
37
+
38
+ This gem parses the given HTML and layouts the following elements in a vertical order:
39
+
40
+ * Text blocks: `p`, `div`, `ol`, `ul`, `li`, `hr`, `br`
41
+ * Text semantics: `a`, `b`, `strong`, `i`, `em`, `u`, `s`, `del`, `sub`, `sup`
42
+ * Headings: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
43
+ * Tables: `table`, `tr`, `td`, `th`
44
+ * Media: `img`, `iframe`
45
+ * Inputs: `type=checkbox`, `type=radio`
46
+
47
+ All other elements are ignored, their content is added to the parent element. With a few exceptions, no CSS is processed. One exception is the `width` property of `img`, `td` and `th`, which may contain values in `cm`, `mm`, `px`, `pt`, `%` or `auto`.
48
+
49
+ If no explicit loader is given (see above), images are loaded from `http(s)` addresses or may be contained in the `src` attribute as base64 encoded data URIs. Prawn only supports `PNG` and `JPG`.
50
+
51
+ ## Example
52
+
53
+ Have a look at [showcase.html](spec/fixtures/showcase.html), which is rendered by the corresponding [spec](spec/prawn/markup/showcase_spec.rb). Uncomment the `lookatit` call there to directly open the generated PDF when running the spec with `spec spec/prawn/markup/showcase_spec.rb`.
54
+
55
+ ## Formatting Options
56
+
36
57
  To customize element formatting, do:
37
58
 
38
59
  ```ruby
@@ -54,39 +75,40 @@ Tables and lists are rendered with [prawn-table](https://github.com/prawnpdf/pra
54
75
 
55
76
  Beside these options handled by Prawn / prawn-table, the following values may be customized:
56
77
 
57
- * `[:text][:preprocessor]`: A proc/callable that is called each time before a chunk of text is rendered.
58
- * `[:text][:margin_bottom]`: Margin after each `<p>`, `<ol>`, `<ul>` or `<table>`. Defaults to about half a line.
59
- * `[:heading1-6][:margin_top]`: Margin before a heading. Default is 0.
60
- * `[:heading1-6][:margin_bottom]`: Margin after a heading. Default is 0.
61
- * `[:table][:placeholder][:too_large]`: If the table content does not fit into the current bounding box, this text/callable is rendered instead. Defaults to '[table content too large]'.
62
- * `[:table][:placeholder][:subtable_too_large]`: If the content of a subtable cannot be fitted into the table, this text is rendered instead. Defaults to '[nested tables with automatic width are not supported]'.
63
- * `[:list][:vertical_margin]`: Margin at the top and the bottom of a list. Default is 5.
64
- * `[:list][:bullet][:char]`: The text used as bullet in unordered lists. Default is '•'.
65
- * `[:list][:bullet][:margin]`: Margin before the bullet. Default is 10.
66
- * `[:list][:content][:margin]`: Margin between the bullet and the content. Default is 10.
67
- * `[:list][:placeholder][:too_large]`: If the list content does not fit into the current bounding box, this text/callable is rendered instead. Defaults to '[list content too large]'.
68
- * `[:image][:loader]`: A callable that accepts the `src` attribute as an argument an returns a value understood by Prawn's `image` method. Loads `http(s)` URLs and base64 encoded data URIs by default.
69
- * `[:image][:placeholder]`: If an image is not supported, this text/callable is rendered instead. Defaults to '[unsupported image]'.
70
- * `[:iframe][:placeholder]`: If the HTML contains IFrames, this text/callable is rendered instead.
71
- A callable gets the URL of the IFrame as an argument. Defaults to ignore iframes.
72
-
73
- ## Supported HTML
74
-
75
- This gem parses the given HTML and layouts the following elements in a vertical order:
76
-
77
- * Text blocks: `p`, `div`, `ol`, `ul`, `li`, `hr`, `br`
78
- * Text semantics: `a`, `b`, `strong`, `i`, `em`, `u`, `s`, `del`, `sub`, `sup`
79
- * Headings: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
80
- * Tables: `table`, `tr`, `td`, `th`
81
- * Media: `img`, `iframe`
82
-
83
- All other elements are ignored, their content is added to the parent element. With a few exceptions, no CSS is processed. One exception is the `width` property of `img`, `td` and `th`, which may contain values in `cm`, `mm`, `px`, `pt`, `%` or `auto`.
84
-
85
- If no explicit loader is given (see above), images are loaded from `http(s)` addresses or may be contained in the `src` attribute as base64 encoded data URIs. Prawn only supports `PNG` and `JPG`.
86
-
87
- ## Example
88
-
89
- Have a look at [showcase.html](spec/fixtures/showcase.html), which is rendered by the corresponding [spec](spec/prawn/markup/showcase_spec.rb). Uncomment the `lookatit` call there to directly open the generated PDF when running the spec with `spec spec/prawn/markup/showcase_spec.rb`.
78
+ * `:text`
79
+ * `:preprocessor`: A proc/callable that is called each time before a chunk of text is rendered.
80
+ * `:margin_bottom`: Margin after each `<p>`, `<ol>`, `<ul>` or `<table>`. Defaults to about half a line.
81
+ * `:heading1-6`
82
+ * `:margin_top`: Margin before a heading. Default is 0.
83
+ * `:margin_bottom`: Margin after a heading. Default is 0.
84
+ * `:table`
85
+ * `:placeholder`
86
+ * `:too_large`: If the table content does not fit into the current bounding box, this text/callable is rendered instead. Defaults to '[table content too large]'.
87
+ * `:subtable_too_large`: If the content of a subtable cannot be fitted into the table, this text is rendered instead. Defaults to '[nested tables with automatic width are not supported]'.
88
+ * `:list`
89
+ * `:vertical_margin`: Margin at the top and the bottom of a list. Default is 5.
90
+ * `:bullet`
91
+ * `:char`: The text used as bullet in unordered lists. Default is '•'.
92
+ * `:margin`: Margin before the bullet. Default is 10.
93
+ * `:content`
94
+ * `:margin`: Margin between the bullet and the content. Default is 10.
95
+ * `:placeholder`
96
+ * `:too_large`: If the list content does not fit into the current bounding box, this text/callable is rendered instead. Defaults to '[list content too large]'.
97
+ * `:image`
98
+ * `:loader`: A callable that accepts the `src` attribute as an argument an returns a value understood by Prawn's `image` method. Loads `http(s)` URLs and base64 encoded data URIs by default.
99
+ * `:placeholder`: If an image is not supported, this text/callable is rendered instead. Defaults to '[unsupported image]'.
100
+ * `:iframe`
101
+ * `:placeholder`: If the HTML contains IFrames, this text/callable is rendered instead.
102
+ A callable gets the URL of the IFrame as an argument. Defaults to ignore iframes.
103
+ * `:input`
104
+ * `:symbol_font`: A special font to print checkboxes and radios. Prawn's standard fonts do not support special unicode characters. Do not forget to update the document's `font_families`.
105
+ * `:symbol_font_size`: The size of the special font to print checkboxes and radios.
106
+ * `:checkbox`
107
+ * `:checked`: The char to print for a checked checkbox. Default is '☑'.
108
+ * `:unchecked`: The char to print for an unchecked checkbox. Default is '☐'.
109
+ * `:radio`
110
+ * `:checked`: The char to print for a checked radio. Default is '◉'.
111
+ * `:unchecked`: The char to print for an unchecked radio. Default is '○'.
90
112
 
91
113
  ## Development
92
114
 
@@ -12,8 +12,11 @@ module Prawn
12
12
  end
13
13
 
14
14
  def start_img
15
+ src = current_attrs['src']
16
+ return if src.to_s.strip.empty?
17
+
15
18
  add_current_text
16
- add_image_or_placeholder(current_attrs['src'])
19
+ add_image_or_placeholder(src)
17
20
  end
18
21
 
19
22
  def start_iframe
@@ -70,7 +73,11 @@ module Prawn
70
73
 
71
74
  def load_remote_image(src)
72
75
  if src =~ %r{^https?:/}
73
- URI.parse(src).open
76
+ begin
77
+ URI.parse(src).open
78
+ rescue OpenURI::HTTPError, SocketError
79
+ nil
80
+ end
74
81
  end
75
82
  end
76
83
 
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Prawn
4
+ module Markup
5
+ module Processor::Inputs
6
+
7
+ DEFAULT_CHECKABLE_CHARS = {
8
+ checkbox: {
9
+ checked: '☑',
10
+ unchecked: '☐'
11
+ },
12
+ radio: {
13
+ checked: '◉',
14
+ unchecked: '○'
15
+ }
16
+ }.freeze
17
+
18
+ def self.prepended(base)
19
+ base.known_elements.push('input')
20
+ end
21
+
22
+ def start_input
23
+ type = current_attrs['type'].to_sym
24
+ if DEFAULT_CHECKABLE_CHARS.keys.include?(type)
25
+ append_checked_symbol(type)
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def append_checked_symbol(type)
32
+ char = checkable_symbol(type)
33
+ append_text(build_font_tag(char))
34
+ end
35
+
36
+ def checkable_symbol(type)
37
+ state = current_attrs.key?('checked') ? :checked : :unchecked
38
+ dig_options(:input, type, state) || DEFAULT_CHECKABLE_CHARS[type][state]
39
+ end
40
+
41
+ def symbol_font_options
42
+ @symbol_font_options ||= {
43
+ name: dig_options(:input, :symbol_font),
44
+ size: dig_options(:input, :symbol_font_size)
45
+ }.compact
46
+ end
47
+
48
+ def build_font_tag(content)
49
+ return content if symbol_font_options.empty?
50
+
51
+ out = +'<font'
52
+ symbol_font_options.each do |key, value|
53
+ out << " #{key}=\"#{value}\""
54
+ end
55
+ out << '>'
56
+ out << content
57
+ out << '</font>'
58
+ end
59
+ end
60
+ end
61
+ end
@@ -34,13 +34,13 @@ module Prawn
34
34
  alias end_ul end_list
35
35
 
36
36
  def start_li
37
- return unless inside_container?
37
+ return unless current_list
38
38
 
39
39
  current_list.items << Elements::Item.new
40
40
  end
41
41
 
42
42
  def end_li
43
- return unless inside_container?
43
+ return unless current_list
44
44
 
45
45
  add_cell_text_node(current_list_item)
46
46
  end
@@ -67,7 +67,9 @@ module Prawn
67
67
  end
68
68
 
69
69
  def current_list_item
70
- current_list.items.last
70
+ items = current_list.items
71
+ items << Elements::Item.new if items.empty?
72
+ items.last
71
73
  end
72
74
 
73
75
  def inside_container?
@@ -26,6 +26,7 @@ module Prawn
26
26
  require 'prawn/markup/processor/blocks'
27
27
  require 'prawn/markup/processor/headings'
28
28
  require 'prawn/markup/processor/images'
29
+ require 'prawn/markup/processor/inputs'
29
30
  require 'prawn/markup/processor/tables'
30
31
  require 'prawn/markup/processor/lists'
31
32
 
@@ -33,10 +34,12 @@ module Prawn
33
34
  prepend Prawn::Markup::Processor::Blocks
34
35
  prepend Prawn::Markup::Processor::Headings
35
36
  prepend Prawn::Markup::Processor::Images
37
+ prepend Prawn::Markup::Processor::Inputs
36
38
  prepend Prawn::Markup::Processor::Tables
37
39
  prepend Prawn::Markup::Processor::Lists
38
40
 
39
41
  def initialize(pdf, options = {})
42
+ super()
40
43
  @pdf = pdf
41
44
  @options = options
42
45
  end
@@ -50,10 +53,8 @@ module Prawn
50
53
  end
51
54
 
52
55
  def start_element(name, attrs = [])
53
- stack.push(name: name, attrs: Hash[attrs])
54
- if self.class.known_elements.include?(name)
55
- send("start_#{name}") if respond_to?("start_#{name}", true)
56
- end
56
+ stack.push(name: name, attrs: attrs.to_h)
57
+ send("start_#{name}") if known_element?(name) && respond_to?("start_#{name}", true)
57
58
  end
58
59
 
59
60
  def end_element(name)
@@ -67,11 +68,11 @@ module Prawn
67
68
  end
68
69
 
69
70
  def error(string)
70
- logger.info('SAX parsing error: ' + string.strip) if logger
71
+ logger.info("SAX parsing error: #{string.strip}") if logger
71
72
  end
72
73
 
73
74
  def warning(string)
74
- logger.info('SAX parsing warning: ' + string.strip) if logger
75
+ logger.info("SAX parsing warning: #{string.strip}") if logger
75
76
  end
76
77
 
77
78
  private
@@ -83,6 +84,10 @@ module Prawn
83
84
  @text_buffer = +''
84
85
  end
85
86
 
87
+ def known_element?(name)
88
+ self.class.known_elements.include?(name)
89
+ end
90
+
86
91
  def append_text(string)
87
92
  text_buffer.concat(string)
88
93
  end
@@ -120,15 +125,14 @@ module Prawn
120
125
  def style_properties
121
126
  style = current_attrs['style']
122
127
  if style
123
- tokens = style.split(';').map { |p| p.split(':', 2).map(&:strip) }
124
- Hash[tokens]
128
+ style.split(';').map { |p| p.split(':', 2).map(&:strip) }.to_h
125
129
  else
126
130
  {}
127
131
  end
128
132
  end
129
133
 
130
134
  def placeholder_value(keys, *args)
131
- placeholder = dig_options(keys)
135
+ placeholder = dig_options(*keys)
132
136
  return if placeholder.nil?
133
137
 
134
138
  if placeholder.respond_to?(:call)
@@ -138,7 +142,7 @@ module Prawn
138
142
  end
139
143
  end
140
144
 
141
- def dig_options(keys)
145
+ def dig_options(*keys)
142
146
  keys.inject(options) { |opts, key| opts ? opts[key] : nil }
143
147
  end
144
148
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prawn
4
4
  module Markup
5
- VERSION = '0.2.2'
5
+ VERSION = '0.3.3'
6
6
  end
7
7
  end
data/prawn-markup.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.license = 'MIT'
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
20
+ f.match(%r{^(((spec|bin)/)|\.|Gemfile|Rakefile)})
21
21
  end
22
22
  spec.bindir = 'exe'
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Zumkehr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2021-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -159,18 +159,9 @@ executables: []
159
159
  extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
- - ".gitignore"
163
- - ".rspec"
164
- - ".rubocop.yml"
165
- - ".travis.yml"
166
162
  - CODE_OF_CONDUCT.md
167
- - Gemfile
168
- - Gemfile.lock
169
163
  - LICENSE.txt
170
164
  - README.md
171
- - Rakefile
172
- - bin/console
173
- - bin/setup
174
165
  - lib/prawn/markup.rb
175
166
  - lib/prawn/markup/builders/list_builder.rb
176
167
  - lib/prawn/markup/builders/nestable_builder.rb
@@ -183,6 +174,7 @@ files:
183
174
  - lib/prawn/markup/processor/blocks.rb
184
175
  - lib/prawn/markup/processor/headings.rb
185
176
  - lib/prawn/markup/processor/images.rb
177
+ - lib/prawn/markup/processor/inputs.rb
186
178
  - lib/prawn/markup/processor/lists.rb
187
179
  - lib/prawn/markup/processor/tables.rb
188
180
  - lib/prawn/markup/processor/text.rb
@@ -210,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
202
  - !ruby/object:Gem::Version
211
203
  version: '0'
212
204
  requirements: []
213
- rubygems_version: 3.1.2
205
+ rubygems_version: 3.1.4
214
206
  signing_key:
215
207
  specification_version: 4
216
208
  summary: Parse simple HTML markup to include in Prawn PDFs
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /spec/coverage/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,68 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- Exclude:
4
- - '*.gemspec'
5
- - spec/**/*
6
- - vendor/**/*
7
-
8
- Metrics/AbcSize:
9
- Severity: error
10
-
11
- Metrics/ClassLength:
12
- Max: 250
13
- Severity: error
14
-
15
- Metrics/CyclomaticComplexity:
16
- Severity: error
17
-
18
- Metrics/MethodLength:
19
- Max: 10
20
- Severity: error
21
-
22
- Metrics/ModuleLength:
23
- Max: 150
24
- Severity: error
25
-
26
- Metrics/ParameterLists:
27
- Max: 4
28
- Severity: warning
29
-
30
- Layout/LineLength:
31
- Max: 100
32
- Severity: error
33
-
34
- # We thinks that's fine for specs
35
- Layout/EmptyLinesAroundBlockBody:
36
- Enabled: false
37
-
38
- # We thinks that's fine
39
- Layout/EmptyLinesAroundClassBody:
40
- Enabled: false
41
-
42
- # We thinks that's fine
43
- Layout/EmptyLinesAroundModuleBody:
44
- Enabled: false
45
-
46
- # Keep for now, easier with superclass definitions
47
- Style/ClassAndModuleChildren:
48
- Enabled: false
49
-
50
- # The ones we use must exist for the entire class hierarchy.
51
- Style/ClassVars:
52
- Enabled: false
53
-
54
- # Well, well, well
55
- Style/Documentation:
56
- Enabled: false
57
-
58
- # Keep single line bodys for if and unless
59
- Style/IfUnlessModifier:
60
- Enabled: false
61
-
62
- # We think that's the developers choice
63
- Style/GuardClause:
64
- Enabled: false
65
-
66
- # Backwards compatibility
67
- Style/SafeNavigation:
68
- Enabled: false
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.5.7
5
-
6
- env:
7
- global:
8
- - CC_TEST_REPORTER_ID=d70fe39ffb8f2f7c5f837f0133d10a3a1c6784d0dd189153111577b60f74c603
9
-
10
- before_script:
11
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12
- - chmod +x ./cc-test-reporter
13
- - ./cc-test-reporter before-build
14
-
15
- script:
16
- - bundle exec rake
17
- - bundle exec rubocop
18
-
19
- after_script:
20
- - ./cc-test-reporter format-coverage -t simplecov -o spec/coverage/codeclimate.json spec/coverage/.resultset.json
21
- - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage -i spec/coverage/codeclimate.json; fi
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- # Specify your gem's dependencies in prawn-markup.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,87 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- prawn-markup (0.2.2)
5
- nokogiri
6
- prawn
7
- prawn-table
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- Ascii85 (1.0.3)
13
- afm (0.2.2)
14
- ast (2.4.0)
15
- byebug (11.1.1)
16
- diff-lcs (1.3)
17
- docile (1.3.2)
18
- hashery (2.1.2)
19
- jaro_winkler (1.5.4)
20
- mini_portile2 (2.4.0)
21
- nokogiri (1.10.9)
22
- mini_portile2 (~> 2.4.0)
23
- parallel (1.19.1)
24
- parser (2.7.0.4)
25
- ast (~> 2.4.0)
26
- pdf-core (0.7.0)
27
- pdf-inspector (1.3.0)
28
- pdf-reader (>= 1.0, < 3.0.a)
29
- pdf-reader (2.4.0)
30
- Ascii85 (~> 1.0.0)
31
- afm (~> 0.2.1)
32
- hashery (~> 2.0)
33
- ruby-rc4
34
- ttfunk
35
- prawn (2.2.2)
36
- pdf-core (~> 0.7.0)
37
- ttfunk (~> 1.5)
38
- prawn-table (0.2.2)
39
- prawn (>= 1.3.0, < 3.0.0)
40
- rainbow (3.0.0)
41
- rake (13.0.1)
42
- rexml (3.2.4)
43
- rspec (3.9.0)
44
- rspec-core (~> 3.9.0)
45
- rspec-expectations (~> 3.9.0)
46
- rspec-mocks (~> 3.9.0)
47
- rspec-core (3.9.1)
48
- rspec-support (~> 3.9.1)
49
- rspec-expectations (3.9.1)
50
- diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.9.0)
52
- rspec-mocks (3.9.1)
53
- diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.9.0)
55
- rspec-support (3.9.2)
56
- rubocop (0.80.1)
57
- jaro_winkler (~> 1.5.1)
58
- parallel (~> 1.10)
59
- parser (>= 2.7.0.1)
60
- rainbow (>= 2.2.2, < 4.0)
61
- rexml
62
- ruby-progressbar (~> 1.7)
63
- unicode-display_width (>= 1.4.0, < 1.7)
64
- ruby-progressbar (1.10.1)
65
- ruby-rc4 (0.1.5)
66
- simplecov (0.18.5)
67
- docile (~> 1.1)
68
- simplecov-html (~> 0.11)
69
- simplecov-html (0.12.2)
70
- ttfunk (1.6.2.1)
71
- unicode-display_width (1.6.1)
72
-
73
- PLATFORMS
74
- ruby
75
-
76
- DEPENDENCIES
77
- bundler
78
- byebug
79
- pdf-inspector
80
- prawn-markup!
81
- rake
82
- rspec
83
- rubocop
84
- simplecov
85
-
86
- BUNDLED WITH
87
- 1.17.3
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'prawn/markup'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here