proforma-prawn-renderer 1.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Copyright (c) 2018-present, Blue Marble Payroll, LLC
5
+ #
6
+ # This source code is licensed under the MIT license found in the
7
+ # LICENSE file in the root directory of this source tree.
8
+ #
9
+
10
+ require 'yaml'
11
+ require 'pry'
12
+ require 'pdf/inspector'
13
+
14
+ require 'simplecov'
15
+ require 'simplecov-console'
16
+ SimpleCov.formatter = SimpleCov::Formatter::Console
17
+ SimpleCov.start
18
+
19
+ require './lib/proforma/prawn_renderer'
20
+
21
+ def yaml_read(file)
22
+ # rubocop:disable Security/YAMLLoad
23
+ YAML.load(File.open(file))
24
+ # rubocop:enable Security/YAMLLoad
25
+ end
26
+
27
+ def pdf_strings(rendered_pdf)
28
+ PDF::Inspector::Text.analyze(rendered_pdf).strings.join(' ')
29
+ end
metadata ADDED
@@ -0,0 +1,218 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: proforma-prawn-renderer
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.pre.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Matthew Ruggio
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-04-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: prawn
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: prawn-table
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard-rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.7'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pdf-inspector
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: proforma
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.0.pre.alpha
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.0.pre.alpha
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.8'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.63.1
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.63.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.16.1
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.16.1
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov-console
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.4.2
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.4.2
153
+ description: "\n"
154
+ email:
155
+ - mruggio@bluemarblepayroll.com
156
+ executables:
157
+ - console
158
+ - render
159
+ extensions: []
160
+ extra_rdoc_files: []
161
+ files:
162
+ - ".editorconfig"
163
+ - ".gitignore"
164
+ - ".rubocop.yml"
165
+ - ".ruby-version"
166
+ - ".travis.yml"
167
+ - CHANGELOG.md
168
+ - Gemfile
169
+ - Gemfile.lock
170
+ - Guardfile
171
+ - LICENSE
172
+ - README.md
173
+ - bin/console
174
+ - bin/render
175
+ - lib/proforma/prawn_renderer.rb
176
+ - lib/proforma/prawn_renderer/banner_renderer.rb
177
+ - lib/proforma/prawn_renderer/header_renderer.rb
178
+ - lib/proforma/prawn_renderer/options.rb
179
+ - lib/proforma/prawn_renderer/pane_renderer.rb
180
+ - lib/proforma/prawn_renderer/renderer.rb
181
+ - lib/proforma/prawn_renderer/separator_renderer.rb
182
+ - lib/proforma/prawn_renderer/spacer_renderer.rb
183
+ - lib/proforma/prawn_renderer/table_renderer.rb
184
+ - lib/proforma/prawn_renderer/text_renderer.rb
185
+ - lib/proforma/prawn_renderer/version.rb
186
+ - proforma-prawn-renderer.gemspec
187
+ - spec/fixtures/snapshots/user_details.yml
188
+ - spec/fixtures/snapshots/user_list.yml
189
+ - spec/proforma/prawn_renderer_spec.rb
190
+ - spec/spec_helper.rb
191
+ homepage: https://github.com/bluemarblepayroll/proforma-prawn-renderer
192
+ licenses:
193
+ - MIT
194
+ metadata: {}
195
+ post_install_message:
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: 2.3.8
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">"
207
+ - !ruby/object:Gem::Version
208
+ version: 1.3.1
209
+ requirements: []
210
+ rubygems_version: 3.0.1
211
+ signing_key:
212
+ specification_version: 4
213
+ summary: Proforma renderer plugin for generating PDFs using Prawn
214
+ test_files:
215
+ - spec/fixtures/snapshots/user_details.yml
216
+ - spec/fixtures/snapshots/user_list.yml
217
+ - spec/proforma/prawn_renderer_spec.rb
218
+ - spec/spec_helper.rb