skalera-services 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30a722a2ad3ab8f3a35f1be649daa95562ab50bd
4
- data.tar.gz: 9c71d1e0e63fa739cf74a3e9af1022c1b3cca1b8
3
+ metadata.gz: 7ddfeb7471c5f6f0bd1e7943a9352e4eb1bacc6d
4
+ data.tar.gz: ffdae45ab7c18d85b24e4167b5575a369f3b3a0d
5
5
  SHA512:
6
- metadata.gz: c9f724236ef316e4649dba08c0a41b05b3d400cffe9db2ea11357823d3dd252c1cb8c57923272457ab4bcbe232fb49eb0b427aeb8197f93b3cd5ba7e6adb1b17
7
- data.tar.gz: 3c7664f866fe4a18e0a5282264355edcf883765b5da6b19412920841bc2737db76d0a18504c7569370a36c76d5dceb12829339861cb66d8ed43273bb7dacbcf7
6
+ metadata.gz: 5808cc08ee99a167c0a45b181c504eb5e1e1a8a6d27864b1ba47b42ddf4991c8f5697b18f1764e794488274e75e0dc2027ba969ce55028f6caa3f3d60647e3a9
7
+ data.tar.gz: b0e6cc9eb564630e0ee97e96de109ca25d5d9565f5df9b694bd6b42c2d6eb3031a476d7882856cceb4550c05d17c46d990114aabd3d03e3ead796a72bcc5f6ce
@@ -19,10 +19,13 @@ module Skalera
19
19
  yield host, username, password if block_given?
20
20
  [host, username, password]
21
21
  end.compact # in case there is an error
22
+ rescue Diplomat::KeyNotFound
23
+ STDERR.puts "ERROR: key not found: credentials/#{service_name}"
22
24
  end
23
25
 
24
26
  def self.extract(creds, key, field)
25
27
  result = {}
28
+ # TODO: handle errors when decoding the contents
26
29
  creds.select { |c| c[:key].match(%r{/#{field}$}) }.each do |hash|
27
30
  host = hash[:key].match(%r{#{key}/(.+)/#{field}})[1]
28
31
  result[host] = hash[:value]
@@ -1,5 +1,5 @@
1
1
  module Skalera
2
2
  module Services
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skalera-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Englund
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake