rake_secrets 0.1.0.pre.3 → 0.1.0.pre.5
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.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +13 -11
- data/Gemfile.lock +55 -34
- data/Rakefile +18 -6
- data/lib/rake_secrets/errors/no_such_path_error.rb +8 -0
- data/lib/rake_secrets/errors/remove_error.rb +8 -0
- data/lib/rake_secrets/errors/retrieve_error.rb +8 -0
- data/lib/rake_secrets/errors/store_error.rb +8 -0
- data/lib/rake_secrets/errors/unsupported_operation_error.rb +8 -0
- data/lib/rake_secrets/errors.rb +12 -0
- data/lib/rake_secrets/storage/base.rb +5 -8
- data/lib/rake_secrets/storage/file_system.rb +52 -0
- data/lib/rake_secrets/storage/in_memory.rb +28 -5
- data/lib/rake_secrets/storage.rb +1 -0
- data/lib/rake_secrets/types/alphabetic.rb +1 -1
- data/lib/rake_secrets/types/alphanumeric.rb +1 -1
- data/lib/rake_secrets/types/numeric.rb +1 -1
- data/lib/rake_secrets/version.rb +1 -1
- data/lib/rake_secrets.rb +1 -0
- metadata +9 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45ea335f8f80eaa9fb7448308e58021175d2ade25d84f6fb1c5fdf0a5ad49aa2
|
|
4
|
+
data.tar.gz: bc1082d9ccdaa417f588e8fbf7a953898eb001b40edaabe752fbc19749cdb662
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f51b6a6932d86e78b65c1aa79e8ef97658df75a29c38f1a3779d75f1a524b55db7956f4418e599f1dffb6b4b66803969b1a6978c579e63b7532a12c3ed6f667f
|
|
7
|
+
data.tar.gz: e5521b1a9a4462fa95a9263b64d14c4a33e9f095361e9e6a3c600b09276ea87bbb856506967202c3739f5222615e69d22d36569fe680bb81fe57e2c4a8109d72
|
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
In the interest of fostering an open and welcoming environment, we as
|
|
6
6
|
contributors and maintainers pledge to making participation in our project and
|
|
7
7
|
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
orientation.
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of
|
|
9
|
+
experience, nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
11
|
|
|
12
12
|
## Our Standards
|
|
13
13
|
|
|
@@ -23,7 +23,7 @@ include:
|
|
|
23
23
|
Examples of unacceptable behavior by participants include:
|
|
24
24
|
|
|
25
25
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
26
|
+
advances
|
|
27
27
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
28
|
* Public or private harassment
|
|
29
29
|
* Publishing others' private information, such as a physical or electronic
|
|
@@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
|
|
|
37
37
|
behavior and are expected to take appropriate and fair corrective action in
|
|
38
38
|
response to any instances of unacceptable behavior.
|
|
39
39
|
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or reject
|
|
41
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
42
|
+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
|
43
|
+
contributor for other behaviors that they deem inappropriate, threatening,
|
|
44
|
+
offensive, or harmful.
|
|
45
45
|
|
|
46
46
|
## Scope
|
|
47
47
|
|
|
@@ -58,8 +58,9 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
|
58
58
|
reported by contacting the project team at maintainers@infrablocks.io. All
|
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
|
62
|
-
Further details of specific enforcement policies may be posted
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
|
62
|
+
incident. Further details of specific enforcement policies may be posted
|
|
63
|
+
separately.
|
|
63
64
|
|
|
64
65
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
66
|
faith may face temporary or permanent repercussions as determined by other
|
|
@@ -71,4 +72,5 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
|
71
72
|
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
73
|
|
|
73
74
|
[homepage]: http://contributor-covenant.org
|
|
75
|
+
|
|
74
76
|
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile.lock
CHANGED
|
@@ -1,55 +1,70 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_secrets (0.1.0.pre.
|
|
4
|
+
rake_secrets (0.1.0.pre.5)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
6
|
rake_factory (= 0.32.0.pre.2)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (7.
|
|
11
|
+
activesupport (7.1.1)
|
|
12
|
+
base64
|
|
13
|
+
bigdecimal
|
|
12
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
15
|
+
connection_pool (>= 2.2.5)
|
|
16
|
+
drb
|
|
13
17
|
i18n (>= 1.6, < 2)
|
|
14
18
|
minitest (>= 5.1)
|
|
19
|
+
mutex_m
|
|
15
20
|
tzinfo (~> 2.0)
|
|
16
|
-
addressable (2.8.
|
|
21
|
+
addressable (2.8.5)
|
|
17
22
|
public_suffix (>= 2.0.2, < 6.0)
|
|
18
23
|
ast (2.4.2)
|
|
24
|
+
base64 (0.1.1)
|
|
25
|
+
bigdecimal (3.1.4)
|
|
19
26
|
colored2 (3.1.2)
|
|
20
|
-
concurrent-ruby (1.2.
|
|
27
|
+
concurrent-ruby (1.2.2)
|
|
28
|
+
connection_pool (2.4.1)
|
|
21
29
|
diff-lcs (1.5.0)
|
|
22
30
|
docile (1.4.0)
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
drb (2.1.1)
|
|
32
|
+
ruby2_keywords
|
|
33
|
+
excon (0.104.0)
|
|
34
|
+
faraday (2.7.11)
|
|
35
|
+
base64
|
|
25
36
|
faraday-net_http (>= 2.0, < 3.1)
|
|
26
37
|
ruby2_keywords (>= 0.0.4)
|
|
27
38
|
faraday-net_http (3.0.2)
|
|
28
39
|
gem-release (2.2.2)
|
|
29
|
-
git (1.
|
|
40
|
+
git (1.18.0)
|
|
30
41
|
addressable (~> 2.8)
|
|
31
42
|
rchardet (~> 1.8)
|
|
32
43
|
hamster (3.0.0)
|
|
33
44
|
concurrent-ruby (~> 1.0)
|
|
34
|
-
i18n (1.
|
|
45
|
+
i18n (1.14.1)
|
|
35
46
|
concurrent-ruby (~> 1.0)
|
|
36
47
|
immutable-struct (2.4.1)
|
|
37
48
|
json (2.6.3)
|
|
49
|
+
language_server-protocol (3.17.0.3)
|
|
38
50
|
lino (3.1.0)
|
|
39
51
|
hamster (~> 3.0)
|
|
40
52
|
open4 (~> 1.3)
|
|
41
53
|
memfs (1.0.0)
|
|
42
|
-
minitest (5.
|
|
43
|
-
|
|
54
|
+
minitest (5.20.0)
|
|
55
|
+
mutex_m (0.1.2)
|
|
56
|
+
octokit (6.1.1)
|
|
44
57
|
faraday (>= 1, < 3)
|
|
45
58
|
sawyer (~> 0.9)
|
|
46
59
|
open4 (1.3.4)
|
|
47
|
-
parallel (1.
|
|
48
|
-
parser (3.2.
|
|
60
|
+
parallel (1.23.0)
|
|
61
|
+
parser (3.2.2.4)
|
|
49
62
|
ast (~> 2.4.1)
|
|
50
|
-
|
|
63
|
+
racc
|
|
64
|
+
public_suffix (5.0.3)
|
|
65
|
+
racc (1.7.1)
|
|
51
66
|
rainbow (3.1.1)
|
|
52
|
-
rake (13.0
|
|
67
|
+
rake (13.1.0)
|
|
53
68
|
rake_circle_ci (0.11.0)
|
|
54
69
|
colored2 (~> 3.1)
|
|
55
70
|
excon (~> 0.72)
|
|
@@ -58,11 +73,11 @@ GEM
|
|
|
58
73
|
rake_factory (0.32.0.pre.2)
|
|
59
74
|
activesupport (>= 4)
|
|
60
75
|
rake (~> 13.0)
|
|
61
|
-
rake_git (0.1.0.pre.
|
|
76
|
+
rake_git (0.1.0.pre.8)
|
|
62
77
|
colored2 (~> 3.1)
|
|
63
78
|
git (~> 1.13, >= 1.13.2)
|
|
64
79
|
rake_factory (= 0.32.0.pre.2)
|
|
65
|
-
rake_git_crypt (0.1.0.pre.
|
|
80
|
+
rake_git_crypt (0.1.0.pre.27)
|
|
66
81
|
colored2 (~> 3.1)
|
|
67
82
|
rake_factory (= 0.32.0.pre.2)
|
|
68
83
|
ruby_git_crypt (= 0.1.0.pre.2)
|
|
@@ -75,46 +90,50 @@ GEM
|
|
|
75
90
|
rake_gpg (0.18.0)
|
|
76
91
|
rake_factory (~> 0.23)
|
|
77
92
|
ruby_gpg2 (~> 0.6)
|
|
78
|
-
rake_ssh (0.
|
|
93
|
+
rake_ssh (0.10.0)
|
|
79
94
|
colored2 (~> 3.1)
|
|
80
95
|
rake_factory (~> 0.23)
|
|
81
96
|
sshkey (~> 2.0)
|
|
82
97
|
rchardet (1.8.0)
|
|
83
|
-
regexp_parser (2.
|
|
84
|
-
rexml (3.2.
|
|
98
|
+
regexp_parser (2.8.2)
|
|
99
|
+
rexml (3.2.6)
|
|
85
100
|
rspec (3.12.0)
|
|
86
101
|
rspec-core (~> 3.12.0)
|
|
87
102
|
rspec-expectations (~> 3.12.0)
|
|
88
103
|
rspec-mocks (~> 3.12.0)
|
|
89
|
-
rspec-core (3.12.
|
|
104
|
+
rspec-core (3.12.2)
|
|
90
105
|
rspec-support (~> 3.12.0)
|
|
91
|
-
rspec-expectations (3.12.
|
|
106
|
+
rspec-expectations (3.12.3)
|
|
92
107
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
93
108
|
rspec-support (~> 3.12.0)
|
|
94
|
-
rspec-mocks (3.12.
|
|
109
|
+
rspec-mocks (3.12.6)
|
|
95
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
96
111
|
rspec-support (~> 3.12.0)
|
|
97
|
-
rspec-support (3.12.
|
|
98
|
-
rubocop (1.
|
|
112
|
+
rspec-support (3.12.1)
|
|
113
|
+
rubocop (1.57.2)
|
|
99
114
|
json (~> 2.3)
|
|
115
|
+
language_server-protocol (>= 3.17.0)
|
|
100
116
|
parallel (~> 1.10)
|
|
101
|
-
parser (>= 3.2.
|
|
117
|
+
parser (>= 3.2.2.4)
|
|
102
118
|
rainbow (>= 2.2.2, < 4.0)
|
|
103
119
|
regexp_parser (>= 1.8, < 3.0)
|
|
104
120
|
rexml (>= 3.2.5, < 4.0)
|
|
105
|
-
rubocop-ast (>= 1.
|
|
121
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
106
122
|
ruby-progressbar (~> 1.7)
|
|
107
123
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
108
|
-
rubocop-ast (1.
|
|
109
|
-
parser (>= 3.
|
|
110
|
-
rubocop-capybara (2.
|
|
124
|
+
rubocop-ast (1.30.0)
|
|
125
|
+
parser (>= 3.2.1.0)
|
|
126
|
+
rubocop-capybara (2.19.0)
|
|
111
127
|
rubocop (~> 1.41)
|
|
128
|
+
rubocop-factory_bot (2.24.0)
|
|
129
|
+
rubocop (~> 1.33)
|
|
112
130
|
rubocop-rake (0.6.0)
|
|
113
131
|
rubocop (~> 1.0)
|
|
114
|
-
rubocop-rspec (2.
|
|
115
|
-
rubocop (~> 1.
|
|
132
|
+
rubocop-rspec (2.25.0)
|
|
133
|
+
rubocop (~> 1.40)
|
|
116
134
|
rubocop-capybara (~> 2.17)
|
|
117
|
-
|
|
135
|
+
rubocop-factory_bot (~> 2.22)
|
|
136
|
+
ruby-progressbar (1.13.0)
|
|
118
137
|
ruby2_keywords (0.0.5)
|
|
119
138
|
ruby_git_crypt (0.1.0.pre.2)
|
|
120
139
|
immutable-struct (~> 2.4)
|
|
@@ -133,10 +152,12 @@ GEM
|
|
|
133
152
|
sshkey (2.0.0)
|
|
134
153
|
tzinfo (2.0.6)
|
|
135
154
|
concurrent-ruby (~> 1.0)
|
|
136
|
-
unicode-display_width (2.
|
|
155
|
+
unicode-display_width (2.5.0)
|
|
137
156
|
|
|
138
157
|
PLATFORMS
|
|
139
158
|
arm64-darwin-21
|
|
159
|
+
arm64-darwin-22
|
|
160
|
+
ruby
|
|
140
161
|
x86_64-darwin-19
|
|
141
162
|
x86_64-darwin-21
|
|
142
163
|
x86_64-linux
|
|
@@ -161,4 +182,4 @@ DEPENDENCIES
|
|
|
161
182
|
simplecov
|
|
162
183
|
|
|
163
184
|
BUNDLED WITH
|
|
164
|
-
2.4.
|
|
185
|
+
2.4.17
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'yaml'
|
|
4
3
|
require 'rake_circle_ci'
|
|
5
4
|
require 'rake_git'
|
|
6
5
|
require 'rake_git_crypt'
|
|
7
6
|
require 'rake_github'
|
|
8
|
-
require 'rake_ssh'
|
|
9
7
|
require 'rake_gpg'
|
|
10
|
-
require '
|
|
8
|
+
require 'rake_ssh'
|
|
11
9
|
require 'rspec/core/rake_task'
|
|
12
10
|
require 'rubocop/rake_task'
|
|
11
|
+
require 'securerandom'
|
|
12
|
+
require 'yaml'
|
|
13
13
|
|
|
14
14
|
task default: %i[
|
|
15
15
|
library:fix
|
|
@@ -48,10 +48,12 @@ namespace :encryption do
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
namespace :passphrase do
|
|
51
|
-
desc 'Generate encryption passphrase
|
|
51
|
+
desc 'Generate encryption passphrase for CI GPG key'
|
|
52
52
|
task generate: ['directory:ensure'] do
|
|
53
|
-
File.write(
|
|
54
|
-
|
|
53
|
+
File.write(
|
|
54
|
+
'config/secrets/ci/encryption.passphrase',
|
|
55
|
+
SecureRandom.base64(36)
|
|
56
|
+
)
|
|
55
57
|
end
|
|
56
58
|
end
|
|
57
59
|
end
|
|
@@ -76,6 +78,16 @@ namespace :keys do
|
|
|
76
78
|
end
|
|
77
79
|
|
|
78
80
|
namespace :secrets do
|
|
81
|
+
namespace :directory do
|
|
82
|
+
desc 'Ensure secrets directory exists and is set up correctly'
|
|
83
|
+
task :ensure do
|
|
84
|
+
FileUtils.mkdir_p('config/secrets')
|
|
85
|
+
unless File.exist?('config/secrets/.unlocked')
|
|
86
|
+
File.write('config/secrets/.unlocked', 'true')
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
79
91
|
desc 'Generate all generatable secrets.'
|
|
80
92
|
task generate: %w[
|
|
81
93
|
encryption:passphrase:generate
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'errors/unsupported_operation_error'
|
|
4
|
+
require_relative 'errors/no_such_path_error'
|
|
5
|
+
require_relative 'errors/store_error'
|
|
6
|
+
require_relative 'errors/remove_error'
|
|
7
|
+
require_relative 'errors/retrieve_error'
|
|
8
|
+
|
|
9
|
+
module RakeSecrets
|
|
10
|
+
module Errors
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require_relative '../errors'
|
|
4
4
|
|
|
5
5
|
module RakeSecrets
|
|
6
6
|
module Storage
|
|
7
|
-
class UnsupportedOperationError < StandardError
|
|
8
|
-
end
|
|
9
|
-
|
|
10
7
|
class Base
|
|
11
8
|
def store(_path, _content)
|
|
12
|
-
raise(UnsupportedOperationError, '#store not supported.')
|
|
9
|
+
raise(Errors::UnsupportedOperationError, '#store not supported.')
|
|
13
10
|
end
|
|
14
11
|
|
|
15
12
|
def remove(_path)
|
|
16
|
-
raise(UnsupportedOperationError, '#remove not supported.')
|
|
13
|
+
raise(Errors::UnsupportedOperationError, '#remove not supported.')
|
|
17
14
|
end
|
|
18
15
|
|
|
19
|
-
def
|
|
20
|
-
raise(UnsupportedOperationError, '#
|
|
16
|
+
def retrieve(_path)
|
|
17
|
+
raise(Errors::UnsupportedOperationError, '#retrieve not supported.')
|
|
21
18
|
end
|
|
22
19
|
end
|
|
23
20
|
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
|
|
5
|
+
require_relative 'base'
|
|
6
|
+
require_relative '../errors'
|
|
7
|
+
|
|
8
|
+
module RakeSecrets
|
|
9
|
+
module Storage
|
|
10
|
+
class FileSystem < Base
|
|
11
|
+
def store(path, content)
|
|
12
|
+
FileUtils.mkdir_p(File.dirname(path))
|
|
13
|
+
File.write(path, content)
|
|
14
|
+
rescue SystemCallError, IOError
|
|
15
|
+
raise(
|
|
16
|
+
RakeSecrets::Errors::StoreError,
|
|
17
|
+
"Failed to store at path: '#{path}'."
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def remove(path)
|
|
22
|
+
ensure_path_exists(path)
|
|
23
|
+
|
|
24
|
+
File.delete(path)
|
|
25
|
+
rescue SystemCallError
|
|
26
|
+
raise(
|
|
27
|
+
RakeSecrets::Errors::RemoveError,
|
|
28
|
+
"Failed to remove from path: '#{path}'."
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def retrieve(path)
|
|
33
|
+
ensure_path_exists(path)
|
|
34
|
+
|
|
35
|
+
File.read(path)
|
|
36
|
+
rescue SystemCallError
|
|
37
|
+
raise(
|
|
38
|
+
RakeSecrets::Errors::RetrieveError,
|
|
39
|
+
"Failed to retrieve from path: '#{path}'."
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
def ensure_path_exists(path)
|
|
46
|
+
return if File.exist?(path)
|
|
47
|
+
|
|
48
|
+
raise(Errors::NoSuchPathError, "Path '#{path}' not in storage.")
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative '
|
|
3
|
+
require_relative 'base'
|
|
4
|
+
require_relative '../errors'
|
|
4
5
|
|
|
5
6
|
module RakeSecrets
|
|
6
7
|
module Storage
|
|
7
8
|
class InMemory < Base
|
|
8
|
-
def initialize(
|
|
9
|
+
def initialize(opts = {})
|
|
9
10
|
super()
|
|
10
|
-
@persistence =
|
|
11
|
+
@persistence = opts[:contents] || {}
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def store(path, content)
|
|
@@ -15,12 +16,34 @@ module RakeSecrets
|
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
def remove(path)
|
|
18
|
-
|
|
19
|
+
paths = matching_paths(path)
|
|
20
|
+
|
|
21
|
+
if paths.empty?
|
|
22
|
+
raise(Errors::NoSuchPathError, "Path '#{path}' not in storage.")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
paths.each do |p|
|
|
26
|
+
@persistence.delete(p)
|
|
27
|
+
end
|
|
19
28
|
end
|
|
20
29
|
|
|
21
|
-
def
|
|
30
|
+
def retrieve(path)
|
|
31
|
+
unless contains_exact_path?(path)
|
|
32
|
+
raise(Errors::NoSuchPathError, "Path '#{path}' not in storage.")
|
|
33
|
+
end
|
|
34
|
+
|
|
22
35
|
@persistence[path]
|
|
23
36
|
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def contains_exact_path?(path)
|
|
41
|
+
@persistence.include?(path)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def matching_paths(path)
|
|
45
|
+
@persistence.select { |k| k == path or k.start_with?(path) }.keys
|
|
46
|
+
end
|
|
24
47
|
end
|
|
25
48
|
end
|
|
26
49
|
end
|
data/lib/rake_secrets/storage.rb
CHANGED
data/lib/rake_secrets/version.rb
CHANGED
data/lib/rake_secrets.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_secrets
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.0.pre.
|
|
4
|
+
version: 0.1.0.pre.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InfraBlocks Maintainers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored2
|
|
@@ -54,9 +54,16 @@ files:
|
|
|
54
54
|
- bin/console
|
|
55
55
|
- bin/setup
|
|
56
56
|
- lib/rake_secrets.rb
|
|
57
|
+
- lib/rake_secrets/errors.rb
|
|
58
|
+
- lib/rake_secrets/errors/no_such_path_error.rb
|
|
59
|
+
- lib/rake_secrets/errors/remove_error.rb
|
|
60
|
+
- lib/rake_secrets/errors/retrieve_error.rb
|
|
61
|
+
- lib/rake_secrets/errors/store_error.rb
|
|
62
|
+
- lib/rake_secrets/errors/unsupported_operation_error.rb
|
|
57
63
|
- lib/rake_secrets/mixins/support.rb
|
|
58
64
|
- lib/rake_secrets/storage.rb
|
|
59
65
|
- lib/rake_secrets/storage/base.rb
|
|
66
|
+
- lib/rake_secrets/storage/file_system.rb
|
|
60
67
|
- lib/rake_secrets/storage/in_memory.rb
|
|
61
68
|
- lib/rake_secrets/tasks.rb
|
|
62
69
|
- lib/rake_secrets/tasks/generate.rb
|