sass 3.1.0.alpha.206 → 3.1.0.alpha.210
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.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/lib/sass/script/funcall.rb +8 -1
- data/test/sass/functions_test.rb +0 -4
- data/test/sass/script_test.rb +4 -4
- data/test/sass/scss/scss_test.rb +0 -11
- metadata +2 -2
data/REVISION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d759347f1299f579d7b5dc2f0f5f30b895168c38
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.0.alpha.
|
|
1
|
+
3.1.0.alpha.210
|
data/lib/sass/script/funcall.rb
CHANGED
|
@@ -84,7 +84,7 @@ module Sass
|
|
|
84
84
|
args = construct_ruby_args(ruby_name, args, keywords)
|
|
85
85
|
|
|
86
86
|
unless Sass::Util.has?(:public_instance_method, Functions, ruby_name) && ruby_name !~ /^__/
|
|
87
|
-
opts(
|
|
87
|
+
opts(to_literal(args))
|
|
88
88
|
else
|
|
89
89
|
opts(Functions::EvaluationContext.new(environment.options).send(ruby_name, *args))
|
|
90
90
|
end
|
|
@@ -93,6 +93,13 @@ module Sass
|
|
|
93
93
|
raise Sass::SyntaxError.new("#{e.message} for `#{name}'")
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
# This method is factored out from `_perform` so that compass can override
|
|
97
|
+
# it with a cross-browser implementation for functions that require vendor prefixes
|
|
98
|
+
# in the generated css.
|
|
99
|
+
def to_literal(args)
|
|
100
|
+
Script::String.new("#{name}(#{args.join(', ')})")
|
|
101
|
+
end
|
|
102
|
+
|
|
96
103
|
private
|
|
97
104
|
|
|
98
105
|
def construct_ruby_args(name, args, keywords)
|
data/test/sass/functions_test.rb
CHANGED
|
@@ -802,10 +802,6 @@ class SassFunctionTest < Test::Unit::TestCase
|
|
|
802
802
|
assert_equal('foo', evaluate('unquote($string: foo)'))
|
|
803
803
|
end
|
|
804
804
|
|
|
805
|
-
def test_unquote_tests_type
|
|
806
|
-
assert_error_message("#ff0000 is not a string for `unquote'", "unquote(#f00)")
|
|
807
|
-
end
|
|
808
|
-
|
|
809
805
|
def test_quote
|
|
810
806
|
assert_equal('"foo"', evaluate('quote(foo)'))
|
|
811
807
|
assert_equal('"foo"', evaluate('quote("foo")'))
|
data/test/sass/script_test.rb
CHANGED
|
@@ -13,13 +13,13 @@ class SassScriptTest < Test::Unit::TestCase
|
|
|
13
13
|
include Sass::Script
|
|
14
14
|
|
|
15
15
|
def test_color_checks_input
|
|
16
|
-
assert_raise_message(
|
|
17
|
-
assert_raise_message(
|
|
16
|
+
assert_raise_message(ArgumentError, "Blue value must be between 0 and 255") {Color.new([1, 2, -1])}
|
|
17
|
+
assert_raise_message(ArgumentError, "Red value must be between 0 and 255") {Color.new([256, 2, 3])}
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def test_color_checks_rgba_input
|
|
21
|
-
assert_raise_message(
|
|
22
|
-
assert_raise_message(
|
|
21
|
+
assert_raise_message(ArgumentError, "Alpha channel must be between 0 and 1") {Color.new([1, 2, 3, 1.1])}
|
|
22
|
+
assert_raise_message(ArgumentError, "Alpha channel must be between 0 and 1") {Color.new([1, 2, 3, -0.1])}
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def test_string_escapes
|
data/test/sass/scss/scss_test.rb
CHANGED
|
@@ -878,17 +878,6 @@ SCSS
|
|
|
878
878
|
assert_equal 2, e.sass_line
|
|
879
879
|
end
|
|
880
880
|
|
|
881
|
-
def test_imports_only_at_toplevel
|
|
882
|
-
render <<SCSS
|
|
883
|
-
foo {
|
|
884
|
-
@import "foo.scss";}
|
|
885
|
-
SCSS
|
|
886
|
-
assert(false, "Expected syntax error")
|
|
887
|
-
rescue Sass::SyntaxError => e
|
|
888
|
-
assert_equal "Import directives may only be used at the root of a document.", e.message
|
|
889
|
-
assert_equal 2, e.sass_line
|
|
890
|
-
end
|
|
891
|
-
|
|
892
881
|
def test_rules_beneath_properties
|
|
893
882
|
render <<SCSS
|
|
894
883
|
foo {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sass
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.0.alpha.
|
|
4
|
+
version: 3.1.0.alpha.210
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -11,7 +11,7 @@ autorequire:
|
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
13
|
|
|
14
|
-
date: 2010-12-
|
|
14
|
+
date: 2010-12-30 00:00:00 -05:00
|
|
15
15
|
default_executable:
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|