gds-api-adapters 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gds_api/response.rb +3 -3
- data/lib/gds_api/version.rb +1 -1
- data/test/json_client_test.rb +8 -1
- metadata +3 -3
data/lib/gds_api/response.rb
CHANGED
data/lib/gds_api/version.rb
CHANGED
data/test/json_client_test.rb
CHANGED
@@ -91,7 +91,14 @@ class JsonClientTest < MiniTest::Spec
|
|
91
91
|
assert_equal nil, response.does_not_exist
|
92
92
|
end
|
93
93
|
|
94
|
-
|
94
|
+
def test_response_does_not_claim_to_respond_to_methods_corresponding_to_non_existent_attributes
|
95
|
+
# This mimics the behaviour of OpenStruct
|
96
|
+
url = "http://some.endpoint/some.json"
|
97
|
+
stub_request(:put, url).to_return(:body => '{"a":1}', :status => 200)
|
98
|
+
response = @client.put_json(url, {})
|
99
|
+
assert ! response.respond_to?(:does_not_exist)
|
100
|
+
end
|
101
|
+
|
95
102
|
def test_client_can_use_basic_auth
|
96
103
|
client = GdsApi::JsonClient.new(basic_auth: {user: 'user', password: 'password'})
|
97
104
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.29
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Stewart
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements:
|
161
161
|
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
hash:
|
163
|
+
hash: -2837227603408355889
|
164
164
|
segments:
|
165
165
|
- 0
|
166
166
|
version: "0"
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
requirements:
|
170
170
|
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
hash:
|
172
|
+
hash: -2837227603408355889
|
173
173
|
segments:
|
174
174
|
- 0
|
175
175
|
version: "0"
|