Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-css_parser for 
openSUSE:Factory checked in at 2022-02-02 22:41:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-css_parser (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-css_parser.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-css_parser"

Wed Feb  2 22:41:15 2022 rev:4 rq:950613 version:1.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-css_parser/rubygem-css_parser.changes    
2021-06-25 15:02:06.536208005 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-css_parser.new.1898/rubygem-css_parser.changes
  2022-02-02 22:42:17.783172880 +0100
@@ -1,0 +2,6 @@
+Tue Jan 25 06:46:51 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.11.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  css_parser-1.9.0.gem

New:
----
  css_parser-1.11.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-css_parser.spec ++++++
--- /var/tmp/diff_new_pack.10rDsn/_old  2022-02-02 22:42:18.239169789 +0100
+++ /var/tmp/diff_new_pack.10rDsn/_new  2022-02-02 22:42:18.247169734 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-css_parser
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # 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-css_parser
-Version:        1.9.0
+Version:        1.11.0
 Release:        0
 %define mod_name css_parser
 %define mod_full_name %{mod_name}-%{version}

++++++ css_parser-1.9.0.gem -> css_parser-1.11.0.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/css_parser/regexps.rb 
new/lib/css_parser/regexps.rb
--- old/lib/css_parser/regexps.rb       2021-02-04 17:08:19.000000000 +0100
+++ new/lib/css_parser/regexps.rb       2021-12-14 06:11:22.000000000 +0100
@@ -58,6 +58,22 @@
   RE_BORDER_STYLE = 
/(\s*^)?(none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset)(\s*$)?/imx.freeze
   RE_BORDER_UNITS = Regexp.union(BOX_MODEL_UNITS_RX, /(thin|medium|thick)/i)
 
+  # Functions like calc, var, clamp, etc.
+  RE_FUNCTIONS = /
+    (
+      [a-z0-9-]+        # function name
+    )
+    (?>
+      \(                # opening parenthesis
+        (?:
+          ([^()]+)
+          |             # recursion via subexpression
+          \g<0>
+        )*
+      \)                # closing parenthesis
+    )
+  /imx.freeze
+
   # Patterns for specificity calculations
   NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX_NC = /
     (?:\.\w+)                     # classes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/css_parser/rule_set.rb 
new/lib/css_parser/rule_set.rb
--- old/lib/css_parser/rule_set.rb      2021-02-04 17:08:19.000000000 +0100
+++ new/lib/css_parser/rule_set.rb      2021-12-14 06:11:22.000000000 +0100
@@ -24,6 +24,8 @@
       ['border-width', %w[border-top-width border-right-width 
border-bottom-width border-left-width]]
     ].freeze
 
+    WHITESPACE_REPLACEMENT = '___SPACE___'
+
     class Declarations
       class Value
         attr_reader :value
@@ -358,7 +360,7 @@
         # TODO: rgba, hsl, hsla
         value.gsub!(RE_COLOUR) { |c| c.gsub(/(\s*,\s*)/, ',') }
 
-        matches = value.strip.split(/\s+/)
+        matches = split_value_preserving_function_whitespace(value)
 
         case matches.length
         when 1
@@ -374,8 +376,7 @@
           raise ArgumentError, "Cannot parse #{value}"
         end
 
-        t, r, b, l = values
-        replacement = {top => t, right => r, bottom => b, left => l}
+        replacement = [top, right, bottom, left].zip(values).to_h
 
         declarations.replace_declaration!(property, replacement, 
preserve_importance: true)
       end
@@ -510,23 +511,22 @@
     #
     # TODO: this is extremely similar to create_background_shorthand! and 
should be combined
     def create_border_shorthand! # :nodoc:
-      values = []
-
-      BORDER_STYLE_PROPERTIES.each do |property|
+      values = BORDER_STYLE_PROPERTIES.map do |property|
         next unless (declaration = declarations[property])
         next if declaration.important
-
         # can't merge if any value contains a space (i.e. has multiple values)
         # we temporarily remove any spaces after commas for the check (inside 
rgba, etc...)
-        return nil if declaration.value.gsub(/,\s/, ',').strip =~ /\s/
+        next if declaration.value.gsub(/,\s/, ',').strip =~ /\s/
 
-        values << declaration.value
+        declaration.value
+      end.compact
 
+      return if values.size != BORDER_STYLE_PROPERTIES.size
+
+      BORDER_STYLE_PROPERTIES.each do |property|
         declarations.delete(property)
       end
 
-      return if values.empty?
-
       declarations['border'] = values.join(' ')
     end
 
@@ -634,6 +634,19 @@
         s
       end
     end
+
+    def split_value_preserving_function_whitespace(value)
+      split_value = value.gsub(RE_FUNCTIONS) do |c|
+        c.gsub!(/\s+/, WHITESPACE_REPLACEMENT)
+        c
+      end
+
+      matches = split_value.strip.split(/\s+/)
+
+      matches.each do |c|
+        c.gsub!(WHITESPACE_REPLACEMENT, ' ')
+      end
+    end
   end
 
   class OffsetAwareRuleSet < RuleSet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/css_parser/version.rb 
new/lib/css_parser/version.rb
--- old/lib/css_parser/version.rb       2021-02-04 17:08:19.000000000 +0100
+++ new/lib/css_parser/version.rb       2021-12-14 06:11:22.000000000 +0100
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 
 module CssParser
-  VERSION = '1.9.0'.freeze
+  VERSION = '1.11.0'.freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-02-04 17:08:19.000000000 +0100
+++ new/metadata        2021-12-14 06:11:22.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: css_parser
 version: !ruby/object:Gem::Version
-  version: 1.9.0
+  version: 1.11.0
 platform: ruby
 authors:
 - Alex Dunae
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2021-02-04 00:00:00.000000000 Z
+date: 2021-12-14 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: addressable
@@ -170,7 +170,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.1.3
+rubygems_version: 3.2.16
 signing_key: 
 specification_version: 4
 summary: Ruby CSS parser.

Reply via email to