ezprint 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@ Ezprint
2
2
  =======
3
3
 
4
4
  Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
5
- as the backend instead pf princexml, possibly saving you millions of
5
+ as the backend instead of princexml, possibly saving you millions of
6
6
  dollars. I recommend using the Rack middleware component of PDFKit to
7
7
  print PDFs in rails, but this plugin makes an easy transition from
8
8
  prince->PDFKit for those using princely.
@@ -1,7 +1,7 @@
1
1
  = Ezprint
2
2
 
3
3
  Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
4
- as the backend instead pf princexml, possibly saving you millions of
4
+ as the backend instead of princexml, possibly saving you millions of
5
5
  dollars. I recommend using the Rack middleware component of PDFKit to
6
6
  print PDFs in rails, but this plugin makes an easy transition from
7
7
  prince->PDFKit for those using princely.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ezprint}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jason Stewart"]
12
- s.date = %q{2011-01-04}
12
+ s.date = %q{2011-01-13}
13
13
  s.description = %q{A Rails wrapper for the PDFkit library. Meant to be a drop in replacement for princely.}
14
14
  s.email = %q{jstewart@fusionary.com}
15
15
  s.extra_rdoc_files = [
@@ -35,9 +35,18 @@ module EzPrint
35
35
  end
36
36
 
37
37
  def make_and_send_pdf(pdf_name, options = {})
38
+ filename = "#{pdf_name}.pdf"
39
+ if request.headers['User-Agent'] =~ /MSIE ([0-9]{1,}[\.0-9]{0,})/
40
+ response.headers['Content-Disposition'] = "attachment;filename=\"#{filename}.pdf\""
41
+ response.headers['Content-Description'] = 'File Transfer'
42
+ response.headers['Content-Transfer-Encoding'] = 'binary'
43
+ response.headers['Expires'] = '0'
44
+ response.headers['Pragma'] = 'public'
45
+ end
46
+
38
47
  send_data(
39
48
  make_pdf(options),
40
- :filename => pdf_name + ".pdf",
49
+ :filename => filename,
41
50
  :type => 'application/pdf'
42
51
  )
43
52
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezprint
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Stewart
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-04 00:00:00 -05:00
18
+ date: 2011-01-13 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency