Hello community,
here is the log from the commit of package rubygem-rack-oauth2 for
openSUSE:Factory checked in at 2018-02-14 09:28:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rack-oauth2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-rack-oauth2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rack-oauth2"
Wed Feb 14 09:28:27 2018 rev:2 rq:574087 version:1.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rack-oauth2/rubygem-rack-oauth2.changes
2018-01-10 23:32:00.960897930 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-rack-oauth2.new/rubygem-rack-oauth2.changes
2018-02-14 09:28:39.069939234 +0100
@@ -1,0 +2,6 @@
+Tue Jan 9 07:41:43 UTC 2018 - [email protected]
+
+- updated to version 1.7.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
rack-oauth2-1.6.4.gem
New:
----
rack-oauth2-1.7.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-rack-oauth2.spec ++++++
--- /var/tmp/diff_new_pack.NpZPmX/_old 2018-02-14 09:28:40.213897779 +0100
+++ /var/tmp/diff_new_pack.NpZPmX/_new 2018-02-14 09:28:40.213897779 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-rack-oauth2
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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-rack-oauth2
-Version: 1.6.4
+Version: 1.7.0
Release: 0
%define mod_name rack-oauth2
%define mod_full_name %{mod_name}-%{version}
++++++ rack-oauth2-1.6.4.gem -> rack-oauth2-1.7.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2017-10-19 03:48:38.000000000 +0200
+++ new/.travis.yml 2017-12-26 02:35:40.000000000 +0100
@@ -2,7 +2,5 @@
- gem install bundler
rvm:
- - 2.2.2
- - 2.2.6
- - 2.3.3
- - 2.4.0
\ No newline at end of file
+ - 2.3.5
+ - 2.4.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2017-10-19 03:48:38.000000000 +0200
+++ new/VERSION 2017-12-26 02:35:40.000000000 +0100
@@ -1 +1 @@
-1.6.4
\ No newline at end of file
+1.7.0
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rack/oauth2/client.rb
new/lib/rack/oauth2/client.rb
--- old/lib/rack/oauth2/client.rb 2017-10-19 03:48:38.000000000 +0200
+++ new/lib/rack/oauth2/client.rb 2017-12-26 02:35:40.000000000 +0100
@@ -76,18 +76,16 @@
params[:scope] = Array(options.delete(:scope)).join(' ') if
options[:scope].present?
params.merge! options
- if secret
- if client_auth_method == :basic
- cred = ["#{identifier}:#{secret}"].pack('m').tr("\n", '')
- headers.merge!(
- 'Authorization' => "Basic #{cred}"
- )
- else
- params.merge!(
- client_id: identifier,
- client_secret: secret
- )
- end
+ if client_auth_method == :basic
+ cred = ["#{identifier}:#{secret}"].pack('m').tr("\n", '')
+ headers.merge!(
+ 'Authorization' => "Basic #{cred}"
+ )
+ else
+ params.merge!(
+ client_id: identifier,
+ client_secret: secret
+ )
end
handle_response do
Rack::OAuth2.http_client.post(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rack/oauth2/server/abstract/error.rb
new/lib/rack/oauth2/server/abstract/error.rb
--- old/lib/rack/oauth2/server/abstract/error.rb 2017-10-19
03:48:38.000000000 +0200
+++ new/lib/rack/oauth2/server/abstract/error.rb 2017-12-26
02:35:40.000000000 +0100
@@ -53,13 +53,13 @@
end
class ServerError < Error
- def initialize(error = :forbidden, description = nil, options = {})
+ def initialize(error = :server_error, description = nil, options =
{})
super 500, error, description, options
end
end
class TemporarilyUnavailable < Error
- def initialize(error = :forbidden, description = nil, options = {})
+ def initialize(error = :temporarily_unavailable, description = nil,
options = {})
super 503, error, description, options
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2017-10-19 03:48:38.000000000 +0200
+++ new/metadata 2017-12-26 02:35:40.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: rack-oauth2
version: !ruby/object:Gem::Version
- version: 1.6.4
+ version: 1.7.0
platform: ruby
authors:
- nov matake
autorequire:
bindir: bin
cert_chain: []
-date: 2017-10-19 00:00:00.000000000 Z
+date: 2017-12-26 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/rack/oauth2/server/resource/error_spec.rb
new/spec/rack/oauth2/server/resource/error_spec.rb
--- old/spec/rack/oauth2/server/resource/error_spec.rb 2017-10-19
03:48:38.000000000 +0200
+++ new/spec/rack/oauth2/server/resource/error_spec.rb 2017-12-26
02:35:40.000000000 +0100
@@ -57,6 +57,16 @@
end
end
+ context 'when no error_code is given' do
+ let(:error) { Rack::OAuth2::Server::Resource::Unauthorized.new }
+
+ it 'should have error_code in body but not in WWW-Authenticate header'
do
+ status, header, response = error_with_scheme.finish
+ header['WWW-Authenticate'].should == "Scheme realm=\"#{realm}\""
+ response.body.first.should == '{"error":"unauthorized"}'
+ end
+ end
+
context 'when realm is specified' do
let(:realm) { 'server.example.com' }
let(:error) {
Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new(:something, nil,
realm: realm) }