sparoid 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sparoid/cli.rb +6 -3
- data/lib/sparoid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c8737279c5f4eae1d6b5c38e14fc6d43ec3978bb445196a2873dbcb24c33146
|
4
|
+
data.tar.gz: 72b1d744ecac0c6afa993b7365f2023ba17d6306ee64d58ae5a27378d082f667
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 671a2b3ad5df6752f29f5de76c6e3f1613088b75406d187154a4be4da514b93e1c0a9ee19b99c430133321029db3f088565d917860f9794ef15558c467ed2532
|
7
|
+
data.tar.gz: 57d624c615d9067eaa2d4fd6f23fe3d5213b953674b00738da08f995b917244fb85fb8e1bddf3ccd0013b292a5101ade4014b9da1b5155a35c2d78732ce5c7b6
|
data/CHANGELOG.md
CHANGED
data/lib/sparoid/cli.rb
CHANGED
@@ -41,14 +41,17 @@ module Sparoid
|
|
41
41
|
private
|
42
42
|
|
43
43
|
def send_auth(host, port, config)
|
44
|
-
key =
|
45
|
-
hmac_key = ENV["SPAROID_HMAC_KEY"]
|
46
|
-
key, hmac_key = get_keys(parse_ini(config)) if config
|
44
|
+
key, hmac_key = get_keys(parse_ini(config))
|
47
45
|
Sparoid.auth(key, hmac_key, host, port.to_i)
|
48
46
|
end
|
49
47
|
|
50
48
|
def parse_ini(path)
|
51
49
|
File.readlines(File.expand_path(path)).map! { |line| line.split("=", 2).map!(&:strip) }.to_h
|
50
|
+
rescue Errno::ENOENT
|
51
|
+
{
|
52
|
+
"key" => ENV["SPAROID_KEY"],
|
53
|
+
"hmac-key" => ENV["SPAROID_HMAC_KEY"]
|
54
|
+
}
|
52
55
|
end
|
53
56
|
|
54
57
|
def get_keys(config)
|
data/lib/sparoid/version.rb
CHANGED