signet 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/signet/errors.rb +5 -0
- data/lib/signet/oauth_2/client.rb +1 -3
- data/lib/signet/version.rb +2 -2
- data/spec/signet/oauth_2/client_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cca16d5ecdcc2714f91dda26893593bc4864b3108fb705b02df3267e2deb5864
|
4
|
+
data.tar.gz: 06bd27996b7e0bcc297934f89727be25d1027ae623d94a72635c7ce40edf9d10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a51a0441913e042ed13cd8667168cd7a37e5787714a50b361b5b6e37536be723a22132e7782ee5c8605d01bff35d2acb821f8e14d809f8917815d7c7084542
|
7
|
+
data.tar.gz: 13796569d062502f45820b91085a555858d1cce5bd53a4133e230023aca5bfbcbbee3223ea0dbe3393669c91635d0a2142a5d898d2a9800cc5a3e74413fc705e
|
data/CHANGELOG.md
CHANGED
data/lib/signet/errors.rb
CHANGED
@@ -39,6 +39,11 @@ module Signet
|
|
39
39
|
class RemoteServerError < StandardError
|
40
40
|
end
|
41
41
|
|
42
|
+
##
|
43
|
+
# An error indicating that the server sent an unexpected http status
|
44
|
+
class UnexpectedStatusError < StandardError
|
45
|
+
end
|
46
|
+
|
42
47
|
##
|
43
48
|
# An error indicating the remote server refused to authorize the client.
|
44
49
|
class AuthorizationError < StandardError
|
@@ -1006,9 +1006,7 @@ module Signet
|
|
1006
1006
|
if body.to_s.strip.length > 0
|
1007
1007
|
message += " Server message:\n#{response.body.to_s.strip}"
|
1008
1008
|
end
|
1009
|
-
raise ::Signet::
|
1010
|
-
message, :response => response
|
1011
|
-
)
|
1009
|
+
raise ::Signet::UnexpectedStatusError.new(message)
|
1012
1010
|
end
|
1013
1011
|
end
|
1014
1012
|
|
data/lib/signet/version.rb
CHANGED
@@ -589,7 +589,7 @@ describe Signet::OAuth2::Client, 'configured for Google userinfo API' do
|
|
589
589
|
stubs.verify_stubbed_calls
|
590
590
|
end
|
591
591
|
|
592
|
-
it 'should raise an error if the token server gives an unexpected status' do
|
592
|
+
it 'should raise an unexpected error if the token server gives an unexpected status' do
|
593
593
|
@client.client_id = 'client-12345'
|
594
594
|
@client.client_secret = 'secret-12345'
|
595
595
|
stubs = Faraday::Adapter::Test::Stubs.new do |stub|
|
@@ -604,7 +604,7 @@ describe Signet::OAuth2::Client, 'configured for Google userinfo API' do
|
|
604
604
|
@client.fetch_access_token!(
|
605
605
|
:connection => connection
|
606
606
|
)
|
607
|
-
end).to raise_error(Signet::
|
607
|
+
end).to raise_error(Signet::UnexpectedStatusError)
|
608
608
|
stubs.verify_stubbed_calls
|
609
609
|
end
|
610
610
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Aman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-09-
|
12
|
+
date: 2018-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|