encrypt_env 0.0.1 → 0.0.4
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/bin/encrypt_env +23 -28
- data/lib/encrypt_env.rb +1 -0
- 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: e5e431e0af0fe05b0f3626fc7c6eb39cb73777f00f167a63a8d7a938eba3ab38
|
4
|
+
data.tar.gz: 78cc5ae194051528b04755099e3783b44f27e8a3550d01065dcf36d3edd76d44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 340aee1f184202f43a34ea8a18a6996bca83f5517dfd0640c4094819f725eebd51e3829fdaf92d3e15c4cc90d7d04c75082bbeb66310636667852097b9b74905
|
7
|
+
data.tar.gz: c35d1761ed73e5ac77c9f8c7736cea1d6fe2cc50b61916acb926c917f7fed34b9c1e30763a10e4ecd44032be6e4635cbda720e11cb7d345193982b2270f68a59
|
data/bin/encrypt_env
CHANGED
@@ -4,37 +4,32 @@
|
|
4
4
|
|
5
5
|
require 'encrypt_env'
|
6
6
|
|
7
|
-
COMMANDS = {
|
8
|
-
'setup' => EncryptEnv.setup,
|
9
|
-
'secrets' => EncryptEnv.secrets,
|
10
|
-
'secrets_all' => EncryptEnv.secrets_all,
|
11
|
-
'edit' => EncryptEnv.edit
|
12
|
-
}.freeze
|
13
|
-
|
14
7
|
argv = ARGV
|
15
8
|
action = argv.shift
|
16
|
-
command_class = COMMANDS[action]
|
17
|
-
unless command_class
|
18
|
-
if ['help', '--help', '-h'].include?(action)
|
19
|
-
puts <<~HELP
|
20
|
-
Usage:
|
21
|
-
encrypt_env setup
|
22
|
-
encrypt_env secrets
|
23
|
-
encrypt_env secrets_all
|
24
|
-
encrypt_env edit
|
25
|
-
HELP
|
26
9
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
10
|
+
if action == 'setup'
|
11
|
+
EncryptEnv.setup
|
12
|
+
exit 0
|
13
|
+
elsif action == 'show'
|
14
|
+
EncryptEnv.secrets
|
15
|
+
exit 0
|
16
|
+
elsif action == 'all'
|
17
|
+
EncryptEnv.secrets_all
|
18
|
+
exit 0
|
19
|
+
elsif action == 'edit'
|
20
|
+
EncryptEnv.edit
|
21
|
+
exit 0
|
22
|
+
elsif ['help', '--help', '-h'].include?(action)
|
23
|
+
puts <<~HELP
|
24
|
+
Usage:
|
25
|
+
encrypt_env setup
|
26
|
+
encrypt_env secrets
|
27
|
+
encrypt_env secrets_all
|
28
|
+
encrypt_env edit
|
29
|
+
HELP
|
33
30
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
rescue ArgumentError => e
|
38
|
-
puts e.message
|
31
|
+
exit 0
|
32
|
+
else
|
33
|
+
puts "Unknown action: #{action}"
|
39
34
|
exit 1
|
40
35
|
end
|
data/lib/encrypt_env.rb
CHANGED