commit rubygem-sass for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-sass for openSUSE:Factory checked in at 2015-10-14 16:44:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-08-27 08:58:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-sass.new/rubygem-sass.changes 2015-10-14 16:45:00.000000000 +0200 @@ -1,0 +2,6 @@ +Sat Oct 10 04:30:06 UTC 2015 - coolo@suse.com + +- updated to version 3.4.19 + see installed CHANGELOG.md + +------------------------------------------------------------------- Old: ---- sass-3.4.18.gem New: ---- sass-3.4.19.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-sass.spec ++++++ --- /var/tmp/diff_new_pack.3nyS7Q/_old 2015-10-14 16:45:01.000000000 +0200 +++ /var/tmp/diff_new_pack.3nyS7Q/_new 2015-10-14 16:45:01.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-sass -Version: 3.4.18 +Version: 3.4.19 Release: 0 %define mod_name sass %define mod_full_name %{mod_name}-%{version} @@ -42,7 +42,7 @@ PreReq: update-alternatives %description -Sass makes CSS fun again. Sass is an extension of CSS3, adding +Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. ++++++ sass-3.4.18.gem -> sass-3.4.19.gem ++++++ 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-10-10 03:18:30.000000000 +0200 @@ -1,3 +1,3 @@ -Contributions are welcomed. Please see the following sites for guidelines: +Contributions are welcomed. Please see the following site 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/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 2015-10-10 03:18:30.000000000 +0200 @@ -1,14 +1,14 @@ # Sass [![Gem Version](https://badge.fury.io/rb/sass.png)](http://badge.fury.io/rb/sass) [![Inline docs](http://inch-ci.org/github/sass/sass.svg)](http://inch-ci.org/github/sass/sass) -**Sass makes CSS fun again**. Sass is an extension of CSS3, +**Sass makes CSS fun again**. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. Sass has two syntaxes. The new main syntax (as of Sass 3) is known as "SCSS" (for "Sassy CSS"), -and is a superset of CSS3's syntax. -This means that every valid CSS3 stylesheet is valid SCSS as well. +and is a superset of CSS's syntax. +This means that every valid CSS stylesheet is valid SCSS as well. SCSS files use the extension `.scss`. The second, older syntax is known as the indented syntax (or just "Sass"). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 1970-01-01 01:00:00.000000000 +0100 +++ new/VERSION 2015-10-10 03:18:30.000000000 +0200 @@ -1 +1 @@ -3.4.18 +3.4.19 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION_DATE new/VERSION_DATE --- old/VERSION_DATE 1970-01-01 01:00:00.000000000 +0100 +++ new/VERSION_DATE 2015-10-10 03:18:30.000000000 +0200 @@ -1 +1 @@ -25 August 2015 20:10:56 UTC +10 October 2015 01:18:29 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 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/exec/sass_scss.rb 2015-10-10 03:18:30.000000000 +0200 @@ -174,9 +174,6 @@ 'Read input from standard input instead of an input file.', 'This is the default if no input file is specified.') do @options[:input] = $stdin - - # See issue 1745 - (@options[:for_engine][:load_paths] ||= []) << ::Sass::Importers::DeprecatedPath.new(".") end encoding_option(opts) @@ -390,6 +387,11 @@ input = @options[:input] output = @options[:output] + if input == $stdin + # See issue 1745 + (@options[:for_engine][:load_paths] ||= []) << ::Sass::Importers::DeprecatedPath.new(".") + end + @options[:for_engine][:syntax] ||= :scss if input.is_a?(File) && input.path =~ /\.scss$/ @options[:for_engine][:syntax] ||= @default_syntax engine = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/importers/filesystem.rb new/lib/sass/importers/filesystem.rb --- old/lib/sass/importers/filesystem.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/importers/filesystem.rb 2015-10-10 03:18:30.000000000 +0200 @@ -150,8 +150,7 @@ full_path.gsub!(REDUNDANT_DIRECTORY, File::SEPARATOR) [Sass::Util.cleanpath(full_path).to_s, s] end - end - found = Sass::Util.flatten(found, 1) + end.flatten(1) return if found.empty? if found.size > 1 && !@same_name_warnings.include?(found.first.first) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/functions.rb new/lib/sass/script/functions.rb --- old/lib/sass/script/functions.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/functions.rb 2015-10-10 03:18:30.000000000 +0200 @@ -188,7 +188,7 @@ # \{#index index($list, $value)} # : Returns the position of a value within a list. # - # \{#list_separator list-separator(#list)} + # \{#list_separator list-separator($list)} # : Returns the separator of a list. # # ## Map Functions {#map-functions} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/tree/funcall.rb new/lib/sass/script/tree/funcall.rb --- old/lib/sass/script/tree/funcall.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/tree/funcall.rb 2015-10-10 03:18:30.000000000 +0200 @@ -1,5 +1,5 @@ require 'sass/script/functions' -require 'sass/util/normalized_map' +require 'sass/util' module Sass::Script::Tree # A SassScript parse node representing a function call. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/tree/node.rb new/lib/sass/script/tree/node.rb --- old/lib/sass/script/tree/node.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/tree/node.rb 2015-10-10 03:18:30.000000000 +0200 @@ -62,6 +62,10 @@ # Returns the text of this SassScript expression. # + # @options opts :quote [String] + # The preferred quote style for quoted strings. If `:none`, strings are + # always emitted unquoted. + # # @return [String] def to_sass(opts = {}) Sass::Util.abstract(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/tree/string_interpolation.rb new/lib/sass/script/tree/string_interpolation.rb --- old/lib/sass/script/tree/string_interpolation.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/tree/string_interpolation.rb 2015-10-10 03:18:30.000000000 +0200 @@ -3,12 +3,33 @@ # # @see Interpolation class StringInterpolation < Node + # @return [Literal] The string literal before this interpolation. + attr_reader :before + + # @return [Node] The SassScript within the interpolation + attr_reader :mid + + # @return [StringInterpolation, Literal] + # The string literal or string interpolation before this interpolation. + attr_reader :after + + # Whether this is a CSS string or a CSS identifier. The difference is that + # strings are written with double-quotes, while identifiers aren't. + # + # String interpolations are only ever identifiers if they're quote-like + # functions such as `url()`. + # + # @return [Symbol] `:string` or `:identifier` + def type + @before.value.type + end + # Interpolation in a string is of the form `"before #{mid} after"`, # where `before` and `after` may include more interpolation. # - # @param before [Node] The string before the interpolation - # @param mid [Node] The SassScript within the interpolation - # @param after [Node] The string after the interpolation + # @param before [StringInterpolation, Literal] See {StringInterpolation#before} + # @param mid [Node] See {StringInterpolation#mid} + # @param after [Literal] See {StringInterpolation#after} def initialize(before, mid, after) @before = before @mid = mid @@ -22,32 +43,15 @@ # @see Node#to_sass def to_sass(opts = {}) - # We can get rid of all of this when we remove the deprecated :equals context - # XXX CE: It's gone now but I'm not sure what can be removed now. - before_unquote, before_quote_char, before_str = parse_str(@before.to_sass(opts)) - after_unquote, after_quote_char, after_str = parse_str(@after.to_sass(opts)) - unquote = before_unquote || after_unquote || - (before_quote_char && !after_quote_char && !after_str.empty?) || - (!before_quote_char && after_quote_char && !before_str.empty?) - quote_char = - if before_quote_char && after_quote_char && before_quote_char != after_quote_char - before_str.gsub!("\\'", "'") - before_str.gsub!('"', "\\\"") - after_str.gsub!("\\'", "'") - after_str.gsub!('"', "\\\"") - '"' - else - before_quote_char || after_quote_char - end + quote = type == :string ? opts[:quote] || quote_for(self) || '"' : :none + opts = opts.merge(:quote => quote) res = "" - res << 'unquote(' if unquote - res << quote_char if quote_char - res << before_str - res << '#{' << @mid.to_sass(opts) << '}' - res << after_str - res << quote_char if quote_char - res << ')' if unquote + res << quote if quote != :none + res << _to_sass(before, opts) + res << '#{' << @mid.to_sass(opts.merge(:quote => nil)) << '}' + res << _to_sass(after, opts) + res << quote if quote != :none res end @@ -88,17 +92,28 @@ private - def parse_str(str) - case str - when /^unquote\((["'])(.*)\1\)$/ - return true, $1, $2 - when '""' - return false, nil, "" - when /^(["'])(.*)\1$/ - return false, $1, $2 - else - return false, nil, str + def _to_sass(string_or_interp, opts) + result = string_or_interp.to_sass(opts) + opts[:quote] == :none ? result : result.slice(1...-1) + end + + def quote_for(string_or_interp) + if string_or_interp.is_a?(Sass::Script::Tree::Literal) + return nil if string_or_interp.value.value.empty? + return '"' if string_or_interp.value.value.include?("'") + return "'" if string_or_interp.value.value.include?('"') + return nil end + + # Double-quotes take precedence over single quotes. + before_quote = quote_for(string_or_interp.before) + return '"' if before_quote == '"' + after_quote = quote_for(string_or_interp.after) + return '"' if after_quote == '"' + + # Returns "'" if either or both insist on single quotes, and nil + # otherwise. + before_quote || after_quote end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/value/number.rb new/lib/sass/script/value/number.rb --- old/lib/sass/script/value/number.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/value/number.rb 2015-10-10 03:18:30.000000000 +0200 @@ -43,6 +43,7 @@ def self.precision=(digits) @precision = digits.round @precision_factor = 10.0**@precision + @epsilon = 1 / (@precision_factor * 10) end # the precision factor used in numeric output @@ -51,6 +52,13 @@ @precision_factor ||= 10.0**precision end + # Used in checking equality of floating point numbers. Any + # numbers within an `epsilon` of each other are considered functionally equal. + # The value for epsilon is one tenth of the current numeric precision. + def self.epsilon + @epsilon ||= 1 / (precision_factor * 10) + end + # Used so we don't allocate two new arrays for each new number. NO_UNITS = [] @@ -200,7 +208,7 @@ rescue Sass::UnitConversionError return Bool::FALSE end - Bool.new(this.value == other.value) + Bool.new(basically_equal?(this.value, other.value)) end def hash @@ -211,7 +219,7 @@ # Hash-equality must be transitive, so it just compares the exact value, # numerator units, and denominator units. def eql?(other) - value == other.value && numerator_units == other.numerator_units && + basically_equal?(value, other.value) && numerator_units == other.numerator_units && denominator_units == other.denominator_units end @@ -294,7 +302,7 @@ # @return [Boolean] Whether or not this number is an integer. def int? - value % 1 == 0.0 + basically_equal?(value % 1, 0.0) end # @return [Boolean] Whether or not this number has no units. @@ -376,10 +384,22 @@ private # @private + # @see Sass::Script::Number.basically_equal? + def basically_equal?(num1, num2) + self.class.basically_equal?(num1, num2) + end + + # Checks whether two numbers are within an epsilon of each other. + # @return [Boolean] + def self.basically_equal?(num1, num2) + (num1 - num2).abs < epsilon + end + + # @private def self.round(num) if num.is_a?(Float) && (num.infinite? || num.nan?) num - elsif num % 1 == 0.0 + elsif basically_equal?(num % 1, 0.0) num.to_i else ((num * precision_factor).round / precision_factor).to_f diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/script/value/string.rb new/lib/sass/script/value/string.rb --- old/lib/sass/script/value/string.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/script/value/string.rb 2015-10-10 03:18:30.000000000 +0200 @@ -28,9 +28,18 @@ end end - def self.quote(contents, quote = nil) + # Returns the quoted string representation of `contents`. + # + # @options opts :quote [String] + # The preferred quote style for quoted strings. If `:none`, strings are + # always emitted unquoted. If `nil`, quoting is determined automatically. + # @options opts :sass [String] + # Whether to quote strings for Sass source, as opposed to CSS. Defaults to `false`. + def self.quote(contents, opts = {}) + quote = opts[:quote] + # Short-circuit if there are no characters that need quoting. - unless contents =~ /[\n\\"']/ + unless contents =~ /[\n\\"']|\#\{/ quote ||= '"' return "#{quote}#{contents}#{quote}" end @@ -50,6 +59,9 @@ # Replace single backslashes with multiples. contents = contents.gsub("\\", "\\\\\\\\") + # Escape interpolation. + contents = contents.gsub('#{', "\\\#{") if opts[:sass] + if quote == '"' contents = contents.gsub('"', "\\\"") else @@ -82,12 +94,12 @@ # @see Value#to_s def to_s(opts = {}) return @value.gsub(/\n\s*/, ' ') if opts[:quote] == :none || @type == :identifier - Sass::Script::Value::String.quote(value, opts[:quote]) + String.quote(value, opts) end # @see Value#to_sass def to_sass(opts = {}) - to_s + to_s(opts.merge(:sass => true)) end def inspect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/scss/parser.rb new/lib/sass/scss/parser.rb --- old/lib/sass/scss/parser.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/scss/parser.rb 2015-10-10 03:18:30.000000000 +0200 @@ -156,13 +156,12 @@ else value = Sass::Engine.parse_interp( text, line, @scanner.pos - text.size, :filename => @filename) - string_before_comment = @scanner.string[0...@scanner.pos - text.length] - newline_before_comment = string_before_comment.rindex("\n") + newline_before_comment = @scanner.string.rindex("\n", @scanner.pos - text.length) last_line_before_comment = if newline_before_comment - string_before_comment[newline_before_comment + 1..-1] + @scanner.string[newline_before_comment + 1...@scanner.pos - text.length] else - string_before_comment + @scanner.string[0...@scanner.pos - text.length] end value.unshift(last_line_before_comment.gsub(/[^\s]/, ' ')) end @@ -215,12 +214,12 @@ end def special_directive(name, start_pos) - sym = name.gsub('-', '_').to_sym + sym = name.tr('-', '_').to_sym DIRECTIVES.include?(sym) && send("#{sym}_directive", start_pos) end def prefixed_directive(name, start_pos) - sym = deprefix(name).gsub('-', '_').to_sym + sym = deprefix(name).tr('-', '_').to_sym PREFIXED_DIRECTIVES.include?(sym) && send("#{sym}_directive", name, start_pos) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/selector/sequence.rb new/lib/sass/selector/sequence.rb --- old/lib/sass/selector/sequence.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/selector/sequence.rb 2015-10-10 03:18:30.000000000 +0200 @@ -228,11 +228,11 @@ next if current.empty? current = current.dup last_current = [current.pop] - prefixes = Sass::Util.flatten(prefixes.map do |prefix| + prefixes = prefixes.map do |prefix| sub = subweave(prefix, current) next [] unless sub sub.map {|seqs| seqs + last_current} - end, 1) + end.flatten(1) end prefixes end @@ -551,7 +551,7 @@ def trim(seqses) # Avoid truly horrific quadratic behavior. TODO: I think there # may be a way to get perfect trimming without going quadratic. - return Sass::Util.flatten(seqses, 1) if seqses.size > 100 + return seqses.flatten(1) if seqses.size > 100 # Keep the results in a separate array so we can be sure we aren't # comparing against an already-trimmed selector. This ensures that two @@ -586,7 +586,7 @@ end end end - Sass::Util.flatten(result, 1) + result.flatten(1) end def _hash 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 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/selector/simple_sequence.rb 2015-10-10 03:18:30.000000000 +0200 @@ -332,12 +332,12 @@ end def _hash - [base, Sass::Util.set_hash(rest)].hash + [base, rest.hash].hash end def _eql?(other) other.base.eql?(base) && other.pseudo_elements == pseudo_elements && - Sass::Util.set_eql?(other.rest, rest) && other.subject? == subject? + other.rest.eql?(rest) && other.subject? == subject? end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/util/normalized_map.rb new/lib/sass/util/normalized_map.rb --- old/lib/sass/util/normalized_map.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/util/normalized_map.rb 2015-10-10 03:18:30.000000000 +0200 @@ -1,5 +1,4 @@ require 'delegate' -require 'sass/util' module Sass module Util diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/util/subset_map.rb new/lib/sass/util/subset_map.rb --- old/lib/sass/util/subset_map.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/util/subset_map.rb 2015-10-10 03:18:30.000000000 +0200 @@ -78,8 +78,7 @@ next unless subset.subset?(set) [index, subenum] end - end - res = Sass::Util.flatten(res, 1) + end.flatten(1) res.compact! res.uniq! res.sort! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sass/util.rb new/lib/sass/util.rb --- old/lib/sass/util.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/sass/util.rb 2015-10-10 03:18:30.000000000 +0200 @@ -276,7 +276,7 @@ # # [2, 4, 5]] def paths(arrs) arrs.inject([[]]) do |paths, arr| - flatten(arr.map {|e| paths.map {|path| path + [e]}}, 1) + arr.map {|e| paths.map {|path| path + [e]}}.flatten(1) end end @@ -783,15 +783,6 @@ (RUBY_VERSION_COMPONENTS[0] == 1 && RUBY_VERSION_COMPONENTS[1] < 9) end - # Whether or not this is running under Ruby 1.8.6 or lower. - # Note that lower versions are not officially supported. - # - # @return [Boolean] - def ruby1_8_6? - return @ruby1_8_6 if defined?(@ruby1_8_6) - @ruby1_8_6 = ruby1_8? && RUBY_VERSION_COMPONENTS[2] < 7 - end - # Whether or not this is running under Ruby 1.9.2 exactly. # # @return [Boolean] @@ -841,7 +832,7 @@ end return Hash[pairs_or_hash] unless ruby1_8? - (pairs_or_hash.is_a?(NormalizedMap) ? NormalizedMap : OrderedHash)[*flatten(pairs_or_hash, 1)] + (pairs_or_hash.is_a?(NormalizedMap) ? NormalizedMap : OrderedHash)[*pairs_or_hash.flatten(1)] end unless ruby1_8? @@ -987,17 +978,6 @@ ruby1_8? ? c[0] : c.ord end - # Flattens the first `n` nested arrays in a cross-version manner. - # - # @param arr [Array] The array to flatten - # @param n [Fixnum] The number of levels to flatten - # @return [Array] The flattened array - def flatten(arr, n) - return arr.flatten(n) unless ruby1_8_6? - return arr if n == 0 - arr.inject([]) {|res, e| e.is_a?(Array) ? res.concat(flatten(e, n - 1)) : res << e} - end - # Flattens the first level of nested arrays in `arrs`. Unlike # `Array#flatten`, this orders the result by taking the first # values from each array in order, then the second, and so on. @@ -1016,27 +996,6 @@ result end - # Returns the hash code for a set in a cross-version manner. - # Aggravatingly, this is order-dependent in Ruby 1.8.6. - # - # @param set [Set] - # @return [Fixnum] The order-independent hashcode of `set` - def set_hash(set) - return set.hash unless ruby1_8_6? - set.map {|e| e.hash}.uniq.sort.hash - end - - # Tests the hash-equality of two sets in a cross-version manner. - # Aggravatingly, this is order-dependent in Ruby 1.8.6. - # - # @param set1 [Set] - # @param set2 [Set] - # @return [Boolean] Whether or not the sets are hashcode equal - def set_eql?(set1, set2) - return set1.eql?(set2) unless ruby1_8_6? - set1.to_a.uniq.sort_by {|e| e.hash}.eql?(set2.to_a.uniq.sort_by {|e| e.hash}) - end - # Like `Object#inspect`, but preserves non-ASCII characters rather than # escaping them under Ruby 1.9.2. This is necessary so that the # precompiled Haml template can be `#encode`d into `@options[:encoding]` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 2015-10-10 03:18:30.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: sass version: !ruby/object:Gem::Version - version: 3.4.18 + version: 3.4.19 platform: ruby authors: - Natalie Weizenbaum @@ -10,55 +10,54 @@ autorequire: bindir: bin cert_chain: [] -date: 2015-08-25 00:00:00.000000000 Z +date: 2015-10-10 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: yard requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: 0.5.3 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: 0.5.3 - !ruby/object:Gem::Dependency name: maruku requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: 0.5.9 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: 0.5.9 - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: '5' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: '5' -description: |2 - Sass makes CSS fun again. Sass is an extension of CSS3, adding - nested rules, variables, mixins, selector inheritance, and more. - It's translated to well-formatted, standard CSS using the - command line tool or a web-framework plugin. +description: ! " Sass makes CSS fun again. Sass is an extension of CSS, adding\n + \ nested rules, variables, mixins, selector inheritance, and more.\n It's + translated to well-formatted, standard CSS using the\n command line tool or + a web-framework plugin.\n" email: sass-lang@googlegroups.com executables: - sass @@ -67,31 +66,47 @@ extensions: [] extra_rdoc_files: [] files: -- rails/init.rb +- .yardopts +- CODE_OF_CONDUCT.md +- CONTRIBUTING.md +- MIT-LICENSE +- README.md +- REVISION +- Rakefile +- VERSION +- VERSION_DATE +- VERSION_NAME +- bin/sass +- bin/sass-convert +- bin/scss +- extra/update_watch.rb +- init.rb +- lib/sass.rb +- lib/sass/cache_stores.rb - lib/sass/cache_stores/base.rb - lib/sass/cache_stores/chain.rb - lib/sass/cache_stores/filesystem.rb - lib/sass/cache_stores/memory.rb - lib/sass/cache_stores/null.rb -- lib/sass/cache_stores.rb - lib/sass/callbacks.rb - lib/sass/css.rb - lib/sass/engine.rb - lib/sass/environment.rb - lib/sass/error.rb +- lib/sass/exec.rb - lib/sass/exec/base.rb - lib/sass/exec/sass_convert.rb - lib/sass/exec/sass_scss.rb -- lib/sass/exec.rb - lib/sass/features.rb +- lib/sass/importers.rb - lib/sass/importers/base.rb - lib/sass/importers/deprecated_path.rb - lib/sass/importers/filesystem.rb -- lib/sass/importers.rb +- lib/sass/logger.rb - lib/sass/logger/base.rb - lib/sass/logger/log_level.rb -- lib/sass/logger.rb - lib/sass/media.rb +- lib/sass/plugin.rb - lib/sass/plugin/compiler.rb - lib/sass/plugin/configuration.rb - lib/sass/plugin/generic.rb @@ -99,15 +114,16 @@ - lib/sass/plugin/rack.rb - lib/sass/plugin/rails.rb - lib/sass/plugin/staleness_checker.rb -- lib/sass/plugin.rb - lib/sass/railtie.rb - lib/sass/repl.rb - lib/sass/root.rb +- lib/sass/script.rb - lib/sass/script/css_lexer.rb - lib/sass/script/css_parser.rb - lib/sass/script/functions.rb - lib/sass/script/lexer.rb - lib/sass/script/parser.rb +- lib/sass/script/tree.rb - lib/sass/script/tree/funcall.rb - lib/sass/script/tree/interpolation.rb - lib/sass/script/tree/list_literal.rb @@ -119,7 +135,7 @@ - lib/sass/script/tree/string_interpolation.rb - lib/sass/script/tree/unary_operation.rb - lib/sass/script/tree/variable.rb -- lib/sass/script/tree.rb +- lib/sass/script/value.rb - lib/sass/script/value/arg_list.rb - lib/sass/script/value/base.rb - lib/sass/script/value/bool.rb @@ -130,22 +146,20 @@ - lib/sass/script/value/null.rb - lib/sass/script/value/number.rb - lib/sass/script/value/string.rb -- lib/sass/script/value.rb -- lib/sass/script.rb +- lib/sass/scss.rb - lib/sass/scss/css_parser.rb - lib/sass/scss/parser.rb - lib/sass/scss/rx.rb - lib/sass/scss/script_lexer.rb - lib/sass/scss/script_parser.rb - lib/sass/scss/static_parser.rb -- lib/sass/scss.rb +- lib/sass/selector.rb - lib/sass/selector/abstract_sequence.rb - lib/sass/selector/comma_sequence.rb - lib/sass/selector/pseudo.rb - lib/sass/selector/sequence.rb - lib/sass/selector/simple.rb - lib/sass/selector/simple_sequence.rb -- lib/sass/selector.rb - lib/sass/shared.rb - lib/sass/source/map.rb - lib/sass/source/position.rb @@ -189,54 +203,15 @@ - lib/sass/tree/visitors/to_css.rb - lib/sass/tree/warn_node.rb - lib/sass/tree/while_node.rb +- lib/sass/util.rb - lib/sass/util/cross_platform_random.rb - lib/sass/util/multibyte_string_scanner.rb - lib/sass/util/normalized_map.rb - lib/sass/util/ordered_hash.rb - lib/sass/util/subset_map.rb - lib/sass/util/test.rb -- lib/sass/util.rb - lib/sass/version.rb -- lib/sass.rb -- vendor/listen/CHANGELOG.md -- vendor/listen/CONTRIBUTING.md -- vendor/listen/Gemfile -- vendor/listen/Guardfile -- vendor/listen/lib/listen/adapter.rb -- vendor/listen/lib/listen/adapters/bsd.rb -- vendor/listen/lib/listen/adapters/darwin.rb -- vendor/listen/lib/listen/adapters/linux.rb -- vendor/listen/lib/listen/adapters/polling.rb -- vendor/listen/lib/listen/adapters/windows.rb -- vendor/listen/lib/listen/directory_record.rb -- vendor/listen/lib/listen/listener.rb -- vendor/listen/lib/listen/turnstile.rb -- vendor/listen/lib/listen/version.rb -- vendor/listen/lib/listen.rb -- vendor/listen/LICENSE -- vendor/listen/listen.gemspec -- vendor/listen/Rakefile -- vendor/listen/README.md -- vendor/listen/spec/listen/adapter_spec.rb -- vendor/listen/spec/listen/adapters/bsd_spec.rb -- vendor/listen/spec/listen/adapters/darwin_spec.rb -- vendor/listen/spec/listen/adapters/linux_spec.rb -- vendor/listen/spec/listen/adapters/polling_spec.rb -- vendor/listen/spec/listen/adapters/windows_spec.rb -- vendor/listen/spec/listen/directory_record_spec.rb -- vendor/listen/spec/listen/listener_spec.rb -- vendor/listen/spec/listen/turnstile_spec.rb -- vendor/listen/spec/listen_spec.rb -- vendor/listen/spec/spec_helper.rb -- vendor/listen/spec/support/adapter_helper.rb -- vendor/listen/spec/support/directory_record_helper.rb -- vendor/listen/spec/support/fixtures_helper.rb -- vendor/listen/spec/support/listeners_helper.rb -- vendor/listen/spec/support/platform_helper.rb -- vendor/listen/Vagrantfile -- bin/sass -- bin/sass-convert -- bin/scss +- rails/init.rb - test/sass/cache_test.rb - test/sass/callbacks_test.rb - test/sass/compiler_test.rb @@ -361,18 +336,42 @@ - test/sass/util_test.rb - test/sass/value_helpers_test.rb - test/test_helper.rb -- extra/update_watch.rb -- Rakefile -- init.rb -- .yardopts -- CODE_OF_CONDUCT.md -- CONTRIBUTING.md -- MIT-LICENSE -- README.md -- REVISION -- VERSION -- VERSION_DATE -- VERSION_NAME +- vendor/listen/CHANGELOG.md +- vendor/listen/CONTRIBUTING.md +- vendor/listen/Gemfile +- vendor/listen/Guardfile +- vendor/listen/LICENSE +- vendor/listen/README.md +- vendor/listen/Rakefile +- vendor/listen/Vagrantfile +- vendor/listen/lib/listen.rb +- vendor/listen/lib/listen/adapter.rb +- vendor/listen/lib/listen/adapters/bsd.rb +- vendor/listen/lib/listen/adapters/darwin.rb +- vendor/listen/lib/listen/adapters/linux.rb +- vendor/listen/lib/listen/adapters/polling.rb +- vendor/listen/lib/listen/adapters/windows.rb +- vendor/listen/lib/listen/directory_record.rb +- vendor/listen/lib/listen/listener.rb +- vendor/listen/lib/listen/turnstile.rb +- vendor/listen/lib/listen/version.rb +- vendor/listen/listen.gemspec +- vendor/listen/spec/listen/adapter_spec.rb +- vendor/listen/spec/listen/adapters/bsd_spec.rb +- vendor/listen/spec/listen/adapters/darwin_spec.rb +- vendor/listen/spec/listen/adapters/linux_spec.rb +- vendor/listen/spec/listen/adapters/polling_spec.rb +- vendor/listen/spec/listen/adapters/windows_spec.rb +- vendor/listen/spec/listen/directory_record_spec.rb +- vendor/listen/spec/listen/listener_spec.rb +- vendor/listen/spec/listen/turnstile_spec.rb +- vendor/listen/spec/listen_spec.rb +- vendor/listen/spec/spec_helper.rb +- vendor/listen/spec/support/adapter_helper.rb +- vendor/listen/spec/support/directory_record_helper.rb +- vendor/listen/spec/support/fixtures_helper.rb +- vendor/listen/spec/support/listeners_helper.rb +- vendor/listen/spec/support/platform_helper.rb homepage: http://sass-lang.com/ licenses: - MIT @@ -383,43 +382,43 @@ - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: 1.8.7 required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ! '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: sass -rubygems_version: 2.0.3 +rubygems_version: 2.4.3 signing_key: specification_version: 4 summary: A powerful but elegant CSS compiler that makes CSS fun again. test_files: +- test/sass/importer_test.rb +- test/sass/engine_test.rb +- test/sass/value_helpers_test.rb +- test/sass/superselector_test.rb +- test/sass/logger_test.rb +- test/sass/util_test.rb - test/sass/cache_test.rb -- test/sass/callbacks_test.rb -- test/sass/compiler_test.rb -- test/sass/conversion_test.rb -- test/sass/css2sass_test.rb - test/sass/encoding_test.rb -- test/sass/engine_test.rb +- test/sass/source_map_test.rb +- test/sass/css2sass_test.rb +- test/sass/plugin_test.rb +- test/sass/conversion_test.rb +- test/sass/util/subset_map_test.rb +- test/sass/util/multibyte_string_scanner_test.rb +- test/sass/util/normalized_map_test.rb - test/sass/exec_test.rb -- test/sass/extend_test.rb +- test/sass/scss/rx_test.rb +- test/sass/scss/scss_test.rb +- test/sass/scss/css_test.rb +- test/sass/callbacks_test.rb - test/sass/functions_test.rb -- test/sass/importer_test.rb -- test/sass/logger_test.rb -- test/sass/plugin_test.rb +- test/sass/extend_test.rb - test/sass/script_conversion_test.rb - test/sass/script_test.rb -- test/sass/scss/css_test.rb -- test/sass/scss/rx_test.rb -- test/sass/scss/scss_test.rb -- test/sass/source_map_test.rb -- test/sass/superselector_test.rb -- test/sass/util/multibyte_string_scanner_test.rb -- test/sass/util/normalized_map_test.rb -- test/sass/util/subset_map_test.rb -- test/sass/util_test.rb -- test/sass/value_helpers_test.rb +- test/sass/compiler_test.rb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/engine_test.rb new/test/sass/engine_test.rb --- old/test/sass/engine_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/test/sass/engine_test.rb 2015-10-10 03:18:30.000000000 +0200 @@ -78,7 +78,6 @@ "& a\n :b c" => ["Base-level rules cannot contain the parent-selector-referencing character '&'.", 1], "a\n :b\n c" => "Illegal nesting: Only properties may be nested beneath properties.", "$a: b\n :c d\n" => "Illegal nesting: Nothing may be nested beneath variable declarations.", - "$a: b\n :c d\n" => "Illegal nesting: Nothing may be nested beneath variable declarations.", "@import templates/basic\n foo" => "Illegal nesting: Nothing may be nested beneath import directives.", "foo\n @import foo.css" => "CSS import directives may only be used at the root of a document.", "@if true\n @import foo" => "Import directives may not be used within control directives or mixins.", 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 1970-01-01 01:00:00.000000000 +0100 +++ new/test/sass/script_conversion_test.rb 2015-10-10 03:18:30.000000000 +0200 @@ -334,7 +334,10 @@ assert_renders '"foo #{$bar} #{$bang} baz"' assert_renders '"#{$bar}baz"' assert_renders '"foo#{$bar}"' - assert_equal '#{$bar}', render('"#{$bar}"') + assert_renders '"#{$bar}"' + + assert_renders "'\"\#{\"bar\"}\"'" + assert_renders '"\#{bar}"' assert_equal '"foo#{$bar}baz"', render("'foo\#{$bar}baz'") end 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 1970-01-01 01:00:00.000000000 +0100 +++ new/test/sass/script_test.rb 2015-10-10 03:18:30.000000000 +0200 @@ -44,6 +44,7 @@ assert_equal "☃f", resolve("\"\\2603 f\"") assert_equal "☃x", resolve("\"\\2603x\"") assert_equal "\\2603", resolve("\"\\\\2603\"") + assert_equal "\#{foo}", resolve("\"\\\#{foo}\"") # U+FFFD is the replacement character, "�". assert_equal [0xFFFD].pack("U"), resolve("\"\\0\"") @@ -71,6 +72,7 @@ assert_equal '"☃abcdef"', resolve_quoted('"\2603 abcdef"') assert_equal '"\\\\"', resolve_quoted('"\\\\"') assert_equal '"foobar"', resolve_quoted("\"foo\\\nbar\"") + assert_equal '"#{foo}"', resolve_quoted("\"\\\#{foo}\"") end def test_color_names @@ -1162,6 +1164,13 @@ assert_equal "NaN", resolve("(0.0/0.0)") end + def test_equality_uses_an_epsilon + # At least on my machine, this calculation introduces a floating point error: + # 29.0 / 7 * 7 + # => 29.000000000000004 + assert_equal "true", resolve("29 == (29 / 7 * 7)") + end + private def resolve(str, opts = {}, environment = env) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/source_map_test.rb new/test/sass/source_map_test.rb --- old/test/sass/source_map_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/test/sass/source_map_test.rb 2015-10-10 03:18:30.000000000 +0200 @@ -881,11 +881,12 @@ source_ranges = build_ranges(source, source_file_name) target_ranges = build_ranges(css) map = Sass::Source::Map.new - Sass::Util.flatten(source_ranges.map do |(name, sources)| + source_ranges.map do |(name, sources)| assert(sources.length == 1, "#{sources.length} source ranges encountered for annotation #{name}") assert(target_ranges[name], "No target ranges for annotation #{name}") target_ranges[name].map {|target_range| [sources.first, target_range]} - end, 1). + end. + flatten(1). sort_by {|(_, target)| [target.start_pos.line, target.start_pos.offset]}. each {|(s2, target)| map.add(s2, target)} map diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sass/util_test.rb new/test/sass/util_test.rb --- old/test/sass/util_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/test/sass/util_test.rb 2015-10-10 03:18:30.000000000 +0200 @@ -206,20 +206,6 @@ assert_equal(98, ord("bar")) end - def test_flatten - assert_equal([1, 2, 3], flatten([1, 2, 3], 0)) - assert_equal([1, 2, 3], flatten([1, 2, 3], 1)) - assert_equal([1, 2, 3], flatten([1, 2, 3], 2)) - - assert_equal([[1, 2], 3], flatten([[1, 2], 3], 0)) - assert_equal([1, 2, 3], flatten([[1, 2], 3], 1)) - assert_equal([1, 2, 3], flatten([[1, 2], 3], 2)) - - assert_equal([[[1], 2], [3], 4], flatten([[[1], 2], [3], 4], 0)) - assert_equal([[1], 2, 3, 4], flatten([[[1], 2], [3], 4], 1)) - assert_equal([1, 2, 3, 4], flatten([[[1], 2], [3], 4], 2)) - end - def test_flatten_vertically assert_equal([1, 2, 3], flatten_vertically([1, 2, 3])) assert_equal([1, 3, 5, 2, 4, 6], flatten_vertically([[1, 2], [3, 4], [5, 6]])) @@ -227,36 +213,6 @@ assert_equal([1, 4, 6, 2, 5, 3], flatten_vertically([[1, 2, 3], [4, 5], 6])) end - def test_set_hash - assert(set_hash(Set[1, 2, 3]) == set_hash(Set[3, 2, 1])) - assert(set_hash(Set[1, 2, 3]) == set_hash(Set[1, 2, 3])) - - s1 = Set[] - s1 << 1 - s1 << 2 - s1 << 3 - s2 = Set[] - s2 << 3 - s2 << 2 - s2 << 1 - assert(set_hash(s1) == set_hash(s2)) - end - - def test_set_eql - assert(set_eql?(Set[1, 2, 3], Set[3, 2, 1])) - assert(set_eql?(Set[1, 2, 3], Set[1, 2, 3])) - - s1 = Set[] - s1 << 1 - s1 << 2 - s1 << 3 - s2 = Set[] - s2 << 3 - s2 << 2 - s2 << 1 - assert(set_eql?(s1, s2)) - end - def test_extract_and_inject_values test = lambda {|arr| assert_equal(arr, with_extracted_values(arr) {|str| str})}
participants (1)
-
root@hilbert.suse.de