ruby_vault 0.1.0.pre.11 → 0.1.0.pre.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruby_vault/commands/login.rb +10 -1
- data/lib/ruby_vault/commands/write.rb +4 -2
- data/lib/ruby_vault/options/definitions.rb +49 -1
- data/lib/ruby_vault/options/sets.rb +12 -0
- data/lib/ruby_vault/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b17ec9c83acf4fd34e008f7dad361e59775eee24902a57cba7e94f9bb57821b2
|
4
|
+
data.tar.gz: 83672206d074f7c0ed9b9fb183104a95910247c56378f9f822fdefe06b20ef34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552e66742c3824a05f9f71d9026c2e020978a176873399e1e0c748f197257da72e87a230b98cef9d3afd186d4e52f13cd70b5f8c860eb6d256c69ba539556667
|
7
|
+
data.tar.gz: d5ca4effda41bf30170a06ddadc8f528b870761734768216db59411b26b05ba4c5356880971ab02f7c8b28f129f160a8a0a38894b7d76b34544bc83e8b810e8c
|
data/Gemfile.lock
CHANGED
@@ -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,14 @@ 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
|
16
18
|
end
|
17
19
|
|
18
20
|
# @!visibility private
|
19
21
|
def arguments(parameters)
|
20
|
-
[parameters[:path]]
|
22
|
+
[parameters[:path], parameters[:data]].flatten
|
21
23
|
end
|
22
24
|
end
|
23
25
|
end
|
@@ -3,6 +3,16 @@
|
|
3
3
|
module RubyVault
|
4
4
|
module Options
|
5
5
|
HTTP_DEFINITIONS = [
|
6
|
+
# key-value repeatable options
|
7
|
+
%w[-header].map do |o|
|
8
|
+
definition(
|
9
|
+
name: o, option_type: :standard, value_type: :string,
|
10
|
+
repeatable: true,
|
11
|
+
override_keys: { singular: false, plural: :headers }
|
12
|
+
)
|
13
|
+
end,
|
14
|
+
|
15
|
+
# string options
|
6
16
|
%w[
|
7
17
|
-address
|
8
18
|
-agent-address
|
@@ -14,6 +24,30 @@ module RubyVault
|
|
14
24
|
-namespace
|
15
25
|
-tls-server-name
|
16
26
|
-unlock-key
|
27
|
+
-wrap-ttl
|
28
|
+
].map do |o|
|
29
|
+
definition(name: o, option_type: :standard,
|
30
|
+
value_type: :string)
|
31
|
+
end,
|
32
|
+
|
33
|
+
# flag options
|
34
|
+
%w[
|
35
|
+
-non-interactive
|
36
|
+
-output-curl-string
|
37
|
+
-output-policy
|
38
|
+
-policy-override
|
39
|
+
-tls-skip-verify
|
40
|
+
].map do |o|
|
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
|
17
51
|
].map do |o|
|
18
52
|
definition(name: o, option_type: :standard, value_type: :string)
|
19
53
|
end
|
@@ -23,11 +57,25 @@ module RubyVault
|
|
23
57
|
# string options
|
24
58
|
%w[
|
25
59
|
-method
|
60
|
+
-path
|
26
61
|
].map do |o|
|
27
62
|
definition(name: o, option_type: :standard, value_type: :string)
|
63
|
+
end,
|
64
|
+
|
65
|
+
# flag options
|
66
|
+
%w[
|
67
|
+
-no-print
|
68
|
+
-no-store
|
69
|
+
-token-only
|
70
|
+
].map do |o|
|
71
|
+
definition(name: o, option_type: :flag, value_type: :boolean)
|
28
72
|
end
|
29
73
|
].flatten.freeze
|
30
74
|
|
31
|
-
DEFINITIONS = (
|
75
|
+
DEFINITIONS = (
|
76
|
+
HTTP_DEFINITIONS +
|
77
|
+
OUTPUT_DEFINITIONS +
|
78
|
+
OTHER_DEFINITIONS
|
79
|
+
).flatten.freeze
|
32
80
|
end
|
33
81
|
end
|
@@ -10,10 +10,22 @@ module RubyVault
|
|
10
10
|
-ca-path
|
11
11
|
-client-cert
|
12
12
|
-client-key
|
13
|
+
-header
|
13
14
|
-mfa
|
14
15
|
-namespace
|
16
|
+
-non-interactive
|
17
|
+
-output-curl-string
|
18
|
+
-output-policy
|
19
|
+
-policy-override
|
15
20
|
-tls-server-name
|
21
|
+
-tls-skip-verify
|
16
22
|
-unlock-key
|
23
|
+
-wrap-ttl
|
24
|
+
].freeze
|
25
|
+
|
26
|
+
OUTPUT_OPTIONS = %w[
|
27
|
+
-field
|
28
|
+
-format
|
17
29
|
].freeze
|
18
30
|
end
|
19
31
|
end
|
data/lib/ruby_vault/version.rb
CHANGED