compass 0.10.0.rc2 → 0.10.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,8 @@
1
1
  COMPASS CHANGELOG
2
2
  =================
3
+ 0.10.0.rc3 (April 13, 2010)
4
+ ---------------------------
5
+ * This release addresses several bugs in rc2.
3
6
 
4
7
  0.10.0.rc2 (April 12, 2010)
5
8
  ---------------------------
data/REVISION CHANGED
@@ -1 +1 @@
1
- 98908c49780d58a43681c484bb36c6ace0cc2d85
1
+ 6faed2049cb16d05cbf0c721d1e005045f078d6a
@@ -2,4 +2,4 @@
2
2
  :patch: 0
3
3
  :major: 0
4
4
  :minor: 10
5
- :build: rc2
5
+ :build: rc3
@@ -85,7 +85,7 @@ module Compass
85
85
  contents = File.new(from).read
86
86
  if preferred_syntax.to_s != from[-4..-1]
87
87
  logger.record :convert, basename(from)
88
- tree = Sass::Engine.new(contents, Compass.sass_engine_options).to_tree
88
+ tree = Sass::Engine.new(contents, Compass.sass_engine_options.merge(:syntax => from[-4..-1].intern)).to_tree
89
89
  contents = tree.send("to_#{preferred_syntax}")
90
90
  to[-4..-1] = preferred_syntax.to_s
91
91
  end
@@ -1,6 +1,7 @@
1
1
  module Compass::SassExtensions::Functions::Enumerate
2
- def enumerate(prefix, from, through, separator = "-")
3
- selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator}#{i}"}.join(", ")
2
+ def enumerate(prefix, from, through, separator = nil)
3
+ separator ||= Sass::Script::String.new("-", :string)
4
+ selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator.value}#{i}"}.join(", ")
4
5
  Sass::Script::String.new(selectors)
5
6
  end
6
7
  end
@@ -20,12 +20,32 @@ class SassExtensionsTest < Test::Unit::TestCase
20
20
  assert_equal "a b e, a b f, a c e, a c f, a d e, a d f", nest("a", "b, c, d", "e, f")
21
21
  end
22
22
 
23
+ def test_enumerate
24
+ assert_equal ".grid-1, .grid-2, .grid-3", enumerate(".grid", 1, 3, "-")
25
+ end
26
+
27
+ def test_append_selector
28
+ assert_equal "div.bar", append_selector("div", ".bar")
29
+ assert_equal ".foo1.bar1, .foo1.bar2, .foo2.bar1, .foo2.bar2", append_selector(".foo1, .foo2", ".bar1, .bar2")
30
+ end
31
+
23
32
  protected
24
33
  def evaluation_content(options)
25
34
  Sass::Script::Functions::EvaluationContext.new(options)
26
35
  end
27
36
  def nest(*arguments)
28
37
  options = arguments.last.is_a?(Hash) ? arguments.pop : Hash.new
29
- evaluation_content(options).nest(*arguments.map{|a| Sass::Script::String.new(a)}).to_s
38
+ evaluation_content(options).nest(*arguments.map{|a| Sass::Script::String.new(a, :string)}).to_s
39
+ end
40
+ def enumerate(prefix, from, through, separator = "-", options = {})
41
+ prefix = Sass::Script::String.new(prefix, :string)
42
+ from = Sass::Script::Number.new(from)
43
+ through = Sass::Script::Number.new(through)
44
+ separator = Sass::Script::String.new(separator, :string)
45
+ evaluation_content(options).enumerate(prefix, from, through, separator).to_s
46
+ end
47
+ def append_selector(*arguments)
48
+ options = arguments.last.is_a?(Hash) ? arguments.pop : Hash.new
49
+ evaluation_content(options).append_selector(*arguments.map{|a| Sass::Script::String.new(a, :string)}).to_s
30
50
  end
31
51
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 10
8
8
  - 0
9
- - rc2
10
- version: 0.10.0.rc2
9
+ - rc3
10
+ version: 0.10.0.rc3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Eppstein
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-12 00:00:00 -07:00
18
+ date: 2010-04-13 00:00:00 -07:00
19
19
  default_executable: compass
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency