Hello community, here is the log from the commit of package rubygem-mustermann for openSUSE:Factory checked in at 2020-03-24 22:34:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-mustermann (Old) and /work/SRC/openSUSE:Factory/.rubygem-mustermann.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mustermann" Tue Mar 24 22:34:42 2020 rev:5 rq:787517 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-mustermann/rubygem-mustermann.changes 2018-10-17 08:42:35.209795437 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-mustermann.new.3160/rubygem-mustermann.changes 2020-03-24 22:34:45.977160091 +0100 @@ -1,0 +2,6 @@ +Mon Feb 10 15:13:38 UTC 2020 - Stephan Kulow <[email protected]> + +- updated to version 1.1.1 + no changelog found + +------------------------------------------------------------------- Old: ---- mustermann-1.0.3.gem New: ---- mustermann-1.1.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-mustermann.spec ++++++ --- /var/tmp/diff_new_pack.FQihAm/_old 2020-03-24 22:34:46.693160439 +0100 +++ /var/tmp/diff_new_pack.FQihAm/_new 2020-03-24 22:34:46.697160441 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-mustermann # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ # Name: rubygem-mustermann -Version: 1.0.3 +Version: 1.1.1 Release: 0 %define mod_name mustermann %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{ruby >= 2.2.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 -Url: https://github.com/sinatra/mustermann +URL: https://github.com/sinatra/mustermann Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Your personal string matching expert ++++++ mustermann-1.0.3.gem -> mustermann-1.1.1.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/mustermann/ast/compiler.rb new/lib/mustermann/ast/compiler.rb --- old/lib/mustermann/ast/compiler.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/ast/compiler.rb 2020-01-03 16:27:30.000000000 +0100 @@ -40,7 +40,7 @@ # @!visibility private def translate(**options) - return pattern(options) if options[:no_captures] + return pattern(**options) if options[:no_captures] "(?<#{name}>#{translate(no_captures: true, **options)})" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/ast/expander.rb new/lib/mustermann/ast/expander.rb --- old/lib/mustermann/ast/expander.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/ast/expander.rb 2020-01-03 16:27:30.000000000 +0100 @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'mustermann/ast/translator' require 'mustermann/ast/compiler' +require 'ruby2_keywords' module Mustermann module AST @@ -92,11 +93,11 @@ # @see Mustermann::Pattern#expand # @!visibility private def expand(values) - values = values.each_with_object({}){ |(key, value), new_hash| + adjusted = values.each_with_object({}){ |(key, value), new_hash| new_hash[value.instance_of?(Array) ? [key] * value.length : key] = value } - keys, pattern, filters = mappings.fetch(values.keys.flatten.sort) { error_for(values) } - filters.each { |key, filter| values[key] &&= escape(values[key], also_escape: filter) } - pattern % (values[keys] || values.values_at(*keys)) + keys, pattern, filters = mappings.fetch(adjusted.keys.flatten.sort) { error_for(values) } + filters.each { |key, filter| adjusted[key] &&= escape(adjusted[key], also_escape: filter) } + pattern % (adjusted[keys] || adjusted.values_at(*keys)) end # @see Mustermann::Pattern#expandable? @@ -122,7 +123,7 @@ # @see Mustermann::AST::Translator#expand # @!visibility private - def escape(string, *args) + ruby2_keywords def escape(string, *args) # URI::Parser is pretty slow, let's not send every string to it, even if it's unnecessary string =~ /\A\w*\Z/ ? string : super end @@ -137,7 +138,7 @@ # @!visibility private def add_to(list, result) list << [[], ""] if list.empty? - list.inject([]) { |l, (k1, p1, f1)| l + result.map { |k2, p2, f2| [k1+k2, p1+p2, **f1, **f2] } } + list.inject([]) { |l, (k1, p1, f1)| l + result.map { |k2, p2, f2| [k1+k2, p1+p2, f1.merge(f2)] } } end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/ast/parser.rb new/lib/mustermann/ast/parser.rb --- old/lib/mustermann/ast/parser.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/ast/parser.rb 2020-01-03 16:27:30.000000000 +0100 @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'mustermann/ast/node' require 'forwardable' +require 'ruby2_keywords' require 'strscan' module Mustermann @@ -64,7 +65,7 @@ # @param [Symbol] type node type # @return [Mustermann::AST::Node] # @!visibility private - def node(type, *args, &block) + ruby2_keywords def node(type, *args, &block) type = Node[type] unless type.respond_to? :new start = pos node = block ? type.parse(*args, &block) : type.new(*args) @@ -153,7 +154,7 @@ def read_brackets(open, close, char: nil, escape: ?\\, quote: false, **options) result = String.new escape = false if escape.nil? - while current = getch + while (current = getch) case current when close then return result when open then result << open << read_brackets(open, close) << close diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/ast/translator.rb new/lib/mustermann/ast/translator.rb --- old/lib/mustermann/ast/translator.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/ast/translator.rb 2020-01-03 16:27:30.000000000 +0100 @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'mustermann/ast/node' require 'mustermann/error' +require 'ruby2_keywords' require 'delegate' module Mustermann @@ -36,7 +37,7 @@ # shorthand for translating a nested object # @!visibility private - def t(*args, &block) + ruby2_keywords def t(*args, &block) return translator unless args.any? translator.translate(*args, &block) end @@ -109,7 +110,7 @@ # Start the translation dance for a (sub)tree. # @!visibility private - def translate(node, *args, &block) + ruby2_keywords def translate(node, *args, &block) result = decorator_for(node).translate(*args, &block) result = result.node while result.is_a? NodeTranslator result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/composite.rb new/lib/mustermann/composite.rb --- old/lib/mustermann/composite.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/composite.rb 2020-01-03 16:27:30.000000000 +0100 @@ -102,9 +102,9 @@ end # @!visibility private - def patterns_from(pattern, options = nil) + def patterns_from(pattern, **options) return pattern.patterns if pattern.is_a? Composite and pattern.operator == self.operator - [options ? Mustermann.new(pattern, **options) : pattern] + [options.empty? && pattern.is_a?(Pattern) ? pattern : Mustermann.new(pattern, **options)] end private :with_matching, :patterns_from diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/concat.rb new/lib/mustermann/concat.rb --- old/lib/mustermann/concat.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/concat.rb 2020-01-03 16:27:30.000000000 +0100 @@ -40,7 +40,7 @@ # Should not be used directly. # @!visibility private - def initialize(*) + def initialize(*, **) super AST::Validation.validate(combined_ast) if respond_to? :expand end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/mapper.rb new/lib/mustermann/mapper.rb --- old/lib/mustermann/mapper.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/mapper.rb 2020-01-03 16:27:30.000000000 +0100 @@ -40,11 +40,7 @@ # # @example map before options # require 'mustermann/mapper' - # Mustermann::Mapper.new("/:foo" => "/:foo.html", type: :rails) - # - # @example map after options - # require 'mustermann/mapper' - # Mustermann::Mapper.new(type: :rails, "/:foo" => "/:foo.html") + # Mustermann::Mapper.new({"/:foo" => "/:foo.html"}, type: :rails) def initialize(map = {}, additional_values: :ignore, **options, &block) @map = [] @options = options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/pattern.rb new/lib/mustermann/pattern.rb --- old/lib/mustermann/pattern.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/pattern.rb 2020-01-03 16:27:30.000000000 +0100 @@ -56,7 +56,7 @@ end @map ||= EqualityMap.new - @map.fetch([string, options]) { super(string, options) { options } } + @map.fetch([string, options]) { super(string, **options) { options } } end supported_options :uri_decode, :ignore_unknown_options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mustermann/version.rb new/lib/mustermann/version.rb --- old/lib/mustermann/version.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/lib/mustermann/version.rb 2020-01-03 16:27:30.000000000 +0100 @@ -1,4 +1,4 @@ # frozen_string_literal: true module Mustermann - VERSION ||= '1.0.3' + VERSION ||= '1.1.1' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-08-16 18:41:42.000000000 +0200 +++ new/metadata 2020-01-03 16:27:29.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: mustermann version: !ruby/object:Gem::Version - version: 1.0.3 + version: 1.1.1 platform: ruby authors: - Konstantin Haase @@ -9,8 +9,22 @@ autorequire: bindir: bin cert_chain: [] -date: 2018-08-16 00:00:00.000000000 Z -dependencies: [] +date: 2020-01-03 00:00:00.000000000 Z +dependencies: +- !ruby/object:Gem::Dependency + name: ruby2_keywords + requirement: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.0.1 + type: :runtime + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.0.1 description: A library implementing patterns that behave like regular expressions. email: [email protected] executables: [] @@ -92,7 +106,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.8 +rubygems_version: 2.7.3 signing_key: specification_version: 4 summary: Your personal string matching expert. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mustermann.gemspec new/mustermann.gemspec --- old/mustermann.gemspec 2018-08-16 18:41:42.000000000 +0200 +++ new/mustermann.gemspec 2020-01-03 16:27:30.000000000 +0100 @@ -14,4 +14,6 @@ s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + + s.add_runtime_dependency('ruby2_keywords', '~> 0.0.1') end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/expander_spec.rb new/spec/expander_spec.rb --- old/spec/expander_spec.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/spec/expander_spec.rb 2020-01-03 16:27:30.000000000 +0100 @@ -64,6 +64,8 @@ example { expander.expand(a: ?a).should be == '/a' } example { expander.expand(a: ?a, b: ?b).should be == '/a' } example { expect { expander.expand(b: ?b) }.to raise_error(Mustermann::ExpandError) } + example { expect { expander.expand(b: ?b, c: []) }.to raise_error(Mustermann::ExpandError) } + example { expect { expander.expand(b: ?b, c: [], d: ?d) }.to raise_error(Mustermann::ExpandError) } end context :append do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/mapper_spec.rb new/spec/mapper_spec.rb --- old/spec/mapper_spec.rb 2018-08-16 18:41:42.000000000 +0200 +++ new/spec/mapper_spec.rb 2020-01-03 16:27:30.000000000 +0100 @@ -19,21 +19,14 @@ end context 'accepts mappings followed by options' do - subject(:mapper) { Mustermann::Mapper.new("/foo" => "/bar", additional_values: :raise) } - its(:to_h) { should be == { Mustermann.new("/foo") => Mustermann::Expander.new("/bar") } } - example { mapper['/foo'].should be == '/bar' } - example { mapper['/fox'].should be == '/fox' } - end - - context 'accepts options followed by mappings' do - subject(:mapper) { Mustermann::Mapper.new(additional_values: :raise, "/foo" => "/bar") } + subject(:mapper) { Mustermann::Mapper.new({ "/foo" => "/bar" }, additional_values: :raise) } its(:to_h) { should be == { Mustermann.new("/foo") => Mustermann::Expander.new("/bar") } } example { mapper['/foo'].should be == '/bar' } example { mapper['/fox'].should be == '/fox' } end context 'allows specifying type' do - subject(:mapper) { Mustermann::Mapper.new(additional_values: :raise, type: :rails, "/foo" => "/bar") } + subject(:mapper) { Mustermann::Mapper.new({ "/foo" => "/bar" }, additional_values: :raise, type: :rails) } its(:to_h) { should be == { Mustermann.new("/foo", type: :rails) => Mustermann::Expander.new("/bar", type: :rails) } } example { mapper['/foo'].should be == '/bar' } example { mapper['/fox'].should be == '/fox' }
