wkhtmltopdf_for_rails 0.0.2 → 0.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.4
data/bin/wkhtmltopdf CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- if RUBY_PLATFORM =~ /linux/ && RUBY_PLATFORM =~ /386/
3
+ if RUBY_PLATFORM =~ /linux/ && RUBY_PLATFORM =~ /[3|4]86/
4
4
  executable = 'wkhtmltopdf_linux_386'
5
5
  elsif RUBY_PLATFORM =~ /linux/ && RUBY_PLATFORM =~ /64/
6
6
  executable = 'wkhtmltopdf-amd64'
data/lib/render_pdf.rb CHANGED
@@ -25,7 +25,7 @@ module RenderPdf
25
25
  html_string = generate_html(options)
26
26
  timestamp = Time.now.strftime("%y%m%d%H%M%S")
27
27
  html_file_name = "#{timestamp}_#{options[:pdf]}.html"
28
- html_file_path = File.join(RAILS_ROOT, 'tmp', html_file_name)
28
+ html_file_path = File.join(::Rails.root, 'tmp', html_file_name)
29
29
  File.open(html_file_path, 'w') do |f|
30
30
  f.write(html_string)
31
31
  end
data/lib/wkhtmltopdf.rb CHANGED
@@ -13,10 +13,8 @@ class Wkhtmltopdf
13
13
  def generate
14
14
  wkhtml_call = "wkhtmltopdf "
15
15
  if !@source.nil?
16
- puts "source"
17
16
  wkhtml_call << "#{@source}"
18
17
  else
19
- puts "local html"
20
18
  wkhtml_call << "#{@html_file}"
21
19
  end
22
20
  wkhtml_call << " #{@params_string} - -q"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexey Osipenko