slimmer 15.6.1 → 16.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: b50a2f579bef76ba7364de07eaebbf2be8ed7fcbfcb3a2818ff3005a18a65007
4
- data.tar.gz: 8b1a553d9ccb0b12bef74edd0e9913d440908bf24fce8c529786b092187bf410
3
+ metadata.gz: 118378e1ad3f656164da144437d42085b0e7d69ffc567d922266e531001aeab5
4
+ data.tar.gz: e96c1f6bd1fe7d479a217dfa6ec3c76793c140063377d146bc418e0756f46dea
5
5
  SHA512:
6
- metadata.gz: bb82513d196832bc2ce53e88458d19db078c2a73092f88770d101ef6d42323336a9e42ef0537ed132e5233be593a333fb7cdabfd024406d44a735f3a39d2e7e6
7
- data.tar.gz: 176ffae950e7168365582f5e4956b5cea438582e4e43083132b67014f4d0f8ebbe76370f2f1b2f6264aca221aead761a8a27bf86bd7bde0b5a4c123e7aa73655
6
+ metadata.gz: 0fd17a9971da4ab0c6d43883b9ce7cff0556384e1470c9c26dc4c6e1c97e9a9c7510fd5b938a315d8ead09cb70af05e0e644257849aa15c950bdc31cc6ad373d
7
+ data.tar.gz: 76d732124e4efc8ec9b62c5ea7747a5316f740f38f2f9e80595bcda08ab3c864bf1bbe89985cade4ee2cdec10d70b866ac081e2b482f851ec7135c5660580c21
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 16.0.0
2
+ * BREAKING: Remove NavigationMover processor (#275)
3
+
1
4
  # 15.6.1
2
5
  * Use safe navigation operator in feedback url swapper (#273)
3
6
 
data/lib/slimmer/skin.rb CHANGED
@@ -106,7 +106,6 @@ module Slimmer
106
106
  processors = [
107
107
  Processors::TitleInserter.new,
108
108
  Processors::TagMover.new,
109
- Processors::NavigationMover.new(self),
110
109
  Processors::ConditionalCommentMover.new,
111
110
  Processors::BodyInserter.new(wrapper_id, template_wrapper_id, response.headers),
112
111
  Processors::FeedbackURLSwapper.new(source_request, response.headers),
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = "15.6.1".freeze
2
+ VERSION = "16.0.0".freeze
3
3
  end
data/lib/slimmer.rb CHANGED
@@ -36,7 +36,6 @@ module Slimmer
36
36
  autoload :MetadataInserter, "slimmer/processors/metadata_inserter"
37
37
  autoload :HeaderContextInserter, "slimmer/processors/header_context_inserter"
38
38
  autoload :InsideHeaderInserter, "slimmer/processors/inside_header_inserter"
39
- autoload :NavigationMover, "slimmer/processors/navigation_mover"
40
39
  autoload :SearchPathSetter, "slimmer/processors/search_path_setter"
41
40
  autoload :SearchParameterInserter, "slimmer/processors/search_parameter_inserter"
42
41
  autoload :SearchRemover, "slimmer/processors/search_remover"
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: 15.6.1
4
+ version: 16.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: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -260,7 +260,6 @@ files:
260
260
  - lib/slimmer/processors/header_context_inserter.rb
261
261
  - lib/slimmer/processors/inside_header_inserter.rb
262
262
  - lib/slimmer/processors/metadata_inserter.rb
263
- - lib/slimmer/processors/navigation_mover.rb
264
263
  - lib/slimmer/processors/search_parameter_inserter.rb
265
264
  - lib/slimmer/processors/search_path_setter.rb
266
265
  - lib/slimmer/processors/search_remover.rb
@@ -1,24 +0,0 @@
1
- class Slimmer::Processors::NavigationMover
2
- def initialize(skin)
3
- @skin = skin
4
- end
5
-
6
- def filter(src, dest)
7
- proposition_header = src.at_css("#proposition-menu")
8
- global_header = dest.at_css("#global-header")
9
- if proposition_header && global_header
10
- proposition_header.remove
11
-
12
- global_header["class"] = [global_header["class"], "with-proposition"].compact.join(" ")
13
-
14
- header_block = Nokogiri::HTML.fragment(proposition_header_block)
15
- header_block.at_css(".content") << proposition_header
16
-
17
- global_header.at_css(".header-wrapper") << header_block
18
- end
19
- end
20
-
21
- def proposition_header_block
22
- @proposition_header_block ||= @skin.template("proposition_menu")
23
- end
24
- end