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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cc83fe6e9b8f141eef721eeb62608f57535aaedd
4
- data.tar.gz: b7c90295820373a1b04ce3dc95574614e74ea132
2
+ SHA256:
3
+ metadata.gz: 202262aed7ae6b3cffbba137d118838cf8370d7ef54244215833378a1944c56c
4
+ data.tar.gz: 990e817eab3133c4a42e6bb904874e060a204900319b7d87015e6d0449553c1c
5
5
  SHA512:
6
- metadata.gz: ed02288410213a27a4b6229e576355200176332b29a3598c15d1ea21af14717acfb18d5fdd8f2f6cb9177cfc6719863f68a224f387bed2298ccc74a691b38f0b
7
- data.tar.gz: c4d63d2ee433403d931edac75093975da0a8909f69f4d2c300e503f481bcd00c80140d9765720030009ccc6f079d926dd44eed7ef435d1e9a54f5e6e12149de1
6
+ metadata.gz: 1c2d25554329ceb38a8ed6dde23036100c8e54f9022d5a782f0ef66bee1aa05d207150282a5ea3766f1061f79d2871eb47b954090896452064912ef083ebc68f
7
+ data.tar.gz: c553057dcbb670b980a8ed7e2a784c0445a04314f53d86bd1bd9f8326997a2bf0dda5a1b2f375df3a5bb0b71c3e92a74509b24f5e10318634572241baa706be4
@@ -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.book-#{KeyApi.read_app_id()}-#{KeyNow.yyjjj_hhmm_ss_nanosec()}.json"
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 configuration
6
- # directives inside the safe workstation INI formatted file.
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 eithe be created (or will overwrite) an existing
13
- # directive with the same path.
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 :domain_name
25
-
18
+ attr_writer :directive_name, :directive_value
26
19
 
27
- # The <b>use <em>use case</em></b> is borrowed from the database world and it denotes
28
- # the domain to be used <b>for now (and evermore)</b> for this workstation until another
29
- # use command is issued.
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
@@ -1,3 +1,3 @@
1
1
  module SafeDb
2
- VERSION = "0.3.1010"
2
+ VERSION = "0.3.1011"
3
3
  end
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.1010
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 00:00:00.000000000 Z
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.5.2.1
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.