prawn_plus 10.0.0 → 10.5.0

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: 2a3df6a1bbce8e4d75e3b411204b873dbca62a6913a8de04efcee18429746fe2
4
- data.tar.gz: 476146ef2a7b988b54d374538185689c53154f8f397b523e242fa4ada63a4287
3
+ metadata.gz: a25f5619d13db63c18865c6efbfd6ff28bd4eccf6fef0ea447f790cb527b09c8
4
+ data.tar.gz: 4560bf85e045843b10a3a67c07d69385a48e5d4a9f4fdb3745f328a8043dec06
5
5
  SHA512:
6
- metadata.gz: 6eb86c793d0786c7363368db13391cfd3562f5dd4aec6ca3e45356cd7d2f9f32067e3882898d40334037b4b0bbb6028716f98d76bb0552bb5617eb55eabae868
7
- data.tar.gz: 3a8318182f7c2499fc4699ca42fc19b1dbed269d98a52e36f38425a3621d5f4b7a6c2274be3affd9f2929d0435b281169cde2c3b90cb7cb9ddf170fe205dd1da
6
+ metadata.gz: 64b335c1733a9ff668121b378cbce5f9078da9b153f30e860f7407a10b9d749e1b538681b43460612f18b6cb4e755fe0505fc8b0e250bad78ac38b229f97fa34
7
+ data.tar.gz: 7e1b09edb45a286cda98f59451f6f31e1f12baf359d4e91e2e0b528f98ce4eca49be1888e185baba47306f5c3a18454b6dd9b83eed920ba5a5b34f6f2eee2b25
@@ -1 +1 @@
1
- ��g V'H48Y\]V.|\/�Y�l6T_�)�����Q0x��$�j�y^�@B�$.�{��ʱ�ݧDx���o���UXM#�)�&~'�pyGG�pS˨VG��z�����)�>
1
+ ͟�,)��E^34��u�"R�rP�!�;��u�!�S_"��� ���r��u%J�ݕxN��Q�4P��C�H�����~S��5�����X�ݺg���$���9�}��Jq�'1�5hJ� /��[����k�;WhS����M_�`��p�Q4�_���Cc���� ��_:�НUPp ��0�B��7�y@�W4?/�d5xO�™��$Wd�`,�l�����i�����Dh8(H����/V/ݢ
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �n�9^>��L/Y��-9��)x��d��5s9�VPc}e5�(��^�L9��qOHXsF�a� _\��[w[ Y܍�W��J*`j�.�vF]�n�k��[�������
2
- T��3���6UT$-?싼����NЛ4��؛��F[@��K�� {H3&Q�A�2Z L�.�[��AN�]Ʋsl����-��C��fl���4oc��`�d�=%�o��L3�X�/�v���#���KA] (-��UӒbp�o���6{
1
+ H$�ztɓ��ߣ�y�� �Ȥ����gKcq�+iN\�f6�E�y���h�,��B�n��. mQ���Ec{%R0T�aA��gz�,<0��Z 0>�g�9��E��iN}ڹo10A��S|��xBq/OG7��z +�a�|�arq��YcG^h
2
+ UvE�鍮�,��3ll���u���x���RIE
@@ -1,4 +1,4 @@
1
- # Apache License
1
+ = Apache License
2
2
 
3
3
  Version 2.0, January 2004
4
4
 
@@ -6,7 +6,7 @@ http://www.apache.org/licenses
6
6
 
7
7
  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
8
 
9
- ## 1. Definitions
9
+ == 1. Definitions
10
10
 
11
11
  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
12
12
  Sections 1 through 9 of this document.
@@ -54,14 +54,14 @@ Contribution."
54
54
  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
55
55
  Contribution has been received by Licensor and subsequently incorporated within the Work.
56
56
 
57
- ## 2. Grant of Copyright License
57
+ == 2. Grant of Copyright License
58
58
 
59
59
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
60
60
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
61
61
  reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
62
62
  distribute the Work and such Derivative Works in Source or Object form.
63
63
 
64
- ## 3. Grant of Patent License
64
+ == 3. Grant of Patent License
65
65
 
66
66
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
67
67
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
@@ -74,39 +74,38 @@ a Contribution incorporated within the Work constitutes direct or contributory p
74
74
  then any patent licenses granted to You under this License for that Work shall terminate as of the
75
75
  date such litigation is filed.
76
76
 
77
- ## 4. Redistribution
77
+ == 4. Redistribution
78
78
 
79
79
  You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
80
80
  or without modifications, and in Source or Object form, provided that You meet the following
81
81
  conditions:
82
82
 
83
- 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
83
+ . You must give any other recipients of the Work or Derivative Works a copy of this License; and
84
84
 
85
- 2. You must cause any modified files to carry prominent notices stating that You changed the
86
- files; and
85
+ . You must cause any modified files to carry prominent notices stating that You changed the files;
86
+ and
87
87
 
88
- 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
- patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
- notices that do not pertain to any part of the Derivative Works; and
88
+ . You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
+ patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
+ notices that do not pertain to any part of the Derivative Works; and
91
91
 
92
- 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
93
- Works that You distribute must include a readable copy of the attribution notices contained
94
- within such NOTICE file, excluding those notices that do not pertain to any part of the
95
- Derivative Works, in at least one of the following places: within a NOTICE text file
96
- distributed as part of the Derivative Works; within the Source form or documentation, if
97
- provided along with the Derivative Works; or, within a display generated by the Derivative
98
- Works, if and wherever such third-party notices normally appear. The contents of the NOTICE
99
- file are for informational purposes only and do not modify the License. You may add Your own
100
- attribution notices within Derivative Works that You distribute, alongside or as an addendum to
101
- the NOTICE text from the Work, provided that such additional attribution notices cannot be
102
- construed as modifying the License.
92
+ . If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
93
+ that You distribute must include a readable copy of the attribution notices contained within such
94
+ NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
95
+ at least one of the following places: within a NOTICE text file distributed as part of the
96
+ Derivative Works; within the Source form or documentation, if provided along with the Derivative
97
+ Works; or, within a display generated by the Derivative Works, if and wherever such third-party
98
+ notices normally appear. The contents of the NOTICE file are for informational purposes only and
99
+ do not modify the License. You may add Your own attribution notices within Derivative Works that
100
+ You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
101
+ additional attribution notices cannot be construed as modifying the License.
103
102
 
104
103
  You may add Your own copyright statement to Your modifications and may provide additional or
105
104
  different license terms and conditions for use, reproduction, or distribution of Your modifications,
106
105
  or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
107
106
  the Work otherwise complies with the conditions stated in this License.
108
107
 
109
- ## 5. Submission of Contributions
108
+ == 5. Submission of Contributions
110
109
 
111
110
  Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
112
111
  Work by You to the Licensor shall be under the terms and conditions of this License, without any
@@ -114,13 +113,13 @@ additional terms or conditions. Notwithstanding the above, nothing herein shall
114
113
  the terms of any separate license agreement you may have executed with Licensor regarding such
115
114
  Contributions.
116
115
 
117
- ## 6. Trademarks
116
+ == 6. Trademarks
118
117
 
119
118
  This License does not grant permission to use the trade names, trademarks, service marks, or product
120
119
  names of the Licensor, except as required for reasonable and customary use in describing the origin
121
120
  of the Work and reproducing the content of the NOTICE file.
122
121
 
123
- ## 7. Disclaimer of Warranty
122
+ == 7. Disclaimer of Warranty
124
123
 
125
124
  Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
126
125
  Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -129,7 +128,7 @@ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
129
128
  responsible for determining the appropriateness of using or redistributing the Work and assume any
130
129
  risks associated with Your exercise of permissions under this License.
131
130
 
132
- ## 8. Limitation of Liability
131
+ == 8. Limitation of Liability
133
132
 
134
133
  In no event and under no legal theory, whether in tort (including negligence), contract, or
135
134
  otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
@@ -139,7 +138,7 @@ License or out of the use or inability to use the Work (including but not limite
139
138
  loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
140
139
  damages or losses), even if such Contributor has been advised of the possibility of such damages.
141
140
 
142
- ## 9. Accepting Warranty or Additional Liability
141
+ == 9. Accepting Warranty or Additional Liability
143
142
 
144
143
  While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
145
144
  for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
@@ -151,11 +150,11 @@ additional liability.
151
150
 
152
151
  END OF TERMS AND CONDITIONS
153
152
 
154
- Copyright 2012 [Alchemists](https://www.alchemists.io).
153
+ Copyright 2012 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
155
154
 
156
155
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
157
- compliance with the License. You may obtain a [copy](http://www.apache.org/licenses/LICENSE-2.0) of
158
- the License.
156
+ compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
157
+ of the License.
159
158
 
160
159
  Unless required by applicable law or agreed to in writing, software distributed under the License is
161
160
  distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
@@ -0,0 +1,176 @@
1
+ :toc: macro
2
+ :toclevels: 5
3
+ :figure-caption!:
4
+
5
+ = Prawn+
6
+
7
+ [link=http://badge.fury.io/rb/prawn_plus]
8
+ image::https://badge.fury.io/rb/prawn_plus.svg[Gem Version]
9
+ [link=https://www.alchemists.io/projects/code_quality]
10
+ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
11
+ [link=https://circleci.com/gh/bkuhlmann/prawn_plus]
12
+ image::https://circleci.com/gh/bkuhlmann/prawn_plus.svg?style=svg[Circle CI Status]
13
+
14
+ toc::[]
15
+
16
+ == Features
17
+
18
+ * Loads the https://github.com/prawnpdf/prawn[Prawn] gem by default (no Gemfile entry necessary).
19
+ * Registers PDF as a MIME type.
20
+ * Registers a template handler for rendering "`.prawn`" template view files.
21
+
22
+ == Requirements
23
+
24
+ . https://www.ruby-lang.org[Ruby]
25
+ . https://rubyonrails.org[Ruby on Rails]
26
+ . https://github.com/prawnpdf/prawn[Prawn]
27
+
28
+ == Setup
29
+
30
+ To install, run:
31
+
32
+ [source,bash]
33
+ ----
34
+ gem install prawn_plus
35
+ ----
36
+
37
+ Add the following to your Gemfile:
38
+
39
+ [source,ruby]
40
+ ----
41
+ gem "prawn_plus"
42
+ ----
43
+
44
+ == Usage
45
+
46
+ === Views
47
+
48
+ Within your views you can craft Prawn templates using Ruby code. For example, assuming there are
49
+ document resources, then the following structure might exist:
50
+
51
+ ....
52
+ /views/documents/show.html.slim
53
+ /views/documents/show.pdf.prawn
54
+ ....
55
+
56
+ The `show.html.slim` could have a link to the PDF download. Example:
57
+
58
+ ....
59
+ = link_to "PDF Download", action: "show", id: @document.id, format: "pdf"
60
+ ....
61
+
62
+ The `show.pdf.prawn` file would contain the Prawn syntax for crafting the PDF. A simple example
63
+ might look like this:
64
+
65
+ [source,ruby]
66
+ ----
67
+ pdf.text "Hello, I'm a PDF!"
68
+ ----
69
+
70
+ ...which would render the following output:
71
+
72
+ image::https://www.alchemists.io/images/projects/prawn_plus/screenshots/basic.png[Basic Example]
73
+
74
+ You could also render a more complex PDF with tabular information, for example:
75
+
76
+ [source,ruby]
77
+ ----
78
+ pdf.text "Metals"
79
+ pdf.move_down 10
80
+ pdf.font_size = 10
81
+
82
+ data = [
83
+ ["Name", "Atomic Number", "Price"],
84
+ ["Mercury", "80", number_to_currency(10)],
85
+ ["Platinum", "78", number_to_currency(25)],
86
+ ["Titanium", "22", number_to_currency(50)]
87
+ ]
88
+
89
+ pdf.table data, header: true, column_widths: [100, 50, 50], row_colors: ["FFFFFF", "E5ECF9"] do
90
+ columns(0).align = :left
91
+ columns(1..2).align = :right
92
+ row(0).text_color = "FFFFFF"
93
+ row(0).background_color = "000000"
94
+ row(0).columns(0..2).font_style = :bold
95
+ row(0).columns(0..2).align = :center
96
+ end
97
+ ----
98
+
99
+ ...which would render the following output:
100
+
101
+ image::https://www.alchemists.io/images/projects/prawn_plus/screenshots/complex.png[Complex Example]
102
+
103
+ _NOTE: The `pdf` object must always be referenced when making using of the Prawn syntax - it is
104
+ initialized for you as a Prawn::Document instance._
105
+
106
+ === Controllers
107
+
108
+ Within your controller, only the `respond_to` method is required. Example:
109
+
110
+ [source,ruby]
111
+ ----
112
+ class DocumentsController < ApplicationController
113
+ respond_to :pdf
114
+
115
+ def show
116
+ end
117
+ end
118
+ ----
119
+
120
+ That’s it!
121
+
122
+ == Development
123
+
124
+ To contribute, run:
125
+
126
+ [source,bash]
127
+ ----
128
+ git clone https://github.com/bkuhlmann/prawn_plus.git
129
+ cd prawn_plus
130
+ bin/setup
131
+ ----
132
+
133
+ You can also use the IRB console for direct access to all objects:
134
+
135
+ [source,bash]
136
+ ----
137
+ bin/console
138
+ ----
139
+
140
+ == Tests
141
+
142
+ To test, run:
143
+
144
+ [source,bash]
145
+ ----
146
+ bundle exec rake
147
+ ----
148
+
149
+ == Versioning
150
+
151
+ Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
152
+
153
+ * Major (X.y.z) - Incremented for any backwards incompatible public API changes.
154
+ * Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
155
+ * Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
156
+
157
+ == Code of Conduct
158
+
159
+ Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
160
+ participating in this project you agree to abide by its terms.
161
+
162
+ == Contributions
163
+
164
+ Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
165
+
166
+ == License
167
+
168
+ Read link:LICENSE.adoc[LICENSE] for details.
169
+
170
+ == History
171
+
172
+ Read link:CHANGES.adoc[CHANGES] for details.
173
+
174
+ == Credits
175
+
176
+ Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
@@ -3,20 +3,9 @@
3
3
  module PrawnPlus
4
4
  # Gem identity information.
5
5
  module Identity
6
- def self.name
7
- "prawn_plus"
8
- end
9
-
10
- def self.label
11
- "Prawn+"
12
- end
13
-
14
- def self.version
15
- "10.0.0"
16
- end
17
-
18
- def self.version_label
19
- "#{label} #{version}"
20
- end
6
+ NAME = "prawn_plus"
7
+ LABEL = "Prawn+"
8
+ VERSION = "10.5.0"
9
+ VERSION_LABEL = "#{LABEL} #{VERSION}"
21
10
  end
22
11
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 10.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBAjANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xOTAyMTcxNjAxMTFaFw0yMDAyMTcx
15
- NjAxMTFaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBAzANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMDAzMTUxNDQ1MzJaFw0yMTAzMTUx
15
+ NDQ1MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
@@ -20,15 +20,15 @@ cert_chain:
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
22
  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBANgfX7kPZkJvsbdWMvbe
24
- DUUYxRTqTUzCDpLd2p3sQvgLMKjTNSKt6CFq/kh+98b6RCgO6DqiVfxvOEq02dvf
25
- ebMN/ylQqan2FgiAs1rpP0/D4C0MlBjoDktsT+2IyLol1KmkDB20ExJ4Sf1GRNdA
26
- hpWOtcgqHtmrc7xzgB6BuyoYufrKKUlCO3ewTM4C375D2qO7hIdKuMOO3CdPMtSk
27
- OrWpbzCL+nbbXqeoqiHgZaUvcyyQrGj5sQRxMTzuMXzzQxtHnuTuKrcz16HMTX/O
28
- dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
29
- y84=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAIHhAlD3po4sTYqacXaQ
24
+ XI9jIhrfMy//2PgbHWcETtlJPBeNUbbSNBABcllUHKqYsVDlSvSmss034KSWNR8F
25
+ bF1GcloicyvcCC4y6IoW4it0COAcdeaaxkxiBSgKdQFpff9REnDlIKK4uQ9lLxIo
26
+ Y2G5xubiziKZkyfWFuSr67PIjW3Bu673D1JVBArhA1qbgQmYQcy1CkGOjo+iO8Nf
27
+ 7u/QSfBHb+r/bXhKscDgPpnKwbUmvgO2+94zJG9KsrmIydlzYfsD09aXKx0t6Xy4
28
+ 2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
+ QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-01-01 00:00:00.000000000 Z
31
+ date: 2020-12-13 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: prawn
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.2'
39
+ version: '2.3'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '2.2'
46
+ version: '2.3'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: prawn-table
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -73,252 +73,43 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '6.0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: bundler-audit
76
+ name: refinements
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.6'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '0.6'
89
- - !ruby/object:Gem::Dependency
90
- name: capybara
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '3.1'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '3.1'
103
- - !ruby/object:Gem::Dependency
104
- name: gemsmith
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '14.0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '14.0'
117
- - !ruby/object:Gem::Dependency
118
- name: git-cop
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '4.0'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '4.0'
131
- - !ruby/object:Gem::Dependency
132
- name: guard-rspec
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '4.7'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '4.7'
145
- - !ruby/object:Gem::Dependency
146
- name: pg
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '1.2'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '1.2'
159
- - !ruby/object:Gem::Dependency
160
- name: pry
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '0.12'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: '0.12'
173
- - !ruby/object:Gem::Dependency
174
- name: pry-byebug
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '3.7'
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - "~>"
185
- - !ruby/object:Gem::Version
186
- version: '3.7'
187
- - !ruby/object:Gem::Dependency
188
- name: rake
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - "~>"
192
- - !ruby/object:Gem::Version
193
- version: '13.0'
194
- type: :development
195
- prerelease: false
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '13.0'
201
- - !ruby/object:Gem::Dependency
202
- name: reek
203
- requirement: !ruby/object:Gem::Requirement
204
- requirements:
205
- - - "~>"
206
- - !ruby/object:Gem::Version
207
- version: '5.4'
208
- type: :development
209
- prerelease: false
210
- version_requirements: !ruby/object:Gem::Requirement
211
- requirements:
212
- - - "~>"
213
- - !ruby/object:Gem::Version
214
- version: '5.4'
215
- - !ruby/object:Gem::Dependency
216
- name: rspec-rails
217
- requirement: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - "~>"
220
- - !ruby/object:Gem::Version
221
- version: '3.9'
222
- type: :development
223
- prerelease: false
224
- version_requirements: !ruby/object:Gem::Requirement
225
- requirements:
226
- - - "~>"
227
- - !ruby/object:Gem::Version
228
- version: '3.9'
229
- - !ruby/object:Gem::Dependency
230
- name: rubocop
231
- requirement: !ruby/object:Gem::Requirement
232
- requirements:
233
- - - "~>"
234
- - !ruby/object:Gem::Version
235
- version: '0.78'
236
- type: :development
237
- prerelease: false
238
- version_requirements: !ruby/object:Gem::Requirement
239
- requirements:
240
- - - "~>"
241
- - !ruby/object:Gem::Version
242
- version: '0.78'
243
- - !ruby/object:Gem::Dependency
244
- name: rubocop-performance
245
- requirement: !ruby/object:Gem::Requirement
246
- requirements:
247
- - - "~>"
248
- - !ruby/object:Gem::Version
249
- version: '1.5'
250
- type: :development
251
- prerelease: false
252
- version_requirements: !ruby/object:Gem::Requirement
253
- requirements:
254
- - - "~>"
255
- - !ruby/object:Gem::Version
256
- version: '1.5'
257
- - !ruby/object:Gem::Dependency
258
- name: rubocop-rake
259
- requirement: !ruby/object:Gem::Requirement
260
- requirements:
261
- - - "~>"
262
- - !ruby/object:Gem::Version
263
- version: '0.5'
264
- type: :development
265
- prerelease: false
266
- version_requirements: !ruby/object:Gem::Requirement
267
- requirements:
268
- - - "~>"
269
- - !ruby/object:Gem::Version
270
- version: '0.5'
271
- - !ruby/object:Gem::Dependency
272
- name: rubocop-rspec
273
- requirement: !ruby/object:Gem::Requirement
274
- requirements:
275
- - - "~>"
276
- - !ruby/object:Gem::Version
277
- version: '1.37'
278
- type: :development
279
- prerelease: false
280
- version_requirements: !ruby/object:Gem::Requirement
281
- requirements:
282
- - - "~>"
283
- - !ruby/object:Gem::Version
284
- version: '1.37'
285
- - !ruby/object:Gem::Dependency
286
- name: simplecov
287
- requirement: !ruby/object:Gem::Requirement
288
- requirements:
289
- - - "~>"
290
- - !ruby/object:Gem::Version
291
- version: '0.17'
292
- type: :development
81
+ version: '7.16'
82
+ type: :runtime
293
83
  prerelease: false
294
84
  version_requirements: !ruby/object:Gem::Requirement
295
85
  requirements:
296
86
  - - "~>"
297
87
  - !ruby/object:Gem::Version
298
- version: '0.17'
299
- description:
88
+ version: '7.16'
89
+ description:
300
90
  email:
301
91
  - brooke@alchemists.io
302
92
  executables: []
303
93
  extensions: []
304
94
  extra_rdoc_files:
305
- - README.md
306
- - LICENSE.md
95
+ - README.adoc
96
+ - LICENSE.adoc
307
97
  files:
308
- - LICENSE.md
309
- - README.md
98
+ - LICENSE.adoc
99
+ - README.adoc
310
100
  - lib/prawn_plus.rb
311
101
  - lib/prawn_plus/identity.rb
312
102
  - lib/prawn_plus/railtie.rb
313
103
  - lib/prawn_plus/template_handlers/prawn.rb
314
- homepage: https://github.com/bkuhlmann/prawn_plus
104
+ homepage: https://www.alchemists.io/projects/prawn_plus
315
105
  licenses:
316
106
  - Apache-2.0
317
107
  metadata:
318
- source_code_uri: https://github.com/bkuhlmann/prawn_plus
319
- changelog_uri: https://github.com/bkuhlmann/prawn_plus/blob/master/CHANGES.md
320
108
  bug_tracker_uri: https://github.com/bkuhlmann/prawn_plus/issues
321
- post_install_message:
109
+ changelog_uri: https://www.alchemists.io/projects/prawn_plus/changes.html
110
+ documentation_uri: https://www.alchemists.io/projects/prawn_plus
111
+ source_code_uri: https://github.com/bkuhlmann/prawn_plus
112
+ post_install_message:
322
113
  rdoc_options: []
323
114
  require_paths:
324
115
  - lib
@@ -333,8 +124,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
333
124
  - !ruby/object:Gem::Version
334
125
  version: '0'
335
126
  requirements: []
336
- rubygems_version: 3.1.2
337
- signing_key:
127
+ rubygems_version: 3.2.0
128
+ signing_key:
338
129
  specification_version: 4
339
130
  summary: A Rails renderer for Prawn PDFs.
340
131
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/README.md DELETED
@@ -1,155 +0,0 @@
1
- <p align="center">
2
- <img src="prawn_plus.png" alt="Prawn+ Icon"/>
3
- </p>
4
-
5
- # Prawn+
6
-
7
- [![Gem Version](https://badge.fury.io/rb/prawn_plus.svg)](http://badge.fury.io/rb/prawn_plus)
8
- [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/11437f0567f0cd96d04e/maintainability)](https://codeclimate.com/github/bkuhlmann/prawn_plus/maintainability)
9
- [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/11437f0567f0cd96d04e/test_coverage)](https://codeclimate.com/github/bkuhlmann/prawn_plus/test_coverage)
10
- [![Circle CI Status](https://circleci.com/gh/bkuhlmann/prawn_plus.svg?style=svg)](https://circleci.com/gh/bkuhlmann/prawn_plus)
11
-
12
- <!-- Tocer[start]: Auto-generated, don't remove. -->
13
-
14
- ## Table of Contents
15
-
16
- - [Features](#features)
17
- - [Requirements](#requirements)
18
- - [Setup](#setup)
19
- - [Usage](#usage)
20
- - [Views](#views)
21
- - [Controllers](#controllers)
22
- - [Tests](#tests)
23
- - [Versioning](#versioning)
24
- - [Code of Conduct](#code-of-conduct)
25
- - [Contributions](#contributions)
26
- - [License](#license)
27
- - [History](#history)
28
- - [Credits](#credits)
29
-
30
- <!-- Tocer[finish]: Auto-generated, don't remove. -->
31
-
32
- ## Features
33
-
34
- - Loads the [Prawn](https://github.com/prawnpdf/prawn) gem by default (no Gemfile entry necessary).
35
- - Registers PDF as a MIME type.
36
- - Registers a template handler for rendering ".prawn" template view files.
37
-
38
- ## Requirements
39
-
40
- 1. [Ruby 2.6.x](https://www.ruby-lang.org).
41
- 1. [Ruby on Rails 5.x.x](http://rubyonrails.org).
42
- 1. [Prawn](https://github.com/prawnpdf/prawn).
43
-
44
- ## Setup
45
-
46
- Type the following to install:
47
-
48
- gem install prawn_plus
49
-
50
- Add the following to your Gemfile:
51
-
52
- gem "prawn_plus"
53
-
54
- ## Usage
55
-
56
- ### Views
57
-
58
- Within your views you can craft Prawn templates using Ruby code. For example, assuming there are
59
- document resources, then the following structure might exist:
60
-
61
- /views/documents/show.html.slim
62
- /views/documents/show.pdf.prawn
63
-
64
- The `show.html.slim` could have a link to the PDF download. Example:
65
-
66
- = link_to "PDF Download", action: "show", id: @document.id, format: "pdf"
67
-
68
- The `show.pdf.prawn` file would contain the Prawn syntax for crafting the PDF. A simple example
69
- might look like this:
70
-
71
- pdf.text "Hello, I'm a PDF!"
72
-
73
- ...which would render the following output:
74
-
75
- [![Basic Example](https://github.com/bkuhlmann/prawn_plus/raw/master/doc/examples/basic.png)](https://github.com/bkuhlmann/prawn_plus)
76
-
77
- You could also render a more complex PDF with tabular information, for example:
78
-
79
- pdf.text "Metals"
80
- pdf.move_down 10
81
- pdf.font_size = 10
82
-
83
- data = [
84
- ["Name", "Atomic Number", "Price"],
85
- ["Mercury", "80", number_to_currency(10)],
86
- ["Platinum", "78", number_to_currency(25)],
87
- ["Titanium", "22", number_to_currency(50)]
88
- ]
89
-
90
- pdf.table data, header: true, column_widths: [100, 50, 50], row_colors: ["FFFFFF", "E5ECF9"] do
91
- columns(0).align = :left
92
- columns(1..2).align = :right
93
- row(0).text_color = "FFFFFF"
94
- row(0).background_color = "000000"
95
- row(0).columns(0..2).font_style = :bold
96
- row(0).columns(0..2).align = :center
97
- end
98
-
99
- ...which would render the following output:
100
-
101
- [![Complex Example](https://github.com/bkuhlmann/prawn_plus/raw/master/doc/examples/complex.png)](https://github.com/bkuhlmann/prawn_plus)
102
-
103
- *NOTE: The `pdf` object must always be referenced when making using of the Prawn syntax - it is
104
- initialized for you as a Prawn::Document instance.*
105
-
106
- ### Controllers
107
-
108
- Within your controller, only the `respond_to` method is required. Example:
109
-
110
- class DocumentsController < ApplicationController
111
- respond_to :pdf
112
-
113
- def show
114
- end
115
- end
116
-
117
- That's it!
118
-
119
- ## Tests
120
-
121
- To test, run:
122
-
123
- bundle exec rake
124
-
125
- ## Versioning
126
-
127
- Read [Semantic Versioning](https://semver.org) for details. Briefly, it means:
128
-
129
- - Major (X.y.z) - Incremented for any backwards incompatible public API changes.
130
- - Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
131
- - Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
132
-
133
- ## Code of Conduct
134
-
135
- Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
136
- participating in this project you agree to abide by its terms.
137
-
138
- ## Contributions
139
-
140
- Read [CONTRIBUTING](CONTRIBUTING.md) for details.
141
-
142
- ## License
143
-
144
- Copyright 2012 [Alchemists](https://www.alchemists.io).
145
- Read [LICENSE](LICENSE.md) for details.
146
-
147
- ## History
148
-
149
- Read [CHANGES](CHANGES.md) for details.
150
- Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
151
-
152
- ## Credits
153
-
154
- Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
155
- [Alchemists](https://www.alchemists.io).