secretmgr 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +27 -22
- data/.rubocop_todo.yml +101 -46
- data/Gemfile +25 -14
- data/Gemfile.lock +65 -49
- data/Rakefile +41 -4
- data/SECURITY.md +21 -0
- data/exe/secretmgr +15 -78
- data/lib/secretmgr/cli.rb +171 -0
- data/lib/secretmgr/config.rb +42 -41
- data/lib/secretmgr/globalsetting.rb +49 -0
- data/lib/secretmgr/loggerxs.rb +4 -0
- data/lib/secretmgr/secret.rb +228 -0
- data/lib/secretmgr/secretmgr.rb +247 -200
- data/lib/secretmgr/util.rb +15 -0
- data/lib/secretmgr/version.rb +1 -1
- data/lib/secretmgr.rb +28 -22
- data/rubocoprefine.bat +29 -29
- data/secretmgr.gemspec +49 -49
- metadata +16 -79
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fda7934d5a11c91db39b564f04132bd1208ed67e090f2059da7d6be310623c5
|
4
|
+
data.tar.gz: d984c3eb66db54b42b5e093e4997edc29687e04d058dba23d71842e8021d7233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84883e264d7918497bca6cdc86e14cf35d0a9db895aca0f4590dbf8ce03849c3ca20c4784685c0ec0be0502a621f631d03a9f47074350a8ab81a9151377e97b5
|
7
|
+
data.tar.gz: 91deac409a846d86f4872ea4650322578d58334a855f0241f269f1c1a5f379c5401289c7f552e02a136e1985e6c184c936671f5ee1b6102b5063e7d110c0d8d1
|
data/.rubocop.yml
CHANGED
@@ -1,22 +1,27 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-rake
|
5
|
+
- rubocop-rspec
|
6
|
+
|
7
|
+
AllCops:
|
8
|
+
NewCops: enable
|
9
|
+
TargetRubyVersion: 2.6
|
10
|
+
|
11
|
+
Style/StringLiterals:
|
12
|
+
Enabled: true
|
13
|
+
EnforcedStyle: double_quotes
|
14
|
+
|
15
|
+
Style/StringLiteralsInInterpolation:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedStyle: double_quotes
|
18
|
+
|
19
|
+
Layout/LineLength:
|
20
|
+
Max: 120
|
21
|
+
|
22
|
+
Style/Documentation:
|
23
|
+
Enabled: false
|
24
|
+
#
|
25
|
+
Naming/AccessorMethodName:
|
26
|
+
Enabled: false
|
27
|
+
|
data/.rubocop_todo.yml
CHANGED
@@ -1,46 +1,101 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count:
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- '
|
16
|
-
- 'lib/secretmgr/
|
17
|
-
|
18
|
-
|
19
|
-
#
|
20
|
-
# Configuration parameters:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
# Offense count:
|
36
|
-
#
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
#
|
41
|
-
|
42
|
-
#
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2024-01-17 04:42:45 UTC using RuboCop version 1.59.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 3
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
|
12
|
+
# SupportedStyles: case, end
|
13
|
+
Layout/CaseIndentation:
|
14
|
+
Exclude:
|
15
|
+
# - 'lib/secretmgr/globalsetting.rb'
|
16
|
+
# - 'lib/secretmgr/secretmgr.rb'
|
17
|
+
|
18
|
+
# Offense count: 3
|
19
|
+
# This cop supports safe autocorrection (--autocorrect).
|
20
|
+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
21
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
22
|
+
Layout/EndAlignment:
|
23
|
+
Exclude:
|
24
|
+
# - 'lib/secretmgr/config.rb'
|
25
|
+
# - 'lib/secretmgr/globalsetting.rb'
|
26
|
+
# - 'lib/secretmgr/secretmgr.rb'
|
27
|
+
|
28
|
+
# Offense count: 1
|
29
|
+
# This cop supports safe autocorrection (--autocorrect).
|
30
|
+
# Configuration parameters: Width, AllowedPatterns.
|
31
|
+
Layout/IndentationWidth:
|
32
|
+
Exclude:
|
33
|
+
# - 'lib/secretmgr/config.rb'
|
34
|
+
|
35
|
+
# Offense count: 2
|
36
|
+
# This cop supports safe autocorrection (--autocorrect).
|
37
|
+
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
|
38
|
+
Layout/LeadingCommentSpace:
|
39
|
+
Exclude:
|
40
|
+
# - 'spec/secretmgr/secretmgr_spec.rb'
|
41
|
+
|
42
|
+
# Offense count: 6
|
43
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
44
|
+
Metrics/AbcSize:
|
45
|
+
Max: 67
|
46
|
+
|
47
|
+
# Offense count: 3
|
48
|
+
# Configuration parameters: CountComments, CountAsOne.
|
49
|
+
Metrics/ClassLength:
|
50
|
+
Max: 182
|
51
|
+
|
52
|
+
# Offense count: 3
|
53
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
54
|
+
Metrics/CyclomaticComplexity:
|
55
|
+
Max: 13
|
56
|
+
|
57
|
+
# Offense count: 13
|
58
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
59
|
+
Metrics/MethodLength:
|
60
|
+
Max: 44
|
61
|
+
|
62
|
+
# Offense count: 3
|
63
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
64
|
+
Metrics/ParameterLists:
|
65
|
+
Max: 10
|
66
|
+
|
67
|
+
# Offense count: 3
|
68
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
69
|
+
Metrics/PerceivedComplexity:
|
70
|
+
Max: 13
|
71
|
+
|
72
|
+
# Offense count: 4
|
73
|
+
# Configuration parameters: CountAsOne.
|
74
|
+
RSpec/ExampleLength:
|
75
|
+
Max: 16
|
76
|
+
|
77
|
+
# Offense count: 2
|
78
|
+
RSpec/MultipleExpectations:
|
79
|
+
Max: 2
|
80
|
+
|
81
|
+
# Offense count: 6
|
82
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
83
|
+
# Configuration parameters: EnforcedStyle.
|
84
|
+
# SupportedStyles: always, always_true, never
|
85
|
+
Style/FrozenStringLiteralComment:
|
86
|
+
Exclude:
|
87
|
+
- 'd.rb'
|
88
|
+
- 'lib/secretmgr/cli.rb'
|
89
|
+
- 'lib/secretmgr/globalsetting.rb'
|
90
|
+
- 'lib/secretmgr/loggerxs.rb'
|
91
|
+
- 'lib/secretmgr/secret.rb'
|
92
|
+
- 'spec/secretmgr/cli_spec.rb'
|
93
|
+
|
94
|
+
# Offense count: 12
|
95
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
96
|
+
# Configuration parameters: Mode.
|
97
|
+
Style/StringConcatenation:
|
98
|
+
Exclude:
|
99
|
+
# - 'Rakefile'
|
100
|
+
# - 'lib/secretmgr/secretmgr.rb'
|
101
|
+
# - 'spec/spec_helper.rb'
|
data/Gemfile
CHANGED
@@ -1,14 +1,25 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in secretmgr.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
gem "
|
9
|
-
|
10
|
-
gem "
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
gem "
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in secretmgr.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "multi_json"
|
9
|
+
|
10
|
+
# gem "loggerx", path: "../loggerx"
|
11
|
+
gem "loggerx", "~> 0.2.0"
|
12
|
+
|
13
|
+
group :development, :test do
|
14
|
+
gem "rake", "~> 13.0"
|
15
|
+
gem "rspec", "~> 3.0"
|
16
|
+
gem "rubocop", "~> 1.21"
|
17
|
+
gem "rubocop-rake", require: false
|
18
|
+
gem "rubocop-rspec", require: false
|
19
|
+
|
20
|
+
# gem "multi_json"
|
21
|
+
|
22
|
+
gem "debug"
|
23
|
+
|
24
|
+
gem "rufo"
|
25
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,80 +1,96 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
secretmgr (0.
|
5
|
-
|
6
|
-
rake (~> 13.0)
|
7
|
-
rspec (~> 3.0)
|
8
|
-
rubocop (~> 1.21)
|
9
|
-
ykutils
|
10
|
-
ykxutils
|
4
|
+
secretmgr (0.2.0)
|
5
|
+
loggerx
|
11
6
|
|
12
7
|
GEM
|
13
8
|
remote: https://rubygems.org/
|
14
9
|
specs:
|
15
10
|
ast (2.4.2)
|
11
|
+
debug (1.9.1)
|
12
|
+
irb (~> 1.10)
|
13
|
+
reline (>= 0.3.8)
|
16
14
|
diff-lcs (1.5.0)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
io-console (0.7.1)
|
16
|
+
irb (1.11.1)
|
17
|
+
rdoc
|
18
|
+
reline (>= 0.4.2)
|
19
|
+
json (2.7.1)
|
20
|
+
language_server-protocol (3.17.0.3)
|
21
|
+
loggerx (0.2.0)
|
24
22
|
multi_json (1.15.0)
|
25
|
-
parallel (1.
|
26
|
-
parser (3.
|
23
|
+
parallel (1.24.0)
|
24
|
+
parser (3.3.0.2)
|
27
25
|
ast (~> 2.4.1)
|
26
|
+
racc
|
27
|
+
psych (5.1.2)
|
28
|
+
stringio
|
29
|
+
racc (1.7.3)
|
28
30
|
rainbow (3.1.1)
|
29
|
-
rake (13.0
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
rspec
|
37
|
-
rspec-
|
38
|
-
|
31
|
+
rake (13.1.0)
|
32
|
+
rdoc (6.6.2)
|
33
|
+
psych (>= 4.0.0)
|
34
|
+
regexp_parser (2.9.0)
|
35
|
+
reline (0.4.2)
|
36
|
+
io-console (~> 0.5)
|
37
|
+
rexml (3.2.6)
|
38
|
+
rspec (3.12.0)
|
39
|
+
rspec-core (~> 3.12.0)
|
40
|
+
rspec-expectations (~> 3.12.0)
|
41
|
+
rspec-mocks (~> 3.12.0)
|
42
|
+
rspec-core (3.12.2)
|
43
|
+
rspec-support (~> 3.12.0)
|
44
|
+
rspec-expectations (3.12.3)
|
39
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
46
|
+
rspec-support (~> 3.12.0)
|
47
|
+
rspec-mocks (3.12.6)
|
42
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
45
|
-
rubocop (1.
|
49
|
+
rspec-support (~> 3.12.0)
|
50
|
+
rspec-support (3.12.1)
|
51
|
+
rubocop (1.59.0)
|
46
52
|
json (~> 2.3)
|
53
|
+
language_server-protocol (>= 3.17.0)
|
47
54
|
parallel (~> 1.10)
|
48
|
-
parser (>= 3.
|
55
|
+
parser (>= 3.2.2.4)
|
49
56
|
rainbow (>= 2.2.2, < 4.0)
|
50
57
|
regexp_parser (>= 1.8, < 3.0)
|
51
58
|
rexml (>= 3.2.5, < 4.0)
|
52
|
-
rubocop-ast (>= 1.
|
59
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
53
60
|
ruby-progressbar (~> 1.7)
|
54
|
-
unicode-display_width (>=
|
55
|
-
rubocop-ast (1.
|
56
|
-
parser (>= 3.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
62
|
+
rubocop-ast (1.30.0)
|
63
|
+
parser (>= 3.2.1.0)
|
64
|
+
rubocop-capybara (2.20.0)
|
65
|
+
rubocop (~> 1.41)
|
66
|
+
rubocop-factory_bot (2.25.1)
|
67
|
+
rubocop (~> 1.41)
|
68
|
+
rubocop-rake (0.6.0)
|
69
|
+
rubocop (~> 1.0)
|
70
|
+
rubocop-rspec (2.26.1)
|
71
|
+
rubocop (~> 1.40)
|
72
|
+
rubocop-capybara (~> 2.17)
|
73
|
+
rubocop-factory_bot (~> 2.22)
|
74
|
+
ruby-progressbar (1.13.0)
|
75
|
+
rufo (0.17.0)
|
76
|
+
stringio (3.1.0)
|
77
|
+
unicode-display_width (2.5.0)
|
65
78
|
|
66
79
|
PLATFORMS
|
67
|
-
|
68
|
-
|
80
|
+
ruby
|
81
|
+
x86_64-linux
|
69
82
|
|
70
83
|
DEPENDENCIES
|
84
|
+
debug
|
85
|
+
loggerx (~> 0.2.0)
|
71
86
|
multi_json
|
72
87
|
rake (~> 13.0)
|
73
88
|
rspec (~> 3.0)
|
74
89
|
rubocop (~> 1.21)
|
90
|
+
rubocop-rake
|
91
|
+
rubocop-rspec
|
92
|
+
rufo
|
75
93
|
secretmgr!
|
76
|
-
ykutils
|
77
|
-
ykxutils
|
78
94
|
|
79
95
|
BUNDLED WITH
|
80
|
-
2.
|
96
|
+
2.5.3
|
data/Rakefile
CHANGED
@@ -1,12 +1,49 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
|
-
require "rspec/core/rake_task"
|
5
4
|
|
6
|
-
|
5
|
+
task default: :spec
|
7
6
|
|
8
|
-
|
7
|
+
###
|
8
|
+
require "secretmgr"
|
9
|
+
require "pathname"
|
9
10
|
|
10
|
-
|
11
|
+
begin
|
12
|
+
require "rspec/core/rake_task"
|
13
|
+
rescue LoadError => e
|
14
|
+
puts e.message
|
15
|
+
end
|
11
16
|
|
17
|
+
begin
|
18
|
+
RSpec::Core::RakeTask.new(:spec)
|
19
|
+
rescue NameError, LoadError => e
|
20
|
+
puts e.message
|
21
|
+
end
|
22
|
+
|
23
|
+
begin
|
24
|
+
require "rubocop/rake_task"
|
25
|
+
rescue LoadError => e
|
26
|
+
puts e.message
|
27
|
+
end
|
28
|
+
|
29
|
+
begin
|
30
|
+
RuboCop::RakeTask.new
|
31
|
+
rescue NameError, LoadError => e
|
32
|
+
puts e.message
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "secretmgr setup"
|
12
36
|
task default: %i[spec rubocop]
|
37
|
+
|
38
|
+
desc "setup"
|
39
|
+
task :setup do
|
40
|
+
home_dir_pn = Pathname.new(Dir.home)
|
41
|
+
spec_dir_pn = home_dir_pn + "spec"
|
42
|
+
test_data_dir_pn = spec_dir_pn + "test_data"
|
43
|
+
ssh_dir_pn = test_data_dir_pn + ".ssh"
|
44
|
+
if ssh_dir_pn.exist?
|
45
|
+
puts "Exist ssh_dir_pn=#{ssh_dir_pn}"
|
46
|
+
else
|
47
|
+
puts "Not Exist ssh_dir_pn=#{ssh_dir_pn}"
|
48
|
+
end
|
49
|
+
end
|
data/SECURITY.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
Use this section to tell people about which versions of your project are
|
6
|
+
currently being supported with security updates.
|
7
|
+
|
8
|
+
| Version | Supported |
|
9
|
+
| ------- | ------------------ |
|
10
|
+
| 5.1.x | :white_check_mark: |
|
11
|
+
| 5.0.x | :x: |
|
12
|
+
| 4.0.x | :white_check_mark: |
|
13
|
+
| < 4.0 | :x: |
|
14
|
+
|
15
|
+
## Reporting a Vulnerability
|
16
|
+
|
17
|
+
Use this section to tell people how to report a vulnerability.
|
18
|
+
|
19
|
+
Tell them where to go, how often they can expect to get an update on a
|
20
|
+
reported vulnerability, what to expect if the vulnerability is accepted or
|
21
|
+
declined, etc.
|
data/exe/secretmgr
CHANGED
@@ -1,78 +1,15 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
if
|
10
|
-
# p
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
plain_setting_file_pn = Pathname.new(plain_setting_file)
|
17
|
-
plain_secret_file_pn = Pathname.new(plain_secret_file)
|
18
|
-
|
19
|
-
exit 10 unless secret_dir_pn.exist?
|
20
|
-
# p "setup_data 11"
|
21
|
-
exit 11 unless secret_dir_pn.directory?
|
22
|
-
# p "setup_data 12"
|
23
|
-
exit 12 unless plain_setting_file_pn.exist?
|
24
|
-
# p "setup_data 13"
|
25
|
-
exit 13 unless plain_setting_file_pn.file?
|
26
|
-
# p "setup_data 14"
|
27
|
-
exit 14 unless plain_secret_file_pn.exist?
|
28
|
-
# p "setup_data 15"
|
29
|
-
exit 15 unless plain_secret_file_pn.file?
|
30
|
-
|
31
|
-
# p "setup_data 100"
|
32
|
-
else
|
33
|
-
setting_txt_file = arg.shift
|
34
|
-
secret_txt_file = arg.shift
|
35
|
-
|
36
|
-
# p "setting_txt_file=#{setting_txt_file}"
|
37
|
-
if (arg[0] == "--template-dir") || (arg[0] == "-d")
|
38
|
-
template_dir = arg[1]
|
39
|
-
arg.shift
|
40
|
-
arg.shift
|
41
|
-
end
|
42
|
-
|
43
|
-
# p "template_dir=#{template_dir}"
|
44
|
-
|
45
|
-
if (arg[0] == "--target") || (arg[0] == "-t")
|
46
|
-
target = arg[1]
|
47
|
-
sub_target = arg[2]
|
48
|
-
arg.shift
|
49
|
-
arg.shift
|
50
|
-
arg.shift
|
51
|
-
end
|
52
|
-
|
53
|
-
# p "target=#{target}"
|
54
|
-
# p "sub_target=#{sub_target}"
|
55
|
-
|
56
|
-
setting_pn = Pathname.new(setting_txt_file)
|
57
|
-
exit 10 unless setting_pn.exist?
|
58
|
-
exit 10 unless setting_pn.file?
|
59
|
-
|
60
|
-
secret_dir_pn = setting_pn.parent
|
61
|
-
|
62
|
-
secret_pn = Pathname.new(secret_txt_file)
|
63
|
-
exit 10 unless secret_pn.exist?
|
64
|
-
exit 10 unless secret_pn.file?
|
65
|
-
|
66
|
-
# secret_txt_file
|
67
|
-
end
|
68
|
-
|
69
|
-
case cmd
|
70
|
-
when "setup_data"
|
71
|
-
inst = Secretmgr::Secretmgr.create(secret_dir_pn, plain_setting_file_pn, plain_secret_file_pn)
|
72
|
-
inst.setup
|
73
|
-
else
|
74
|
-
sm = Secretmgr::Secretmgr.new(secret_dir_pn)
|
75
|
-
sm.set_setting_for_query(target, sub_target)
|
76
|
-
sm.load
|
77
|
-
p sm.make(template_dir, target, sub_target)
|
78
|
-
end
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "secretmgr"
|
5
|
+
|
6
|
+
cli = Secretmgr::Cli.new
|
7
|
+
ret = cli.arg_parse(ARGV)
|
8
|
+
# p 1
|
9
|
+
if ret
|
10
|
+
# p 2
|
11
|
+
cli.execute
|
12
|
+
else
|
13
|
+
# p 3
|
14
|
+
exit(Secretmgr::Cli::EXIT_CODE_FAILURE)
|
15
|
+
end
|