envdgen 0.1.3 → 0.1.5

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: 6ad120d9f34e44160474c651b6accab94756c9b2
4
- data.tar.gz: d0585da672967220e3e86cab17524e56402241df
3
+ metadata.gz: c23ed5f94f1d8c40b65d020119e33e0de2f96d5c
4
+ data.tar.gz: 92de01701d0ab4e26c150ec173c247618fba76fe
5
5
  SHA512:
6
- metadata.gz: 20c2e0b6762d8002f0510f79aba465962090e3538b4478bc94ff09b4c0f93e56d1384c87551bb651ba922d2b83075e4ef41846115a3c7b40cf4615e4f470b13a
7
- data.tar.gz: 1c93000988a4e484c7b128831e68dc17c722e3bf6f75e34461a22d8121da17cd442b317733387113bf9d17127dfef83b0ae578748127d48c3af37b820de141e4
6
+ metadata.gz: f62312882fcd140d87e05da90730071d7f0d1a03bff0a944002bea97909f4e6c260120b402e3e3be4883e2a7fd2dd00d57c6990521338a345a6e76d42e923285
7
+ data.tar.gz: c30a66c0379af60b785b299a81ca90154fad5b6beefb16526f50e34c00b26d4a48c9cf6476de104babcf4e0f1876e2e15591a1fd9264b6232e05df6563d9571b
data/bin/envdgen CHANGED
@@ -2,29 +2,38 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'envdgen'
5
+ require 'methadone'
5
6
 
6
- force = false
7
-
8
- case ARGV[0]
9
- when "-h", "--help"
10
- puts "usage: envdgen [-f|--force] SOURCE_FILE TARGET_DIR"
11
- puts " envdgen [-h|--help]"
12
- exit
13
- when "-v", "--version"
14
- puts "envdgen v#{Envred::VERSION}"
15
- exit
16
- when "-f", "--force"
17
- force = true
18
- ARGV.shift
19
- end
7
+ include Methadone::Main
8
+ include Methadone::CLILogging
20
9
 
21
- if ARGV.size < 2
22
- $stderr.write("ERROR: Invalid parameters. Run with `-h' flag for help.\n")
23
- exit(1)
24
- end
10
+ main do |source_file, target_dir|
11
+ if !!options['version']
12
+ puts "envdgen #{Envdgen::VERSION}"
13
+ exit
14
+ end
15
+
16
+ if source_file.to_s.empty? or target_dir.to_s.empty?
17
+ $stderr.write("error: you must specify both, source_file and target_dir.\n\n")
18
+ puts opts.help
19
+ exit(1)
20
+ end
21
+
22
+ Envdgen.gen(source_file, target_dir, !!options['force']) do |fname|
23
+ puts "Written #{fname}"
24
+ end
25
25
 
26
- Envdgen.gen(ARGV[0], ARGV[1], force) do |fname|
27
- puts "Written #{fname}"
26
+ puts "Done!"
28
27
  end
29
28
 
30
- puts "Done!"
29
+ description "Foreman's dotenv to envdir directories converter."
30
+
31
+ version Envdgen::VERSION
32
+
33
+ arg :source_file, :optional
34
+ arg :target_dir, :optional
35
+
36
+ on "-f", "--force", "If present, it will force to overwrite existing files."
37
+ on "-v", "--version", "Show current version number."
38
+
39
+ go!
data/envdgen.gemspec CHANGED
@@ -21,5 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rspec", "~> 2.5"
23
23
  spec.add_development_dependency "rake"
24
- spec.add_dependency "dotenv"
24
+ spec.add_dependency "methadone", "~> 1.3.2"
25
+ spec.add_dependency "dotenv", "~> 0.10.0"
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Envdgen
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Kovalik
@@ -52,20 +52,34 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: methadone
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.2
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.3.2
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: dotenv
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ">="
73
+ - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '0'
75
+ version: 0.10.0
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ">="
80
+ - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '0'
82
+ version: 0.10.0
69
83
  description: Gem provides a binary to generate envdir compatible env directories from
70
84
  .env foreman files."
71
85
  email: