safedb 0.3.1010 → 0.3.1011
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/usecase/export.rb +1 -1
- data/lib/usecase/set.rb +19 -21
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 202262aed7ae6b3cffbba137d118838cf8370d7ef54244215833378a1944c56c
|
4
|
+
data.tar.gz: 990e817eab3133c4a42e6bb904874e060a204900319b7d87015e6d0449553c1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c2d25554329ceb38a8ed6dde23036100c8e54f9022d5a782f0ef66bee1aa05d207150282a5ea3766f1061f79d2871eb47b954090896452064912ef083ebc68f
|
7
|
+
data.tar.gz: c553057dcbb670b980a8ed7e2a784c0445a04314f53d86bd1bd9f8326997a2bf0dda5a1b2f375df3a5bb0b71c3e92a74509b24f5e10318634572241baa706be4
|
data/lib/usecase/export.rb
CHANGED
@@ -24,7 +24,7 @@ module SafeDb
|
|
24
24
|
puts "--- --------------------------------------------------------------\n"
|
25
25
|
|
26
26
|
chapters = KeyApi.to_matching_dictionary( master_db, ENVELOPE_KEY_PREFIX )
|
27
|
-
export_filename = "safedb
|
27
|
+
export_filename = "safedb.#{KeyApi.read_app_id()}.#{KeyNow.yyjjj_hhmm_ss_nanosec()}.json"
|
28
28
|
export_filepath = File.join( Dir.pwd, export_filename )
|
29
29
|
|
30
30
|
exported_struct = {}
|
data/lib/usecase/set.rb
CHANGED
@@ -2,39 +2,37 @@
|
|
2
2
|
|
3
3
|
module SafeDb
|
4
4
|
|
5
|
-
# The <b>set <em>use case</em></b> is the generic tool for setting
|
6
|
-
# directives
|
5
|
+
# The <b>set <em>use case</em></b> is the generic tool for setting book scoped
|
6
|
+
# configuration directives. These directives can only be read, written, updated
|
7
|
+
# or removed during a logged in session.
|
7
8
|
#
|
8
9
|
# The mirror of this use case is <b><em>unset</em></b>.
|
9
10
|
#
|
10
11
|
# == Observable Value
|
11
12
|
#
|
12
|
-
# The configuration directive will
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# The configuration file is printed to inform the user of the current state.
|
16
|
-
#
|
17
|
-
# == Alternative / Error Flows
|
18
|
-
#
|
19
|
-
# Error - if the directive path is not composed of two (fwd slash separated) parts
|
20
|
-
# Error - if the directive path and/or value contains (or not) unacceptable characters
|
13
|
+
# The configuration directive will either be created or overwriten within the
|
14
|
+
# book's configuration store.
|
21
15
|
#
|
22
16
|
class Set < UseCase
|
23
17
|
|
24
|
-
attr_writer :
|
25
|
-
|
18
|
+
attr_writer :directive_name, :directive_value
|
26
19
|
|
27
|
-
# The <b>
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
# The parameter domain_name must be set after an object instance is acquired but
|
32
|
-
# before the execute method runs.
|
20
|
+
# The <b>set <em>use case</em></b> is the generic tool for setting book scoped
|
21
|
+
# configuration directives. These directives can only be read, written, updated
|
22
|
+
# or removed during a logged in session.
|
33
23
|
def execute
|
34
|
-
end
|
35
24
|
|
25
|
+
return unless ops_key_exists?
|
26
|
+
master_db = KeyApi.read_master_db()
|
27
|
+
|
28
|
+
master_db[ @directive_name ] = @directive_value
|
29
|
+
|
30
|
+
puts ""
|
31
|
+
puts JSON.pretty_generate( master_db )
|
32
|
+
puts ""
|
33
|
+
|
34
|
+
KeyApi.write_master_db( create_header(), master_db )
|
36
35
|
|
37
|
-
def pre_validation
|
38
36
|
end
|
39
37
|
|
40
38
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: safedb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1011
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apollo Akora
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
232
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.
|
233
|
+
rubygems_version: 2.7.6
|
234
234
|
signing_key:
|
235
235
|
specification_version: 4
|
236
236
|
summary: safe locks and unlocks secrets in a simple, secure and intuitive way.
|