slimmer 18.5.0 → 18.5.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: bdfa5c9dbc5a0592a4b42952093bf5f3e268e63b8e37cad1c7bfcefb0358cb33
4
- data.tar.gz: 3bdebe8423a212a04b26e158476795b3cca238f2d146967839de71132152ef74
3
+ metadata.gz: 53bda50056426a6cc9b849df995c6aa2c82b0fad7bd2121d5347936786ff0cd3
4
+ data.tar.gz: 9d8c0b2929a185f61d97f268e4e4b156e7ca5591030598c89769305f8427c1c9
5
5
  SHA512:
6
- metadata.gz: 396db96b068f08fb559c22bb8eb8c50218567a82f0c702fcc6a3af83babdfe0584b044831c66cdab0dd58aae10bbe4a7f15f5242fa18eb13e2952813b4a39adc
7
- data.tar.gz: 8734d2170021290c9f8d23cde6b47d9dd012b0bb065901fc17a79e09641f75ad6505d7cce7e4bb9c337d0de3a18bdc9efe79d885e894010150ce1e40f06a81d1
6
+ metadata.gz: 852952d3d2188a3930940640f5167904ebe8509a9ff6b2450980d5da4eeb2479f5f0fe039701d4d7217065d4ff2cdc84c2e547e19ba05881177141400eca5584
7
+ data.tar.gz: 840403cd40c38716efa8b2da15cad73e3440ef021301e571dc0337510ab3b224fd516a2ca73191588f5ae54b766833bf59ec96e2123db585976ffea59415e7eb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 18.5.1
2
+
3
+ * Include a part of the body in the error message text
4
+
1
5
  # 18.5.0
2
6
 
3
7
  * 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.1".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.1
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