grover 1.2.1 → 1.2.2
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 +8 -8
- data/lib/grover/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa11dd4c983b7d122791e035286bc18f9fdda40561f0102547b801aa4718013c
|
4
|
+
data.tar.gz: 77fb1776461acc88789f1405e4c3135b9857971116880239671f3302d4df0505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0e3ae26db5e6934bdb257c465001ac46f15404e201c1d5a431e96f03c36c4b27b1e10920337e0f67d4d012da55d9c651868b0497f20832ae191bb42eba29243
|
7
|
+
data.tar.gz: 5b9baa164d1fdb46b8a71dec29d68471622e9bd829742fee6975c19f2d2fc5b8a51b1f120f8ccebe7ee9ccfc1f38ed291881cb00998b7b72a90ae41bb0bd23d3
|
data/lib/grover/middleware.rb
CHANGED
@@ -40,9 +40,9 @@ class Grover
|
|
40
40
|
|
41
41
|
private
|
42
42
|
|
43
|
-
PDF_REGEX = /\.pdf$/i
|
44
|
-
PNG_REGEX = /\.png$/i
|
45
|
-
JPEG_REGEX = /\.jpe?g$/i
|
43
|
+
PDF_REGEX = /\.pdf$/i
|
44
|
+
PNG_REGEX = /\.png$/i
|
45
|
+
JPEG_REGEX = /\.jpe?g$/i
|
46
46
|
|
47
47
|
attr_reader :pdf_request, :png_request, :jpeg_request
|
48
48
|
|
@@ -85,7 +85,7 @@ class Grover
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def html_content?(headers)
|
88
|
-
headers['
|
88
|
+
headers['content-type'] =~ %r{text/html|application/xhtml\+xml}
|
89
89
|
end
|
90
90
|
|
91
91
|
def update_response(response, headers)
|
@@ -155,11 +155,11 @@ class Grover
|
|
155
155
|
|
156
156
|
def assign_headers(headers, body, content_type)
|
157
157
|
# Do not cache results
|
158
|
-
headers.delete '
|
159
|
-
headers.delete '
|
158
|
+
headers.delete 'etag'
|
159
|
+
headers.delete 'cache-control'
|
160
160
|
|
161
|
-
headers['
|
162
|
-
headers['
|
161
|
+
headers['content-length'] = (body.respond_to?(:bytesize) ? body.bytesize : body.size).to_s
|
162
|
+
headers['content-type'] = content_type
|
163
163
|
end
|
164
164
|
|
165
165
|
def configure_env_for_grover_request(env)
|
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: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Bromwich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -59,10 +59,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 3.0.0
|
63
63
|
- - "<"
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 3.
|
65
|
+
version: 3.5.0
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|