ibm_cloud_sdk_core 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ibm_cloud_sdk_core/version.rb +1 -1
- data/test/unit/test_base_service.rb +1 -1
- data/test/unit/test_cp4d_authenticator.rb +2 -2
- data/test/unit/test_detailed_response.rb +5 -1
- data/test/unit/test_iam_authenticator.rb +4 -4
- data/test/unit/test_jwt_token_manager.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebd79c2aee9cffe2274e236d4e229f80aba49f58e8ae7986ea056c84fb98dcef
|
4
|
+
data.tar.gz: eb9d2fca218160f00d38cfa10e4d51c84ab8ca9a1906a70e9b281ae145ead20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45f85a0d16c3c513dbd7ff1af17606600ecad5c33405d3f888f7a95a61db38c8e97853afbb513ff5cf4690788e483a97b9e6b31b8d1aedeed5dc3a1c7c30d087
|
7
|
+
data.tar.gz: d22350e6ea9eb05038efc51a4936c6c8e6ca79beba731979961fa8c65d6a5a98ace4222b69a0767fca4872982f1d9748eaa201e51f7813f0d6beb840812804b4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[](https://travis-ci.com/IBM/ruby-sdk-core)
|
1
|
+
[](https://app.travis-ci.com/IBM/ruby-sdk-core)
|
2
2
|
[](https://codecov.io/gh/IBM/ruby-sdk-core)
|
3
3
|
[](https://rubygems.org/gems/ibm_cloud_sdk_core)
|
4
4
|
|
@@ -113,7 +113,7 @@ class BaseServiceTest < Minitest::Test
|
|
113
113
|
headers: {
|
114
114
|
"Connection" => "close",
|
115
115
|
"Host" => "iam.cloud.ibm.com",
|
116
|
-
"User-Agent" => "http.rb
|
116
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
117
117
|
}
|
118
118
|
)
|
119
119
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -37,7 +37,7 @@ class Cp4dAuthenticatorTest < Minitest::Test
|
|
37
37
|
"Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
|
38
38
|
"Connection" => "close",
|
39
39
|
"Host" => "icp.com",
|
40
|
-
"User-Agent" => "http.rb
|
40
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
41
41
|
}
|
42
42
|
)
|
43
43
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -77,7 +77,7 @@ class Cp4dAuthenticatorTest < Minitest::Test
|
|
77
77
|
"Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
|
78
78
|
"Connection" => "close",
|
79
79
|
"Host" => "icp.com",
|
80
|
-
"User-Agent" => "http.rb
|
80
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
81
81
|
}
|
82
82
|
)
|
83
83
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -8,6 +8,10 @@ WebMock.disable_net_connect!(allow_localhost: true)
|
|
8
8
|
|
9
9
|
# Unit tests for the IAM Token Manager
|
10
10
|
class DetailedResponseTest < Minitest::Test
|
11
|
+
def example_request
|
12
|
+
HTTP::Request.new({ uri: "http://example.com", verb: :get })
|
13
|
+
end
|
14
|
+
|
11
15
|
def test_detailed_response
|
12
16
|
res = IBMCloudSdkCore::DetailedResponse.new(status: 200, headers: {}, body: {}, response: { code: 401 })
|
13
17
|
assert_equal(res.status, 200)
|
@@ -20,7 +24,7 @@ class DetailedResponseTest < Minitest::Test
|
|
20
24
|
end
|
21
25
|
|
22
26
|
def test_detailed_response_when_only_response
|
23
|
-
response = IBMCloudSdkCore::DetailedResponse.new(response: HTTP::Response.new(status: 401, version: 1, body: {}))
|
27
|
+
response = IBMCloudSdkCore::DetailedResponse.new(response: HTTP::Response.new({ request: example_request, status: 401, version: 1, body: {} }))
|
24
28
|
assert_equal(response.status, 401)
|
25
29
|
end
|
26
30
|
end
|
@@ -41,7 +41,7 @@ class IamAuthenticatorTest < Minitest::Test
|
|
41
41
|
headers: {
|
42
42
|
"Connection" => "close",
|
43
43
|
"Host" => "iam.cloud.ibm.com",
|
44
|
-
"User-Agent" => "http.rb
|
44
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
45
45
|
}
|
46
46
|
)
|
47
47
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -83,7 +83,7 @@ class IamAuthenticatorTest < Minitest::Test
|
|
83
83
|
"Connection" => "close",
|
84
84
|
"Authorization" => "Basic Yng6Yng=",
|
85
85
|
"Host" => "iam.cloud.ibm.com",
|
86
|
-
"User-Agent" => "http.rb
|
86
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
87
87
|
}
|
88
88
|
)
|
89
89
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -126,7 +126,7 @@ class IamAuthenticatorTest < Minitest::Test
|
|
126
126
|
headers: {
|
127
127
|
"Connection" => "close",
|
128
128
|
"Host" => "iam.cloud.ibm.com",
|
129
|
-
"User-Agent" => "http.rb
|
129
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
130
130
|
}
|
131
131
|
)
|
132
132
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -173,7 +173,7 @@ class IamAuthenticatorTest < Minitest::Test
|
|
173
173
|
headers: {
|
174
174
|
"Connection" => "close",
|
175
175
|
"Host" => "my.link",
|
176
|
-
"User-Agent" => "http.rb
|
176
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
177
177
|
}
|
178
178
|
)
|
179
179
|
.to_return(status: 200, body: response.to_json, headers: {})
|
@@ -114,7 +114,7 @@ class JWTTokenManagerTest < Minitest::Test
|
|
114
114
|
"Authorization" => "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
|
115
115
|
"Connection" => "close",
|
116
116
|
"Host" => "icp.com",
|
117
|
-
"User-Agent" => "http.rb
|
117
|
+
"User-Agent" => "http.rb/#{HTTP::VERSION}"
|
118
118
|
}
|
119
119
|
)
|
120
120
|
.to_return(status: 200, body: response.to_json, headers: {})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_cloud_sdk_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mamoon Raja
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jwt
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,8 +220,8 @@ dependencies:
|
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '3.4'
|
223
|
-
description:
|
224
|
-
email:
|
223
|
+
description:
|
224
|
+
email:
|
225
225
|
executables: []
|
226
226
|
extensions: []
|
227
227
|
extra_rdoc_files: []
|
@@ -261,7 +261,7 @@ metadata:
|
|
261
261
|
allowed_push_host: https://rubygems.org
|
262
262
|
source_code_uri: https://github.com/IBM/ruby-sdk-core
|
263
263
|
documentation_uri: https://github.com/IBM/ruby-sdk-core
|
264
|
-
post_install_message:
|
264
|
+
post_install_message:
|
265
265
|
rdoc_options: []
|
266
266
|
require_paths:
|
267
267
|
- lib
|
@@ -276,8 +276,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
|
-
rubygems_version: 3.
|
280
|
-
signing_key:
|
279
|
+
rubygems_version: 3.2.33
|
280
|
+
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: Official IBM Cloud SDK core library
|
283
283
|
test_files: []
|