angus-remote 0.0.6 → 0.0.7

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.
@@ -28,9 +28,10 @@ module Angus
28
28
 
29
29
  @api_base_path = @connection.default_path
30
30
 
31
+ store_namespace = "#{options['code_name']}.#{options['version']}"
31
32
  client_settings = { :public_key => options['public_key'],
32
33
  :private_key => options['private_key'],
33
- :store => Settings.redis }
34
+ :store => Settings.redis.merge({ :namespace => store_namespace }) }
34
35
 
35
36
  @authentication_client = Authentication::Client.new(client_settings)
36
37
  end
@@ -56,5 +56,22 @@ module Angus
56
56
  end
57
57
  end
58
58
 
59
+ class ServiceConfigurationNotFound < Exception
60
+
61
+ def initialize(code_name, version = nil)
62
+ @code_name = code_name
63
+ @version = version
64
+ end
65
+
66
+ def message
67
+ if @version
68
+ "Config for #@code_name v#@version not found."
69
+ else
70
+ "Config for #@code_name not found."
71
+ end
72
+ end
73
+
74
+ end
75
+
59
76
  end
60
77
  end
@@ -234,7 +234,13 @@ module Angus
234
234
 
235
235
  config = service_configuration(code_name)
236
236
 
237
- config["v#{version}"]
237
+ service_settings = config["v#{version}"] or
238
+ raise ServiceConfigurationNotFound.new(code_name, version)
239
+
240
+ service_settings['code_name'] = code_name
241
+ service_settings['version'] = version
242
+
243
+ service_settings
238
244
  end
239
245
  private_class_method :service_settings
240
246
 
@@ -1,7 +1,7 @@
1
1
  module Angus
2
2
  module Remote
3
3
 
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angus-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -20,6 +20,9 @@ dependencies:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: '0.0'
23
+ - - ! '>='
24
+ - !ruby/object:Gem::Version
25
+ version: 0.0.4
23
26
  type: :runtime
24
27
  prerelease: false
25
28
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,6 +31,9 @@ dependencies:
28
31
  - - ~>
29
32
  - !ruby/object:Gem::Version
30
33
  version: '0.0'
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: 0.0.4
31
37
  - !ruby/object:Gem::Dependency
32
38
  name: persistent_http
33
39
  requirement: !ruby/object:Gem::Requirement
@@ -204,7 +210,10 @@ dependencies:
204
210
  - - ~>
205
211
  - !ruby/object:Gem::Version
206
212
  version: '1.9'
207
- description: Provides support code for making requests and building responses
213
+ description: ! ' Provides a client for making requests and building responses to
214
+ remote services.
215
+
216
+ '
208
217
  email:
209
218
  - angus@moove-it.com
210
219
  executables: []
@@ -244,7 +253,7 @@ files:
244
253
  - spec/angus/remote/response/builder_spec.rb
245
254
  - spec/angus/remote/client_spec.rb
246
255
  - spec/angus/remote/builder_spec.rb
247
- homepage: http://mooveit.github.io/angus
256
+ homepage: http://mooveit.github.io/angus-remote
248
257
  licenses:
249
258
  - MIT
250
259
  post_install_message: