arcanus 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arcanus.rb +1 -6
- data/lib/arcanus/chest.rb +8 -0
- data/lib/arcanus/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: 3084d4e42b743d23e52304af98742faed85f52a5
|
4
|
+
data.tar.gz: d898161ecdb772ddbd97c476528f537a812e1235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63f8ee7cb795a80a52a7398b644b111902a23deedf43f314864c118578abb45cf5e6995902f7a95b0278f345946659063932a96366f3fe224338b07ebee059fe
|
7
|
+
data.tar.gz: 627f3f7b281e70ec7b0328c33be30bca912f16439d420be27d490c6adff85a0b4772928b7d47b366b1d0dcf13e5d1b14977cad3856e4ac16d33ba591aed5c2f5
|
data/lib/arcanus.rb
CHANGED
@@ -38,7 +38,7 @@ module Arcanus
|
|
38
38
|
end
|
39
39
|
|
40
40
|
if File.exist?(@repo.unlocked_key_path)
|
41
|
-
key = Arcanus::Key.from_file(@repo.
|
41
|
+
key = Arcanus::Key.from_file(@repo.unlocked_key_path)
|
42
42
|
elsif ENV['ARCANUS_PASSWORD']
|
43
43
|
key = Arcanus::Key.from_protected_file(@repo.locked_key_path, ENV['ARCANUS_PASSWORD'])
|
44
44
|
ENV.delete('ARCANUS_PASSWORD') # Scrub so child processes don't inherit
|
@@ -50,9 +50,4 @@ module Arcanus
|
|
50
50
|
|
51
51
|
@chest = Chest.new(key: key, chest_file_path: @repo.chest_file_path)
|
52
52
|
end
|
53
|
-
|
54
|
-
def unlock(password)
|
55
|
-
key = Arcanus::Key.from_protected_file(@repo.locked_key_path, password)
|
56
|
-
key.save(key_file_path: @repo.unlocked_key_path)
|
57
|
-
end
|
58
53
|
end
|
data/lib/arcanus/chest.rb
CHANGED
@@ -52,6 +52,10 @@ module Arcanus
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def respond_to?(method_sym, include_private = false)
|
56
|
+
@hash.key?(method_sym.to_s) || super
|
57
|
+
end
|
58
|
+
|
55
59
|
# Set value for the specified key path.
|
56
60
|
#
|
57
61
|
# @param key_path [String]
|
@@ -207,6 +211,10 @@ module Arcanus
|
|
207
211
|
end
|
208
212
|
end
|
209
213
|
|
214
|
+
def respond_to?(method_sym, include_private = false)
|
215
|
+
@hash.key?(method_sym.to_s) || super
|
216
|
+
end
|
217
|
+
|
210
218
|
# Access the item as if it were a hash.
|
211
219
|
#
|
212
220
|
# @param key [String]
|
data/lib/arcanus/version.rb
CHANGED