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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 347ddedd0c8bcdcbd3d5d655be1ae714c56383ee42b0fafe50415e1666e6a185
4
- data.tar.gz: e4df638d52d38e9dec2274c81150c8a6ae47a63b0b9585fb5053d9267e5027db
3
+ metadata.gz: 9febdb704dde64f97be4f3b61421ddc55b08c9ef0b2db6486ec4bb7167e39763
4
+ data.tar.gz: 5fdcc0100966e5069556699e6f2885c350382cc08f7596472f9b1c1340ff377a
5
5
  SHA512:
6
- metadata.gz: 2eab74dc3058d3f43d2967fc291cfbd63cc35c58db6cbea54af783f9ee06b4b013aac92590b1a3e4532689073884037f3c6f9fdc783203ae09adbc63f5a4cc88
7
- data.tar.gz: 57f58c1b84f00ac89bb96000c9cf2de064ae4c8ec55f3ededfa346e5daee91e7da1af0b7b0a87a98569b8baa9c6b315e0ce30feb0d2f16cd8574dd0d13c1bbd0
6
+ metadata.gz: 4a900a5a102861d9a24fb3c14cfdeb077e977ddd6b9cd08a115119751aeacbab5983c7cf46d7f93f5fec8f2860737d89178ca33ca709613fe655aba68a5d3178
7
+ data.tar.gz: 65d5c5dfdcfb88dfba72b9995ff708dc16915a708c5324438b7c25f90e56a78d57da2024e959a8f086e45ea24985848a95b36669c64ff3efe7b407509ce429c9
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '0.10.1'
4
+ VERSION = '0.11.1'
5
5
  end
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.10.1
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-12 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combine_pdf