gds-api-adapters 7.10.0 → 7.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,7 @@ module GdsApi
7
7
  include GdsApi::TestHelpers::CommonResponses
8
8
 
9
9
  ORGANISATIONS_API_ENDPOINT = Plek.current.find('whitehall-admin')
10
+ PUBLIC_HOST = Plek.current.find('www')
10
11
 
11
12
  # Sets up the index endpoints for the given organisation slugs
12
13
  # The stubs are setup to paginate in chunks of 20
@@ -70,27 +71,27 @@ module GdsApi
70
71
  # otherwise it will be set to 'Executive agency'
71
72
  def organisation_details_for_slug(slug)
72
73
  {
73
- "id" => "https://www.gov.uk/api/organisations/#{slug}",
74
+ "id" => "#{ORGANISATIONS_API_ENDPOINT}/api/organisations/#{slug}",
74
75
  "title" => titleize_slug(slug, :title_case => true),
75
76
  "format" => (slug =~ /ministry/ ? "Ministerial department" : "Executive agency"),
76
77
  "updated_at" => "2013-03-25T13:06:42+00:00",
77
- "web_url" => "https://www.gov.uk/government/organisations/#{slug}",
78
+ "web_url" => "#{PUBLIC_HOST}/government/organisations/#{slug}",
78
79
  "details" => {
79
80
  "slug" => slug,
80
- "acronym" => acronymize_slug(slug),
81
+ "abbreviation" => acronymize_slug(slug),
81
82
  "closed_at" => nil,
82
83
  "govuk_status" => (slug =~ /ministry/ ? "live" : "joining"),
83
84
  },
84
85
  "parent_organisations" => [
85
86
  {
86
- "id" => "https://www.gov.uk/api/organisations/#{slug}-parent-1",
87
- "web_url" => "https://www.gov.uk/government/organisations/#{slug}-parent-1"
87
+ "id" => "#{ORGANISATIONS_API_ENDPOINT}/api/organisations/#{slug}-parent-1",
88
+ "web_url" => "#{PUBLIC_HOST}/government/organisations/#{slug}-parent-1"
88
89
  },
89
90
  ],
90
91
  "child_organisations" => [
91
92
  {
92
- "id" => "https://www.gov.uk/api/organisations/#{slug}-child-1",
93
- "web_url" => "https://www.gov.uk/government/organisations/#{slug}-child-1"
93
+ "id" => "#{ORGANISATIONS_API_ENDPOINT}/api/organisations/#{slug}-child-1",
94
+ "web_url" => "#{PUBLIC_HOST}/government/organisations/#{slug}-child-1"
94
95
  },
95
96
  ],
96
97
  }
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '7.10.0'
2
+ VERSION = '7.11.0'
3
3
  end
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: 7.10.0
4
+ version: 7.11.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: 2013-10-10 00:00:00.000000000 Z
12
+ date: 2013-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: plek
@@ -338,7 +338,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  segments:
340
340
  - 0
341
- hash: 4439822392201911705
341
+ hash: 759002302188755468
342
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  none: false
344
344
  requirements:
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  segments:
349
349
  - 0
350
- hash: 4439822392201911705
350
+ hash: 759002302188755468
351
351
  requirements: []
352
352
  rubyforge_project:
353
353
  rubygems_version: 1.8.23