gds-api-adapters 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,28 +7,28 @@ require 'gds_api/asset_manager'
7
7
 
8
8
  module GdsApi
9
9
  module Helpers
10
- def asset_manager_api
11
- @asset_manager_api ||= GdsApi::AssetManager.new(Plek.current.find('asset-manager'))
10
+ def asset_manager_api(options = {})
11
+ @asset_manager_api ||= GdsApi::AssetManager.new(Plek.current.find('asset-manager'), options)
12
12
  end
13
13
 
14
- def content_api
15
- @content_api ||= GdsApi::ContentApi.new(Plek.current.find("contentapi"))
14
+ def content_api(options = {})
15
+ @content_api ||= GdsApi::ContentApi.new(Plek.current.find("contentapi"), options)
16
16
  end
17
17
 
18
- def publisher_api
19
- @api ||= GdsApi::Publisher.new(Plek.current.find("publisher"))
18
+ def publisher_api(options = {})
19
+ @api ||= GdsApi::Publisher.new(Plek.current.find("publisher"), options)
20
20
  end
21
21
 
22
- def imminence_api
23
- @imminence_api ||= GdsApi::Imminence.new(Plek.current.find("imminence"))
22
+ def imminence_api(options = {})
23
+ @imminence_api ||= GdsApi::Imminence.new(Plek.current.find("imminence"), options)
24
24
  end
25
25
 
26
- def licence_application_api
27
- @licence_application_api ||= GdsApi::LicenceApplication.new(Plek.current.find("licensify"))
26
+ def licence_application_api(options = {})
27
+ @licence_application_api ||= GdsApi::LicenceApplication.new(Plek.current.find("licensify"), options)
28
28
  end
29
29
 
30
- def panopticon_api
31
- @panopticon_api ||= GdsApi::Panopticon.new(Plek.current.find("panopticon"), panopticon_api_credentials)
30
+ def panopticon_api(options = {})
31
+ @panopticon_api ||= GdsApi::Panopticon.new(Plek.current.find("panopticon"), panopticon_api_credentials.merge(options))
32
32
  end
33
33
 
34
34
  def panopticon_api_credentials
@@ -2,14 +2,14 @@ module GdsApi
2
2
  module TestHelpers
3
3
  module AssetManager
4
4
 
5
- ASSET_ENDPOINT = Plek.current.find('asset-manager')
5
+ ASSET_MANAGER_ENDPOINT = Plek.current.find('asset-manager')
6
6
 
7
7
  def asset_manager_has_an_asset(id, atts)
8
8
  response = atts.merge({
9
9
  "_response_info" => { "status" => "ok" }
10
10
  })
11
11
 
12
- stub_request(:get, "#{ASSET_ENDPOINT}/assets/#{id}")
12
+ stub_request(:get, "#{ASSET_MANAGER_ENDPOINT}/assets/#{id}")
13
13
  .to_return(:body => response.to_json, :status => 200)
14
14
  end
15
15
 
@@ -18,7 +18,7 @@ module GdsApi
18
18
  "_response_info" => { "status" => "not found" }
19
19
  }
20
20
 
21
- stub_request(:get, "#{ASSET_ENDPOINT}/assets/#{id}")
21
+ stub_request(:get, "#{ASSET_MANAGER_ENDPOINT}/assets/#{id}")
22
22
  .to_return(:body => response.to_json, :status => 404)
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '5.2.0'
2
+ VERSION = '5.3.0'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 5.2.0
5
+ version: 5.3.0
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: 2013-02-26 00:00:00 Z
13
+ date: 2013-02-27 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: plek
@@ -245,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">="
247
247
  - !ruby/object:Gem::Version
248
- hash: -3680831020447425897
248
+ hash: -3192296895891701275
249
249
  segments:
250
250
  - 0
251
251
  version: "0"
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - ">="
256
256
  - !ruby/object:Gem::Version
257
- hash: -3680831020447425897
257
+ hash: -3192296895891701275
258
258
  segments:
259
259
  - 0
260
260
  version: "0"