slimmer 3.11.0 → 3.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ module Slimmer::Processors
12
12
  header.add_next_sibling(beta_notice_block)
13
13
  end
14
14
  if footer = page_template.at_css('footer#footer')
15
- footer.add_previous_sibling(beta_notice_block)
15
+ footer.add_previous_sibling(add_footer_class(beta_notice_block))
16
16
  end
17
17
  end
18
18
  end
@@ -21,6 +21,12 @@ module Slimmer::Processors
21
21
  !! @headers[Slimmer::Headers::BETA_HEADER]
22
22
  end
23
23
 
24
+ def add_footer_class(block)
25
+ block = Nokogiri::HTML.fragment(block)
26
+ block.child['class'] = "#{block.child['class']} js-footer"
27
+ block
28
+ end
29
+
24
30
  def beta_notice_block
25
31
  @beta_notice_block ||= @skin.template('beta_notice')
26
32
  end
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '3.11.0'
2
+ VERSION = '3.12.0'
3
3
  end
@@ -267,7 +267,7 @@ module TypicalUsage
267
267
  assert_rendered_in_template "body.beta.wibble #global-header + div.beta-notice"
268
268
 
269
269
  # beta notice before footer
270
- assert_rendered_in_template "body.beta.wibble div.beta-notice + #footer"
270
+ assert_rendered_in_template "body.beta.wibble div.beta-notice.js-footer + #footer"
271
271
  end
272
272
  end
273
273
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 3.11.0
5
+ version: 3.12.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Griffiths
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2013-02-20 00:00:00 Z
14
+ date: 2013-03-01 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -245,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">="
247
247
  - !ruby/object:Gem::Version
248
- hash: 3638550350140807883
248
+ hash: -3232249318320008172
249
249
  segments:
250
250
  - 0
251
251
  version: "0"
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - ">="
256
256
  - !ruby/object:Gem::Version
257
- hash: 3638550350140807883
257
+ hash: -3232249318320008172
258
258
  segments:
259
259
  - 0
260
260
  version: "0"