gds-api-adapters 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gds_api/response.rb +3 -0
- data/lib/gds_api/test_helpers/panopticon.rb +2 -0
- data/lib/gds_api/version.rb +1 -1
- data/test/json_client_test.rb +8 -0
- metadata +4 -4
data/lib/gds_api/response.rb
CHANGED
data/lib/gds_api/version.rb
CHANGED
data/test/json_client_test.rb
CHANGED
@@ -99,6 +99,14 @@ class JsonClientTest < MiniTest::Spec
|
|
99
99
|
assert ! response.respond_to?(:does_not_exist)
|
100
100
|
end
|
101
101
|
|
102
|
+
def test_a_response_is_always_considered_present_and_not_blank
|
103
|
+
url = "http://some.endpoint/some.json"
|
104
|
+
stub_request(:put, url).to_return(:body => '{"a":1}', :status => 200)
|
105
|
+
response = @client.put_json(url, {})
|
106
|
+
assert ! response.blank?
|
107
|
+
assert response.present?
|
108
|
+
end
|
109
|
+
|
102
110
|
def test_client_can_use_basic_auth
|
103
111
|
client = GdsApi::JsonClient.new(basic_auth: {user: 'user', password: 'password'})
|
104
112
|
|
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.33
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Stewart
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-01-
|
13
|
+
date: 2012-01-12 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: plek
|
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
161
|
requirements:
|
162
162
|
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
hash:
|
164
|
+
hash: 2521228861920169578
|
165
165
|
segments:
|
166
166
|
- 0
|
167
167
|
version: "0"
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
hash:
|
173
|
+
hash: 2521228861920169578
|
174
174
|
segments:
|
175
175
|
- 0
|
176
176
|
version: "0"
|