haml-edge 2.3.88 → 2.3.89

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.88
1
+ 2.3.89
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.88
1
+ 2.3.89
@@ -149,7 +149,6 @@ module Sass
149
149
  # @raise [Sass::SyntaxError] if some element of the tree is invalid
150
150
  # @see Sass::Tree
151
151
  def perform(environment)
152
- environment.options = @options if self.class == Tree::Node
153
152
  _perform(environment)
154
153
  rescue Sass::SyntaxError => e
155
154
  e.modify_backtrace(:filename => filename, :line => line)
@@ -22,7 +22,8 @@ module Sass
22
22
  end
23
23
 
24
24
  # @see \{Node#perform}
25
- def perform(*args)
25
+ def perform(environment)
26
+ environment.options = @options if environment.options.nil? || environment.options.empty?
26
27
  super
27
28
  rescue Sass::SyntaxError => e
28
29
  e.sass_template = @template
@@ -967,6 +967,16 @@ a
967
967
  SASS
968
968
  end
969
969
 
970
+ def test_options_available_in_environment
971
+ assert_equal(<<CSS, render(<<SASS))
972
+ a {
973
+ b: nested; }
974
+ CSS
975
+ a
976
+ b= option("style")
977
+ SASS
978
+ end
979
+
970
980
  # Encodings
971
981
 
972
982
  unless Haml::Util.ruby1_8?
data/test/test_helper.rb CHANGED
@@ -9,6 +9,12 @@ require 'sass'
9
9
 
10
10
  Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
11
11
 
12
+ module Sass::Script::Functions
13
+ def option(name)
14
+ Sass::Script::String.new(@options[name.value.to_sym].to_s)
15
+ end
16
+ end
17
+
12
18
  class Test::Unit::TestCase
13
19
  def munge_filename(opts)
14
20
  return if opts[:filename]
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.88
4
+ version: 2.3.89
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-11-20 00:00:00 -05:00
13
+ date: 2009-11-21 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency