Hello community, here is the log from the commit of package rubygem-crass for openSUSE:Factory checked in at 2020-02-11 22:16:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-crass (Old) and /work/SRC/openSUSE:Factory/.rubygem-crass.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-crass" Tue Feb 11 22:16:58 2020 rev:5 rq:767693 version:1.0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-crass/rubygem-crass.changes 2019-11-13 13:26:57.779612351 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-crass.new.26092/rubygem-crass.changes 2020-02-11 22:17:18.075301550 +0100 @@ -1,0 +2,8 @@ +Mon Jan 27 12:35:30 UTC 2020 - Manuel Schnitzer <[email protected]> + +- updated to version 1.0.6 + + * Number values are now limited to a maximum of Float::MAX and a minimum of negative Float::MAX. (#11) + * Added project metadata to the gemspec. (#9 - @orien) + +------------------------------------------------------------------- Old: ---- crass-1.0.5.gem New: ---- crass-1.0.6.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-crass.spec ++++++ --- /var/tmp/diff_new_pack.jMBjKv/_old 2020-02-11 22:17:18.751301916 +0100 +++ /var/tmp/diff_new_pack.jMBjKv/_new 2020-02-11 22:17:18.755301919 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-crass # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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-crass -Version: 1.0.5 +Version: 1.0.6 Release: 0 %define mod_name crass %define mod_full_name %{mod_name}-%{version} ++++++ crass-1.0.5.gem -> crass-1.0.6.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HISTORY.md new/HISTORY.md --- old/HISTORY.md 2019-10-16 05:42:04.000000000 +0200 +++ new/HISTORY.md 2020-01-12 23:24:25.000000000 +0100 @@ -1,12 +1,19 @@ Crass Change History ==================== -1.0.5 (2019-10-15) +1.0.6 (2020-01-12) ------------------ -* Removed test files from the gem. [@t-richards - #8][8] +* Number values are now limited to a maximum of `Float::MAX` and a minimum of + negative `Float::MAX`. (#11) + +* Added project metadata to the gemspec. (#9 - @orien) + + +1.0.5 (2019-10-15) +------------------ -[8]:https://github.com/rgrove/crass/pull/8 +* Removed test files from the gem. (#8 - @t-richards) 1.0.4 (2018-04-08) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE --- old/LICENSE 2019-10-16 05:42:04.000000000 +0200 +++ new/LICENSE 2020-01-12 23:24:25.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright (c) 2017 Ryan Grove ([email protected]) +Copyright (c) 2020 Ryan Grove ([email protected]) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2019-10-16 05:42:04.000000000 +0200 +++ new/README.md 2020-01-12 23:24:25.000000000 +0100 @@ -190,25 +190,3 @@ [simon]:http://exyr.org/about/ [spec]:http://www.w3.org/TR/css-syntax-3/ [tab]:http://www.xanthir.com/contact/ - -License -------- - -Copyright (c) 2017 Ryan Grove ([email protected]) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the ‘Software’), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crass.gemspec new/crass.gemspec --- old/crass.gemspec 2019-10-16 05:42:04.000000000 +0200 +++ new/crass.gemspec 2020-01-12 23:24:25.000000000 +0100 @@ -11,6 +11,13 @@ s.homepage = 'https://github.com/rgrove/crass/' s.license = 'MIT' + s.metadata = { + 'bug_tracker_uri' => 'https://github.com/rgrove/crass/issues', + 'changelog_uri' => "https://github.com/rgrove/crass/blob/v#{s.version}/HISTORY.md", + 'documentation_uri' => "https://www.rubydoc.info/gems/crass/#{s.version}", + 'source_code_uri' => "https://github.com/rgrove/crass/tree/v#{s.version}", + } + s.platform = Gem::Platform::RUBY s.required_ruby_version = Gem::Requirement.new('>= 1.9.2') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/crass/tokenizer.rb new/lib/crass/tokenizer.rb --- old/lib/crass/tokenizer.rb 2019-10-16 05:42:04.000000000 +0200 +++ new/lib/crass/tokenizer.rb 2020-01-12 23:24:25.000000000 +0100 @@ -429,27 +429,36 @@ # 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token def consume_numeric number = consume_number + repr = number[0] + value = number[1] + type = number[2] + + if type == :integer + value = value.to_i + else + value = value.to_f + end if start_identifier?(@s.peek(3)) create_token(:dimension, - :repr => number[0], - :type => number[2], - :unit => consume_name, - :value => number[1]) + :repr => repr, + :type => type, + :unit => consume_name, + :value => value) elsif @s.peek == '%' @s.consume create_token(:percentage, - :repr => number[0], - :type => number[2], - :value => number[1]) + :repr => repr, + :type => type, + :value => value) else create_token(:number, - :repr => number[0], - :type => number[2], - :value => number[1]) + :repr => repr, + :type => type, + :value => value) end end @@ -588,9 +597,19 @@ t = matches[:exponent_sign] == '-' ? -1 : 1 e = matches[:exponent].to_i - # I know this looks nutty, but it's exactly what's defined in the spec, - # and it works. - s * (i + f * 10**-d) * 10**(t * e) + # I know this formula looks nutty, but it's exactly what's defined in the + # spec, and it works. + value = s * (i + f * 10**-d) * 10**(t * e) + + # Maximum and minimum values aren't defined in the spec, but are enforced + # here for sanity. + if value > Float::MAX + value = Float::MAX + elsif value < -Float::MAX + value = -Float::MAX + end + + value end # Creates and returns a new token with the given _properties_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/crass/version.rb new/lib/crass/version.rb --- old/lib/crass/version.rb 2019-10-16 05:42:04.000000000 +0200 +++ new/lib/crass/version.rb 2020-01-12 23:24:25.000000000 +0100 @@ -1,5 +1,5 @@ # encoding: utf-8 module Crass - VERSION = '1.0.5' + VERSION = '1.0.6' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-10-16 05:42:04.000000000 +0200 +++ new/metadata 2020-01-12 23:24:25.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: crass version: !ruby/object:Gem::Version - version: 1.0.5 + version: 1.0.6 platform: ruby authors: - Ryan Grove autorequire: bindir: bin cert_chain: [] -date: 2019-10-16 00:00:00.000000000 Z +date: 2020-01-12 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: minitest @@ -63,7 +63,11 @@ homepage: https://github.com/rgrove/crass/ licenses: - MIT -metadata: {} +metadata: + bug_tracker_uri: https://github.com/rgrove/crass/issues + changelog_uri: https://github.com/rgrove/crass/blob/v1.0.6/HISTORY.md + documentation_uri: https://www.rubydoc.info/gems/crass/1.0.6 + source_code_uri: https://github.com/rgrove/crass/tree/v1.0.6 post_install_message: rdoc_options: [] require_paths:
