skalera-services 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skalera/services/credentials.rb +3 -0
- data/lib/skalera/services/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ddfeb7471c5f6f0bd1e7943a9352e4eb1bacc6d
|
4
|
+
data.tar.gz: ffdae45ab7c18d85b24e4167b5575a369f3b3a0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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]
|
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.
|
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:
|
11
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake
|