wicked_pdf 1.0.3 → 2.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/.github/issue_template.md +15 -0
  3. data/.github/workflows/ci.yml +56 -0
  4. data/.rubocop.yml +60 -0
  5. data/.rubocop_todo.yml +84 -37
  6. data/CHANGELOG.md +230 -0
  7. data/README.md +188 -30
  8. data/Rakefile +13 -9
  9. data/gemfiles/5.0.gemfile +8 -0
  10. data/gemfiles/5.1.gemfile +8 -0
  11. data/gemfiles/5.2.gemfile +9 -0
  12. data/gemfiles/6.0.gemfile +10 -0
  13. data/gemfiles/6.1.gemfile +12 -0
  14. data/gemfiles/7.0.gemfile +12 -0
  15. data/generators/wicked_pdf/templates/wicked_pdf.rb +9 -0
  16. data/lib/generators/wicked_pdf_generator.rb +5 -9
  17. data/lib/wicked_pdf/binary.rb +65 -0
  18. data/lib/wicked_pdf/middleware.rb +3 -3
  19. data/lib/wicked_pdf/option_parser.rb +229 -0
  20. data/lib/wicked_pdf/pdf_helper.rb +101 -88
  21. data/lib/wicked_pdf/progress.rb +33 -0
  22. data/lib/wicked_pdf/railtie.rb +6 -33
  23. data/lib/wicked_pdf/tempfile.rb +38 -7
  24. data/lib/wicked_pdf/version.rb +1 -1
  25. data/lib/wicked_pdf/wicked_pdf_helper/assets.rb +212 -88
  26. data/lib/wicked_pdf/wicked_pdf_helper.rb +29 -26
  27. data/lib/wicked_pdf.rb +37 -274
  28. data/test/fixtures/database.yml +4 -0
  29. data/test/fixtures/manifest.js +3 -0
  30. data/test/fixtures/wicked.js +1 -0
  31. data/test/functional/pdf_helper_test.rb +74 -5
  32. data/test/functional/wicked_pdf_helper_assets_test.rb +86 -25
  33. data/test/functional/wicked_pdf_helper_test.rb +15 -13
  34. data/test/test_helper.rb +22 -7
  35. data/test/unit/wicked_pdf_binary_test.rb +26 -0
  36. data/test/unit/wicked_pdf_option_parser_test.rb +128 -0
  37. data/test/unit/wicked_pdf_test.rb +14 -168
  38. data/test/unit/wkhtmltopdf_location_test.rb +48 -0
  39. data/wicked_pdf.gemspec +20 -14
  40. metadata +69 -38
  41. data/.travis.yml +0 -57
  42. data/CHANGLOG.md +0 -48
  43. data/gemfiles/2.3.gemfile +0 -10
  44. data/gemfiles/3.0.gemfile +0 -7
  45. data/gemfiles/3.1.gemfile +0 -8
  46. data/gemfiles/3.2.gemfile +0 -7
  47. data/gemfiles/4.0.gemfile +0 -6
  48. data/gemfiles/4.1.gemfile +0 -6
  49. data/gemfiles/4.2.gemfile +0 -6
  50. data/gemfiles/rails_edge.gemfile +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3a9bd19353fd98c1329694e7e28958e05dd01d97
4
- data.tar.gz: 33413fa1202def89fa910d38996ea732ac86b706
2
+ SHA256:
3
+ metadata.gz: efc167edf11352423548ba65167d53beb2e8e60691fb788df361d19c636e7f45
4
+ data.tar.gz: e4c6e40dbbb8ba3867e3fbfa1aadbd151c87355f898dbad629f58a2e39f8a4c4
5
5
  SHA512:
6
- metadata.gz: a7c925ec176e0976cede93924098016466bd8627a99af611b89c283792ccbd9a154a450a2d9370079d9f6f72d1d48c8c57e0ef5ab3d25f235b242222aa4deabe
7
- data.tar.gz: 44b674f5bc1efd1bdb54354f0cc05d13442af7427c53c903821951491f17923466d9d8223303e0519d6b37ba8e2fce8ba534b1d88fcda33c139f61db9d7e1b61
6
+ metadata.gz: 345c533e38faa42be7700d76e6ff761583c1856f30bf12c55fbff410c77d224f5ed0f7698006316e3565d656a9e4db5cef1936f5ec718957e3652cce85e35b03
7
+ data.tar.gz: 00b0cb2ee4c76840d71d984f39987dc04ea23a854d2f38c01b3f21f18ecb7f60c980f477e3eb94a8c1b2b79cda43cb050f521d0003d9306b31cebd8b273dd5ea
@@ -0,0 +1,15 @@
1
+ ## Issue description
2
+
3
+ ## Expected or desired behavior
4
+
5
+ ## System specifications
6
+
7
+ wicked_pdf gem version (output of `cat Gemfile.lock | grep wicked_pdf`):
8
+
9
+ wkhtmltopdf version (output of `wkhtmltopdf --version`):
10
+
11
+ whtmltopdf [provider gem](https://rubygems.org/search?utf8=%E2%9C%93&query=wkhtmltopdf) and version if one is used:
12
+
13
+ platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar):
14
+
15
+
@@ -0,0 +1,56 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request, workflow_dispatch]
4
+
5
+ jobs:
6
+ tests:
7
+ name: Tests with Ruby ${{ matrix.ruby-version }} and Rails ${{ matrix.gemfile }}
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ gemfile: ["5.0"]
12
+ ruby-version: [2.6]
13
+ include:
14
+ - gemfile: "5.0"
15
+ ruby-version: 2.7
16
+ - gemfile: "5.1"
17
+ ruby-version: 2.6
18
+ - gemfile: "5.1"
19
+ ruby-version: 2.7
20
+ - gemfile: "5.2"
21
+ ruby-version: 2.6
22
+ - gemfile: "5.2"
23
+ ruby-version: 2.7
24
+ - gemfile: "6.0"
25
+ ruby-version: 2.6
26
+ - gemfile: "6.0"
27
+ ruby-version: 2.7
28
+ - gemfile: "6.1"
29
+ ruby-version: 2.7
30
+ - gemfile: "6.1"
31
+ ruby-version: 3.0
32
+ - gemfile: "7.0"
33
+ ruby-version: 3.1
34
+
35
+ env:
36
+ BUNDLE_GEMFILE: /home/runner/work/wicked_pdf/wicked_pdf/gemfiles/${{ matrix.gemfile }}.gemfile
37
+ WKHTMLTOPDF_BIN: /usr/bin/wkhtmltopdf
38
+
39
+ steps:
40
+ - uses: actions/checkout@v2
41
+
42
+ - name: Install Ruby ${{ matrix.ruby-version }}
43
+ uses: ruby/setup-ruby@v1
44
+ with:
45
+ ruby-version: ${{ matrix.ruby-version }}
46
+
47
+ - name: Install OS dependencies
48
+ run: |
49
+ sudo apt-get update -y -qq
50
+ sudo apt-get install -y wkhtmltopdf
51
+
52
+ - name: Install gem dependencies
53
+ run: bundle install
54
+
55
+ - name: Run tests with Ruby ${{ matrix.ruby-version }} and Rails ${{ matrix.gemfile }}
56
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,9 +1,69 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
+ NewCops: disable
5
+ TargetRubyVersion: 2.6
4
6
  Exclude:
7
+ - 'gemfiles/bin/*'
5
8
  - 'test/dummy/**/*'
6
9
 
10
+ Metrics/PerceivedComplexity:
11
+ Enabled: false
12
+
13
+ Gemspec/RequiredRubyVersion:
14
+ Enabled: false
15
+
16
+ Bundler/OrderedGems:
17
+ Enabled: false
18
+
19
+ Style/FrozenStringLiteralComment:
20
+ Enabled: false
21
+
22
+ Style/RedundantBegin:
23
+ Enabled: false
24
+
25
+ Style/NumericPredicate:
26
+ Enabled: false
27
+
28
+ Style/RedundantRegexpEscape:
29
+ Enabled: false
30
+
31
+ Style/SafeNavigation:
32
+ Enabled: false
33
+
34
+ Lint/SendWithMixinArgument:
35
+ Enabled: false
36
+
37
+ Lint/RedundantCopDisableDirective:
38
+ Enabled: false
39
+
40
+ Metrics/AbcSize:
41
+ Enabled: false
42
+
43
+ Style/StringConcatenation:
44
+ Enabled: false
45
+
46
+ Style/RedundantFetchBlock:
47
+ Enabled: false
48
+
49
+ Style/CaseLikeIf:
50
+ Enabled: false
51
+
52
+ Style/SoleNestedConditional:
53
+ Enabled: false
54
+
55
+ Style/RedundantReturn:
56
+ Enabled: false
57
+
58
+ Metrics/BlockLength:
59
+ Exclude:
60
+ - 'wicked_pdf.gemspec'
61
+
62
+ Metrics/ModuleLength:
63
+ Exclude:
64
+ # Excluding to keep the logic in one module for the time being.
65
+ - 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
66
+
7
67
  # I'd like wicked_pdf to keep Ruby 1.8 compatibility for now
8
68
  Style/HashSyntax:
9
69
  EnforcedStyle: hash_rockets
data/.rubocop_todo.yml CHANGED
@@ -1,67 +1,114 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-11-08 18:41:57 -0500 using RuboCop version 0.32.1.
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-10-09 14:16:04 +0200 using RuboCop version 0.68.1.
3
4
  # The point is for the user to remove these configuration records
4
5
  # one by one as the offenses are removed from the code base.
5
6
  # Note that changes in the inspected code, or installation of new
6
7
  # versions of RuboCop, may require this file to be generated again.
7
8
 
8
- # Offense count: 2
9
- Lint/AmbiguousRegexpLiteral:
10
- Enabled: false
11
-
12
- # Offense count: 2
13
- Lint/HandleExceptions:
14
- Enabled: false
15
-
16
- # Offense count: 9
9
+ # Offense count: 11
17
10
  Metrics/AbcSize:
18
11
  Max: 45
19
12
 
20
- # Offense count: 2
21
- Metrics/BlockNesting:
22
- Max: 4
23
-
24
13
  # Offense count: 2
25
14
  # Configuration parameters: CountComments.
26
15
  Metrics/ClassLength:
27
- Max: 279
16
+ Max: 250
28
17
 
29
- # Offense count: 5
18
+ # Offense count: 7
30
19
  Metrics/CyclomaticComplexity:
31
- Max: 9
20
+ Max: 13
32
21
 
33
- # Offense count: 92
34
- # Configuration parameters: AllowURI, URISchemes.
35
- Metrics/LineLength:
36
- Max: 563
22
+ # Offense count: 17
23
+ # Configuration parameters: CountComments, ExcludedMethods.
24
+ Metrics/MethodLength:
25
+ Max: 40
37
26
 
38
- # Offense count: 14
27
+ # Offense count: 2
39
28
  # Configuration parameters: CountComments.
40
- Metrics/MethodLength:
41
- Max: 30
29
+ Metrics/ModuleLength:
30
+ Max: 147
42
31
 
43
- # Offense count: 4
32
+ # Offense count: 6
44
33
  Metrics/PerceivedComplexity:
45
- Max: 12
34
+ Max: 13
46
35
 
47
- # Offense count: 5
48
- Style/AccessorMethodName:
49
- Enabled: false
36
+ # Offense count: 2
37
+ Naming/AccessorMethodName:
38
+ Exclude:
39
+ - 'lib/wicked_pdf/middleware.rb'
40
+ - 'lib/wicked_pdf/pdf_helper.rb'
50
41
 
51
42
  # Offense count: 1
52
43
  Style/CaseEquality:
53
- Enabled: false
44
+ Exclude:
45
+ - 'lib/wicked_pdf/wicked_pdf_helper.rb'
54
46
 
55
47
  # Offense count: 1
56
48
  Style/ClassVars:
57
- Enabled: false
49
+ Exclude:
50
+ - 'lib/wicked_pdf.rb'
58
51
 
59
- # Offense count: 15
52
+ # Offense count: 10
60
53
  Style/Documentation:
61
- Enabled: false
54
+ Exclude:
55
+ - 'spec/**/*'
56
+ - 'test/**/*'
57
+ - 'generators/wicked_pdf/wicked_pdf_generator.rb'
58
+ - 'lib/wicked_pdf.rb'
59
+ - 'lib/wicked_pdf/middleware.rb'
60
+ - 'lib/wicked_pdf/pdf_helper.rb'
61
+ - 'lib/wicked_pdf/progress.rb'
62
+ - 'lib/wicked_pdf/railtie.rb'
63
+ - 'lib/wicked_pdf/binary.rb'
64
+ - 'lib/wicked_pdf/option_parser.rb'
65
+ - 'lib/wicked_pdf/tempfile.rb'
66
+ - 'lib/wicked_pdf/wicked_pdf_helper.rb'
67
+ - 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
62
68
 
63
- # Offense count: 5
69
+ # Offense count: 2
70
+ # Cop supports --auto-correct.
71
+ Style/ExpandPathArguments:
72
+ Exclude:
73
+ - 'test/test_helper.rb'
74
+ - 'wicked_pdf.gemspec'
75
+
76
+ # Offense count: 8
77
+ # Cop supports --auto-correct.
78
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
79
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
80
+ Style/HashSyntax:
81
+ Exclude:
82
+ - 'gemfiles/4.0.gemfile'
83
+ - 'gemfiles/4.1.gemfile'
84
+ - 'gemfiles/4.2.gemfile'
85
+ - 'gemfiles/5.0.gemfile'
86
+ - 'gemfiles/5.1.gemfile'
87
+ - 'gemfiles/5.2.gemfile'
88
+ - 'gemfiles/6.0.gemfile'
89
+ - 'gemfiles/rails_edge.gemfile'
90
+
91
+ # Offense count: 2
64
92
  # Cop supports --auto-correct.
65
- # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
93
+ # Configuration parameters: EnforcedStyle.
94
+ # SupportedStyles: literals, strict
95
+ Style/MutableConstant:
96
+ Exclude:
97
+ - 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
98
+
99
+ # Offense count: 6
100
+ # Cop supports --auto-correct.
101
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
102
+ # SupportedStyles: slashes, percent_r, mixed
66
103
  Style/RegexpLiteral:
67
- Enabled: false
104
+ Exclude:
105
+ - 'lib/wicked_pdf/middleware.rb'
106
+ - 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
107
+ - 'test/unit/wicked_pdf_test.rb'
108
+
109
+ # Offense count: 111
110
+ # Cop supports --auto-correct.
111
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
112
+ # URISchemes: http, https
113
+ Metrics/LineLength:
114
+ Max: 563
data/CHANGELOG.md ADDED
@@ -0,0 +1,230 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [master branch] - Unreleased
6
+ ### Breaking Changes
7
+
8
+ ## [2.6.3]
9
+ ### Fixes
10
+ - [Fix typo of #possible_binary_locations](https://github.com/mileszs/wicked_pdf/pull/1025)
11
+ - [Drop unused executables gemspec directive](https://github.com/mileszs/wicked_pdf/pull/1024)
12
+
13
+ ## [2.6.2]
14
+ ### Fixes
15
+ - [Fix undefined local variable or method 'block' for render_to_string](https://github.com/mileszs/wicked_pdf/pull/962)
16
+ - [Add require for `delegate`, which is no longer loaded by default in Ruby 2.7+](https://github.com/mileszs/wicked_pdf/pull/1019)
17
+ ## [2.6.0]
18
+ ### New Features
19
+ - [Support Propshaft in find_asset helper](https://github.com/mileszs/wicked_pdf/pull/1010)
20
+ ### Fixes
21
+ - [Update Changelog with changes from 2.1.0](https://github.com/mileszs/wicked_pdf/pull/1013)
22
+ - [Fix CI build for Rails 7.](https://github.com/mileszs/wicked_pdf/pull/1014)
23
+
24
+ ## [2.5.4] December 20th 2021 769f9df487f3c1e31dc91431666baa78d2aa24fb
25
+ ### New Features
26
+ - [Test with Rails 7](https://github.com/mileszs/wicked_pdf/pull/998)
27
+ ### Fixes
28
+ - [Include view helper on view load.](https://github.com/mileszs/wicked_pdf/pull/992)
29
+
30
+ ## [2.5.3] December 15th 2021 7991877de634067b4245fb47fdad65da43761887
31
+ - [Fix check for webpacker version](https://github.com/mileszs/wicked_pdf/pull/964)
32
+ - [Complete transition to Github actions](https://github.com/mileszs/wicked_pdf/pull/987)
33
+
34
+ ## [2.5.2] November 2021 - fix webpacker_source_url bdd0ca3eca759e277ce5461141b1506f56fefcd1
35
+ - [fix: `webpacker_source_url`](https://github.com/mileszs/wicked_pdf/pull/993)
36
+ - [update README](https://github.com/mileszs/wicked_pdf/pull/968)
37
+
38
+ ## [2.5.1] September 2021 - fix webpacker helper, github actions and Readme updates ae725e8055dc8f51a392c27767b4dcdcfffe155d
39
+ - [Add comment about enable_local_file_access to README](https://github.com/mileszs/wicked_pdf/commit/2dc96dde2e0fd7362395064f2480cac1edcc1f48)
40
+ - [README updates](https://github.com/mileszs/wicked_pdf/pull/974) &&
41
+ - [Github actions](https://github.com/mileszs/wicked_pdf/pull/986)
42
+ - [Screencast links](https://github.com/mileszs/wicked_pdf/pull/976)
43
+ - [fix url generating in webpacker helper](https://github.com/mileszs/wicked_pdf/pull/973)
44
+
45
+ ## [2.5.0] November 2020 Release - 2b1d47a84fce3600e7cbe2f50843af1a7b84d4a6
46
+ - [Remove code for unsupported rails and ruby versions](https://github.com/mileszs/wicked_pdf/pull/925)
47
+
48
+ ## [2.4.1] b56c46a05895def395ebc75ed8e822551c2c478f
49
+ - [Extract reading in chunk](https://github.com/mileszs/wicked_pdf/pull/951)
50
+ - [add ruby 2.7 to the test matrix](https://github.com/mileszs/wicked_pdf/pull/952)
51
+
52
+ ## [2.4.0] 8c007a77057e1a6680469d1ef53aa19a108fe209
53
+ ### New Features
54
+ - [Do not unlink HTML temp files immediately (to enable HTML tempfile inspection)](https://github.com/mileszs/wicked_pdf/pull/950)
55
+ - [Read HTML string and generated PDF file in chunks (to reduce memory overhead of generating large PDFs)](https://github.com/mileszs/wicked_pdf/pull/949)
56
+ - [Add `wicked_pdf_url_base64` helper](https://github.com/mileszs/wicked_pdf/pull/947)
57
+
58
+ ## [2.3.1] - Allow bundler 2.x ee6a5e1f807c872af37c1382f629dd4cac3040a8
59
+ - [Adjust gemspec development dependencies](https://github.com/mileszs/wicked_pdf/pull/814)
60
+
61
+ ## [2.3.0] - Remove support for Ruby 1.x and Rails 2.x 66149c67e54cd3a63dd27528f5b78255fdd5ac43
62
+ - [Remove support for Ruby 1.x and Rails 2.x](https://github.com/mileszs/wicked_pdf/pull/859)
63
+
64
+ ## [2.2.0] - October 2020 release f8abe706f5eb6dba2fcded473c81f2176e9d717e
65
+ ### Fixes
66
+ - [Make CI green again](https://github.com/mileszs/wicked_pdf/pull/939)
67
+ - [rubocop fixes](https://github.com/mileszs/wicked_pdf/pull/945)
68
+ ### New Features
69
+ - [Add support for --keep-relative-links flag](https://github.com/mileszs/wicked_pdf/pull/930)
70
+ - [Encapsulate binary path and version handling](https://github.com/mileszs/wicked_pdf/pull/816) && [#815](https://github.com/mileszs/wicked_pdf/pull/815)
71
+
72
+
73
+ ## [2.1.0] - 2020-06-14
74
+ ### Fixes
75
+ - [Document no_stop_slow_scripts in README](https://github.com/mileszs/wicked_pdf/pull/905)
76
+ - [Document how to use locals in README](https://github.com/mileszs/wicked_pdf/pull/915)
77
+
78
+ ### New Features
79
+ - [Improved support for Webpacker assets with `wicked_pdf_asset_pack_path`](https://github.com/mileszs/wicked_pdf/pull/896)
80
+ - [Support enabling/disabling local file access compatible with wkhtmltopdf 0.12.6](https://github.com/mileszs/wicked_pdf/pull/920)
81
+ - [Add option `use_xvfb` to emulate an X server](https://github.com/mileszs/wicked_pdf/pull/909)
82
+
83
+ ## [2.0.2] - 2020-03-17
84
+ ### Fixes
85
+ - [Force UTF-8 encoding in assets helper](https://github.com/mileszs/wicked_pdf/pull/894)
86
+
87
+ ## [2.0.1] - 2020-02-22
88
+ ### Fixes
89
+ - [Replace open-uri with more secure Net:HTTP.get](https://github.com/mileszs/wicked_pdf/pull/864)
90
+
91
+ ## [2.0.0] - 2020-02-22
92
+ ### Breaking changes
93
+ - [Remove support for older Ruby and Rails versions](https://github.com/mileszs/wicked_pdf/pull/854) - This project no longer supports Ruby < 2.2 and Rails < 4. It may work for you, but we are no longer worrying about breaking backwards compatibility for versions older than these. If you are on an affected version, you can continue to use the 1.x releases. Patches to fix broken behavior on old versions may not be accepted unless they are highly decoupled from the rest of the code base.
94
+
95
+ ### New Features
96
+ - [Add Rubygems metadata hash to gemspec](https://github.com/mileszs/wicked_pdf/pull/856)
97
+ - [Add support for Rails 6](https://github.com/mileszs/wicked_pdf/pull/869)
98
+
99
+ ### Fixes
100
+ - [Fix Webpacker helpers in production environment](https://github.com/mileszs/wicked_pdf/pull/837)
101
+ - [Fix unit tests](https://github.com/mileszs/wicked_pdf/pull/852)
102
+
103
+ ## [1.4.0] - 2019-05-23
104
+ ### New Features
105
+ - [Add support for `log_level` and `quiet` options](https://github.com/mileszs/wicked_pdf/pull/834)
106
+
107
+ ## [1.3.0] - 2019-05-20
108
+ ### New Features
109
+ - [Add support for Webpacker provided bundles](https://github.com/mileszs/wicked_pdf/pull/739)
110
+
111
+ ## [1.2.2] - 2019-04-13
112
+ ### Fixes
113
+ - [Fix issue loading Pty on Windows](https://github.com/mileszs/wicked_pdf/pull/820)
114
+ - [Fix conflict with remotipart causing SystemStackError](https://github.com/mileszs/wicked_pdf/pull/821)
115
+
116
+ ## [1.2.1] - 2019-03-16
117
+ ### Fixes
118
+ - [Fix `SystemStackError` in some setups](https://github.com/mileszs/wicked_pdf/pull/813)
119
+
120
+ ## [1.2.0] - 2019-03-16
121
+ ### New Features
122
+ - [Add `raise_on_all_errors: true` option to raise on any error that prints to STDOUT during PDF generation](https://github.com/mileszs/wicked_pdf/pull/751)
123
+ - [Add ability to use the `assigns` option to `render` to assign instance variables to a PDF template](https://github.com/mileszs/wicked_pdf/pull/801)
124
+ - [Add ability to track console progress](https://github.com/mileszs/wicked_pdf/pull/804) with `progress: -> (output) { puts output }`. This is useful to add reporting hooks to show your frontend what page number is being generated.
125
+
126
+ ### Fixes
127
+ - [Fix conflict with other gems that hook into `render`](https://github.com/mileszs/wicked_pdf/pull/574) and avoid using `alias_method_chain` where possible
128
+ - [Fix issue using the shell to locate `wkhtmltopdf` in a Bundler environment](https://github.com/mileszs/wicked_pdf/pull/728)
129
+ - [Fix `wkhtmltopdf` path detection when HOME environment variable is unset](https://github.com/mileszs/wicked_pdf/pull/568)
130
+ - [Fix error when the `Rails` constant is defined but not actually using Rails](https://github.com/mileszs/wicked_pdf/pull/613)
131
+ - [Fix compatibility issue with Sprockets 4](https://github.com/mileszs/wicked_pdf/pull/615)
132
+ - [Fix compatibility issue with `Mime::JS` in Rails 5.1+](https://github.com/mileszs/wicked_pdf/pull/627)
133
+ - [Fix deprecation warning by using `after_action` instead of `after_filter` when available](https://github.com/mileszs/wicked_pdf/pull/663)
134
+ - [Provide Rails `base_path` to `find_asset` calls for Sprockets file lookup](https://github.com/mileszs/wicked_pdf/pull/688)
135
+ - Logger changes:
136
+ - [Use `Rails.logger.debug` instead of `p`](https://github.com/mileszs/wicked_pdf/pull/575)
137
+ - [Change logger message to prepend `[wicked_pdf]` instead of nonstandard `****************WICKED****************`](https://github.com/mileszs/wicked_pdf/pull/589)
138
+ - Documentation changes:
139
+ - [Update link to wkhtmltopdf homepage](https://github.com/mileszs/wicked_pdf/pull/582)
140
+ - [Update link to `wkhtmltopdf_binary_gem`](https://github.com/mileszs/wicked_pdf/commit/59e6c5fca3985f2fa2f345089596250df5da2682)
141
+ - [Update documentation for usage with the Asset Pipeline](https://github.com/mileszs/wicked_pdf/commit/690d00157706699a71b7dcd71834759f4d84702f)
142
+ - [Document `default_protocol` option](https://github.com/mileszs/wicked_pdf/pull/585)
143
+ - [Document `image` and `no_image` options](https://github.com/mileszs/wicked_pdf/pull/689)
144
+ - [Document issue with DPI/scaling on various platforms](https://github.com/mileszs/wicked_pdf/pull/715)
145
+ - [Document creating and attaching a PDF in a mailer](https://github.com/mileszs/wicked_pdf/pull/746)
146
+ - [Document dependency on `wkhtmltopdf` with RubyGems](https://github.com/mileszs/wicked_pdf/pull/656)
147
+ - [Add example using WickedPDF with Rails in an API-only configuration](https://github.com/mileszs/wicked_pdf/pull/796)
148
+ - [Add example for rending a template as a header/footer](https://github.com/mileszs/wicked_pdf/pull/603)
149
+ - [Add GitHub issue template](https://github.com/mileszs/wicked_pdf/pull/805)
150
+ - [Add CodeClimate Badge](https://github.com/mileszs/wicked_pdf/pull/646)
151
+ - RuboCop cleanup
152
+ - Updates to Travis CI pipeline to support newer versions of Ruby & Rails
153
+
154
+ ## [1.1.0] - 2016-08-30
155
+ ### New Features
156
+ - Support Rails 5.x and Sprockets 3.x
157
+ - Support `window_status: 'somestring'` option, to instruct wkhtmltopdf to wait until the browser `window.status` is equal to the supplied string. This can be useful to force rendering to wait [as explained quite well here](https://spin.atomicobject.com/2015/08/29/ember-app-done-loading/)
158
+ - Support `no_stop_slow_scripts: true` to let slow running scripts delay rendering
159
+ - [Changes to asset finding to support Rails 5](https://github.com/mileszs/wicked_pdf/pull/561)
160
+
161
+ ### Fixes
162
+ - [Improved error handling](https://github.com/mileszs/wicked_pdf/pull/543)
163
+ - [Namespace helper classes under WickedPdf namespace](https://github.com/mileszs/wicked_pdf/pull/538)
164
+
165
+ ## [1.0.6] - 2016-04-04
166
+ ### Fixes
167
+ - Revert shell escaping of options. The fix was causing more issues than it solved (like "[page] of [topage]" being escaped, and thus not parsed by `wkhtmltopdf`). See #514 for details.
168
+
169
+ ## [1.0.5] - 2016-03-28
170
+ ### Fixes
171
+ - Numerous RuboCop style violation fixes, spelling errors, and test-setup issues from [indyrb.org](http://indyrb.org/) hack night. Thank you all for your contributions!
172
+ - Shellescape options. A stray quote in `header` or `footer` would cause PDF to fail to generate, and this should close down many potential attack vectors if you allow user-supplied values to be passed into `wicked_pdf` render options.
173
+
174
+ ## [1.0.4] - 2016-01-26
175
+ ### Fixes
176
+ - Check that logger responds to info before calling it. It was possible to have a `logger` method defined as a controller helper that would override `Rails.logger`.
177
+ - [Issue with Sprockets 3.0](https://github.com/mileszs/wicked_pdf/issues/476) where an asset referenced in a stylesheet not existing would raise an exception `read_asset` on nil.
178
+
179
+ ## [1.0.3] - 2015-12-02
180
+ ### Fixes
181
+ - Revert default DPI. Some installs of `wkhtmltopdf` would experience major slowdowns or crashes with it set to 72. It is suggested that a DPI of 75 may be better, but I'm holding off on making it a default without more information.
182
+
183
+ ## [1.0.2] - 2015-11-30
184
+ ### Fixes
185
+ - The default dpi is now 72. Previously the default would be whatever your `wkhtmltopdf` version specified as the default. This change [speeds up generation of documents that contain `border-radius` dramatically](https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1510)
186
+
187
+ ## [1.0.1] - 2015-11-19
188
+ ### Fixes
189
+ - Made minor RuboCop style tweaks.
190
+ - Added default [RuboCop](https://github.com/bbatsov/rubocop) config and run after test suite.
191
+ - Issue with `nil.basename` from asset helpers.
192
+
193
+ ## [1.0.0] - 2015-11-03
194
+ ### Breaking Changes
195
+ - Accepted that `WickedPDF` cannot guarantee backwards compatibility with older versions of `wkthmltopdf`, and decided to publish a new version with the MAJOR number incremented, signaling that this may have breaking changes for some people, but providing a path forward for progress. This release number also signals that this is a mature (and relatively stable) project, and should be deemed ready for production (since it has been used in production since ~2009, and downloaded over a *million* times on [RubyGems.org](https://rubygems.org/gems/wicked_pdf)).
196
+ - Stopped attempting to track with version number of `wkhtmltopdf` binary releases (`wkhtmltopdf` v9.x == `WickedPDF` v9.x)
197
+ - Adopted [Semantic Versioning](http://semver.org/) for release numbering
198
+ - Added a CHANGELOG (based on [keepachangelog.com](http://keepachangelog.com/))
199
+ - Misc code tweaks as suggested by [RuboCop](https://github.com/bbatsov/rubocop)
200
+
201
+ ### New Features
202
+ - Check version of `wkhtmltopdf` before deciding to pass arguments with or without dashes
203
+ - New arguments and options for the table of contents supported in newer versions of wkhtmltopdf: `text_size_shrink`, `level_indentation`, `disable_dotted_lines`, `disable_toc_links`, `xsl_style_sheet`
204
+ - Merge in global options to `pdf_from_html_file` and `pdf_from_string`
205
+ - Add ability to generate pdf from a web resource: `pdf_from_url(url)`
206
+ - Removed explicit dependency on [Rails](https://github.com/rails/rails), since parts of this library may be used without it.
207
+
208
+ ### Fixes
209
+ - Comment out the `:exe_path` option in the generated initializer by default (since many systems won't have `wkthmltopdf` installed in that specific location)
210
+ - Issues with `file://` paths on Windows-based systems
211
+ - Issues with parsed options/argument ordering on versions of `wkthmltopdf` > 0.9
212
+ - Issues with middleware headers when running Rails app mounted in a subdirectory
213
+ - Issues with options that have a `key: 'value'` syntax when passed to `wkthmltopdf`
214
+ - Issue with `:temp_path` option being deleted from original options hash
215
+ - Issue with header/footer `:content` being deleted after the first page
216
+ - Issues with options being modified during processing (including global config options)
217
+ - Issues with asset helpers recognizing assets specified without a protocol
218
+ - Issues with `url()` references and embedded `data:base64` assets in stylesheets rendered with `wicked_pdf_stylesheet_link_tag`
219
+ - Asset helpers no longer add a file extension if it already is specified with one
220
+
221
+ # Compare Releases
222
+ - [2.1.0...HEAD (unreleased changes)](https://github.com/mileszs/wicked_pdf/compare/2.1.0...HEAD)
223
+ - [2.0.2...2.1.0](https://github.com/mileszs/wicked_pdf/compare/2.0.2...2.1.0)
224
+ - [2.0.0...2.0.2](https://github.com/mileszs/wicked_pdf/compare/2.0.0...2.0.2)
225
+ - [1.4.0...2.0.0](https://github.com/mileszs/wicked_pdf/compare/1.4.0...2.0.0)
226
+ - [1.3.0...1.4.0](https://github.com/mileszs/wicked_pdf/compare/1.3.0...1.4.0)
227
+ - [1.2.0...1.3.0](https://github.com/mileszs/wicked_pdf/compare/1.2.0...1.3.0)
228
+ - [1.1.0...1.2.0](https://github.com/mileszs/wicked_pdf/compare/1.1.0...1.2.0)
229
+ - [1.0.0...1.1.0](https://github.com/mileszs/wicked_pdf/compare/1.0.0...1.0.0)
230
+ - [0.11.0...1.0.0](https://github.com/mileszs/wicked_pdf/compare/0.11.0...1.0.0)