slimmer 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ module Slimmer
17
17
  end
18
18
 
19
19
  def wrap_node(src, node)
20
- if node.previous_sibling.to_s =~ /<!--\[if[^\]]+\]>-->/ and node.next_sibling.to_s == '<!--<![endif]-->'
20
+ if node.previous_sibling.to_s =~ /<!--\[if[^\]]+\]><!-->/ and node.next_sibling.to_s == '<!--<![endif]-->'
21
21
  node = Nokogiri::XML::NodeSet.new(src, [node.previous_sibling, node, node.next_sibling])
22
22
  end
23
23
  node
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -134,14 +134,14 @@ module TypicalUsage
134
134
  given_response 200, %{
135
135
  <html>
136
136
  <head>
137
- <!--[if gt IE 8]>--><link href="app.css" rel="stylesheet" type="text/css"><!--<![endif]-->
137
+ <!--[if gt IE 8]><!--><link href="app.css" rel="stylesheet" type="text/css"><!--<![endif]-->
138
138
  </head>
139
139
  </html>
140
140
  }
141
141
  def test_should_find_stylesheet_wrapped_with_conditional_comments
142
142
  assert_rendered_in_template "head link[href='app.css']"
143
143
  element = Nokogiri::HTML.parse(last_response.body).at_xpath('/html/head')
144
- assert_match element.to_s, /<!--\[if gt IE 8\]>-->.*app\.css.*<!--<!\[endif\]-->/m, 'Not found conditional comment in output'
144
+ assert_match element.to_s, /<!--\[if gt IE 8\]><!-->.*app\.css.*<!--<!\[endif\]-->/m, 'Not found conditional comment in output'
145
145
  end
146
146
  end
147
147
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.0
5
+ version: 1.2.1
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: 2012-08-02 00:00:00 Z
14
+ date: 2012-08-03 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -210,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
210
  requirements:
211
211
  - - ">="
212
212
  - !ruby/object:Gem::Version
213
- hash: -1131306322543169285
213
+ hash: -4578393140137017541
214
214
  segments:
215
215
  - 0
216
216
  version: "0"
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
- hash: -1131306322543169285
222
+ hash: -4578393140137017541
223
223
  segments:
224
224
  - 0
225
225
  version: "0"