gds-api-adapters 7.0.0 → 7.1.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.
@@ -15,6 +15,10 @@ module GdsApi
15
15
  get_json!(request_path)
16
16
  end
17
17
 
18
+ def organisations
19
+ get_json!("#{base_url}/organisations")
20
+ end
21
+
18
22
  private
19
23
 
20
24
  def search_url(type, query, extra_params={})
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '7.0.0'
2
+ VERSION = '7.1.0'
3
3
  end
@@ -75,6 +75,15 @@ describe GdsApi::Rummager do
75
75
  assert_requested :get, /\?foo=bar&q=search-term&zoo=baz/
76
76
  end
77
77
 
78
+ # tests for #organisations
79
+
80
+ it "should request the list of organisations" do
81
+ stub_request(:get, /example.com\/organisations/).to_return(body: "{}")
82
+ GdsApi::Rummager.new("http://example.com").organisations
83
+
84
+ assert_requested :get, /organisations/
85
+ end
86
+
78
87
  # tests for #advanced_search
79
88
 
80
89
  it "#advanced_search should raise an exception if the service at the search URI returns a 500" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 7.0.0
5
+ version: 7.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Stewart
@@ -254,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - ">="
256
256
  - !ruby/object:Gem::Version
257
- hash: 3315844948382405852
257
+ hash: 1472364090859651365
258
258
  segments:
259
259
  - 0
260
260
  version: "0"
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  requirements:
264
264
  - - ">="
265
265
  - !ruby/object:Gem::Version
266
- hash: 3315844948382405852
266
+ hash: 1472364090859651365
267
267
  segments:
268
268
  - 0
269
269
  version: "0"