slimmer 18.1.0 → 18.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/slimmer/app.rb +2 -4
- data/lib/slimmer/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c83a7a1a6f6cc3aa308937371b5bd5ed83640dc639f3601ad13b42f85e34b9e
|
4
|
+
data.tar.gz: '0862dc4f349e0b6ec12c8151cfe6be98ab06635ec58a947ac1e3a90d16fc28d7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f323c8d68bf3bf70e5127f1ac2ce00921b39b4f3f0ec16ca1675675b69ce2db802c75f3f5c0baa38ba6261b708579d42419f4fa5304b79e935345872c4ab42e
|
7
|
+
data.tar.gz: a56a4d1fc87d64c1d7c54f7fc18fbc235871584f43d63071e24d93620239a219bcaa057b795892e0bb71a8833b0b6e6862201cf254054db179185f224f9a466d
|
data/CHANGELOG.md
CHANGED
data/lib/slimmer/app.rb
CHANGED
@@ -42,7 +42,7 @@ module Slimmer
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def response_can_be_rewritten?(status, headers)
|
45
|
-
Rack::
|
45
|
+
Rack::Headers.new.merge(headers)["Content-Type"] =~ /text\/html/ && ![301, 302, 304].include?(status)
|
46
46
|
end
|
47
47
|
|
48
48
|
def skip_slimmer?(env, response)
|
@@ -93,9 +93,7 @@ module Slimmer
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def strip_slimmer_headers(headers)
|
96
|
-
|
97
|
-
# of extra states not copied. Can be removed once Ruby < 3.1 support is removed.
|
98
|
-
headers.to_h.reject { |k, _v| k =~ /\A#{Headers::HEADER_PREFIX}/ }
|
96
|
+
headers.reject { |k, _v| k =~ /\A#{Headers::HEADER_PREFIX}/i }
|
99
97
|
end
|
100
98
|
end
|
101
99
|
end
|
data/lib/slimmer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.
|
4
|
+
version: 18.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 4.
|
173
|
+
version: 4.12.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 4.
|
180
|
+
version: 4.12.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: webmock
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -244,14 +244,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
requirements:
|
245
245
|
- - ">"
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version:
|
247
|
+
version: '3.0'
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - ">="
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.4.
|
254
|
+
rubygems_version: 3.4.21
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: Thinner than the skinner
|