configuration_service 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a08e439b4b3ae82204b37d1220da1ad995d05724
4
- data.tar.gz: d6cf937e29cf6f2d521eeecaf1b20a3096ebeafd
3
+ metadata.gz: d95adf4453485b695ef282335dace87967e66e6c
4
+ data.tar.gz: e02eb0b25f7eaaaffac67d74617fdd9145dd1d77
5
5
  SHA512:
6
- metadata.gz: f330c463b9dd838d0f9702e29853df543070cb7b2f737274d2388d11371dc6de9f9d5233681b07118c8e5621f71b88676a2773b0f1ceb8c7c32838b24c9ebc9e
7
- data.tar.gz: a73776f84e1b156bafbd6129b27eb8c10f29c8ec3bdeb39939a0ab71c2b1334f19fcf5493b748d4fd50066a7a8fe4a2ba936ba0d38ed0de2abc8a65f3ceb589e
6
+ metadata.gz: b9d30e1de3bc12bedb49f9885378745a476be1f03d6bfe8ac8932af554dc70cba03fd4153b93f6d3f8f732a9aa58440c646abaebeda7c07aa128dcdeb5ad6735
7
+ data.tar.gz: 25ae4f77493da061cbc13c74239682602c46cab47c43c1e7fb7fdd98cc3b8538b2335bb5871ec5378d3c77237494c59d18015f571f9f2b46c75150155799fa7c
data/Rakefile CHANGED
@@ -15,10 +15,11 @@ end
15
15
  namespace :test do
16
16
  desc "Test includes"
17
17
  task :includes do
18
- sh %{cd lib && for i in configuration_service.rb $(find configuration_service -name '*.rb'); do
19
- i=${i%.rb}
20
- ruby -e '$LOAD_PATH.unshift("."); '"require '$i'; "'exit 0' || break
21
- done}
18
+ Dir.chdir("lib") do
19
+ Dir["**/*.rb"].map { |x| x.chomp(".rb") }.each do |f|
20
+ sh %Q{ruby -e '$LOAD_PATH.unshift("."); require "#{f}"; exit 0'}
21
+ end
22
+ end
22
23
  end
23
24
  end
24
25
 
@@ -106,8 +106,10 @@ module ConfigurationService
106
106
  #
107
107
  def request_configuration(identifier, credentials)
108
108
  configuration = @provider.request_configuration(identifier, credentials)
109
- resolved_configuration_data = resolve_configuration_data(configuration.data, credentials)
110
- ConfigurationService::Configuration.new(configuration.identifier, resolved_configuration_data, configuration.metadata)
109
+ if configuration
110
+ resolved_configuration_data = resolve_configuration_data(configuration.data, credentials)
111
+ ConfigurationService::Configuration.new(configuration.identifier, resolved_configuration_data, configuration.metadata)
112
+ end
111
113
  end
112
114
 
113
115
  ##
@@ -122,9 +124,9 @@ module ConfigurationService
122
124
  #
123
125
  def authorize_consumption(identifier, credentials)
124
126
  configuration = @provider.request_configuration(identifier, credentials)
125
- identifiers = find_configuration_identifiers(configuration.data)
127
+ identifiers = configuration ? find_configuration_identifiers(configuration.data) : []
126
128
  identifiers.unshift(identifier)
127
- @provider.authorize_consumption(identifiers, credentials)
129
+ @provider.authorize_consumption(identifiers, credentials)
128
130
  end
129
131
 
130
132
  private
@@ -1,5 +1,5 @@
1
1
  module ConfigurationService
2
2
 
3
- VERSION = "4.2.0"
3
+ VERSION = "4.2.1"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configuration_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Hearn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler