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 +4 -4
- data/README.md +12 -0
- data/lib/breezy_pdf/intercept/base.rb +6 -5
- data/lib/breezy_pdf/response.rb +2 -2
- data/lib/breezy_pdf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b80f459f7d3b8bd7ed153b6cf53d768ea8d24ad
|
4
|
+
data.tar.gz: 7e572f5716b99ddea161aef08fd6f262527bf64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
"#{
|
28
|
-
"#{path}#{query_string}"
|
30
|
+
"#{base_url}#{path}#{query_string}"
|
29
31
|
end
|
30
32
|
|
31
33
|
def requested_url
|
32
|
-
"#{
|
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
|
-
"#{
|
38
|
+
"#{scheme}://#{env['SERVER_NAME']}#{port}"
|
38
39
|
end
|
39
40
|
|
40
41
|
def port
|
data/lib/breezy_pdf/response.rb
CHANGED
@@ -17,7 +17,7 @@ module BreezyPDF
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def method_missing(method, *_args, &_blk)
|
20
|
-
if body.
|
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.
|
28
|
+
body.key?(method.to_s)
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
data/lib/breezy_pdf/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|