fig2coreos 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fig2coreos +11 -12
  3. data/lib/fig2coreos.rb +0 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 944247b3ed3f3f5e0dd8792cdb5e3f944b610dd9
4
- data.tar.gz: dff72cbe3a9ced91a1e81d5c4f8dd8afad59afb9
3
+ metadata.gz: a76ac0e62fd0adba35cad54a706584ef2ba1ed20
4
+ data.tar.gz: 5555233bfcf74dbb6eec72fc69abdf380d97c276
5
5
  SHA512:
6
- metadata.gz: b510c97c08d9b97fc925df10b1e31d64d3f39100ae7e98170fbd9fd21cfb8108c4f73c351a7e9917825b80e7060882796b775a85dc4c192ac1c5d930c71ea350
7
- data.tar.gz: bd08a816eac64b32db8fb087dc7b9921dc4f74985a90801ef6c16c2f9fccd59bcb9e294a38fc075556d9e76039767c95005625d1c12ab7a7c81c1009bb6f2aba
6
+ metadata.gz: 2eb504aed6ac00e5d85992f3cd990d3574c1d359b923075184b91b7ee90120294af2bb3812facc1e88f44fc03a31a805c5e2c1be53fff1a5f82145313eea7602
7
+ data.tar.gz: 8c00a2cb33e4aa73984b9194edd92a76f1905c36c9aeaf3acd2f6c090f4c2a39bea1614ffc215a56456f03ba541b7d3d7a82711eff4b0766a9aea114c6a2eb82
data/bin/fig2coreos CHANGED
@@ -6,35 +6,34 @@ FIG2COREOS_BANNER = "Usage: fig2coreos [options] APP_NAME FIG_YAML OUTPUT_DIRECT
6
6
 
7
7
  options = {type: "fleet"}
8
8
 
9
- OptionParser.new do |opts|
9
+ opt_parser = OptionParser.new do |opts|
10
10
  opts.banner = FIG2COREOS_BANNER
11
11
 
12
- opts.on("-t", "--type TYPE", "Output type: fllet (default) or vagrant (generate a Vagrantfile)") do |type|
12
+ opts.on("-t", "--type TYPE", "Output type: fleet (default) or vagrant (generate a Vagrantfile)") do |type|
13
13
  options[:type] = type
14
14
  end
15
- end.parse!
16
15
 
17
- if ARGV[0].to_s.include?("-t")
18
- ARGV.shift
19
- ARGV.shift
16
+ opts.on( '-h', '--help', 'Display this screen' ) do
17
+ puts opts
18
+ exit
19
+ end
20
20
  end
21
21
 
22
+ opt_parser.parse!
23
+
22
24
  if ARGV[0].nil?
23
- puts "[ERROR] APP_NAME required"
24
- puts FIG2COREOS_BANNER
25
+ puts opt_parser
25
26
  exit -1
26
27
  end
27
28
 
28
29
  if !File.file?(File.expand_path(ARGV[1].to_s))
29
- puts "[ERROR] FIG_YAML path required"
30
- puts FIG2COREOS_BANNER
30
+ puts opt_parser
31
31
  exit -1
32
32
  end
33
33
 
34
34
  if !ARGV[2] || !File.directory?(File.expand_path(ARGV[2].to_s))
35
35
  if !FileUtils.mkdir_p(File.join(ARGV[2].to_s, "media", "state", "units"))
36
- puts "[ERROR] OUTPUT_DIRECTORY required"
37
- puts FIG2COREOS_BANNER
36
+ puts opt_parser
38
37
  exit -1
39
38
  end
40
39
  end
data/lib/fig2coreos.rb CHANGED
@@ -1,6 +1,3 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
-
4
1
  require 'yaml'
5
2
  require 'fileutils'
6
3
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fig2coreos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson