secret_hub 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/secret_hub/commands/org.rb +9 -3
- data/lib/secret_hub/commands/repo.rb +9 -4
- data/lib/secret_hub/exceptions.rb +1 -0
- data/lib/secret_hub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55c57ad86eb27ea766d06923f3231e513dcb37da3050c6d1ac22de4831796140
|
4
|
+
data.tar.gz: d653818ddfd5967f66761ad76512a027c0b7e1942c72a3f0b3e91ce4c99a7bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7f20c2ac2b71264a73a33fae3436e22968083f3bb00855a5f3f74c0a0e528c80ac6b2d0d9d2a2ab374a19c2345212e1c79bed7601a3244fd8f08c4f981164d
|
7
|
+
data.tar.gz: 8e4b87a3229d977c6c61c5629481517e4cdc945825e0e00b8343f629ab1d4811c6ab1958c6aaedc5258bcd75c9f75b4cde95fbb3cf141b427e7fa9f96f629b3a
|
data/README.md
CHANGED
@@ -61,7 +61,7 @@ Run secrethub COMMAND --help for command specific help
|
|
61
61
|
$ secrethub repo
|
62
62
|
Usage:
|
63
63
|
secrethub repo list REPO
|
64
|
-
secrethub repo save REPO KEY VALUE
|
64
|
+
secrethub repo save REPO KEY [VALUE]
|
65
65
|
secrethub repo delete REPO KEY
|
66
66
|
secrethub repo (-h|--help)
|
67
67
|
|
@@ -69,7 +69,7 @@ Usage:
|
|
69
69
|
$ secrethub org
|
70
70
|
Usage:
|
71
71
|
secrethub org list ORG
|
72
|
-
secrethub org save ORG KEY VALUE
|
72
|
+
secrethub org save ORG KEY [VALUE]
|
73
73
|
secrethub org delete ORG KEY
|
74
74
|
secrethub org (-h|--help)
|
75
75
|
|
@@ -4,7 +4,7 @@ module SecretHub
|
|
4
4
|
summary "Manage organization secrets"
|
5
5
|
|
6
6
|
usage "secrethub org list ORG"
|
7
|
-
usage "secrethub org save ORG KEY VALUE"
|
7
|
+
usage "secrethub org save ORG KEY [VALUE]"
|
8
8
|
usage "secrethub org delete ORG KEY"
|
9
9
|
usage "secrethub org (-h|--help)"
|
10
10
|
|
@@ -14,9 +14,10 @@ module SecretHub
|
|
14
14
|
|
15
15
|
param "ORG", "Name of the organization"
|
16
16
|
param "KEY", "The name of the secret"
|
17
|
-
param "VALUE", "The plain text secret value"
|
17
|
+
param "VALUE", "The plain text secret value. If not provided, it is expected to be set as an environment variable"
|
18
18
|
|
19
19
|
example "secrethub org list myorg"
|
20
|
+
example "secrethub org save myorg PASSWORD"
|
20
21
|
example "secrethub org save myorg PASSWORD s3cr3t"
|
21
22
|
example "secrethub org delete myorg PASSWORD"
|
22
23
|
|
@@ -48,7 +49,12 @@ module SecretHub
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def value
|
51
|
-
args['VALUE']
|
52
|
+
result = args['VALUE'] || ENV[key]
|
53
|
+
if result
|
54
|
+
result
|
55
|
+
else
|
56
|
+
raise InvalidInput, "Please provide a value, either in the command line or in the environment variable '#{key}'"
|
57
|
+
end
|
52
58
|
end
|
53
59
|
|
54
60
|
end
|
@@ -4,7 +4,7 @@ module SecretHub
|
|
4
4
|
summary "Manage repository secrets"
|
5
5
|
|
6
6
|
usage "secrethub repo list REPO"
|
7
|
-
usage "secrethub repo save REPO KEY VALUE"
|
7
|
+
usage "secrethub repo save REPO KEY [VALUE]"
|
8
8
|
usage "secrethub repo delete REPO KEY"
|
9
9
|
usage "secrethub repo (-h|--help)"
|
10
10
|
|
@@ -14,9 +14,10 @@ module SecretHub
|
|
14
14
|
|
15
15
|
param "REPO", "Full name of the GitHub repository (user/repo)"
|
16
16
|
param "KEY", "The name of the secret"
|
17
|
-
param "VALUE", "The plain text secret value"
|
17
|
+
param "VALUE", "The plain text secret value. If not provided, it is expected to be set as an environment variable"
|
18
18
|
|
19
19
|
example "secrethub repo list me/myrepo"
|
20
|
+
example "secrethub repo save me/myrepo PASSWORD"
|
20
21
|
example "secrethub repo save me/myrepo PASSWORD s3cr3t"
|
21
22
|
example "secrethub repo delete me/myrepo PASSWORD"
|
22
23
|
|
@@ -48,9 +49,13 @@ module SecretHub
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def value
|
51
|
-
args['VALUE']
|
52
|
+
result = args['VALUE'] || ENV[key]
|
53
|
+
if result
|
54
|
+
result
|
55
|
+
else
|
56
|
+
raise InvalidInput, "Please provide a value, either in the command line or in the environment variable '#{key}'"
|
57
|
+
end
|
52
58
|
end
|
53
|
-
|
54
59
|
end
|
55
60
|
end
|
56
61
|
end
|
data/lib/secret_hub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secret_hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mister_bin
|