invoice_printer 2.3.0 → 2.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f98cb9145f19c42e95490c56afbb156408c5049c766d9ddcb1c776ee112c5fe
4
- data.tar.gz: 77c6280ab4566b41ad6b040113f3ccf99b0c4bf5e2bccce28c3d0740644a1e57
3
+ metadata.gz: f0b0c25298ec6af636229e5502e0e80bfdf7675bc46d4f6a8fbec3a81c215dbd
4
+ data.tar.gz: 80bb84c5081ece73c5f77ed6597e987267c64f90cdc76c547ee123e417c878ae
5
5
  SHA512:
6
- metadata.gz: c1be305d2988483f0912598cbcd523b3f8f020667f61cb253e7b5c3f455ed188efebcec20fe4d1f77148ce984c9866c723c3e645a9e4515b50a67aceb85d45a5
7
- data.tar.gz: f4764ce73b9c8f696cdd8bfa975ab1f3cbd8d85bb62a3b335a321eb7fb860b08a03835cc875c3dd774b670af3baeffc48f590e53d0c763ccece20e9e22b74657
6
+ metadata.gz: 68978f3d5badd98537e2c3c287c4bbca474de49db7b02210e0d388e764935f612fe10b72a53e689d29643466fd8ffce6d122202f55860876609d2f01dab4a2b8
7
+ data.tar.gz: f3d1d0a824c9c1ba9528a564a497e5709d118ab0d91e97f9910d369b448a45536097b60370255d6751d3bb2ce253eb751807bf1a73461b27ab68902d6d3016a8
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ - pull_request
6
+ - push
7
+
8
+ env:
9
+ TESTOPT: "-v"
10
+
11
+ concurrency:
12
+ group: ${{ github.ref_name }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ test:
17
+ name: Ruby
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ ruby:
23
+ - "3.1"
24
+ - "3.2"
25
+ - "3.3"
26
+ - "3.4"
27
+ steps:
28
+ - name: Install system dependencies
29
+ run: sudo apt-get install imagemagick libmagickwand-dev
30
+ - name: Check out code
31
+ uses: actions/checkout@v5
32
+ - name: Install Ruby dependencies
33
+ uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: ${{ matrix.ruby }}
36
+ bundler-cache: true
37
+ - name: Run tests
38
+ run: bundle exec rake test
data/Dockerfile CHANGED
@@ -26,10 +26,10 @@ RUN apk update && apk upgrade
26
26
  RUN apk add build-base bash ruby ruby-etc ruby-dev
27
27
 
28
28
  # Install builtin fonts
29
- RUN gem install invoice_printer_fonts --version 2.3.0 --no-document
29
+ RUN gem install invoice_printer_fonts --version 2.4.0 --no-document
30
30
 
31
31
  # Install the gem from RubyGems.org
32
- RUN gem install invoice_printer_server --version 2.3.0 --no-document
32
+ RUN gem install invoice_printer_server --version 2.4.0 --no-document
33
33
 
34
34
  # Clean APK cache
35
35
  RUN rm -rf /var/cache/apk/*
data/README.md CHANGED
@@ -26,6 +26,7 @@ See more usecases in the `examples/` directory.
26
26
  - Payment method box showing banking details including SWIFT and IBAN fields
27
27
  - Issue/due dates box
28
28
  - Configurable items' table with item description, breakdown, quantity, unit, price per unit, tax and item's total amount fields
29
+ - Description above the table
29
30
  - Final subtotal/tax/total info box
30
31
  - Page numbers
31
32
  - Configurable field labels & sublabels (optional little labels)
@@ -50,8 +51,22 @@ See more usecases in the `examples/` directory.
50
51
 
51
52
  I am developing InvoicePrinter as a free and MIT-licensed library for several years now.
52
53
 
53
- I would appreciate if you consider [buying my book](https://deploymentfromscratch.com/).
54
+ Please consider [buying my book](https://deploymentfromscratch.com/) or [my Rails starter kit](https://businessclasskit.com/) so I can work more on Open Source.
55
+
56
+ ## Contributing
57
+
58
+ Contributions are welcome. Make sure the tests are passing before submitting a PR:
59
+
60
+ ```bash
61
+ $ bundle && bundle exec rake test
62
+ ```
63
+
64
+ You can also quickly regenerate the examples if necessary:
65
+
66
+ ```bash
67
+ $ ruby regenerate.rb
68
+ ```
54
69
 
55
70
  ## Copyright
56
71
 
57
- Copyright 2015-2021 © [Josef Strzibny](http://strzibny.name/). MIT licensed.
72
+ Copyright 2015-2024 © [Josef Strzibny](http://strzibny.name/). MIT licensed.
data/bin/invoice_printer CHANGED
@@ -22,6 +22,7 @@ def show_help
22
22
  --bold-font path to bold font or builtin font name
23
23
  -s, --stamp path to stamp
24
24
  --logo path to logotype
25
+ --qr path to QR image
25
26
  --background path to background image
26
27
  --page-size letter or a4 (letter is the default)
27
28
  -f, --filename output path
@@ -60,6 +61,10 @@ parser = OptionParser.new do|opts|
60
61
  options[:logo] = path
61
62
  end
62
63
 
64
+ opts.on('--qr PATH') do |path|
65
+ options[:qr] = path
66
+ end
67
+
63
68
  opts.on('--background PATH') do |path|
64
69
  options[:background] = path
65
70
  end
@@ -124,6 +129,7 @@ begin
124
129
  bold_font: options[:bold_font],
125
130
  stamp: options[:stamp],
126
131
  logo: options[:logo],
132
+ qr: options[:qr],
127
133
  background: options[:background],
128
134
  page_size: options[:page_size]
129
135
  )
@@ -139,6 +145,7 @@ begin
139
145
  bold_font: options[:bold_font],
140
146
  stamp: options[:stamp],
141
147
  logo: options[:logo],
148
+ qr: options[:qr],
142
149
  file_name: options[:filename],
143
150
  background: options[:background],
144
151
  page_size: options[:page_size]
data/docs/COMMAND_LINE.md CHANGED
@@ -16,6 +16,7 @@ Options:
16
16
  --bold-font path to bold font or builtin font name
17
17
  -s, --stamp path to stamp
18
18
  --logo path to logotype
19
+ --qr path to QR image
19
20
  --background path to background image
20
21
  --page-size letter or a4 (letter is the default)
21
22
  -f, --filename output path
data/docs/SERVER.md CHANGED
@@ -64,6 +64,7 @@ Options:
64
64
  - `bold_font` - path to bold font file or builtin font name
65
65
  - `stamp` - path to stamp file
66
66
  - `logo` - path to logotype file
67
+ - `qr` - path to QR image file
67
68
  - `background` - path to background file
68
69
  - `page_size` - letter or A4 page size
69
70
 
@@ -107,6 +108,7 @@ Options:
107
108
  - `bold_font` - path to bold font file or builtin font name
108
109
  - `stamp` - path to stamp file
109
110
  - `logo` - path to logotype file
111
+ - `qr` - path to QR image file
110
112
  - `background` - path to background file
111
113
  - `page_size` - letter or A4 page size
112
114
  - `filename` - path for saving the generated output PDF
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env ruby
2
+ # Example demonstrating adding a QR image to the invoice (bottom-right)
3
+
4
+ lib = File.expand_path('../../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'invoice_printer'
7
+
8
+ provider_address = <<ADDRESS
9
+ 5th Avenue
10
+ 747 05 NYC
11
+ ADDRESS
12
+
13
+ purchaser_address = <<ADDRESS
14
+ 7th Avenue
15
+ 747 70 NYC
16
+ ADDRESS
17
+
18
+ item = InvoicePrinter::Document::Item.new(
19
+ name: 'Programming',
20
+ quantity: '10',
21
+ unit: 'hr',
22
+ price: '$ 90',
23
+ amount: '$ 900'
24
+ )
25
+
26
+ invoice = InvoicePrinter::Document.new(
27
+ number: 'NO. 202500000001',
28
+ provider_name: 'John White',
29
+ provider_lines: provider_address,
30
+ purchaser_name: 'Will Black',
31
+ purchaser_lines: purchaser_address,
32
+ issue_date: '10/20/2025',
33
+ due_date: '11/03/2025',
34
+ total: '$ 900',
35
+ bank_account_number: '156546546465',
36
+ description: "Invoice with QR image example.",
37
+ items: [item],
38
+ note: "Scan the QR code for payment or details."
39
+ )
40
+
41
+ qr_path = File.expand_path('../qr.png', __FILE__)
42
+ logo_path = File.expand_path('../prawn.png', __FILE__)
43
+
44
+ InvoicePrinter.print(
45
+ document: invoice,
46
+ logo: logo_path,
47
+ qr: qr_path,
48
+ file_name: 'qr_invoice.pdf'
49
+ )
50
+
51
+ InvoicePrinter.print(
52
+ document: invoice,
53
+ logo: logo_path,
54
+ qr: qr_path,
55
+ file_name: 'qr_invoice_a4.pdf',
56
+ page_size: :a4
57
+ )
@@ -11,10 +11,13 @@ ONLY_FONTS_FILES = [
11
11
  'FONTS_LICENSE.txt',
12
12
  'assets/fonts/overpass/OFL-1.1.txt',
13
13
  'assets/fonts/overpass/Overpass-Regular.ttf',
14
+ 'assets/fonts/overpass/Overpass-Bold.ttf',
14
15
  'assets/fonts/opensans/Apache-2.0.txt',
15
16
  'assets/fonts/opensans/OpenSans-Regular.ttf',
17
+ 'assets/fonts/opensans/OpenSans-Bold.ttf',
16
18
  'assets/fonts/roboto/Apache-2.0.txt',
17
19
  'assets/fonts/roboto/Roboto-Regular.ttf',
20
+ 'assets/fonts/roboto/Roboto-Bold.ttf',
18
21
  'lib/invoice_printer/fonts.rb'
19
22
  ]
20
23
 
@@ -33,8 +36,8 @@ Gem::Specification.new do |spec|
33
36
  package_files = `git ls-files -z`.split("\x0")
34
37
  .reject{ |file| ONLY_SERVER_FILES.include?(file) }
35
38
  .reject{ |file| ONLY_FONTS_FILES.include?(file) }
36
- .reject{ |file| file.match /.*\.png/ }
37
- .reject{ |file| file.match /.*\.pdf/ }
39
+ .reject{ |file| file.match(/.*\.png/) }
40
+ .reject{ |file| file.match(/.*\.pdf/) }
38
41
 
39
42
  spec.files = package_files
40
43
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -42,13 +45,14 @@ Gem::Specification.new do |spec|
42
45
  spec.require_paths = ['lib']
43
46
  spec.bindir = 'bin'
44
47
 
45
- spec.required_ruby_version = '>= 2.4'
48
+ spec.required_ruby_version = '>= 3.1'
46
49
 
47
50
  spec.add_dependency 'json', '~> 2.1'
48
51
  spec.add_dependency 'prawn', '~> 2.4'
49
52
  spec.add_dependency 'prawn-table', '~> 0.2.2'
50
53
  spec.add_dependency 'matrix'
51
54
  spec.add_dependency 'e2mmap'
55
+ spec.add_dependency 'base64'
52
56
 
53
57
  spec.add_development_dependency 'bundler', '>= 1.7'
54
58
  spec.add_development_dependency 'rake', '>= 10.0'
@@ -13,15 +13,17 @@ module InvoicePrinter
13
13
  # font: 'font.ttf',
14
14
  # bold_font: 'bold_font.ttf',
15
15
  # stamp: 'stamp.jpg',
16
- # logo: 'example.jpg'
16
+ # logo: 'example.jpg',
17
+ # qr: 'qr.png'
17
18
  # )
18
19
  class PDFDocument
19
20
  class FontFileNotFound < StandardError; end
20
21
  class LogoFileNotFound < StandardError; end
21
22
  class StampFileNotFound < StandardError; end
23
+ class QRFileNotFound < StandardError; end
22
24
  class InvalidInput < StandardError; end
23
25
 
24
- attr_reader :invoice, :labels, :file_name, :font, :bold_font, :stamp, :logo
26
+ attr_reader :invoice, :labels, :file_name, :font, :bold_font, :stamp, :logo, :qr
25
27
 
26
28
  DEFAULT_LABELS = {
27
29
  name: 'Invoice',
@@ -74,6 +76,7 @@ module InvoicePrinter
74
76
  bold_font: nil,
75
77
  stamp: nil,
76
78
  logo: nil,
79
+ qr: nil,
77
80
  background: nil,
78
81
  page_size: :letter
79
82
  )
@@ -83,6 +86,7 @@ module InvoicePrinter
83
86
  @bold_font = bold_font
84
87
  @stamp = stamp
85
88
  @logo = logo
89
+ @qr = qr
86
90
  @page_size = page_size ? PAGE_SIZES[page_size.to_sym] : PAGE_SIZES[:letter]
87
91
  @pdf = Prawn::Document.new(background: background, page_size: @page_size.name)
88
92
 
@@ -105,6 +109,14 @@ module InvoicePrinter
105
109
  end
106
110
  end
107
111
 
112
+ if used? @qr
113
+ if File.exist?(@qr)
114
+ @qr = qr
115
+ else
116
+ raise QRFileNotFound, "QR image file not found at #{@qr}"
117
+ end
118
+ end
119
+
108
120
  if used?(@font) && used?(@bold_font)
109
121
  use_font(@font, @bold_font)
110
122
  elsif used?(@font)
@@ -176,6 +188,7 @@ module InvoicePrinter
176
188
  build_total
177
189
  build_stamp
178
190
  build_logo
191
+ build_qr
179
192
  build_note
180
193
  build_footer
181
194
  end
@@ -297,8 +310,10 @@ module InvoicePrinter
297
310
  # ------------------------------------------
298
311
  #
299
312
  def build_purchaser_box
313
+ purchaser = [@document.purchaser_name, @document.purchaser_lines].join("\n")
314
+
300
315
  @pdf.text_box(
301
- @document.purchaser_name,
316
+ purchaser.lines.first,
302
317
  size: 15,
303
318
  at: [x(284), y(640) - @push_down],
304
319
  width: x(240)
@@ -320,9 +335,9 @@ module InvoicePrinter
320
335
  )
321
336
  end
322
337
  # Render purchaser_lines if present
323
- if !@document.purchaser_lines.empty?
338
+ if purchaser.lines.size > 1
324
339
  @pdf.text_box(
325
- @document.purchaser_lines,
340
+ purchaser.lines(chomp: true)[1..].join("\n"),
326
341
  size: 10,
327
342
  at: [x(284), y(618) - @push_down],
328
343
  width: x(246),
@@ -655,7 +670,7 @@ module InvoicePrinter
655
670
  end
656
671
  end
657
672
 
658
- def description_height
673
+ def description_height
659
674
  @description_height ||= begin
660
675
  num_of_lines = @document.description.lines.count
661
676
  (num_of_lines * 13)
@@ -692,7 +707,6 @@ module InvoicePrinter
692
707
 
693
708
  options = {
694
709
  header: true,
695
- row_colors: [nil, 'ededed'],
696
710
  width: x(540, 2),
697
711
  cell_style: {
698
712
  borders: []
@@ -731,10 +745,13 @@ module InvoicePrinter
731
745
 
732
746
  # Include only items params with provided data
733
747
  def build_items_data(items_params)
734
- @document.items.map do |item|
748
+ colspan = items_params.select { |k, v| v }.count
749
+ color_background = false
750
+
751
+ items = []
752
+ @document.items.each do |item|
735
753
  line = []
736
- line << { content: name_cell(item), borders: [:bottom] } if items_params[:names]
737
- #line << { content: item.name, borders: [:bottom], align: :left } if items_params[:names]
754
+ line << { content: item.name, align: :left } if items_params[:names]
738
755
  line << { content: item.variable, align: :right } if items_params[:variables]
739
756
  line << { content: item.quantity, align: :right } if items_params[:quantities]
740
757
  line << { content: item.unit, align: :right } if items_params[:units]
@@ -743,29 +760,19 @@ module InvoicePrinter
743
760
  line << { content: item.tax2, align: :right } if items_params[:taxes2]
744
761
  line << { content: item.tax3, align: :right } if items_params[:taxes3]
745
762
  line << { content: item.amount, align: :right } if items_params[:amounts]
746
- line
747
- end
748
- end
749
763
 
750
- # Display item's name and breakdown if present
751
- def name_cell(item)
752
- data = if used?(item.breakdown)
753
- data = [
754
- [{ content: item.name, padding: [5, 0, 0, 5] }],
755
- [{ content: item.breakdown, size: 8, padding: [2, 0, 5, 5] }]
756
- ]
764
+ line.each {|c| c[:background_color] = 'ededed'} if color_background
757
765
 
758
- options = {
759
- cell_style: {
760
- borders: []
761
- },
762
- position: :left
763
- }
766
+ items << line
764
767
 
765
- @pdf.make_table(data, options)
766
- else
767
- item.name
768
+ if used?(item.breakdown)
769
+ items << [{ content: item.breakdown, align: :left, size: 8, colspan: colspan, padding: [0, 0, 5, 5] }]
770
+ items.last.first[:background_color] = 'ededed' if color_background
771
+ end
772
+
773
+ color_background = !color_background
768
774
  end
775
+ items
769
776
  end
770
777
 
771
778
  # Include only relevant headers
@@ -861,6 +868,26 @@ module InvoicePrinter
861
868
  end
862
869
  end
863
870
 
871
+ # Insert a QR image at the right bottom of the document
872
+ #
873
+ # If a note is present, position it on top of it.
874
+ def build_qr
875
+ if @qr && !@qr.empty?
876
+ bottom = @document.note.empty? ? 75 : (75 + note_height)
877
+ # Place QR at page width minus its fit width to keep it at the right edge.
878
+
879
+ image_info = Prawn::Images::PNG.new(File.read(@qr))
880
+ image_width = image_info.width.to_f
881
+
882
+ if image_width > x(50)
883
+ image_width = x(50)
884
+ end
885
+
886
+ left = @pdf.bounds.right - image_width
887
+ @pdf.image(@qr, at: [left, bottom], fit: [x(50), y(50)])
888
+ end
889
+ end
890
+
864
891
  # Insert a stamp (with signature) after the total table
865
892
  def build_stamp
866
893
  if @stamp && !@stamp.empty?
@@ -1,3 +1,3 @@
1
1
  module InvoicePrinter
2
- VERSION = '2.3.0'
2
+ VERSION = '2.5.0'
3
3
  end
@@ -18,6 +18,7 @@ Prawn::Font::AFM.hide_m17n_warning = true
18
18
  # bold_font: 'path-to-font-file.ttf',
19
19
  # stamp: 'stamp.jpg',
20
20
  # logo: 'logo.jpg',
21
+ # qr: 'qr.png',
21
22
  # file_name: 'invoice.pdf'
22
23
  # )
23
24
  module InvoicePrinter
@@ -69,6 +70,7 @@ module InvoicePrinter
69
70
  # bold_font - bold font file to use
70
71
  # stamp - stamp & signature (image)
71
72
  # logo - logotype (image)
73
+ # qr - QR image (image)
72
74
  # background - background (image)
73
75
  # page_size - :letter or :a4
74
76
  # file_name - output file
@@ -79,6 +81,7 @@ module InvoicePrinter
79
81
  bold_font: nil,
80
82
  stamp: nil,
81
83
  logo: nil,
84
+ qr: nil,
82
85
  background: nil,
83
86
  page_size: :letter,
84
87
  file_name:
@@ -90,6 +93,7 @@ module InvoicePrinter
90
93
  bold_font: bold_font,
91
94
  stamp: stamp,
92
95
  logo: logo,
96
+ qr: qr,
93
97
  background: background,
94
98
  page_size: page_size
95
99
  ).print(file_name)
@@ -103,6 +107,7 @@ module InvoicePrinter
103
107
  # bold_font - bold font file to use
104
108
  # stamp - stamp & signature (image)
105
109
  # logo - logotype (image)
110
+ # qr - QR image (image)
106
111
  # background - background (image)
107
112
  # page_size - :letter or :a4
108
113
  def self.render(
@@ -112,6 +117,7 @@ module InvoicePrinter
112
117
  bold_font: nil,
113
118
  stamp: nil,
114
119
  logo: nil,
120
+ qr: nil,
115
121
  background: nil,
116
122
  page_size: :letter
117
123
  )
@@ -122,6 +128,7 @@ module InvoicePrinter
122
128
  bold_font: bold_font,
123
129
  stamp: stamp,
124
130
  logo: logo,
131
+ qr: qr,
125
132
  background: background,
126
133
  page_size: page_size
127
134
  ).render
data/test/cli_test.rb CHANGED
@@ -22,6 +22,7 @@ class CLITest < Minitest::Test
22
22
  "--document '#{@invoice_as_json}' " +
23
23
  "--labels '#{labels_hash.to_json}' " +
24
24
  "--logo '#{logo_path}' " +
25
+ "--qr '#{qr_path}' " +
25
26
  "--background '#{background_path}' " +
26
27
  "--filename #{@output_path}"
27
28
 
@@ -44,6 +45,7 @@ class CLITest < Minitest::Test
44
45
  document: @invoice,
45
46
  labels: labels_hash,
46
47
  logo: logo_path,
48
+ qr: qr_path,
47
49
  background: background_path,
48
50
  page_size: :letter,
49
51
  file_name: expected_pdf_path
@@ -60,6 +62,7 @@ class CLITest < Minitest::Test
60
62
  "--document '#{@invoice_as_json}' " +
61
63
  "--labels '#{labels_hash.to_json}' " +
62
64
  "--logo '#{logo_path}' " +
65
+ "--qr '#{qr_path}' " +
63
66
  "--background '#{background_path}' " +
64
67
  "--page-size a4 " +
65
68
  "--filename #{@output_path}"
@@ -83,6 +86,7 @@ class CLITest < Minitest::Test
83
86
  document: @invoice,
84
87
  labels: labels_hash,
85
88
  logo: logo_path,
89
+ qr: qr_path,
86
90
  background: background_path,
87
91
  page_size: :a4,
88
92
  file_name: expected_pdf_path
@@ -107,6 +111,10 @@ class CLITest < Minitest::Test
107
111
  File.expand_path('../../examples/logo.png', __FILE__)
108
112
  end
109
113
 
114
+ def qr_path
115
+ File.expand_path('../../assets/qr.png', __FILE__)
116
+ end
117
+
110
118
  def background_path
111
119
  File.expand_path('../../examples/background.png', __FILE__)
112
120
  end
data/test/inputs_test.rb CHANGED
@@ -55,4 +55,12 @@ class InputsTest < Minitest::Test
55
55
  InvoicePrinter.render(document: invoice, stamp: 'missing.png')
56
56
  end
57
57
  end
58
+
59
+ def test_missing_qr_raises_an_exception
60
+ invoice = InvoicePrinter::Document.new(**default_document_params)
61
+
62
+ assert_raises(InvoicePrinter::PDFDocument::QRFileNotFound) do
63
+ InvoicePrinter.render(document: invoice, qr: 'missing.png')
64
+ end
65
+ end
58
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoice_printer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Strzibny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-11 00:00:00.000000000 Z
11
+ date: 2025-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: base64
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -116,16 +130,13 @@ executables:
116
130
  extensions: []
117
131
  extra_rdoc_files: []
118
132
  files:
133
+ - ".github/workflows/ci.yml"
119
134
  - ".gitignore"
120
135
  - Dockerfile
121
136
  - Gemfile
122
- - Gemfile.lock
123
137
  - LICENSE.txt
124
138
  - README.md
125
139
  - Rakefile
126
- - assets/fonts/opensans/OpenSans-Bold.ttf
127
- - assets/fonts/overpass/Overpass-Bold.ttf
128
- - assets/fonts/roboto/Roboto-Bold.ttf
129
140
  - benchmarks/render.yml
130
141
  - bin/invoice_printer
131
142
  - docs/COMMAND_LINE.md
@@ -142,6 +153,7 @@ files:
142
153
  - examples/picture.jpg
143
154
  - examples/promo.rb
144
155
  - examples/provider_purchaser_lines.rb
156
+ - examples/qr_invoice.rb
145
157
  - examples/simple_invoice.rb
146
158
  - examples/variable_field_invoice.rb
147
159
  - invoice_printer.gemspec
@@ -179,14 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
191
  requirements:
180
192
  - - ">="
181
193
  - !ruby/object:Gem::Version
182
- version: '2.4'
194
+ version: '3.1'
183
195
  required_rubygems_version: !ruby/object:Gem::Requirement
184
196
  requirements:
185
197
  - - ">="
186
198
  - !ruby/object:Gem::Version
187
199
  version: '0'
188
200
  requirements: []
189
- rubygems_version: 3.3.3
201
+ rubygems_version: 3.5.22
190
202
  signing_key:
191
203
  specification_version: 4
192
204
  summary: Super simple PDF invoicing in pure Ruby
data/Gemfile.lock DELETED
@@ -1,77 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- invoice_printer (2.2.0)
5
- e2mmap
6
- json (~> 2.1)
7
- matrix
8
- prawn (~> 2.4)
9
- prawn-table (~> 0.2.2)
10
- invoice_printer_server (2.2.0)
11
- invoice_printer (= 2.2.0)
12
- json (~> 2.1)
13
- puma (>= 3.9.0)
14
- roda (~> 3.5)
15
-
16
- GEM
17
- remote: https://rubygems.org/
18
- specs:
19
- Ascii85 (1.1.0)
20
- afm (0.2.2)
21
- benchmark_driver (0.15.17)
22
- benchmark_driver-output-gruff (0.3.1)
23
- benchmark_driver (>= 0.12.0)
24
- gruff
25
- e2mmap (0.1.0)
26
- gruff (0.14.0)
27
- histogram
28
- rmagick
29
- hashery (2.1.2)
30
- histogram (0.2.4.1)
31
- json (2.6.3)
32
- matrix (0.1.0)
33
- minitest (5.15.0)
34
- nio4r (2.5.8)
35
- pdf-core (0.9.0)
36
- pdf-inspector (1.3.0)
37
- pdf-reader (>= 1.0, < 3.0.a)
38
- pdf-reader (2.11.0)
39
- Ascii85 (~> 1.0)
40
- afm (~> 0.2.1)
41
- hashery (~> 2.0)
42
- ruby-rc4
43
- ttfunk
44
- pkg-config (1.5.1)
45
- prawn (2.4.0)
46
- pdf-core (~> 0.9.0)
47
- ttfunk (~> 1.7)
48
- prawn-table (0.2.2)
49
- prawn (>= 1.3.0, < 3.0.0)
50
- puma (6.0.2)
51
- nio4r (~> 2.0)
52
- rack (3.0.4.1)
53
- rack-test (2.0.2)
54
- rack (>= 1.3)
55
- rake (13.0.6)
56
- rmagick (5.1.0)
57
- pkg-config (~> 1.4)
58
- roda (3.64.0)
59
- rack
60
- ruby-rc4 (0.1.5)
61
- ttfunk (1.7.0)
62
-
63
- PLATFORMS
64
- x86_64-linux
65
-
66
- DEPENDENCIES
67
- benchmark_driver (= 0.15.17)
68
- benchmark_driver-output-gruff
69
- bundler (>= 1.7)
70
- invoice_printer_server!
71
- minitest
72
- pdf-inspector
73
- rack-test
74
- rake (>= 10.0)
75
-
76
- BUNDLED WITH
77
- 2.4.3
Binary file