ruby_vault 0.1.0.pre.13 → 0.1.0.pre.16
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/Gemfile.lock +7 -7
- data/lib/ruby_vault/commands/list.rb +26 -0
- data/lib/ruby_vault/commands/login.rb +10 -1
- data/lib/ruby_vault/commands/write.rb +6 -2
- data/lib/ruby_vault/commands.rb +1 -0
- data/lib/ruby_vault/options/definitions.rb +30 -3
- data/lib/ruby_vault/options/sets.rb +5 -0
- data/lib/ruby_vault/version.rb +1 -1
- data/lib/ruby_vault.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7f36432434eebe9d29814ea87207855d888d471bede5d6baa069e34c332d749
|
4
|
+
data.tar.gz: f021a1281e92ab14f6e9cd6fcfe0e97a71f3c9c39b1ada07e628a6b020f39ab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf2f62179d0e4ed2593db536e970393e8f8280a797cdffc4039ccbbc36a00567c9d85667bbc894b72c8341603fc22fa7c4b63cf42420822cbc3de217adb8d75
|
7
|
+
data.tar.gz: 74f1e931a687479dbf0004752a9dfcad405dc955d08919c273b6e4b358e32a1f97666555781c0646a93a4137435ea8b334e3b2ee49445aa81ec9a08010c87e84
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby_vault (0.1.0.pre.
|
4
|
+
ruby_vault (0.1.0.pre.16)
|
5
5
|
immutable-struct (~> 2.4)
|
6
6
|
lino (~> 3.0)
|
7
7
|
|
@@ -69,7 +69,7 @@ GEM
|
|
69
69
|
sawyer (~> 0.9)
|
70
70
|
open4 (1.3.4)
|
71
71
|
parallel (1.22.1)
|
72
|
-
parser (3.1.2.
|
72
|
+
parser (3.1.2.1)
|
73
73
|
ast (~> 2.4.1)
|
74
74
|
pry (0.14.1)
|
75
75
|
coderay (~> 1.1)
|
@@ -115,17 +115,17 @@ GEM
|
|
115
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
116
116
|
rspec-support (~> 3.11.0)
|
117
117
|
rspec-support (3.11.0)
|
118
|
-
rubocop (1.
|
118
|
+
rubocop (1.34.1)
|
119
119
|
json (~> 2.3)
|
120
120
|
parallel (~> 1.10)
|
121
|
-
parser (>= 3.1.
|
121
|
+
parser (>= 3.1.2.1)
|
122
122
|
rainbow (>= 2.2.2, < 4.0)
|
123
123
|
regexp_parser (>= 1.8, < 3.0)
|
124
124
|
rexml (>= 3.2.5, < 4.0)
|
125
|
-
rubocop-ast (>= 1.
|
125
|
+
rubocop-ast (>= 1.20.0, < 2.0)
|
126
126
|
ruby-progressbar (~> 1.7)
|
127
127
|
unicode-display_width (>= 1.4.0, < 3.0)
|
128
|
-
rubocop-ast (1.
|
128
|
+
rubocop-ast (1.21.0)
|
129
129
|
parser (>= 3.1.1.0)
|
130
130
|
rubocop-rake (0.6.0)
|
131
131
|
rubocop (~> 1.0)
|
@@ -182,4 +182,4 @@ DEPENDENCIES
|
|
182
182
|
yard
|
183
183
|
|
184
184
|
BUNDLED WITH
|
185
|
-
2.3.
|
185
|
+
2.3.20
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'base'
|
4
|
+
|
5
|
+
module RubyVault
|
6
|
+
module Commands
|
7
|
+
class List < Base
|
8
|
+
# @!visibility private
|
9
|
+
def subcommands
|
10
|
+
%w[list]
|
11
|
+
end
|
12
|
+
|
13
|
+
# @!visibility private
|
14
|
+
def options
|
15
|
+
super +
|
16
|
+
Options::Sets::HTTP_OPTIONS +
|
17
|
+
Options::Sets::OUTPUT_OPTIONS
|
18
|
+
end
|
19
|
+
|
20
|
+
# @!visibility private
|
21
|
+
def arguments(parameters)
|
22
|
+
[parameters[:path]].compact.flatten
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -12,7 +12,16 @@ module RubyVault
|
|
12
12
|
|
13
13
|
# @!visibility private
|
14
14
|
def options
|
15
|
-
super +
|
15
|
+
super +
|
16
|
+
Options::Sets::HTTP_OPTIONS +
|
17
|
+
Options::Sets::OUTPUT_OPTIONS +
|
18
|
+
%w[
|
19
|
+
-method
|
20
|
+
-no-print
|
21
|
+
-no-store
|
22
|
+
-path
|
23
|
+
-token-only
|
24
|
+
]
|
16
25
|
end
|
17
26
|
|
18
27
|
def arguments(parameters)
|
@@ -12,12 +12,16 @@ module RubyVault
|
|
12
12
|
|
13
13
|
# @!visibility private
|
14
14
|
def options
|
15
|
-
super +
|
15
|
+
super +
|
16
|
+
Options::Sets::HTTP_OPTIONS +
|
17
|
+
Options::Sets::OUTPUT_OPTIONS + %w[
|
18
|
+
-force
|
19
|
+
]
|
16
20
|
end
|
17
21
|
|
18
22
|
# @!visibility private
|
19
23
|
def arguments(parameters)
|
20
|
-
[parameters[:path], parameters[:data]].flatten
|
24
|
+
[parameters[:path], parameters[:data]].compact.flatten
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
data/lib/ruby_vault/commands.rb
CHANGED
@@ -26,7 +26,8 @@ module RubyVault
|
|
26
26
|
-unlock-key
|
27
27
|
-wrap-ttl
|
28
28
|
].map do |o|
|
29
|
-
definition(name: o, option_type: :standard,
|
29
|
+
definition(name: o, option_type: :standard,
|
30
|
+
value_type: :string)
|
30
31
|
end,
|
31
32
|
|
32
33
|
# flag options
|
@@ -37,7 +38,18 @@ module RubyVault
|
|
37
38
|
-policy-override
|
38
39
|
-tls-skip-verify
|
39
40
|
].map do |o|
|
40
|
-
definition(name: o, option_type: :flag,
|
41
|
+
definition(name: o, option_type: :flag,
|
42
|
+
value_type: :boolean)
|
43
|
+
end
|
44
|
+
].flatten.freeze
|
45
|
+
|
46
|
+
OUTPUT_DEFINITIONS = [
|
47
|
+
# string options
|
48
|
+
%w[
|
49
|
+
-field
|
50
|
+
-format
|
51
|
+
].map do |o|
|
52
|
+
definition(name: o, option_type: :standard, value_type: :string)
|
41
53
|
end
|
42
54
|
].flatten.freeze
|
43
55
|
|
@@ -45,11 +57,26 @@ module RubyVault
|
|
45
57
|
# string options
|
46
58
|
%w[
|
47
59
|
-method
|
60
|
+
-path
|
48
61
|
].map do |o|
|
49
62
|
definition(name: o, option_type: :standard, value_type: :string)
|
63
|
+
end,
|
64
|
+
|
65
|
+
# flag options
|
66
|
+
%w[
|
67
|
+
-force
|
68
|
+
-no-print
|
69
|
+
-no-store
|
70
|
+
-token-only
|
71
|
+
].map do |o|
|
72
|
+
definition(name: o, option_type: :flag, value_type: :boolean)
|
50
73
|
end
|
51
74
|
].flatten.freeze
|
52
75
|
|
53
|
-
DEFINITIONS = (
|
76
|
+
DEFINITIONS = (
|
77
|
+
HTTP_DEFINITIONS +
|
78
|
+
OUTPUT_DEFINITIONS +
|
79
|
+
OTHER_DEFINITIONS
|
80
|
+
).flatten.freeze
|
54
81
|
end
|
55
82
|
end
|
data/lib/ruby_vault/version.rb
CHANGED
data/lib/ruby_vault.rb
CHANGED
@@ -31,6 +31,11 @@ module RubyVault
|
|
31
31
|
parameters, invocation_options)
|
32
32
|
end
|
33
33
|
|
34
|
+
def list(parameters = {}, invocation_options = {})
|
35
|
+
exec(RubyVault::Commands::List,
|
36
|
+
parameters, invocation_options)
|
37
|
+
end
|
38
|
+
|
34
39
|
private
|
35
40
|
|
36
41
|
def exec(command_class, parameters, invocation_options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: immutable-struct
|
@@ -295,6 +295,7 @@ files:
|
|
295
295
|
- lib/ruby_vault.rb
|
296
296
|
- lib/ruby_vault/commands.rb
|
297
297
|
- lib/ruby_vault/commands/base.rb
|
298
|
+
- lib/ruby_vault/commands/list.rb
|
298
299
|
- lib/ruby_vault/commands/login.rb
|
299
300
|
- lib/ruby_vault/commands/write.rb
|
300
301
|
- lib/ruby_vault/errors.rb
|