linecook-gem 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linecook/util/config.rb +2 -4
- data/lib/linecook/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3890b7bac9016028f98b6967d21b9f60518ac84f
|
4
|
+
data.tar.gz: c3e4bfe870cf93ea51aa28cfb44f0a12ed330c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f18cdad769a08a53c6ce845da61cecdab88f57d75ba762175327809a17bf57905bf7f7bb854a448e7d04d839726e005aba5f5a2d05a8a941e56875cea2262878
|
7
|
+
data.tar.gz: 59bf75141b3503ee285ad9cde5532f74cdc2a2b697f49cde355325f87abce4bec39890cbb465a978ddb0307a84db6f7f521d05b76e9661b2950157f189e1cac5
|
data/lib/linecook/util/config.rb
CHANGED
@@ -65,11 +65,9 @@ module Linecook
|
|
65
65
|
def secrets
|
66
66
|
@secrets ||= begin
|
67
67
|
if File.exists?(SECRETS_PATH)
|
68
|
-
ejson_path =
|
68
|
+
ejson_path = File.join(Gem::Specification.find_by_name('ejson').gem_dir, 'build', "#{Linecook::Config.platform}-amd64", 'ejson' )
|
69
69
|
command = "#{ejson_path} decrypt #{SECRETS_PATH}"
|
70
|
-
secrets = JSON.load(
|
71
|
-
# if we can't read the ejson key, try again with sudo
|
72
|
-
secrets = JSON.load(`sudo #{command}`) if secrets.empty?
|
70
|
+
secrets = JSON.load(`sudo #{command}`)
|
73
71
|
secrets.deep_symbolize_keys
|
74
72
|
else
|
75
73
|
{}
|
data/lib/linecook/version.rb
CHANGED