chromium-pdf 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3320328ed664493cdbde1a5fb22f43b9f94cd9e167966e6dbcdf4f5912d323d8
4
- data.tar.gz: 894c956ee6f48e89d94e08d5c3d0646111f2b4c43e91eb0fc7e075e01703aca3
3
+ metadata.gz: 00ca3cc4b98adc752f0fc922ef246c613acfb35f915edc90ffb551803ba17d8c
4
+ data.tar.gz: 6ac4d6928c6ef664e70b6429fa7b401a0b832a38cbdea17d94feaee3cefe7076
5
5
  SHA512:
6
- metadata.gz: 7f92b925921a0ef3cb81166f329990e5a54bcfdfb25dd5693cf2d825eaa45aee96bb4be764bd261d77d0e35a47a00abd73829bfd634fff0fd81566991b0a87e3
7
- data.tar.gz: f770fe84db4b74895ac8ce9c6ccaf39330129b714f4247195577042bb01de11b63911a00481c9374c93a379586ea1dd34e787a71a3250e7c6f2bb25c75d95812
6
+ metadata.gz: 547f1f46062417cdfa4d80da94ce0aa4b1134ebc1a619372380680ecd859861055d3f8aafcd9409bff129de212c8f37096bc07346bde7e21c5a221ae0d1c6528
7
+ data.tar.gz: dfc587b51a40b3ec10d122ddb3c5c2dda8c9fb4f4be346ae895211901fd0e69861b738f047319ebf77a85d08e68cf326b5b2dfe0a02da3b57693a5f9a806d9d3
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Chromium
4
4
  module Pdf
5
- VERSION = '1.0.3'
5
+ VERSION = '1.0.4'
6
6
  end
7
7
  end
data/lib/chromium/pdf.rb CHANGED
@@ -25,18 +25,18 @@ module Chromium
25
25
  # @yield [file, filename] Yields the file object and the filename to the block.
26
26
  #
27
27
  def generate_pdf!(unescaped_filename, print_url, arguments: DEFAULT_CHROME_ARGUMENTS, &block)
28
- chrome_path = ENV.fetch('GOOGLE_CHROME_BIN', nil)
29
28
  filename = unescaped_filename.gsub('&', 'and')
30
29
 
31
30
  Dir.mktmpdir do |path|
32
31
  filepath = "#{path}/#{filename}"
33
- chrome_print chrome_path, print_url, filename, filepath, arguments, &block
32
+ chrome_print(print_url, filename, filepath, arguments, &block)
34
33
  end
35
34
  end
36
35
 
37
36
  protected
38
37
 
39
- def chrome_print(chrome_path, print_url, filename, filepath, arguments, &block)
38
+ def chrome_print(print_url, filename, filepath, arguments, &block)
39
+ chrome_path = ENV.fetch('GOOGLE_CHROME_BIN', 'chrome')
40
40
  Kernel.system("LD_PRELOAD='' #{chrome_path} --print-to-pdf='#{filepath}' #{arguments.join(' ')} #{print_url}")
41
41
  sleep 0.1 until file_created?(filepath)
42
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chromium-pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - RoleModel Software