breezy_pdf 1.0.0 → 1.0.1

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: abd6c1ec49223a3fe2a785fe9f06d72a6de0cab0
4
- data.tar.gz: 4194517b6246b64a93b3027cb978f06bb4b88fc2
3
+ metadata.gz: 5b80f459f7d3b8bd7ed153b6cf53d768ea8d24ad
4
+ data.tar.gz: 7e572f5716b99ddea161aef08fd6f262527bf64a
5
5
  SHA512:
6
- metadata.gz: 69a1225b849e2657727bb67e0ffbc9b193c32581fac0b0d2cb246cbd688a0a1c230105d2ec598628d311fb4d22058ede71c90bca89e254a521de15b0cce893ec
7
- data.tar.gz: 670de9e8c2f978bdcac63538531db81fa24259f5113f2fa2e471252f81a622e7bc5e84cf121335dd0370e9940b5ebb42402843fce5e6f31cca9a081bf1ea6a94
6
+ metadata.gz: 51d968658beb6a81279c3a9f51043eed2f618758df08beb9e51120b258aadc35ec9961c7a2b36e197d2bd0fe8e7bb8ba8a7036a3a24f8181838ac85173479204
7
+ data.tar.gz: 4df71bbfe3a4867264b7357291080de93906411c4f7ab9c547e2723b3f61727b9753676ef53bf088642a54ccabcd29ca5e0c09dc164452c9142375dad5c0c008
data/README.md CHANGED
@@ -6,6 +6,18 @@ Make PDF generation a breezy-easy.
6
6
 
7
7
  No binaries to install. No reinventing the wheel to match HTML layouts. Just simple HTML to PDF generation as a Rack Middleware with support for modern CSS and JavaScript. `.pdf` any of your app's URL's for fast, out-of-process, PDF generation of that URL. Support for public and authenticated views, local development and production.
8
8
 
9
+ #### No libraries to install.
10
+
11
+ #### No fonts to manage.
12
+
13
+ #### No DSL to learn.
14
+
15
+ #### Works anywhere.
16
+
17
+ #### Leverage modern CSS and ECMAScript.
18
+
19
+ #### Magical support for Sinatra, Ruby on Rails, and any other Rack based web framework.
20
+
9
21
  [Sign Up](https://BreezyPDF.com/) for an account to get started.
10
22
 
11
23
  [View the Demo](https://ruby.demo.breezypdf.com) and the [Demo's Source Code](https://github.com/danielwestendorf/breezy_pdf-ruby-demo)
@@ -3,6 +3,9 @@
3
3
  module BreezyPDF::Intercept
4
4
  # :nodoc
5
5
  class Base
6
+ include Rack::Request::Env
7
+ include Rack::Request::Helpers
8
+
6
9
  attr_reader :app, :env
7
10
 
8
11
  def initialize(app, env)
@@ -24,17 +27,15 @@ module BreezyPDF::Intercept
24
27
  end
25
28
 
26
29
  def rendered_url
27
- "#{env['rack.url_scheme']}://#{env['SERVER_NAME']}#{port}" \
28
- "#{path}#{query_string}"
30
+ "#{base_url}#{path}#{query_string}"
29
31
  end
30
32
 
31
33
  def requested_url
32
- "#{env['rack.url_scheme']}://#{env['SERVER_NAME']}#{port}" \
33
- "#{env['PATH_INFO']}#{query_string}"
34
+ "#{base_url}#{env['PATH_INFO']}#{query_string}"
34
35
  end
35
36
 
36
37
  def base_url
37
- "#{env['rack.url_scheme']}://#{env['SERVER_NAME']}#{port}"
38
+ "#{scheme}://#{env['SERVER_NAME']}#{port}"
38
39
  end
39
40
 
40
41
  def port
@@ -17,7 +17,7 @@ module BreezyPDF
17
17
  end
18
18
 
19
19
  def method_missing(method, *_args, &_blk)
20
- if body.keys.include?(method.to_s)
20
+ if body.key?(method.to_s)
21
21
  body[method.to_s]
22
22
  else
23
23
  super
@@ -25,7 +25,7 @@ module BreezyPDF
25
25
  end
26
26
 
27
27
  def respond_to_missing?(method, *)
28
- body.keys.include?(method.to_s)
28
+ body.key?(method.to_s)
29
29
  end
30
30
 
31
31
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BreezyPDF
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breezy_pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby