slimmer 16.0.1 → 17.0.0

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: b9fa11bce76f394cdd62bf87754f0a9fe701d12318de438129e6d09c8595ce6d
4
- data.tar.gz: d12897d944a227f8bef8c7c07038136e598ac2ab6f285698d4a75a70855c716a
3
+ metadata.gz: 0a6d7eb900be169022598a1a09b96d08394d90e55ca451e611bc9de803f900f0
4
+ data.tar.gz: 71243a607e6868ae847544cc1ed6d30acdf031f41b0572ac309fccf93e2814db
5
5
  SHA512:
6
- metadata.gz: f6bc30a38aa60c2582b5fb4b7fbdc9c542e4852f75941dc72edf783a145f9a347c4c2ac8afe454b4d130da4767cb22056cea63f6b6866c6cf080c521d0d95b90
7
- data.tar.gz: 82a4a80af07e8c9554fab7934a02055b30f125a6239ee429375e7a16d893805ab3ad374f77ca2c4b76cacdba1a4d4010b80ea0c9cd760d4502712ad1bac4502c
6
+ metadata.gz: 3d986e7ec508d57b6d949272db05a0a5b25184ffe9195760671d1e72dc5f6397857ae0f5dc35936749ca0eb1cb7880e750a72f36a83d5dddc9792eada2349694
7
+ data.tar.gz: 50f88ad62bb6530f70a8684f7427ce9933525440fbc131669526fc65ebdd8502c7d1e247771a54989842d77be31230b1e60b7f0692b3b5e91fa5767dbff5f73b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 17.0.0
2
+
3
+ * BREAKING: Set default template to `gem_layout` and remove references to the deprecated `core_layout`.
4
+
1
5
  # 16.0.1
2
6
  * Resolve Nokogiri deprecation warning (#277)
3
7
 
data/README.md CHANGED
@@ -57,6 +57,10 @@ class ApplicationController < ActionController::Base
57
57
  end
58
58
  ```
59
59
 
60
+ ## Use in before_action renders
61
+
62
+ If you have a non-default layout and want to render in a before_action method, note that you may have to explicitly call `slimmer_template(:your_template_name)` in the action before rendering. Rendering in a before_action immediately stops the action chain, and since slimmer usually calls slimmer_template as an after_action, it would be skipped over (and you'd get the default layout).
63
+
60
64
  ## Logging
61
65
 
62
66
  Slimmer can be configured with a logger by passing in a logger instance
data/lib/slimmer/skin.rb CHANGED
@@ -119,7 +119,7 @@ module Slimmer
119
119
  Processors::AccountsShower.new(response.headers),
120
120
  ]
121
121
 
122
- template_name = response.headers[Headers::TEMPLATE_HEADER] || "core_layout"
122
+ template_name = response.headers[Headers::TEMPLATE_HEADER] || "gem_layout"
123
123
  process(processors, body, template(template_name), source_request.env)
124
124
  end
125
125
  end
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = "16.0.1".freeze
2
+ VERSION = "17.0.0".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: 16.0.1
4
+ version: 17.0.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: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport