haml 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of haml might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.0.2
data/lib/haml/exec.rb CHANGED
@@ -205,7 +205,7 @@ END
205
205
  puts("haml --rails isn't needed for Rails 3 or greater.",
206
206
  "Add 'gem \"haml\"' to your Gemfile instead.", "",
207
207
  "haml --rails will no longer work in the next version of #{@name}.", "")
208
- elsif File.exists?(env) && File.open(f) {|f| f.grep(/config\.gem/)}
208
+ elsif File.exists?(env) && File.open(env) {|env| env.grep(/config\.gem/)}
209
209
  puts("haml --rails isn't needed for Rails 2.1 or greater.",
210
210
  "Add 'gem \"haml\"' to config/environment.rb instead.", "",
211
211
  "haml --rails will no longer work in the next version of #{@name}.", "")
@@ -25,5 +25,6 @@ unless defined?(Sass::MERB_LOADED)
25
25
  Sass::Plugin.options.merge!(config)
26
26
 
27
27
  require 'sass/plugin/rack'
28
- Merb::Config[:app].use Sass::Plugin::Rack
28
+ # Merb::Config is used in Merb >= 1.1.0
29
+ (Merb::Config[:app] || Merb::Config).use Sass::Plugin::Rack
29
30
  end
data/lib/sass/scss/rx.rb CHANGED
@@ -56,12 +56,12 @@ module Sass
56
56
  end
57
57
  NONASCII = /[#{s}]/
58
58
  ESCAPE = /#{UNICODE}|\\[ -~#{s}]/
59
- NMSTART = /[a-zA-Z]|#{NONASCII}|#{ESCAPE}/
59
+ NMSTART = /[_a-zA-Z]|#{NONASCII}|#{ESCAPE}/
60
60
  NMCHAR = /[a-zA-Z0-9_-]|#{NONASCII}|#{ESCAPE}/
61
61
  STRING1 = /\"((?:[^\n\r\f\\"]|\\#{NL}|#{ESCAPE})*)\"/
62
62
  STRING2 = /\'((?:[^\n\r\f\\']|\\#{NL}|#{ESCAPE})*)\'/
63
63
 
64
- IDENT = /[-_]?#{NMSTART}#{NMCHAR}*/
64
+ IDENT = /-?#{NMSTART}#{NMCHAR}*/
65
65
  NAME = /#{NMCHAR}+/
66
66
  NUM = /[0-9]+|[0-9]*.[0-9]+/
67
67
  STRING = /#{STRING1}|#{STRING2}/
@@ -49,6 +49,10 @@ class ScssRxTest < Test::Unit::TestCase
49
49
  def test_underscores_in_identifiers
50
50
  assert_match IDENT, "foo_bar"
51
51
  assert_match IDENT, "_\xC3\xBFfoo"
52
+ assert_match IDENT, "__foo"
53
+ assert_match IDENT, "_1foo"
54
+ assert_match IDENT, "-_foo"
55
+ assert_match IDENT, "_-foo"
52
56
  end
53
57
 
54
58
  def test_invalid_identifiers
@@ -56,9 +60,6 @@ class ScssRxTest < Test::Unit::TestCase
56
60
  assert_no_match IDENT, "1foo"
57
61
  assert_no_match IDENT, "-1foo"
58
62
  assert_no_match IDENT, "--foo"
59
- assert_no_match IDENT, "_1foo"
60
- assert_no_match IDENT, "-_foo"
61
- assert_no_match IDENT, "_-foo"
62
63
  assert_no_match IDENT, "foo bar"
63
64
  assert_no_match IDENT, "foo~bar"
64
65
 
metadata CHANGED
@@ -5,17 +5,18 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 1
9
- version: 3.0.1
8
+ - 2
9
+ version: 3.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Weizenbaum
13
+ - Chris Eppstein
13
14
  - Hampton Catlin
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-05-10 00:00:00 -07:00
19
+ date: 2010-05-11 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency