wicked_pdf 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,11 @@
1
1
  require 'tempfile'
2
2
 
3
3
  class WickedPdfTempfile < Tempfile
4
- # Replaces Tempfile's +make_tmpname+ with one that honors file extensions.
5
- def make_tmpname(basename, n)
6
- extension = File.extname(basename)
7
- sprintf("%s_%d_%d%s", File.basename(basename, extension), $$, n.to_i, extension)
4
+ # ensures the Tempfile's filename always keeps its extension
5
+ def initialize(filename, temp_dir=nil)
6
+ temp_dir ||= Dir.tmpdir
7
+ extension = File.extname(filename)
8
+ basename = File.basename(filename, extension)
9
+ super([basename, extension], temp_dir)
8
10
  end
9
- end
10
-
11
+ end
@@ -1,3 +1,3 @@
1
1
  class WickedPdf
2
- VERSION = '0.9.3'
2
+ VERSION = '0.9.4'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wicked_pdf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 3
10
- version: 0.9.3
9
+ - 4
10
+ version: 0.9.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Miles Z. Sterret