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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddc9e70299505d1a8a5de9c6428a8f9a1024e67f
4
- data.tar.gz: 16ee676db638cd35a86516b3e2860997fa4a1554
3
+ metadata.gz: 8fc4dcc5ca7d46950d04b2d9683659de9dc79d93
4
+ data.tar.gz: 926aeccb87441feca061e2fda938d44e97b23c08
5
5
  SHA512:
6
- metadata.gz: aeb94206104d381ef5d4b568b6067e7b17f592f23f76272398d0f26db73292ede10f4c7a5dbe01cdb381774a0470a3e57cebc24c684caaf00cc407f341534054
7
- data.tar.gz: 1db298e4ec312b2dfdfc3bd5a7ee805114c28b3e09aa51300afbe20a6db6f22d0c5483ee5a6cc2b7aaceb3420846d94f71a2964d641e6bd95a1fdbd9ee0ca189
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 `-f` flag:
23
+ To force writing files use `--force` flag:
24
24
 
25
- $ envdgen /path/to/.env /path/to/env/dir -f
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
- if ARGV.include?("-h") || ARGV.include?("--help")
7
- puts "usage: envdgen [SOURCE_DOTENV_FILE] [TARGET_DIR] [-h|--help] [-f|--force]"
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
@@ -1,3 +1,3 @@
1
1
  module Envdgen
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envdgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Kovalik