prawn-attachment 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5cedf55c7c97ed821fc7d9a61cd6f88538eb959d17cd2fe11f8a5aaae2d734c0
4
+ data.tar.gz: 5ad7f5ce585f97f508fda3d6a257f4f7bc47197887914c1424aaa506f4747bad
5
+ SHA512:
6
+ metadata.gz: c4c2452fa385e45480211f2744e6cfaa7d96131acff1472e8652ef7802500b5c895eeb16358a134520f77492a06db8533abba8d4b3707d9a899ecf8e5384ab36
7
+ data.tar.gz: '09fdd61fd399f58a78898b15faaea1b4738f1fa7617a0aa8dd1edc9e9bdbbdf02d4fc15bd1208a9d936beefdecbf10f5d604eb09ce079361458a395742357e65'
@@ -0,0 +1,41 @@
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ name: Tests - Ruby ${{ matrix.ruby }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby:
13
+ # - "3.1"
14
+ - "3.0"
15
+ - "2.7"
16
+ - "2.6"
17
+ - "2.5"
18
+ # - ruby-head
19
+ - jruby-9.3
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+ - name: Run rspec
29
+ run: bundle exec rspec
30
+
31
+ rubocop:
32
+ runs-on: ubuntu-latest
33
+
34
+ steps:
35
+ - uses: actions/checkout@v2
36
+ - uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: 2.7
39
+ bundler-cache: true
40
+ - name: Lint Ruby code with RuboCop
41
+ run: bundle exec rubocop
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.gem
10
+ *.pdf
11
+ .rspec_status
12
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.5
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-11-19
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at sam.lown@cabify.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in prawn-attachment.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.7"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Sam Lown
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Prawn::Attachment
2
+
3
+ Attach files to Prawn PDF documents according to the PDF/A-3 standard.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'prawn-attachment'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install prawn-attachment
20
+
21
+ ## Usage
22
+
23
+ Simply require the gem and attach your files the PDF document you're building with Prawn.
24
+
25
+ ```ruby
26
+ require "prawn"
27
+ require "prawn/attachment"
28
+
29
+ Prawn::Document.generate("hello.pdf") do
30
+ text "Hello World!"
31
+ attach "./data.json"
32
+ end
33
+ ```
34
+
35
+ If you open up the PDF in a view that supports PDF/A-3, like the standard [Adobe Acrobat Reader](https://get.adobe.com/reader/) you should be able to see the attached data in the "attachments" section.
36
+
37
+ ## Development
38
+
39
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
+
41
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+
43
+ ## Contributing
44
+
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/invopop/prawn-attachment. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/invopop/prawn-attachment/blob/master/CODE_OF_CONDUCT.md).
46
+
47
+ ## License
48
+
49
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
50
+
51
+ ## Code of Conduct
52
+
53
+ Everyone interacting in the Prawn::Attachment project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/invopop/prawn-attachment/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
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
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "prawn/attachment"
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 ADDED
@@ -0,0 +1,8 @@
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
data/example/attach.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "prawn"
4
+ require_relative "../lib/prawn/attachment"
5
+
6
+ Prawn::Document.generate("hello.pdf") do
7
+ text "Hello World!"
8
+ attach "data.json", File.open("./data.json")
9
+ end
data/example/data.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "message": "Hello World Indeed!"
3
+ }
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PDF
4
+ module Core
5
+ module EmbeddedFiles # :nodoc:
6
+ # The maximum number of children to fit into a single node in the
7
+ # EmbeddedFiles tree.
8
+ NAME_TREE_CHILDREN_LIMIT = 20 # :nodoc:
9
+
10
+ # The EmbeddedFiles name tree in the Name dictionary (see
11
+ # Prawn::Document::Internal#names). This name tree is used to store named
12
+ # embedded files (PDF spec 3.10.3). (For more on name trees, see section
13
+ # 3.8.4 in the PDF spec.)
14
+ #
15
+ def embedded_files
16
+ bump_min_version
17
+
18
+ names.data[:EmbeddedFiles] ||= ref!(
19
+ PDF::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT)
20
+ )
21
+ end
22
+
23
+ # Adds a new embedded file to the EmbeddedFiles name tree
24
+ # (see #embedded_files). The +reference+ parameter will be converted into
25
+ # a PDF::Core::Reference if it is not already one.
26
+ #
27
+ def add_embedded_file(name, reference)
28
+ reference = ref!(reference) unless reference.is_a?(PDF::Core::Reference)
29
+ embedded_files.data.add(name, reference)
30
+ end
31
+
32
+ # Friendly method alias to attach file specifications in the catalog
33
+ alias attach_file add_embedded_file
34
+
35
+ private
36
+
37
+ def bump_min_version
38
+ renderer.min_version(1.4)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Prawn
4
+ module Attachment
5
+ # EmbeddedFile represents a file to be embedded in the PDF.
6
+ class EmbeddedFile
7
+ attr_reader :data, :creation_date, :modification_date, :checksum
8
+
9
+ def initialize(data, options = {})
10
+ @data = data
11
+
12
+ @creation_date = options[:creation_date]
13
+ @creation_date = Time.now.utc unless @creation_date.is_a?(Time)
14
+
15
+ @modification_date = options[:modification_date]
16
+ @modification_date = Time.now.utc unless @modification_date.is_a?(Time)
17
+
18
+ @checksum = Digest::MD5.digest(data)
19
+ end
20
+
21
+ def build_pdf_object(document)
22
+ obj = document.ref!(reference_params)
23
+ obj << data
24
+ obj.stream.compress! if document.compression_enabled?
25
+ obj
26
+ end
27
+
28
+ private
29
+
30
+ def reference_params
31
+ {
32
+ Type: :EmbeddedFile,
33
+ Params: {
34
+ CreationDate: creation_date,
35
+ ModDate: modification_date,
36
+ CheckSum: PDF::Core::LiteralString.new(checksum),
37
+ Size: data.length
38
+ }
39
+ }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "digest"
4
+
5
+ module Prawn
6
+ module Attachment
7
+ # FileSpec corresponds to the PDF file specification object.
8
+ class Filespec
9
+ attr_reader :file_name
10
+
11
+ def initialize(file, options = {})
12
+ hexdigest = Digest.hexencode(file.data[:Params][:CheckSum])
13
+ name = options[:name] || hexdigest
14
+
15
+ @file_name = PDF::Core::LiteralString.new(name)
16
+
17
+ if options[:description]
18
+ desc_str = options[:description].to_s
19
+ @description = PDF::Core::LiteralString.new(desc_str)
20
+ end
21
+
22
+ @hidden = options[:hidden]
23
+ @file = file
24
+ end
25
+
26
+ def hidden?
27
+ @hidden
28
+ end
29
+
30
+ def build_pdf_object(document)
31
+ obj = document.ref!(
32
+ Type: :Filespec,
33
+ F: file_name,
34
+ EF: { F: file, UF: file },
35
+ UF: file_name
36
+ )
37
+
38
+ obj.data[:Desc] = description if description
39
+ obj
40
+ end
41
+
42
+ private
43
+
44
+ attr_reader :file, :description
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Prawn
4
+ module Attachment
5
+ VERSION = "0.2.0"
6
+ end
7
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "prawn"
4
+ require_relative "../pdf/core/embedded_files"
5
+
6
+ require_relative "attachment/version"
7
+ require_relative "attachment/embedded_file"
8
+ require_relative "attachment/filespec"
9
+
10
+ module Prawn
11
+ # Module that supports attachment of file data into a Prawn::Document
12
+ module Attachment
13
+ include PDF::Core::EmbeddedFiles
14
+
15
+ # Missing data error
16
+ class NoDataError < StandardError
17
+ def message
18
+ "Source data is empty"
19
+ end
20
+ end
21
+
22
+ # Attach a file's data to the document. File IO Objects are expected.
23
+ #
24
+ # Arguments:
25
+ # <tt>name</tt>:: name of attachment.
26
+ # <tt>src</tt>:: String or IO object containing source file data.
27
+ #
28
+ # Options:
29
+ # <tt>:created_at</tt>:: timestamp when the file was created.
30
+ # <tt>:modified_at</tt>:: timestamp for when file was last modified.
31
+ # <tt>:description</tt>:: file description.
32
+ # <tt>:hidden</tt>:: if true, prevents the file from appearing in the
33
+ # catalog. (default false)
34
+ #
35
+ # Prawn::Document.generate("file1.pdf") do
36
+ # path = "#{Prawn::DATADIR}/images/dice.png"
37
+ # attach "dice.png", File.open(path), description: 'Example of an attached image file'
38
+ # end
39
+ #
40
+ # This method returns an instance of PDF::Core::NameTree::Value
41
+ # corresponding to the file in the attached files catalog entry node. If
42
+ # hidden, then nil is returned.
43
+ #
44
+ def attach(name, src, opts = {})
45
+ data = src.is_a?(IO) ? src.read : src.b
46
+ raise NoDataError if data.length.zero?
47
+
48
+ opts = prepare_options(name, opts)
49
+
50
+ # Prepare embeddable representation of the source data
51
+ file = EmbeddedFile.new(data, opts)
52
+
53
+ filespec = Filespec.new(file_obj_from_registry(file), opts)
54
+ filespec_obj = filespec.build_pdf_object(self)
55
+
56
+ attach_file(filespec.file_name, filespec_obj) unless filespec.hidden?
57
+ end
58
+
59
+ private
60
+
61
+ def prepare_options(name, opts)
62
+ {
63
+ name: name,
64
+ creation_date: opts[:created_at] || Time.now.utc,
65
+ modification_date: opts[:modified_at] || Time.now.utc,
66
+ description: opts[:description],
67
+ hidden: !!opts[:hidden]
68
+ }
69
+ end
70
+
71
+ # attempt to find a previously stored version of the embedded file in the
72
+ # registry, just in case the same file is attached twice with different names.
73
+ def file_obj_from_registry(file)
74
+ file_obj = file_registry[file.checksum]
75
+ return file_obj if file_obj
76
+
77
+ file_obj = file.build_pdf_object(self)
78
+ file_registry[file.checksum] = file_obj
79
+ file_obj
80
+ end
81
+
82
+ def file_registry
83
+ @file_registry ||= {}
84
+ end
85
+ end
86
+ end
87
+
88
+ # Add ourselves to prawn
89
+ Prawn::Document.include Prawn::Attachment
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/prawn/attachment/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "prawn-attachment"
7
+ spec.version = Prawn::Attachment::VERSION
8
+ spec.authors = ["David Lilue", "Sam Lown"]
9
+ spec.email = ["david.lilue@invopop.com", "sam.lown@invopop.com"]
10
+
11
+ spec.summary = "Attach files to Prawn generated PDFs according to PDF/A-3"
12
+ spec.homepage = "https://github.com/invopop/prawn-attachment"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.5.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/invopop/prawn-attachment"
18
+ spec.metadata["changelog_uri"] = "https://github.com/invopop/prawn-attachment"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
24
+ end
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ # Uncomment to register a new dependency of your gem
30
+ # spec.add_dependency "example-gem", "~> 1.0"
31
+ spec.add_dependency "prawn", "~> 2.4.0"
32
+
33
+ # For more information and examples about making a new gem, checkout our
34
+ # guide at: https://bundler.io/guides/creating_gem.html
35
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: prawn-attachment
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - David Lilue
8
+ - Sam Lown
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2022-03-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: prawn
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 2.4.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 2.4.0
28
+ description:
29
+ email:
30
+ - david.lilue@invopop.com
31
+ - sam.lown@invopop.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - ".github/workflows/main.yml"
37
+ - ".gitignore"
38
+ - ".rspec"
39
+ - ".rubocop.yml"
40
+ - CHANGELOG.md
41
+ - CODE_OF_CONDUCT.md
42
+ - Gemfile
43
+ - LICENSE.txt
44
+ - README.md
45
+ - Rakefile
46
+ - bin/console
47
+ - bin/setup
48
+ - example/attach.rb
49
+ - example/data.json
50
+ - lib/pdf/core/embedded_files.rb
51
+ - lib/prawn/attachment.rb
52
+ - lib/prawn/attachment/embedded_file.rb
53
+ - lib/prawn/attachment/filespec.rb
54
+ - lib/prawn/attachment/version.rb
55
+ - prawn-attachment.gemspec
56
+ homepage: https://github.com/invopop/prawn-attachment
57
+ licenses:
58
+ - MIT
59
+ metadata:
60
+ homepage_uri: https://github.com/invopop/prawn-attachment
61
+ source_code_uri: https://github.com/invopop/prawn-attachment
62
+ changelog_uri: https://github.com/invopop/prawn-attachment
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.5.0
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.2.32
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Attach files to Prawn generated PDFs according to PDF/A-3
82
+ test_files: []