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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58a8f2fc1819948f009412e3427236a810cffcb8
4
- data.tar.gz: ef68d35afa71c736d7de16c2f5fd1ad6fb1595af
3
+ metadata.gz: 3084d4e42b743d23e52304af98742faed85f52a5
4
+ data.tar.gz: d898161ecdb772ddbd97c476528f537a812e1235
5
5
  SHA512:
6
- metadata.gz: d96b56f353f3460e997cd52c3430650cf820f37e621e4857568ee83f7a9709f80a2f2a4157a91a7e055ed30f106fb9f1779660f88bd9264fef35a5b1e2f9637c
7
- data.tar.gz: 8e4c3aacf91f044732d408144ab37e75e8f0541b7d8d29fbb872d9bb7bd50c8cd3ac59736897c71e47071f0e7d957a42b57e425d3392c18c15955a8f5171d5fb
6
+ metadata.gz: 63f8ee7cb795a80a52a7398b644b111902a23deedf43f314864c118578abb45cf5e6995902f7a95b0278f345946659063932a96366f3fe224338b07ebee059fe
7
+ data.tar.gz: 627f3f7b281e70ec7b0328c33be30bca912f16439d420be27d490c6adff85a0b4772928b7d47b366b1d0dcf13e5d1b14977cad3856e4ac16d33ba591aed5c2f5
@@ -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.locked_key_path)
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
@@ -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]
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module Arcanus
5
- VERSION = '0.4.0'.freeze
5
+ VERSION = '0.5.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcanus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva