oauth2_api_client 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54c4982a38d552df8c467fcbd0064eba0d1c35e1dd58fffb07a1d8fbe338c8b1
4
- data.tar.gz: 446b18222a7f5bd1259d2482304180ad0a0e73fd811004464a46b265ac946537
3
+ metadata.gz: f658a875027e6f1dcfd8ca75235d581aa5ee577e6cf1cf01e30c5e0c902c987b
4
+ data.tar.gz: e11832285855ef59f5475fad329ebe3e286983a21e8a21ad2dad41853f508ecb
5
5
  SHA512:
6
- metadata.gz: 42adc9e66943d44b12b9c277042dadaa0cc6e17713962cf6feb2ecc623806e1e7ff19e0bc6265191bd33d552175d3490af9855b152ddba5e70e870f27a6ed391
7
- data.tar.gz: 4f6beef17b91cac08e5a2c89d4e5e4cc26a91b90217e82c026e84dec99a99f0211902fdff761dbe801b837c9ae019bc01d959f3883537a7440370fabc2f44d3a
6
+ metadata.gz: 292ee89d31d2eed1da05f7b5aec3abd25bef1048c03be27200810d94ed0d71e60b4300a9a28c21a6568a50e2c6c912f9acb85a6b4f7bc0ac5fbe97ec19a82f9c
7
+ data.tar.gz: 78425acfe627c77d4f4ebba6b78e791a743ae192ae8b39367e3e82e5ea6376d90c11a8272b705a62704b355b32908ee268ec989868be1f66e25c93612224a658
@@ -1,6 +1,10 @@
1
1
 
2
2
  # CHANGELOG
3
3
 
4
+ # v3.1.0
5
+
6
+ * Added uri to `Oauth2ApiClient::ReponseError` exception message
7
+
4
8
  # v3.0.0
5
9
 
6
10
  * [BREAKING] Renamed `Oauth2ApiClient::HttpError` to
@@ -69,7 +69,7 @@ class Oauth2ApiClient
69
69
  end
70
70
 
71
71
  def to_s
72
- "#{self.class.name} (#{response.code}): #{response.body}"
72
+ "#{self.class.name} (#{response.code}, #{response.uri}): #{response.body}"
73
73
  end
74
74
 
75
75
  # @api private
@@ -1,3 +1,3 @@
1
1
  class Oauth2ApiClient
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -3,9 +3,9 @@ require File.expand_path("../spec_helper", __dir__)
3
3
  RSpec.describe Oauth2ApiClient::ResponseError do
4
4
  describe "#to_s" do
5
5
  it "returns the message" do
6
- response = double(code: 401, body: "unauthorized")
6
+ response = double(code: 401, body: "unauthorized", uri: "http://example.com/")
7
7
 
8
- expect(described_class.new(response).to_s).to eq("Oauth2ApiClient::ResponseError (401): unauthorized")
8
+ expect(described_class.new(response).to_s).to eq("Oauth2ApiClient::ResponseError (401, http://example.com/): unauthorized")
9
9
  end
10
10
  end
11
11
 
@@ -123,7 +123,7 @@ RSpec.describe Oauth2ApiClient do
123
123
  )
124
124
  )
125
125
 
126
- expect { client.get("/path") }.to raise_error("Oauth2ApiClient::ResponseError::Unauthorized (401): unauthorized")
126
+ expect { client.get("/path") }.to raise_error("Oauth2ApiClient::ResponseError::Unauthorized (401, http://localhost/api/path): unauthorized")
127
127
  end
128
128
  end
129
129
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Vetter