gds-api-adapters 14.0.0 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,17 +4,21 @@ module GdsApi
4
4
  module TestHelpers
5
5
  module Rummager
6
6
  def rummager_has_services_and_info_data_for_organisation
7
- stub_request_for search_results_found
7
+ stub_request_for(search_results_found)
8
8
  run_example_query
9
9
  end
10
10
 
11
11
  def rummager_has_no_services_and_info_data_for_organisation
12
- stub_request_for no_search_results_found
12
+ stub_request_for(no_search_results_found)
13
13
  run_example_query
14
14
  end
15
15
 
16
- private
16
+ def rummager_has_specialist_sector_organisations(sub_sector)
17
+ stub_request_for(sub_sector_organisations_results)
18
+ run_example_query
19
+ end
17
20
 
21
+ private
18
22
  def stub_request_for(result_set)
19
23
  stub_request(:get, /example.com\/unified_search/).to_return(body: result_set)
20
24
  end
@@ -41,6 +45,15 @@ module GdsApi
41
45
  )
42
46
  end
43
47
 
48
+ def sub_sector_organisations_results
49
+ File.read(
50
+ File.expand_path(
51
+ "../../../../test/fixtures/sub_sector_organisations.json",
52
+ __FILE__
53
+ )
54
+ )
55
+ end
56
+
44
57
  def client
45
58
  GdsApi::Rummager.new("http://example.com")
46
59
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '14.0.0'
2
+ VERSION = '14.1.0'
3
3
  end
@@ -0,0 +1,57 @@
1
+ {
2
+ "suggested_queries": [],
3
+ "facets": {
4
+ "organisations": {
5
+ "missing_options": 0,
6
+ "total_options": 4,
7
+ "documents_with_no_value": 2,
8
+ "options": [
9
+ {
10
+ "documents": 3,
11
+ "value": {
12
+ "organisation_state": "live",
13
+ "organisation_type": "Ministerial department",
14
+ "acronym": "DECC",
15
+ "title": "Department of Energy & Climate Change",
16
+ "link": "/government/organisations/department-of-energy-climate-change",
17
+ "slug": "department-of-energy-climate-change"
18
+ }
19
+ },
20
+ {
21
+ "documents": 2,
22
+ "value": {
23
+ "organisation_state": "joining",
24
+ "acronym": "AAIB",
25
+ "title": "Air Accidents Investigation Branch",
26
+ "link": "/government/organisations/air-accidents-investigation-branch",
27
+ "slug": "air-accidents-investigation-branch"
28
+ }
29
+ },
30
+ {
31
+ "documents": 1,
32
+ "value": {
33
+ "organisation_state": "live",
34
+ "acronym": "DPMO",
35
+ "title": "Deputy Prime Minister's Office",
36
+ "link": "/government/organisations/deputy-prime-ministers-office",
37
+ "slug": "deputy-prime-ministers-office"
38
+ }
39
+ },
40
+ {
41
+ "documents": 1,
42
+ "value": {
43
+ "organisation_state": "live",
44
+ "organisation_type": "Ministerial department",
45
+ "acronym": "FCO",
46
+ "title": "Foreign & Commonwealth Office",
47
+ "link": "/government/organisations/foreign-commonwealth-office",
48
+ "slug": "foreign-commonwealth-office"
49
+ }
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ "start": 0,
55
+ "total": 8,
56
+ "results": []
57
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.0
4
+ version: 14.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-01 00:00:00.000000000 Z
12
+ date: 2014-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: plek
@@ -387,6 +387,7 @@ files:
387
387
  - test/fixtures/world_organisations_australia.json
388
388
  - test/fixtures/no_services_and_info_data_found_fixture.json
389
389
  - test/fixtures/services_and_info_fixture.json
390
+ - test/fixtures/sub_sector_organisations.json
390
391
  - test/fixtures/finder_api/cma-case-schema.json
391
392
  - test/router_test.rb
392
393
  - test/list_response_test.rb
@@ -409,7 +410,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
409
410
  version: '0'
410
411
  segments:
411
412
  - 0
412
- hash: -3050602615371028442
413
+ hash: 3872121278266282577
413
414
  required_rubygems_version: !ruby/object:Gem::Requirement
414
415
  none: false
415
416
  requirements:
@@ -418,7 +419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
418
419
  version: '0'
419
420
  segments:
420
421
  - 0
421
- hash: -3050602615371028442
422
+ hash: 3872121278266282577
422
423
  requirements: []
423
424
  rubyforge_project:
424
425
  rubygems_version: 1.8.23
@@ -455,6 +456,7 @@ test_files:
455
456
  - test/fixtures/world_organisations_australia.json
456
457
  - test/fixtures/no_services_and_info_data_found_fixture.json
457
458
  - test/fixtures/services_and_info_fixture.json
459
+ - test/fixtures/sub_sector_organisations.json
458
460
  - test/fixtures/finder_api/cma-case-schema.json
459
461
  - test/router_test.rb
460
462
  - test/list_response_test.rb