rake_secrets 0.1.0.pre.4 → 0.1.0.pre.5

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
  SHA256:
3
- metadata.gz: 100abe0dc35580a1e91253c092dcea4d8beb79899f90aa8addf82b6854a6dcb3
4
- data.tar.gz: 8659c46791c6434d9d187b1f3233e6a25f0f61cc99f9d9182ba616ef950454ed
3
+ metadata.gz: 45ea335f8f80eaa9fb7448308e58021175d2ade25d84f6fb1c5fdf0a5ad49aa2
4
+ data.tar.gz: bc1082d9ccdaa417f588e8fbf7a953898eb001b40edaabe752fbc19749cdb662
5
5
  SHA512:
6
- metadata.gz: d43fdad6d0f931f43e5f480db007705f8bc4c62c37824652b8e78dc08b6f4f02dfeddfd9c7f61f97addc6fc0d0cabb86f03949afd1103f027ff5103f9cfcd215
7
- data.tar.gz: b6116f103ac51326ff0244119710b56d13d706bfd14d624b011624698fa2aa513361dd8c4233bdd3c14e9922173c1e751bcc9c1dac3b681bb7000a63ea7a28f5
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 experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
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
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
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 incident.
62
- Further details of specific enforcement policies may be posted separately.
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)
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.0.4.2)
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.1)
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.0)
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
- excon (0.99.0)
24
- faraday (2.7.4)
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.13.2)
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.12.0)
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.17.0)
43
- octokit (6.0.1)
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.22.1)
48
- parser (3.2.0.0)
60
+ parallel (1.23.0)
61
+ parser (3.2.2.4)
49
62
  ast (~> 2.4.1)
50
- public_suffix (5.0.1)
63
+ racc
64
+ public_suffix (5.0.3)
65
+ racc (1.7.1)
51
66
  rainbow (3.1.1)
52
- rake (13.0.6)
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.4)
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.26)
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.8.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.6.2)
84
- rexml (3.2.5)
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.1)
104
+ rspec-core (3.12.2)
90
105
  rspec-support (~> 3.12.0)
91
- rspec-expectations (3.12.2)
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.3)
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.0)
98
- rubocop (1.44.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.0.0)
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.24.1, < 2.0)
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.24.1)
109
- parser (>= 3.1.1.0)
110
- rubocop-capybara (2.17.0)
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.18.1)
115
- rubocop (~> 1.33)
132
+ rubocop-rspec (2.25.0)
133
+ rubocop (~> 1.40)
116
134
  rubocop-capybara (~> 2.17)
117
- ruby-progressbar (1.11.0)
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.4.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.6
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 'securerandom'
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 used by CI.'
51
+ desc 'Generate encryption passphrase for CI GPG key'
52
52
  task generate: ['directory:ensure'] do
53
- File.write('config/secrets/ci/encryption.passphrase',
54
- SecureRandom.base64(36))
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'fileutils'
4
4
 
5
- require_relative './base'
5
+ require_relative 'base'
6
6
  require_relative '../errors'
7
7
 
8
8
  module RakeSecrets
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './base'
3
+ require_relative 'base'
4
4
  require_relative '../errors'
5
5
 
6
6
  module RakeSecrets
@@ -16,16 +16,34 @@ module RakeSecrets
16
16
  end
17
17
 
18
18
  def remove(path)
19
- @persistence.delete(path)
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
20
28
  end
21
29
 
22
30
  def retrieve(path)
23
- unless @persistence.include?(path)
31
+ unless contains_exact_path?(path)
24
32
  raise(Errors::NoSuchPathError, "Path '#{path}' not in storage.")
25
33
  end
26
34
 
27
35
  @persistence[path]
28
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
29
47
  end
30
48
  end
31
49
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './character_set'
3
+ require_relative 'character_set'
4
4
 
5
5
  module RakeSecrets
6
6
  module Types
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './character_set'
3
+ require_relative 'character_set'
4
4
 
5
5
  module RakeSecrets
6
6
  module Types
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './character_set'
3
+ require_relative 'character_set'
4
4
 
5
5
  module RakeSecrets
6
6
  module Types
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RakeSecrets
4
- VERSION = '0.1.0.pre.4'
4
+ VERSION = '0.1.0.pre.5'
5
5
  end
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
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-02-09 00:00:00.000000000 Z
11
+ date: 2023-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2