Hello community,
here is the log from the commit of package rubygem-mustermann for
openSUSE:Factory checked in at 2018-10-17 08:41:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mustermann (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mustermann.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mustermann"
Wed Oct 17 08:41:27 2018 rev:4 rq:642180 version:1.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mustermann/rubygem-mustermann.changes
2018-02-19 13:04:16.754911858 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-mustermann.new/rubygem-mustermann.changes
2018-10-17 08:42:35.209795437 +0200
@@ -1,0 +2,6 @@
+Wed Sep 5 10:29:58 UTC 2018 - [email protected]
+
+- updated to version 1.0.3
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
mustermann-1.0.2.gem
New:
----
mustermann-1.0.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mustermann.spec ++++++
--- /var/tmp/diff_new_pack.v0WRw0/_old 2018-10-17 08:42:35.845794897 +0200
+++ /var/tmp/diff_new_pack.v0WRw0/_new 2018-10-17 08:42:35.849794893 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-mustermann
-Version: 1.0.2
+Version: 1.0.3
Release: 0
%define mod_name mustermann
%define mod_full_name %{mod_name}-%{version}
++++++ mustermann-1.0.2.gem -> mustermann-1.0.3.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/equality_map.rb
new/lib/mustermann/equality_map.rb
--- old/lib/mustermann/equality_map.rb 2018-02-16 16:20:32.000000000 +0100
+++ new/lib/mustermann/equality_map.rb 2018-08-16 18:41:42.000000000 +0200
@@ -10,7 +10,7 @@
# @map = Mustermann::EqualityMap.new
#
# def self.new(*args)
- # @map.fetch(*args) { super }
+ # @map.fetch(args) { super }
# end
# end
#
@@ -27,12 +27,16 @@
@map = ObjectSpace::WeakMap.new
end
- # @param [Array<#hash>] key for caching
+ # @param [#hash] key for caching
# @yield block that will be called to populate entry if missing (has to be
idempotent)
# @return value stored in map or result of block
- def fetch(*key)
+ def fetch(key)
identity = @keys[key.hash]
- key = identity == key ? identity : key
+ if identity == key
+ key = identity
+ elsif key.frozen?
+ key = key.dup
+ end
# it is ok that this is not thread-safe, worst case it has double cost in
# generating, object equality is not guaranteed anyways
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-02-16 16:20:32.000000000 +0100
+++ new/lib/mustermann/pattern.rb 2018-08-16 18:41:42.000000000 +0200
@@ -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/sinatra/safe_renderer.rb
new/lib/mustermann/sinatra/safe_renderer.rb
--- old/lib/mustermann/sinatra/safe_renderer.rb 2018-02-16 16:20:32.000000000
+0100
+++ new/lib/mustermann/sinatra/safe_renderer.rb 2018-08-16 18:41:42.000000000
+0200
@@ -12,6 +12,7 @@
translate(:group) { "(#{t(payload)})"
}
translate(:union) { "(#{t(payload, join: ?|)})"
}
translate(:optional) { "#{t(payload)}?"
}
+ translate(:with_look_ahead) { t([head, payload])
}
translate(Array) { |join: ""| map { |e| t(e) }.join(join)
}
translate(:capture) do
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-02-16 16:20:32.000000000 +0100
+++ new/lib/mustermann/version.rb 2018-08-16 18:41:42.000000000 +0200
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Mustermann
- VERSION ||= '1.0.2'
+ VERSION ||= '1.0.3'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-02-16 16:20:32.000000000 +0100
+++ new/metadata 2018-08-16 18:41:42.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: mustermann
version: !ruby/object:Gem::Version
- version: 1.0.2
+ version: 1.0.3
platform: ruby
authors:
- Konstantin Haase
@@ -9,7 +9,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2018-02-16 00:00:00.000000000 Z
+date: 2018-08-16 00:00:00.000000000 Z
dependencies: []
description: A library implementing patterns that behave like regular
expressions.
email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/equality_map_spec.rb
new/spec/equality_map_spec.rb
--- old/spec/equality_map_spec.rb 2018-02-16 16:20:32.000000000 +0100
+++ new/spec/equality_map_spec.rb 2018-08-16 18:41:42.000000000 +0200
@@ -22,5 +22,21 @@
result = subject.fetch(String.new('foo')) { "bar" }
expect(result).to be == "bar"
end
+
+ specify 'allows a frozen key and value' do
+ next if subject.is_a? Hash
+ key = "foo".freeze
+ value = "bar".freeze
+ subject.fetch(key) { value }
+ result = subject.fetch("foo".dup) { raise "not executed" }
+ expect(result).to be == value
+ expect(result).not_to equal value
+ end
+
+ specify 'allows only a single argument to be compatible with Hash#fetch' do
+ expect {
+ subject.fetch("foo", "bar", "baz") { "value" }
+ }.to raise_error(ArgumentError)
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/regular_spec.rb new/spec/regular_spec.rb
--- old/spec/regular_spec.rb 2018-02-16 16:20:32.000000000 +0100
+++ new/spec/regular_spec.rb 2018-08-16 18:41:42.000000000 +0200
@@ -51,7 +51,7 @@
(.+) # match the second SHA1
}x
}
- example { expect { Timeout.timeout(1){ Mustermann::Regular.new(pattern)
}}.not_to raise_error(Timeout::Error) }
+ example { expect { Timeout.timeout(1){ Mustermann::Regular.new(pattern)
}}.not_to raise_error }
it { expect(Mustermann::Regular.new(pattern)).to
match('/compare/foo/bar..baz') }
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/sinatra_spec.rb new/spec/sinatra_spec.rb
--- old/spec/sinatra_spec.rb 2018-02-16 16:20:32.000000000 +0100
+++ new/spec/sinatra_spec.rb 2018-08-16 18:41:42.000000000 +0200
@@ -826,4 +826,11 @@
its(:class) { should be == Mustermann::Composite }
end
end
+
+ describe "native concatination" do
+ subject { Mustermann.new(prefix) + Mustermann.new(pattern) }
+ let(:prefix) { "/a" }
+ let(:pattern) { "/:b(.:c)?" }
+ it { should match("/a/b.json") }
+ end
end