appril-cli 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8391c959b9f2a565353e6ceebbe52eca94b56457
4
- data.tar.gz: a976bdf49298ac7706ce874b29c4a1830cb04605
3
+ metadata.gz: 6688ffe7a76f2dcee1e23d9425a33e6e4d53ec4a
4
+ data.tar.gz: 820e1300cebf1e9fe46ba1d5bbca2b8dcb9e0449
5
5
  SHA512:
6
- metadata.gz: 1e3f9dd44599283f5174546c00a0138efe8e6f62db2748e9d578fb31325718ceefe5a8ea848943c6096802c59b0028fba3cbf88e8399606949fa5b04c32b161a
7
- data.tar.gz: dbb16bd66d46988fa27e958313740f1a2e8d9e92687aee41b5206332f80908bac5c85a7938dadc7e2baec08bfb5aed3cc2b3bdfe93c66a9802e01d6f15c9d13b
6
+ metadata.gz: 9a75c1bc52aabaa0dac78e8f07b09114048ccbcf9144b45e91bb3b703eaa0e9f73f0376c1ceff3c15ef553912f602dfb0d825963cb2213015fbf4dd86b5edd39
7
+ data.tar.gz: 6d1f0c33713a66d513cf7af96773713e4f6422be9cdf740a11060bb08769017aee1fff1220aadf75fe5f2633f64a4e5f9715af782232fb53bafac3eb75b6f7e0
@@ -1,5 +1,5 @@
1
1
  module Appril
2
2
  class CLI
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '0.2.2'.freeze
4
4
  end
5
5
  end
data/lib/appril-cli.rb CHANGED
@@ -41,6 +41,15 @@ module Appril
41
41
  include Helpers
42
42
 
43
43
  def initialize args
44
+
45
+ if args.empty? || args[0] == '-h'
46
+ return usage
47
+ end
48
+
49
+ if args[0] == '-v'
50
+ return puts VERSION
51
+ end
52
+
44
53
  opts, args = args.partition {|a| a =~ /\A\-/}
45
54
 
46
55
  case command = args[0]
@@ -70,10 +79,6 @@ module Appril
70
79
  puts format_error("Unknown subcommand #{subcommand}")
71
80
  usage
72
81
  end
73
- when '-v', '--version'
74
- puts VERSION
75
- when nil, '-h', '--help'
76
- usage
77
82
  else
78
83
  puts format_error("Unknown command #{command}")
79
84
  usage
@@ -107,10 +112,10 @@ module Appril
107
112
  * If -p option provided it will try to push the image to Docker registry after successful build.
108
113
 
109
114
  === Usage ===
110
- $ appril [-h || --help]
115
+ $ appril [-h]
111
116
 
112
117
  === Version ===
113
- $ appril [-v || --version]
118
+ $ appril [-v]
114
119
  ".split("\n").map {|l| "\t" + l.strip}.join("\n")
115
120
  end
116
121
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appril-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slee Woo
@@ -110,5 +110,5 @@ rubyforge_project:
110
110
  rubygems_version: 2.5.1
111
111
  signing_key:
112
112
  specification_version: 4
113
- summary: '["appril-cli-0.2.1", "Appril CLI"]'
113
+ summary: '["appril-cli-0.2.2", "Appril CLI"]'
114
114
  test_files: []