slimmer 18.5.0 → 18.5.2

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: bdfa5c9dbc5a0592a4b42952093bf5f3e268e63b8e37cad1c7bfcefb0358cb33
4
- data.tar.gz: 3bdebe8423a212a04b26e158476795b3cca238f2d146967839de71132152ef74
3
+ metadata.gz: f4d01a71c91dcc05c81dbfe0b72a94505a46ef1ceca890db26144d48aac077ca
4
+ data.tar.gz: e54b3f1e976748c8e522ac96b3d5bf51d00db5625a5da3633d6b3a14cc99ac10
5
5
  SHA512:
6
- metadata.gz: 396db96b068f08fb559c22bb8eb8c50218567a82f0c702fcc6a3af83babdfe0584b044831c66cdab0dd58aae10bbe4a7f15f5242fa18eb13e2952813b4a39adc
7
- data.tar.gz: 8734d2170021290c9f8d23cde6b47d9dd012b0bb065901fc17a79e09641f75ad6505d7cce7e4bb9c337d0de3a18bdc9efe79d885e894010150ce1e40f06a81d1
6
+ metadata.gz: 2d4eb9f3f23b60a6e55bdc2060e9f7775987b8c0da333baeeedea541a92185201612c3c05b6c5eb8e9f2819db316216c39b012f6666021229c0a8894cbdc78d8
7
+ data.tar.gz: ad166d4c8c8d0e361be75f40bbb716f9f841efbfe8306a4d03d06a5fdcba187cd6119d7d6043772f65bd81049159f3898b952a7f0589210f9bfbef71897ee1c5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 18.5.2
2
+
3
+ * Fix a mistake in 18.5.1
4
+
5
+ # 18.5.1
6
+
7
+ * Include a part of the body in the error message text
8
+
1
9
  # 18.5.0
2
10
 
3
11
  * Raise more specific error when wrapper not found. This will only be active when the host app has SLIMMER_WRAPPER_CHECK=true set in the host app's environment.
data/lib/slimmer/skin.rb CHANGED
@@ -100,6 +100,7 @@ module Slimmer
100
100
  end
101
101
 
102
102
  def success(source_request, response, body)
103
+ original_body = body.dup
103
104
  wrapper_id = options[:wrapper_id] || "wrapper"
104
105
  template_wrapper_id = "wrapper" # All templates in Static use `#wrapper`
105
106
 
@@ -125,8 +126,8 @@ module Slimmer
125
126
  rescue SourceWrapperNotFoundError => e
126
127
  message = "#{e.message} "\
127
128
  "at: #{source_request.base_url}#{source_request.path} "\
128
- "length: #{body.to_s.length} "\
129
- "html: #{body.to_s[0, 300].match?(/<html>/i)}"
129
+ "length: #{original_body.to_s.length} "\
130
+ "body: #{original_body.to_s[0..2000]}"
130
131
  raise SourceWrapperNotFoundError, message, caller
131
132
  end
132
133
  end
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = "18.5.0".freeze
2
+ VERSION = "18.5.2".freeze
3
3
  end
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.5.0
4
+ version: 18.5.2
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: 2024-06-10 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json