opensecret 0.0.941 → 0.0.946

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -2,8 +2,8 @@
2
2
 
3
3
  module OpenSecret
4
4
 
5
- require "usecase/usecase"
6
- require "session/attributes"
5
+ ##### require "usecase/usecase"
6
+ ##### require "session/attributes"
7
7
 
8
8
  # This is the [On] usecase that is triggered when a user would like
9
9
  # to start a locking (encryption) session.
@@ -25,10 +25,8 @@ module OpenSecret
25
25
  attr_writer :safe_path
26
26
  @@context_name = "opensecret"
27
27
  @@prime_name = "opensecret.safe"
28
-
29
28
 
30
29
  def execute
31
-
32
30
 
33
31
  OpenSession::Attributes.stash @@context_name, "safe", @safe_path
34
32
  FileUtils.mkdir_p @safe_path unless File.exists? @safe_path
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/ruby
2
+ # coding: utf-8
3
+
4
+ module OpenSession
5
+
6
+
7
+ # Require every file with a dot rb extension that is
8
+ # +either directly in or recursively below+ the calling gem's
9
+ # directory.
10
+ #
11
+ # Note that this class and its methods depend on an initialized
12
+ # logger so as a pre-condition, ensure the logging has been
13
+ # instantiated before calling.
14
+ #
15
+ # == The Base Require Path
16
+ #
17
+ # Here is an example of the base require path being derived.
18
+ #
19
+ # @example
20
+ # Let's assume that the
21
+ #
22
+ # - ruby gems version is <tt>2.3.0</tt>, and the
23
+ # - opensecret version is <tt>0.0.944</tt>, and the
24
+ # - calling class is in the <tt>lib</tt> directory
25
+ #
26
+ # +then+ the gem base path would be
27
+ #
28
+ # <tt>/var/lib/gems/2.3.0/gems/opensecret-0.0.944/lib</tt>
29
+ #
30
+ # This means every ruby (.rb) file both +directly in+ and
31
+ # +recursively below+ the <tt>lib</tt> directory will be
32
+ # required.
33
+ #
34
+ #
35
+ # == Requiring Parental Classes Before Child Classes
36
+ #
37
+ # This is a common problem when bringing classes in to join
38
+ # the fray. We must require the +Planet+ class before
39
+ # we require the +Neptune+ class.
40
+ #
41
+ # <tt>class Neptune < Planet</tt>
42
+ #
43
+ # The solution lies in the directory structure between parent
44
+ # and child classes and this is illustrated by +plugins+.
45
+ #
46
+ # ------------------------
47
+ # Plugins Folder Structure
48
+ # ------------------------
49
+ #
50
+ # In the plugins hierarchy, you'll notice that the child classes
51
+ # are always below the parents. This strategy works if the +inheritors+
52
+ # are in the same gem as the +inherited+.
53
+ class RecursivelyRequire
54
+
55
+ # Require every file with a dot rb extension that is
56
+ # +either in or recursively below+ the file path given
57
+ # in the parameter.
58
+ #
59
+ # This method logs every file that is required using
60
+ # the INFO log level.
61
+ #
62
+ # == Requiring Parental Classes Before Child Classes
63
+ #
64
+ # This is a common problem when bringing classes in to join
65
+ # the fray. We must require the +Planet+ class before
66
+ # we require the +Neptune+ class.
67
+ #
68
+ # <tt>class Neptune < Planet</tt>
69
+ #
70
+ # The solution lies in the directory structure between parent
71
+ # and child classes and this is illustrated by +plugins+.
72
+ #
73
+ # ------------------------
74
+ # Plugins Folder Structure
75
+ # ------------------------
76
+ #
77
+ # In the plugins hierarchy, you'll notice that the child classes
78
+ # are always below the parents. This strategy works if the +inheritors+
79
+ # are in the same gem as the +inherited+.
80
+ #
81
+ # This require loop is <tt>breadth first</tt> not <tt>depth first</tt>
82
+ # so all the parent (base) classes in plugins will be required before
83
+ # their extension classes in the lower subdirectories.
84
+ #
85
+ # @param gem_filepath [String] path to callling gem (use <tt>__FILE</tt>)
86
+ def self.now gem_filepath
87
+
88
+ gem_basepath = File.expand_path "..", gem_filepath
89
+
90
+ log.info(x) { "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" }
91
+ log.info(x) { "@@@@ Require Gems In or Under [#{gem_basepath}]" }
92
+ log.info(x) { "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" }
93
+
94
+ Dir["#{gem_basepath}/**/*.rb"].each do |gem_path|
95
+
96
+ log.info(x) { "@@@@ => #{gem_path}" }
97
+ require gem_path
98
+
99
+ end
100
+
101
+ log.info(x) { "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" }
102
+
103
+ end
104
+
105
+ end
106
+
107
+ end
@@ -1,3 +1,3 @@
1
1
  module OpenSecret
2
- VERSION = "0.0.941"
2
+ VERSION = "0.0.946"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opensecret
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.941
4
+ version: 0.0.946
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apollo Akora
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inifile
@@ -100,11 +100,14 @@ files:
100
100
  - README.md
101
101
  - Rakefile
102
102
  - bin/opensecret
103
- - lib/config.opensecret.ini
104
103
  - lib/crypto/amalgam.rb
104
+ - lib/crypto/blowfish.rb
105
105
  - lib/crypto/collect.rb
106
106
  - lib/crypto/engineer.rb
107
+ - lib/crypto/open.bcrypt.rb
107
108
  - lib/crypto/verify.rb
109
+ - lib/exception/cli.error.rb
110
+ - lib/exception/errors/cli.errors.rb
108
111
  - lib/extension/array.rb
109
112
  - lib/extension/dir.rb
110
113
  - lib/extension/file.rb
@@ -112,6 +115,7 @@ files:
112
115
  - lib/extension/string.rb
113
116
  - lib/factbase/facts.opensecret.io.ini
114
117
  - lib/logging/gem.logging.rb
118
+ - lib/notepad/blow.rb
115
119
  - lib/opensecret.rb
116
120
  - lib/opensecret/commons/eco.faculty.rb
117
121
  - lib/opensecret/commons/eco.system.rb
@@ -132,15 +136,19 @@ files:
132
136
  - lib/opensecret/factbase/retired.facts/s3-upload-block-facts.ini
133
137
  - lib/opensecret/plugins.io/file/file.rb
134
138
  - lib/opensecret/plugins.io/git/git.flow.rb
139
+ - lib/plugins/cipher.rb
140
+ - lib/plugins/ciphers/aes-256.rb
141
+ - lib/plugins/ciphers/blowfish.rb
142
+ - lib/plugins/stores/store.rb
143
+ - lib/plugins/usecase.rb
144
+ - lib/plugins/usecases/init.rb
145
+ - lib/plugins/usecases/on.rb
146
+ - lib/plugins/usecases/safe.rb
135
147
  - lib/session/attributes.rb
136
- - lib/session/exceptions.rb
137
148
  - lib/session/fact.finder.rb
149
+ - lib/session/require.gem.rb
138
150
  - lib/session/time.stamp.rb
139
151
  - lib/session/user.home.rb
140
- - lib/usecase/usecase.rb
141
- - lib/usecase/usecases/init.rb
142
- - lib/usecase/usecases/on.rb
143
- - lib/usecase/usecases/safe.rb
144
152
  - lib/version.rb
145
153
  - opensecret.gemspec
146
154
  homepage: https://www.eco-platform.co.uk
@@ -1,14 +0,0 @@
1
-
2
- [joebloggs@opensecret.io]
3
- type=user
4
- id=joe
5
- keydir=/media/usb-key/secrets
6
- fingerprint=23423x123123
7
- public.key.signature=13242345dfg
8
-
9
- [blues.band.bloggs]
10
- type=domain
11
- members = { pete => "peterpan@simple.com", fx => "admin@fortknox.com" }
12
- fingerprints = { pete => "x1234ljsdf", fx => "asdfasd1234" }
13
- store.url=https://www.github.com/joes.hub.account
14
-