grover 0.10.1 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grover/middleware.rb +10 -0
- data/lib/grover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9febdb704dde64f97be4f3b61421ddc55b08c9ef0b2db6486ec4bb7167e39763
|
4
|
+
data.tar.gz: 5fdcc0100966e5069556699e6f2885c350382cc08f7596472f9b1c1340ff377a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a900a5a102861d9a24fb3c14cfdeb077e977ddd6b9cd08a115119751aeacbab5983c7cf46d7f93f5fec8f2860737d89178ca33ca709613fe655aba68a5d3178
|
7
|
+
data.tar.gz: 65d5c5dfdcfb88dfba72b9995ff708dc16915a708c5324438b7c25f90e56a78d57da2024e959a8f086e45ea24985848a95b36669c64ff3efe7b407509ce429c9
|
data/lib/grover/middleware.rb
CHANGED
@@ -111,6 +111,7 @@ class Grover
|
|
111
111
|
|
112
112
|
def fetch_cover_pdf(path)
|
113
113
|
temp_env = env.deep_dup
|
114
|
+
scrub_env! temp_env
|
114
115
|
temp_env['PATH_INFO'], temp_env['QUERY_STRING'] = path.split '?'
|
115
116
|
_, _, response = @app.call(temp_env)
|
116
117
|
response.close if response.respond_to? :close
|
@@ -166,5 +167,14 @@ class Grover
|
|
166
167
|
def env
|
167
168
|
@request.env
|
168
169
|
end
|
170
|
+
|
171
|
+
def scrub_env!(env)
|
172
|
+
# Reset the env to remove any cached values from the original request
|
173
|
+
env.delete_if { |k, _| k =~ /^(action_dispatch|rack)\.request/ }
|
174
|
+
env.delete_if { |k, _| k =~ /^action_dispatch\.rescue/ }
|
175
|
+
env['rack.input'] = StringIO.new
|
176
|
+
env.delete 'CONTENT_LENGTH'
|
177
|
+
env.delete 'RAW_POST_DATA'
|
178
|
+
end
|
169
179
|
end
|
170
180
|
end
|
data/lib/grover/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Bromwich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: combine_pdf
|