envdgen 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/envdgen +11 -4
- data/lib/envdgen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fc4dcc5ca7d46950d04b2d9683659de9dc79d93
|
4
|
+
data.tar.gz: 926aeccb87441feca061e2fda938d44e97b23c08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af726ad4f27c54bbf521fdf49a51d9cb2a56d7e3eb449df2a0f7b714023686c94e02ef9519fbb86805e2efe8d9a3ecf67f86aceb1a8052339269f89480fda840
|
7
|
+
data.tar.gz: 7e3fa9a30161d17a81dfd2f5ee7e8e53371c4e5b6270abd499d9bf5988594334fb9e1520dd80925d0e3965e0efce652133befc298439f9b4568c7ee31a6e89c9
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# envdgen
|
1
|
+
# envdgen
|
2
2
|
|
3
3
|
**Environment config directories generator**
|
4
4
|
|
@@ -20,9 +20,9 @@ Generate configuration directory from env file by running:
|
|
20
20
|
$ envdgen /path/to/.env /path/to/env/dir
|
21
21
|
|
22
22
|
Running again the same command will not take any effect, as file are not overwritten.
|
23
|
-
To force writing files use
|
23
|
+
To force writing files use `--force` flag:
|
24
24
|
|
25
|
-
$ envdgen /path/to/.env /path/to/env/dir
|
25
|
+
$ envdgen --force /path/to/.env /path/to/env/dir
|
26
26
|
|
27
27
|
## Hacking
|
28
28
|
|
data/bin/envdgen
CHANGED
@@ -3,9 +3,18 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'envdgen'
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
force = false
|
7
|
+
|
8
|
+
case ARGV[0]
|
9
|
+
when "-h", "--help"
|
10
|
+
puts "usage: envdgen [-h|--help] [-f|--force] [SOURCE_DOTENV_FILE] [TARGET_DIR]"
|
11
|
+
exit
|
12
|
+
when "-v", "--version"
|
13
|
+
puts "envred v#{Envred::VERSION}"
|
8
14
|
exit
|
15
|
+
when "-f", "--force"
|
16
|
+
force = true
|
17
|
+
ARGV.shift
|
9
18
|
end
|
10
19
|
|
11
20
|
if ARGV.size < 2
|
@@ -13,8 +22,6 @@ if ARGV.size < 2
|
|
13
22
|
exit(1)
|
14
23
|
end
|
15
24
|
|
16
|
-
force = ARGV.include?("-f") or ARGV.include?("--force")
|
17
|
-
|
18
25
|
Envdgen.gen(ARGV[0], ARGV[1], force) do |fname|
|
19
26
|
puts "Written #{fname}"
|
20
27
|
end
|
data/lib/envdgen/version.rb
CHANGED