prawn-rails 1.4.0 → 1.4.1

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: 8d84ee700167e6fe6cde67e0abad0c2310a74131e1cd7cb302e7fca00a4d0081
4
- data.tar.gz: 3517d341b40d496f2692d545d7573c2b95ea335799d012e9b5455ea1ee2c8ede
3
+ metadata.gz: 2cc8b0b4dcec01b053fcc3dc156456f243320e5e7b1885486d0de6c6ec55f574
4
+ data.tar.gz: 79ea17f3222b3484e27551f2f7c20a48c964d3d0897340f9bb162b22325a8044
5
5
  SHA512:
6
- metadata.gz: a555d4e0bfc9e416dbe6bce1205a2cc714995b44f9f18e9575dbc788ffe24d0faa8d543c5dc7478871cb405d1d67e393ad81db698e0597d741679e0ed7af2a8b
7
- data.tar.gz: b816eaa0601c5192c4ef522393c641a0f4a7843b16456a375feaefad81b42d5406d424a9ae72a9dbb1ff6d267e77b0d240f6c5eb4c54f80efe61489bd23a1fdb
6
+ metadata.gz: cc3df95c50ee59e14fa1ab357cf01c6112a8d73c4ad799bc32767aa8483fb494562f2cd2a6b9ea8c5141c70cd0db4c9c72862dbce8beeb6d5a801a72e197d579
7
+ data.tar.gz: b696d243feb7d6323296367a3914efa70c740aed86589155cb522d417b917e9d229a0dcc28534b01ea840b5d60c7ef75d15671d005d5ef941cc18eff38d6424b
data/CHANGELOG.md CHANGED
@@ -1,33 +1,36 @@
1
1
  # Changelog
2
2
 
3
- * `Unreleased`
3
+ * `Unreleased` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.4.1...master)
4
4
  - Nothing yet
5
5
 
6
- * `v1.4.0`
6
+ * `Unreleased` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.4.0...v1.4.1)
7
+ - [7575606](https://github.com/cortiz/prawn-rails/commit/7575606) - Fix bug in v1.4.0, where PDF's wouldnt open as `inline` within the browser. Problem was due to incomplete switch to Railsties from [PR #41](https://github.com/cortiz/prawn-rails/pull/41)
8
+
9
+ * `v1.4.0` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.3.0...v1.4.0)
7
10
  - [PR #41](https://github.com/cortiz/prawn-rails/pull/41) - Depend on `railsties` instead of `rails` gem to avoid pulling in unnecessary dependencies such as action_cable, etc.
8
11
 
9
- * `v1.3.0`
12
+ * `v1.3.0` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.2.1...v1.3.0)
10
13
  - [PR #40](https://github.com/cortiz/prawn-rails/pull/40) - Add `:filename` and `:disposition` options for `prawn_document
11
14
  - [PR #40](https://github.com/cortiz/prawn-rails/pull/40) - Do not override existing`Content-Disposition` headers
12
15
 
13
- * `v1.2.1`
16
+ * `v1.2.1` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.2.0...v1.2.1)
14
17
  - [PR #39](https://github.com/cortiz/prawn-rails/pull/39) - Fix Rails 6 deprecation warning for single arity template handlers
15
18
  - Remove unnecessary option logic from `prawn_document` method
16
19
 
17
- * `v1.2.0`
20
+ * `v1.2.0` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.1.0...v1.2.0)
18
21
  - [PR #31](https://github.com/cortiz/prawn-rails/pull/31) - Use Prawn::Document.extensions in favor of custom plug-in loading. This removes all changes made in PR #29 and should behave much more appropriately now.
19
22
  - [Undo PR #29](https://github.com/cortiz/prawn-rails/pull/31) - Use Prawn::Document.extensions in favor of custom plug-in loading
20
23
  - [PR #30](https://github.com/cortiz/prawn-rails/pull/30) - Allow rendering in ActionMailer
21
24
 
22
- * `v1.1.0`
25
+ * `v1.1.0` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.0.2...v1.1.0)
23
26
  - [PR #29](https://github.com/cortiz/prawn-rails/pull/29) - Require all installed prawn extensions
24
27
  - Removed unnecessary `html_strip` helper method. If you were using this feature, instead use Rails built in `strip_tags(html_str)` or `ActionView::Base.full_sanitizer.sanitize(html_str)`
25
28
  - Add legitimate tests
26
29
 
27
- * `v1.0.1`
30
+ * `v1.0.1` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.0.0...v1.0.1)
28
31
  - Fix error when using `ActionController.render_to_string`
29
32
 
30
- * `v1.0.0`
33
+ * `v1.0.0` - [View Diff](https://github.com/cortiz/prawn-rails/compare/v1.0.0...v0.1.1)
31
34
  - Support `@filename`
32
35
  - Set PDF Title metadata based on `@filename` if not specified
33
36
  - Fix for Ruby 1.9.3+
data/lib/prawn-rails.rb CHANGED
@@ -1,6 +1,6 @@
1
- require "prawn-rails/config"
2
- require "prawn-rails/engine"
3
1
  require "prawn-rails/version"
2
+ require "prawn-rails/config"
3
+ require "prawn-rails/railtie"
4
4
 
5
5
  module PrawnRails
6
6
  end
@@ -3,7 +3,7 @@ require "prawn-rails/rails_helper"
3
3
  require "prawn-rails/renderer"
4
4
 
5
5
  module PrawnRails
6
- class Engine < Rails::Engine
6
+ class Railtie < Rails::Railtie
7
7
  ActionView::Base.send(:include, PrawnRails::RailsHelper)
8
8
  ActionView::Template.register_template_handler(:prawn, PrawnRails::Renderer)
9
9
 
@@ -1,3 +1,3 @@
1
1
  module PrawnRails
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -710,3 +710,241 @@ NavigationTest: test_Renders_pdf_to_string
710
710
  Rendering reports/sample.pdf.prawn
711
711
  Rendered reports/sample.pdf.prawn (Duration: 18.2ms | Allocations: 14114)
712
712
   (0.1ms) rollback transaction
713
+  (1.4ms) SELECT sqlite_version(*)
714
+  (0.1ms) SELECT sqlite_version(*)
715
+  (0.1ms) begin transaction
716
+ ------------------------------------------
717
+ NavigationTest: test_Renders_pdf_to_string
718
+ ------------------------------------------
719
+ Rendering reports/sample.pdf.prawn
720
+ Rendered reports/sample.pdf.prawn (Duration: 81.4ms | Allocations: 49036)
721
+  (0.1ms) rollback transaction
722
+  (0.1ms) begin transaction
723
+ -----------------------------------------------------------------
724
+ NavigationTest: test_Sets_file_name_from_'@filename'_when_present
725
+ -----------------------------------------------------------------
726
+ Started GET "/reports/ivar_filename.pdf" for 127.0.0.1 at 2021-05-20 08:47:42 -0700
727
+ Processing by ReportsController#ivar_filename as PDF
728
+ Rendering reports/custom.pdf.prawn
729
+ Rendered reports/custom.pdf.prawn (Duration: 2.8ms | Allocations: 1871)
730
+ Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms | Allocations: 2769)
731
+  (0.1ms) rollback transaction
732
+  (0.1ms) begin transaction
733
+ -----------------------------------------------
734
+ NavigationTest: test_render_to_string_in_mailer
735
+ -----------------------------------------------
736
+ Rendering reports/sample.pdf.prawn
737
+ Rendered reports/sample.pdf.prawn (Duration: 33.8ms | Allocations: 12735)
738
+ Rendering reports_mailer/send_report.html.erb
739
+ Rendered reports_mailer/send_report.html.erb (Duration: 0.4ms | Allocations: 83)
740
+ ReportsMailer#send_report: processed outbound mail in 50.0ms
741
+  (0.1ms) rollback transaction
742
+  (0.1ms) begin transaction
743
+ --------------------------------------------------------------------
744
+ NavigationTest: test_Maintains_existing_'Content-Disposition'_header
745
+ --------------------------------------------------------------------
746
+ Started GET "/reports/custom_headers.pdf" for 127.0.0.1 at 2021-05-20 08:47:42 -0700
747
+ Processing by ReportsController#custom_headers as PDF
748
+ Rendering reports/custom.pdf.prawn
749
+ Rendered reports/custom.pdf.prawn (Duration: 2.3ms | Allocations: 1796)
750
+ Completed 200 OK in 3ms (Views: 3.0ms | ActiveRecord: 0.0ms | Allocations: 2056)
751
+  (0.1ms) rollback transaction
752
+  (0.1ms) begin transaction
753
+ ------------------------------------------------------------
754
+ NavigationTest: test_Respects_the_'disposition'_option_alone
755
+ ------------------------------------------------------------
756
+ Started GET "/reports/custom_disposition.pdf" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
757
+ Processing by ReportsController#custom_disposition as PDF
758
+ Rendering reports/custom_disposition.pdf.prawn
759
+ Rendered reports/custom_disposition.pdf.prawn (Duration: 2.6ms | Allocations: 1830)
760
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.0ms | Allocations: 2250)
761
+  (0.1ms) rollback transaction
762
+  (0.1ms) begin transaction
763
+ ----------------------------------------
764
+ NavigationTest: test_Renders_html_action
765
+ ----------------------------------------
766
+ Started GET "/reports/sample" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
767
+ Processing by ReportsController#sample as HTML
768
+ Rendering reports/sample.html.erb within layouts/application
769
+ Rendered reports/sample.html.erb within layouts/application (Duration: 0.4ms | Allocations: 73)
770
+ Completed 200 OK in 15ms (Views: 14.3ms | ActiveRecord: 0.0ms | Allocations: 4022)
771
+  (0.1ms) rollback transaction
772
+  (0.1ms) begin transaction
773
+ ------------------------------------------------------
774
+ NavigationTest: test_Registers_:prawn_template_handler
775
+ ------------------------------------------------------
776
+  (0.1ms) rollback transaction
777
+  (0.1ms) begin transaction
778
+ ----------------------------------------------
779
+ NavigationTest: test_Renders_sample_pdf_action
780
+ ----------------------------------------------
781
+ Started GET "/reports/sample?format=pdf" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
782
+ Processing by ReportsController#sample as PDF
783
+ Rendering reports/sample.pdf.prawn
784
+ Rendered reports/sample.pdf.prawn (Duration: 27.7ms | Allocations: 12741)
785
+ Completed 200 OK in 29ms (Views: 28.4ms | ActiveRecord: 0.0ms | Allocations: 13160)
786
+  (0.1ms) rollback transaction
787
+  (0.1ms) begin transaction
788
+ ------------------------------------------------------------------------------------
789
+ NavigationTest: test_Renders_table_pdf_action_using_auto-required_plugin_Prawn-Table
790
+ ------------------------------------------------------------------------------------
791
+ Started GET "/reports/table?format=pdf" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
792
+ Processing by ReportsController#table as PDF
793
+ Rendering reports/table.pdf.prawn
794
+ Rendered reports/table.pdf.prawn (Duration: 16.8ms | Allocations: 9596)
795
+ Completed 200 OK in 18ms (Views: 17.5ms | ActiveRecord: 0.0ms | Allocations: 10013)
796
+  (0.1ms) rollback transaction
797
+  (0.1ms) begin transaction
798
+ -----------------------------------------------------------------------
799
+ NavigationTest: test_Respects_both_options_on_'prawn-document'_together
800
+ -----------------------------------------------------------------------
801
+ Started GET "/reports/custom.pdf" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
802
+ Processing by ReportsController#custom as PDF
803
+ Rendering reports/custom.pdf.prawn
804
+ Rendered reports/custom.pdf.prawn (Duration: 6.6ms | Allocations: 1798)
805
+ Completed 200 OK in 8ms (Views: 8.0ms | ActiveRecord: 0.0ms | Allocations: 2072)
806
+  (0.1ms) rollback transaction
807
+  (0.1ms) begin transaction
808
+ ---------------------------------------------------------
809
+ NavigationTest: test_Respects_the_'filename'_option_alone
810
+ ---------------------------------------------------------
811
+ Started GET "/reports/custom_filename.pdf" for 127.0.0.1 at 2021-05-20 08:47:43 -0700
812
+ Processing by ReportsController#custom_filename as PDF
813
+ Rendering reports/custom_filename.pdf.prawn
814
+ Rendered reports/custom_filename.pdf.prawn (Duration: 6.2ms | Allocations: 1864)
815
+ Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.0ms | Allocations: 2273)
816
+  (0.1ms) rollback transaction
817
+  (0.1ms) begin transaction
818
+ ---------------------------------------------
819
+ NavigationTest: test_Registers_:pdf_mime_type
820
+ ---------------------------------------------
821
+  (0.1ms) rollback transaction
822
+  (0.1ms) begin transaction
823
+ --------------------------------------------------------------
824
+ PrawnRailsTest: test_matches_.PDF_extension_regardless_of_case
825
+ --------------------------------------------------------------
826
+  (0.1ms) rollback transaction
827
+  (0.1ms) begin transaction
828
+ ----------------------------------------------
829
+ PrawnRailsTest: test_text_can_take_non_strings
830
+ ----------------------------------------------
831
+  (0.1ms) rollback transaction
832
+  (1.5ms) SELECT sqlite_version(*)
833
+  (0.1ms) SELECT sqlite_version(*)
834
+  (0.1ms) begin transaction
835
+ --------------------------------------------------------------
836
+ PrawnRailsTest: test_matches_.PDF_extension_regardless_of_case
837
+ --------------------------------------------------------------
838
+  (0.1ms) rollback transaction
839
+  (0.1ms) begin transaction
840
+ ----------------------------------------------
841
+ PrawnRailsTest: test_text_can_take_non_strings
842
+ ----------------------------------------------
843
+  (0.1ms) rollback transaction
844
+  (0.1ms) begin transaction
845
+ ------------------------------------------------------------------------------------
846
+ NavigationTest: test_Renders_table_pdf_action_using_auto-required_plugin_Prawn-Table
847
+ ------------------------------------------------------------------------------------
848
+ Started GET "/reports/table?format=pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
849
+ Processing by ReportsController#table as PDF
850
+ Rendering reports/table.pdf.prawn
851
+ Rendered reports/table.pdf.prawn (Duration: 17.7ms | Allocations: 9771)
852
+ Completed 200 OK in 27ms (Views: 23.3ms | ActiveRecord: 0.0ms | Allocations: 12127)
853
+  (0.1ms) rollback transaction
854
+  (0.1ms) begin transaction
855
+ ----------------------------------------------
856
+ NavigationTest: test_Renders_sample_pdf_action
857
+ ----------------------------------------------
858
+ Started GET "/reports/sample?format=pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
859
+ Processing by ReportsController#sample as PDF
860
+ Rendering reports/sample.pdf.prawn
861
+ Rendered reports/sample.pdf.prawn (Duration: 34.4ms | Allocations: 15850)
862
+ Completed 200 OK in 36ms (Views: 35.1ms | ActiveRecord: 0.0ms | Allocations: 16269)
863
+  (0.1ms) rollback transaction
864
+  (0.1ms) begin transaction
865
+ ---------------------------------------------
866
+ NavigationTest: test_Registers_:pdf_mime_type
867
+ ---------------------------------------------
868
+  (0.1ms) rollback transaction
869
+  (0.1ms) begin transaction
870
+ ------------------------------------------------------
871
+ NavigationTest: test_Registers_:prawn_template_handler
872
+ ------------------------------------------------------
873
+  (0.1ms) rollback transaction
874
+  (0.1ms) begin transaction
875
+ ------------------------------------------
876
+ NavigationTest: test_Renders_pdf_to_string
877
+ ------------------------------------------
878
+ Rendering reports/sample.pdf.prawn
879
+ Rendered reports/sample.pdf.prawn (Duration: 22.1ms | Allocations: 12747)
880
+  (0.1ms) rollback transaction
881
+  (0.1ms) begin transaction
882
+ ------------------------------------------------------------
883
+ NavigationTest: test_Respects_the_'disposition'_option_alone
884
+ ------------------------------------------------------------
885
+ Started GET "/reports/custom_disposition.pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
886
+ Processing by ReportsController#custom_disposition as PDF
887
+ Rendering reports/custom_disposition.pdf.prawn
888
+ Rendered reports/custom_disposition.pdf.prawn (Duration: 2.6ms | Allocations: 1834)
889
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms | Allocations: 2243)
890
+  (0.1ms) rollback transaction
891
+  (0.1ms) begin transaction
892
+ ----------------------------------------
893
+ NavigationTest: test_Renders_html_action
894
+ ----------------------------------------
895
+ Started GET "/reports/sample" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
896
+ Processing by ReportsController#sample as HTML
897
+ Rendering reports/sample.html.erb within layouts/application
898
+ Rendered reports/sample.html.erb within layouts/application (Duration: 0.4ms | Allocations: 81)
899
+ Completed 200 OK in 17ms (Views: 15.6ms | ActiveRecord: 0.0ms | Allocations: 4031)
900
+  (0.1ms) rollback transaction
901
+  (0.1ms) begin transaction
902
+ ---------------------------------------------------------
903
+ NavigationTest: test_Respects_the_'filename'_option_alone
904
+ ---------------------------------------------------------
905
+ Started GET "/reports/custom_filename.pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
906
+ Processing by ReportsController#custom_filename as PDF
907
+ Rendering reports/custom_filename.pdf.prawn
908
+ Rendered reports/custom_filename.pdf.prawn (Duration: 7.4ms | Allocations: 1864)
909
+ Completed 200 OK in 10ms (Views: 8.4ms | ActiveRecord: 0.0ms | Allocations: 2274)
910
+  (0.1ms) rollback transaction
911
+  (0.1ms) begin transaction
912
+ -----------------------------------------------------------------
913
+ NavigationTest: test_Sets_file_name_from_'@filename'_when_present
914
+ -----------------------------------------------------------------
915
+ Started GET "/reports/ivar_filename.pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
916
+ Processing by ReportsController#ivar_filename as PDF
917
+ Rendering reports/custom.pdf.prawn
918
+ Rendered reports/custom.pdf.prawn (Duration: 2.4ms | Allocations: 1871)
919
+ Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms | Allocations: 2267)
920
+  (0.1ms) rollback transaction
921
+  (0.1ms) begin transaction
922
+ -----------------------------------------------
923
+ NavigationTest: test_render_to_string_in_mailer
924
+ -----------------------------------------------
925
+ Rendering reports/sample.pdf.prawn
926
+ Rendered reports/sample.pdf.prawn (Duration: 22.7ms | Allocations: 12741)
927
+ Rendering reports_mailer/send_report.html.erb
928
+ Rendered reports_mailer/send_report.html.erb (Duration: 0.4ms | Allocations: 77)
929
+ ReportsMailer#send_report: processed outbound mail in 37.8ms
930
+  (0.1ms) rollback transaction
931
+  (0.1ms) begin transaction
932
+ --------------------------------------------------------------------
933
+ NavigationTest: test_Maintains_existing_'Content-Disposition'_header
934
+ --------------------------------------------------------------------
935
+ Started GET "/reports/custom_headers.pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
936
+ Processing by ReportsController#custom_headers as PDF
937
+ Rendering reports/custom.pdf.prawn
938
+ Rendered reports/custom.pdf.prawn (Duration: 2.3ms | Allocations: 1796)
939
+ Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.0ms | Allocations: 2055)
940
+  (0.1ms) rollback transaction
941
+  (0.1ms) begin transaction
942
+ -----------------------------------------------------------------------
943
+ NavigationTest: test_Respects_both_options_on_'prawn-document'_together
944
+ -----------------------------------------------------------------------
945
+ Started GET "/reports/custom.pdf" for 127.0.0.1 at 2021-05-20 09:12:56 -0700
946
+ Processing by ReportsController#custom as PDF
947
+ Rendering reports/custom.pdf.prawn
948
+ Rendered reports/custom.pdf.prawn (Duration: 2.3ms | Allocations: 1798)
949
+ Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms | Allocations: 2071)
950
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Ortiz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-25 00:00:00.000000000 Z
12
+ date: 2021-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: prawn
@@ -178,8 +178,8 @@ files:
178
178
  - lib/prawn-rails.rb
179
179
  - lib/prawn-rails/config.rb
180
180
  - lib/prawn-rails/document.rb
181
- - lib/prawn-rails/engine.rb
182
181
  - lib/prawn-rails/rails_helper.rb
182
+ - lib/prawn-rails/railtie.rb
183
183
  - lib/prawn-rails/renderer.rb
184
184
  - lib/prawn-rails/version.rb
185
185
  - test/dummy_app/Rakefile
@@ -276,7 +276,8 @@ files:
276
276
  - test/prawn_rails_test.rb
277
277
  - test/test_helper.rb
278
278
  homepage: https://github.com/cortiz/prawn-rails
279
- licenses: []
279
+ licenses:
280
+ - MIT
280
281
  metadata: {}
281
282
  post_install_message:
282
283
  rdoc_options: []