haml-edge 2.3.41 → 2.3.42

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.41
1
+ 2.3.42
data/Rakefile CHANGED
@@ -155,7 +155,7 @@ def mode_unchanged?(mode, version)
155
155
  mode_version = File.read("extra/#{mode}-mode.el").scan(/^;; Version: (.*)$/).first.first
156
156
  return false if mode_version == version
157
157
  return true unless changed_since?(mode_version, "extra/#{mode}-mode.el")
158
- raise "#{mode}-mode.el version is #{haml_mode_version.inspect}, but it has changed as of #{version.inspect}"
158
+ raise "#{mode}-mode.el version is #{version.inspect}, but it has changed as of #{version.inspect}"
159
159
  return false
160
160
  end
161
161
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.41
1
+ 2.3.42
data/extra/haml-mode.el CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ;; Author: Nathan Weizenbaum
6
6
  ;; URL: http://github.com/nex3/haml/tree/master
7
- ;; Version: 2.2.5
7
+ ;; Version: 2.2.6
8
8
  ;; Created: 2007-03-08
9
9
  ;; By: Nathan Weizenbaum
10
10
  ;; Keywords: markup, language, html
data/extra/sass-mode.el CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ;; Author: Nathan Weizenbaum
6
6
  ;; URL: http://github.com/nex3/haml/tree/master
7
- ;; Version: 2.2.5
7
+ ;; Version: 2.2.6
8
8
  ;; Created: 2007-03-15
9
9
  ;; By: Nathan Weizenbaum
10
10
  ;; Keywords: markup, language, css
@@ -465,8 +465,8 @@ END
465
465
  return unless key = scanner.scan(LITERAL_VALUE_REGEX)
466
466
  return unless scanner.scan(/\s*=>\s*/)
467
467
  return unless value = scanner.scan(LITERAL_VALUE_REGEX)
468
+ return unless scanner.scan(/\s*(?:,|$)\s*/)
468
469
  attributes[eval(key).to_s] = eval(value).to_s
469
- scanner.scan(/[,\s]*/)
470
470
  end
471
471
  text.count("\n").times { newline }
472
472
  attributes
@@ -54,6 +54,12 @@ class EngineTest < Test::Unit::TestCase
54
54
  "%p(foo 'bar')" => "Invalid attribute list: \"(foo 'bar')\".",
55
55
  "%p(foo 'bar'\nbaz='bang')" => ["Invalid attribute list: \"(foo 'bar'\".", 1],
56
56
  "%p(foo='bar'\nbaz 'bang'\nbip='bop')" => ["Invalid attribute list: \"(foo='bar' baz 'bang'\".", 2],
57
+ "%p{:foo => 'bar' :bar => 'baz'}" => :compile,
58
+ "%p{:foo => }" => :compile,
59
+ "%p{=> 'bar'}" => :compile,
60
+ "%p{:foo => 'bar}" => :compile,
61
+ "%p{'foo => 'bar'}" => :compile,
62
+ "%p{:foo => 'bar\"}" => :compile,
57
63
 
58
64
  # Regression tests
59
65
  "- raise 'foo'\n\n\n\nbar" => ["foo", 1],
@@ -732,18 +738,22 @@ HAML
732
738
  assert_equal("<a b='2' />\nc\n", render("%a{'b' => 1 + 1}/\n= 'c'\n"))
733
739
  end
734
740
 
735
- def test_exceptions
736
- EXCEPTION_MAP.each do |key, value|
741
+ EXCEPTION_MAP.each do |key, value|
742
+ define_method("test_exception (#{key.inspect})") do
737
743
  begin
738
- render(key, :filename => "(exception test for #{key.inspect})")
744
+ render(key, :filename => __FILE__)
739
745
  rescue Exception => err
740
746
  value = [value] unless value.is_a?(Array)
741
747
  expected_message, line_no = value
742
748
  line_no ||= key.split("\n").length
743
- line_reported = err.backtrace[0].gsub(/\(.+\):/, '').to_i
744
749
 
745
- assert_equal(expected_message, err.message, "Line: #{key}")
746
- assert_equal(line_no, line_reported, "Line: #{key}")
750
+ if expected_message == :compile
751
+ assert_match(/^compile error\n/, err.message, "Line: #{key}")
752
+ else
753
+ assert_equal(expected_message, err.message, "Line: #{key}")
754
+ end
755
+
756
+ assert_match(/^#{Regexp.escape(__FILE__)}:#{line_no}/, err.backtrace[0], "Line: #{key}")
747
757
  else
748
758
  assert(false, "Exception not raised for\n#{key}")
749
759
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.41
4
+ version: 2.3.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-09-23 00:00:00 -04:00
13
+ date: 2009-09-28 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -44,8 +44,8 @@ extensions: []
44
44
 
45
45
  extra_rdoc_files:
46
46
  - README.md
47
- - REVISION
48
47
  - VERSION
48
+ - REVISION
49
49
  - CONTRIBUTING
50
50
  - MIT-LICENSE
51
51
  - VERSION_NAME
@@ -257,8 +257,8 @@ files:
257
257
  - init.rb
258
258
  - .yardopts
259
259
  - README.md
260
- - REVISION
261
260
  - VERSION
261
+ - REVISION
262
262
  - CONTRIBUTING
263
263
  - MIT-LICENSE
264
264
  - VERSION_NAME