htmlToPdf 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 5d462aa56ac4dadbf9ac649d28767114c7b5969c
4
- data.tar.gz: 7f1ce2f3465d7e53365c58dd9bc9a6f34f2bbd84
3
+ metadata.gz: c74212bf8262b3f8dc17f27f3b2bfdfbd2a38880
4
+ data.tar.gz: 95c9390624f0b2965a817c077074ff7e1f21c664
5
5
  SHA512:
6
- metadata.gz: bbc305c676c4b4fb97d9b8b93f75728e0d158904a9426ae69beb0d2aeea7abe8afaff6b2fbd97694e490ac27d031e13130cf809446f1159f720d7936bd1195c7
7
- data.tar.gz: 45009096f3a6f91fbec1e28514d5da9e16a5b3d31ce25a8c1877fbc06a0284156db64a79d3f027aa5974961ed775386015974d5e7d3faf958404fa9bdfb72a97
6
+ metadata.gz: 6390d8b4c3b15b81515f0c368170bbf17b81a14bdcc465ae8d6b93710fa5d43331a79e7642a7bcc44db7dd62d664d0ef0274eb12202bda65c54189fc687ca83c
7
+ data.tar.gz: 0461f89d1e5d994ba2006cea682fffa4f2f2e47705be10db51cf8178db3eba747b9968b7cf22e9f5013c175c5c14e9a0c7e3890f400d84d0dfa9a143461cf0a8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- htmlToPdf (0.0.1)
4
+ htmlToPdf (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -19,6 +19,7 @@ Or install it yourself as:
19
19
  ## Usage
20
20
 
21
21
  write following code inside Application Controller
22
+
22
23
  before_filter :html_to_pdf
23
24
 
24
25
  in views:
@@ -29,8 +30,8 @@ customizing pdf downloads:
29
30
 
30
31
  you can customize pdf like you can give the name and layout for the pdf.to customize pdf use this following example:
31
32
 
32
- <%= link_to 'download', your_action_path(:format => 'pdf') :pdf_options => {title: 'pdf_name', layout: 'layout_name'}) -%>
33
+ <%= link_to 'download', your_action_path(:format => 'pdf',:pdf_options => {title: 'pdf_name', layout: 'layout_name'}) -%>
33
34
 
34
35
  # this will generate the pdf of your_action named "pdf_name.pdf" with layout "layout_name".
35
36
 
36
- one can call any action as pdf and he get the pdf file of that action's html.
37
+ one can call any action as pdf and he get the pdf file of that action's html.
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ram Laxman Yadav"]
10
10
  spec.email = ["yadavramlaxman@gmail.com"]
11
11
  spec.summary = %q{html to pdf converter gem}
12
- spec.description = %q{this gem will generate pdf of given html using wkhtmmltopdf}
12
+ spec.description = %q{this gem will generate pdf of given html using wkhtmltopdf}
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
@@ -10,8 +10,9 @@ module HtmlToPdf
10
10
  _source_file = File.join(Rails.root, 'tmp', "#{Time.now.to_i.to_s}.html")
11
11
  _destination_file = File.join(Rails.root, 'tmp', "#{@name}.pdf")
12
12
  _html = render_to_string(:action => "#{action_name}", :formats => 'html', :layout => @layout )
13
+ file_content = _html.gsub(/\/assets/, "../public/assets")
13
14
  File.open(_source_file, "w+") do |f|
14
- f.write(_html)
15
+ f.write(file_content)
15
16
  end
16
17
  spec = Gem::Specification.find_by_name("htmlToPdf")
17
18
  gem_root = spec.gem_dir
@@ -1,3 +1,3 @@
1
1
  module HtmlToPdf
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlToPdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ram Laxman Yadav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-02 00:00:00.000000000 Z
11
+ date: 2014-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: this gem will generate pdf of given html using wkhtmmltopdf
41
+ description: this gem will generate pdf of given html using wkhtmltopdf
42
42
  email:
43
43
  - yadavramlaxman@gmail.com
44
44
  executables: