Hello community,
here is the log from the commit of package rubygem-sass for openSUSE:Factory checked in at 2015-02-16 21:14:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sass (Old)
and /work/SRC/openSUSE:Factory/.rubygem-sass.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sass"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sass/rubygem-sass.changes 2014-10-24 10:48:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sass.new/rubygem-sass.changes 2015-02-16 21:14:01.000000000 +0100
@@ -1,0 +2,10 @@
+Sat Feb 14 05:31:35 UTC 2015 - coolo@suse.com
+
+- updated to version 3.4.12
+
+-------------------------------------------------------------------
+Mon Feb 9 07:00:53 UTC 2015 - coolo@suse.com
+
+- updated to version 3.4.11, no changelog
+
+-------------------------------------------------------------------
Old:
----
sass-3.4.6.gem
New:
----
sass-3.4.12.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sass.spec ++++++
--- /var/tmp/diff_new_pack.UtIe6a/_old 2015-02-16 21:14:02.000000000 +0100
+++ /var/tmp/diff_new_pack.UtIe6a/_new 2015-02-16 21:14:02.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-sass
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-sass
-Version: 3.4.6
+Version: 3.4.12
Release: 0
%define mod_name sass
%define mod_full_name %{mod_name}-%{version}
++++++ sass-3.4.6.gem -> sass-3.4.12.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CONTRIBUTING new/CONTRIBUTING
--- old/CONTRIBUTING 2014-10-17 03:32:48.000000000 +0200
+++ new/CONTRIBUTING 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-Contributions are welcomed. Please see the following sites for guidelines:
-
- http://sass-lang.com/community#Contribute
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CONTRIBUTING.md new/CONTRIBUTING.md
--- old/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100
+++ new/CONTRIBUTING.md 2015-02-14 02:18:19.000000000 +0100
@@ -0,0 +1,3 @@
+Contributions are welcomed. Please see the following sites for guidelines:
+
+[http://sass-lang.com/community#Contribute](http://sass-lang.com/community#Contribute)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2014-10-17 03:32:48.000000000 +0200
+++ new/VERSION 2015-02-14 02:18:19.000000000 +0100
@@ -1 +1 @@
-3.4.6
+3.4.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION_DATE new/VERSION_DATE
--- old/VERSION_DATE 2014-10-17 03:32:48.000000000 +0200
+++ new/VERSION_DATE 2015-02-14 02:18:19.000000000 +0100
@@ -1 +1 @@
-17 October 2014 01:32:48 UTC
+14 February 2015 01:18:18 UTC
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/exec/sass_scss.rb new/lib/sass/exec/sass_scss.rb
--- old/lib/sass/exec/sass_scss.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/exec/sass_scss.rb 2015-02-14 02:18:19.000000000 +0100
@@ -42,6 +42,7 @@
if @args.size == 1
@args = split_colon_path(@args.first)
else
+ @fake_update = true
@options[:update] = true
end
end
@@ -312,6 +313,16 @@
dirs, files = @args.map {|name| split_colon_path(name)}.
partition {|i, _| File.directory? i}
+
+ if @fake_update && !dirs.empty?
+ # Issue 1602.
+ Sass::Util.sass_warn < 'variable argument list'}
# The environment for this function. This environment's
@@ -649,11 +651,11 @@
#
# @overload rgba($red, $green, $blue, $alpha)
# @param $red [Sass::Script::Value::Number] The amount of red in the
- # color. Must be between 0 and 255 inclusive
+ # color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
# @param $green [Sass::Script::Value::Number] The amount of green in the
- # color. Must be between 0 and 255 inclusive
+ # color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
# @param $blue [Sass::Script::Value::Number] The amount of blue in the
- # color. Must be between 0 and 255 inclusive
+ # color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
# @param $alpha [Sass::Script::Value::Number] The opacity of the color.
# Must be between 0 and 1 inclusive
# @return [Sass::Script::Value::Color]
@@ -681,6 +683,7 @@
assert_type color, :Color, :color
assert_type alpha, :Number, :alpha
+ check_alpha_unit alpha, 'rgba'
color.with(:alpha => alpha.value)
when 4
@@ -738,6 +741,7 @@
assert_type saturation, :Number, :saturation
assert_type lightness, :Number, :lightness
assert_type alpha, :Number, :alpha
+ check_alpha_unit alpha, 'hsla'
h = hue.value
s = saturation.value
@@ -1287,7 +1291,7 @@
# @param $color1 [Sass::Script::Value::Color]
# @param $color2 [Sass::Script::Value::Color]
# @param $weight [Sass::Script::Value::Number] The relative weight of each
- # color. Closer to `0%` gives more weight to `$color`, closer to `100%`
+ # color. Closer to `0%` gives more weight to `$color1`, closer to `100%`
# gives more weight to `$color2`
# @return [Sass::Script::Value::Color]
# @raise [ArgumentError] if `$weight` is out of bounds or any parameter is
@@ -1393,11 +1397,17 @@
# @return [Sass::Script::Value::String]
# @raise [ArgumentError] if `$string` isn't a string
def unquote(string)
- if string.is_a?(Sass::Script::Value::String) && string.type != :identifier
- identifier(string.value)
- else
- string
+ unless string.is_a?(Sass::Script::Value::String)
+ Sass::Util.sass_warn(< 0
- [index.value - 1, original.value.size].min
+ insertion_point = if index.to_i > 0
+ [index.to_i - 1, original.value.size].min
else
- [index.value, -original.value.size - 1].max
+ [index.to_i, -original.value.size - 1].max
end
result = original.value.dup.insert(insertion_point, insert.value)
Sass::Script::Value::String.new(result, original.type)
@@ -2306,7 +2316,7 @@
# Return a decimal between 0 and 1, inclusive of 0 but not 1.
# @return [Sass::Script::Value::Number] A decimal value.
# @overload random($limit)
- # Return an integer between 1 and `$limit`, inclusive of 1 but not `$limit`.
+ # Return an integer between 1 and `$limit`, inclusive of both 1 and `$limit`.
# @param $limit [Sass::Script::Value::Number] The maximum of the random integer to be
# returned, a positive integer.
# @return [Sass::Script::Value::Number] An integer.
@@ -2315,10 +2325,10 @@
generator = Sass::Script::Functions.random_number_generator
if limit
assert_integer limit, "limit"
- if limit.value < 1
+ if limit.to_i < 1
raise ArgumentError.new("$limit #{limit} must be greater than or equal to 1")
end
- number(1 + generator.rand(limit.value))
+ number(1 + generator.rand(limit.to_i))
else
number(generator.rand)
end
@@ -2622,5 +2632,21 @@
color.with(attr => color.send(attr).send(op, amount.value))
end
+
+ def check_alpha_unit(alpha, function)
+ return if alpha.unitless?
+
+ if alpha.is_unit?("%")
+ Sass::Util.sass_warn(< e
raise e unless e.name.to_s == @operator.to_s
raise Sass::SyntaxError.new("Undefined operation: \"#{value1} #{@operator} #{value2}\".")
end
+
+ if @operator == :eq && value1.is_a?(Sass::Script::Value::Number) &&
+ value2.is_a?(Sass::Script::Value::Number) && result == Sass::Script::Value::Bool::TRUE &&
+ value1.unitless? != value2.unitless?
+ Sass::Util.sass_warn <" : seq1[1] == seq2[si + 1]
+
+ # .foo > .baz is not a superselector of .foo > .bar > .baz or .foo >
+ # .bar .baz, despite the fact that .baz is a superselector of .bar >
+ # .baz and .bar .baz. Same goes for + and ~.
+ return if seq1.length == 3 && seq2.length > 3
+
return _superselector?(seq1[2..-1], seq2[si + 2..-1])
elsif seq2[si + 1].is_a?(String)
return unless seq2[si + 1] == ">"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/selector/simple_sequence.rb new/lib/sass/selector/simple_sequence.rb
--- old/lib/sass/selector/simple_sequence.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/selector/simple_sequence.rb 2015-02-14 02:18:20.000000000 +0100
@@ -89,7 +89,7 @@
resolved_members = @members.map do |sel|
next sel unless sel.is_a?(Pseudo) && sel.selector
sel.with_selector(sel.selector.resolve_parent_refs(super_cseq, !:implicit_parent))
- end
+ end.flatten
# Parent selector only appears as the first selector in the sequence
unless (parent = resolved_members.first).is_a?(Parent)
@@ -133,9 +133,9 @@
end
Sequence.new(members[0...-1] +
- [SimpleSequence.new(parent_sub + @members[1..-1], subject?)] +
+ [SimpleSequence.new(parent_sub + resolved_members[1..-1], subject?)] +
[newline].compact)
- end)
+ end)
end
# Non-destructively extends this selector with the extensions specified in a hash
@@ -164,6 +164,20 @@
extended = sel.selector.do_extend(extends, parent_directives, replace, seen, !:original)
next sel if extended == sel.selector
extended.members.reject! {|seq| seq.has_placeholder?}
+
+ # For `:not()`, we usually want to get rid of any complex
+ # selectors becuase that will cause the selector to fail to
+ # parse on all browsers at time of writing. We can keep them
+ # if either the original selector had a complex selector, or
+ # the result of extending has only complex selectors,
+ # because either way we aren't breaking anything that isn't
+ # already broken.
+ if sel.normalized_name == 'not' &&
+ (sel.selector.members.none? {|seq| seq.members.length > 1} &&
+ extended.members.any? {|seq| seq.members.length == 1})
+ extended.members.reject! {|seq| seq.members.length > 1}
+ end
+
modified_original = true
result = sel.with_selector(extended)
result.each {|new_sel| seen_with_pseudo_selectors << [new_sel]}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/tree/function_node.rb new/lib/sass/tree/function_node.rb
--- old/lib/sass/tree/function_node.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/tree/function_node.rb 2015-02-14 02:18:20.000000000 +0100
@@ -20,6 +20,12 @@
# @return [Script::Tree::Node?]
attr_accessor :splat
+ # Strips out any vendor prefixes.
+ # @return [String] The normalized name of the directive.
+ def normalized_name
+ @normalized_name ||= name.gsub(/^(?:-[a-zA-Z0-9]+-)?/, '\1')
+ end
+
# @param name [String] The function name
# @param args [Array<(Script::Tree::Node, Script::Tree::Node)>]
# The arguments for the function.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/tree/rule_node.rb new/lib/sass/tree/rule_node.rb
--- old/lib/sass/tree/rule_node.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/tree/rule_node.rb 2015-02-14 02:18:20.000000000 +0100
@@ -132,14 +132,15 @@
private
def try_to_parse_non_interpolated_rules
- if @rule.all? {|t| t.kind_of?(String)}
- # We don't use real filename/line info because we don't have it yet.
- # When we get it, we'll set it on the parsed rules if possible.
- parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
- # rubocop:disable RescueModifier
- @parsed_rules = parser.parse_selector rescue nil
- # rubocop:enable RescueModifier
- end
+ @parsed_rules = nil
+ return unless @rule.all? {|t| t.kind_of?(String)}
+
+ # We don't use real filename/line info because we don't have it yet.
+ # When we get it, we'll set it on the parsed rules if possible.
+ parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
+ # rubocop:disable RescueModifier
+ @parsed_rules = parser.parse_selector rescue nil
+ # rubocop:enable RescueModifier
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/tree/visitors/convert.rb new/lib/sass/tree/visitors/convert.rb
--- old/lib/sass/tree/visitors/convert.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/tree/visitors/convert.rb 2015-02-14 02:18:20.000000000 +0100
@@ -113,8 +113,8 @@
end
def visit_extend(node)
- "#{tab_str}@extend #{selector_to_src(node.selector).lstrip}#{semi}" +
- "#{" !optional" if node.optional?}\n"
+ "#{tab_str}@extend #{selector_to_src(node.selector).lstrip}" +
+ "#{" !optional" if node.optional?}#{semi}\n"
end
def visit_for(node)
@@ -274,7 +274,7 @@
"#{tab_str}@at-root #{query_interp_to_src(node.query)}#{yield}"
elsif node.children.length == 1 && node.children.first.is_a?(Sass::Tree::RuleNode)
rule = node.children.first
- "#{tab_str}@at-root #{selector_to_src(rule.rule)}#{visit_children(rule)}"
+ "#{tab_str}@at-root #{selector_to_src(rule.rule).lstrip}#{visit_children(rule)}"
else
"#{tab_str}@at-root#{yield}"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/tree/visitors/perform.rb new/lib/sass/tree/visitors/perform.rb
--- old/lib/sass/tree/visitors/perform.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/lib/sass/tree/visitors/perform.rb 2015-02-14 02:18:20.000000000 +0100
@@ -275,6 +275,16 @@
# Loads the function into the environment.
def visit_function(node)
env = Sass::Environment.new(@environment, node.options)
+
+ if node.normalized_name == 'calc' || node.normalized_name == 'element' ||
+ node.name == 'expression' || node.name == 'url'
+ Sass::Util.sass_warn <= 2.0
def start
- @thread = Thread.new {@run_during_start.call(self) if @run_during_start}
+ parent = Thread.current
+ @thread = Thread.new do
+ @run_during_start.call(self) if @run_during_start
+ parent.raise Interrupt
+ end
end
def stop
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/conversion_test.rb new/test/sass/conversion_test.rb
--- old/test/sass/conversion_test.rb 2014-10-17 03:32:48.000000000 +0200
+++ new/test/sass/conversion_test.rb 2015-02-14 02:18:20.000000000 +0100
@@ -30,8 +30,7 @@
end
def test_empty_directive
- assert_scss_to_sass "@media screen", "@media screen {}"
- assert_scss_to_scss "@media screen {}"
+ assert_renders "@media screen", "@media screen {}"
end
def test_empty_control_directive
@@ -287,24 +286,24 @@
}
SCSS
- assert_sass_to_scss < :compact, :load_paths => [File.dirname(__FILE__) + "/templates"]
+ renders_correctly "warn", :style => :compact, :load_paths => ["#{prefix}/templates"]
end
end
@@ -2457,6 +2458,18 @@
# Regression tests
+ def test_interpolation_in_multiline_selector
+ assert_equal(<= 0, "Random number was below 0"
+ assert result.value <= 1, "Random number was above 1"
+ end
+
# This could *possibly* fail, but exceedingly unlikely
def test_random_is_semi_unique
if Sass::Script::Functions.instance_variable_defined?("@random_number_generator")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/script_conversion_test.rb new/test/sass/script_conversion_test.rb
--- old/test/sass/script_conversion_test.rb 2014-10-17 03:32:49.000000000 +0200
+++ new/test/sass/script_conversion_test.rb 2015-02-14 02:18:20.000000000 +0100
@@ -76,6 +76,26 @@
assert_renders "null"
end
+ def test_space_list
+ assert_renders "foo bar baz"
+ assert_renders "foo (bar baz) bip"
+ assert_renders "foo (bar, baz) bip"
+ end
+
+ def test_comma_list
+ assert_renders "foo, bar, baz"
+ assert_renders "foo, (bar, baz), bip"
+ assert_renders "foo, bar baz, bip"
+ end
+
+ def test_space_list_adds_parens_for_clarity
+ assert_renders "(1 + 1) (2 / 4) (3 * 5)"
+ end
+
+ def test_comma_list_doesnt_add_parens
+ assert_renders "1 + 1, 2 / 4, 3 * 5"
+ end
+
def test_empty_list
assert_renders "()"
end
@@ -221,8 +241,8 @@
assert_renders "$foo or ($bar $baz)"
assert_renders "($foo $bar) or $baz"
- assert_equal "$foo $bar or $baz", render("$foo ($bar or $baz)")
- assert_equal "$foo or $bar $baz", render("($foo or $bar) $baz")
+ assert_renders "$foo ($bar or $baz)"
+ assert_renders "($foo or $bar) $baz"
assert_equal "$foo ($bar $baz)", render("$foo ($bar $baz)")
assert_equal "($foo $bar) $baz", render("($foo $bar) $baz")
@@ -261,6 +281,11 @@
assert_renders 'flabnabbit($foo #{1 + "foo"}#{2 + "bar"} $baz)'
end
+ def test_interpolation_in_string_function
+ assert_renders 'calc(#{1 + "foo"})'
+ assert_renders 'calc(foo#{1 + "foo"}baz)'
+ end
+
def test_interpolation_near_operators
assert_renders '#{1 + 2} , #{3 + 4}'
assert_renders '#{1 + 2}, #{3 + 4}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/script_test.rb new/test/sass/script_test.rb
--- old/test/sass/script_test.rb 2014-10-17 03:32:49.000000000 +0200
+++ new/test/sass/script_test.rb 2015-02-14 02:18:20.000000000 +0100
@@ -206,6 +206,13 @@
assert_equal "foo1bar5baz4bang", resolve('\'foo#{1 + "bar#{2 + 3}baz" + 4}bang\'')
end
+ def test_interpolation_in_interpolation
+ assert_equal 'foo', resolve('#{#{foo}}')
+ assert_equal 'foo', resolve('"#{#{foo}}"')
+ assert_equal 'foo', resolve('#{"#{foo}"}')
+ assert_equal 'foo', resolve('"#{"#{foo}"}"')
+ end
+
def test_interpolation_with_newline
assert_equal "\nbang", resolve('"#{"\a "}bang"')
assert_equal "\n\nbang", resolve('"#{"\a "}\a bang"')
@@ -458,8 +465,13 @@
assert_equal "2in", resolve("1in + 96px")
assert_equal "true", resolve("2mm < 1cm")
assert_equal "true", resolve("10mm == 1cm")
- assert_equal "true", resolve("1 == 1cm")
assert_equal "true", resolve("1.1cm == 11mm")
+
+ assert_warning(<https://github.com/sass/sass/issues/1464#issuecomment-70352288
+ assert_equal(< .bar.baz'
assert_strict_superselector '.foo .bar', '.foo.baz > .bar'
+ assert_strict_superselector '.foo .baz', '.foo > .bar > .baz'
+ end
+
+ def test_child_isnt_superselector_of_longer_child
+ refute_superselector '.foo > .baz', '.foo > .bar > .baz'
+ refute_superselector '.foo > .baz', '.foo > .bar .baz'
+ end
+
+ def test_following_sibling_isnt_superselector_of_longer_following_sibling
+ refute_superselector '.foo + .baz', '.foo + .bar + .baz'
+ refute_superselector '.foo + .baz', '.foo + .bar .baz'
+ end
+
+ def test_sibling_isnt_superselector_of_longer_sibling
+ # This actually is a superselector, but it's a very narrow edge case and
+ # detecting it is very difficult and may be exponential in the worst case.
+ refute_superselector '.foo ~ .baz', '.foo ~ .bar ~ .baz'
+
+ refute_superselector '.foo ~ .baz', '.foo ~ .bar .baz'
end
def test_matches_is_superselector_of_constituent_selectors
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org