hanzo 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: b91d7ddb9247b1bd76ebdc2a71d5d0965b8005b1
4
- data.tar.gz: 7842e5ab445d886b43e3d5b2de18158f5d546a89
3
+ metadata.gz: 3f7887514596c54614932197349ee399470a5d58
4
+ data.tar.gz: 8b25c361cda3bbec0307ba5a94e53d1e7fb7b1d5
5
5
  SHA512:
6
- metadata.gz: 772381f316567e3fdbabb5d39d06a0ded5ea84bf91c4c7932087dc2642a558a1c2358c2667208bd6d2aa7c768a1359b1b099b6ffdd283156e7a112d976169ab3
7
- data.tar.gz: edaa4060736a5881662c572a3538616cae0e5cde3d20ba3b8aafa28ff166f69695f71d6cf25207acc159734ed72e202881af5aaabcc01d98c118ab8a02376902
6
+ metadata.gz: d128619b5733c910bdc5ae7d59582e32456c579d8207fb68bac20ec65463d6fea985d6f0e2976e45d5d3203f922c734cea677ae64dc8761fff8c19eae932621e
7
+ data.tar.gz: d8bcd6a4fdb27bac4446c107074188a4b9eda3222b5758953eb53d4e92a3aa7ec2d3034265ff9a88ac45ef0aa05780e4702c769ed1ab1318931464b74997c07d
@@ -17,7 +17,11 @@ module Hanzo
17
17
  def initialize_cli
18
18
  initialize_help and return if @app.nil?
19
19
 
20
- @options = Hanzo.const_get(@app.capitalize).new(@args).options
20
+ begin
21
+ @options = Hanzo.const_get(@app.capitalize).new(@args).options
22
+ rescue NameError
23
+ initialize_help
24
+ end
21
25
  end
22
26
 
23
27
  def initialize_help
@@ -19,7 +19,15 @@ module Hanzo
19
19
  end
20
20
 
21
21
  def initialize_help
22
- @options.banner = "Usage: hanzo deploy ENVIRONMENT"
22
+ @options.banner = <<-BANNER
23
+ Usage: hanzo deploy ENVIRONMENT
24
+
25
+ Available environments
26
+ BANNER
27
+
28
+ Hanzo::Installers::Remotes.environments.each do |env|
29
+ @options.banner << " - #{env.first}\n"
30
+ end
23
31
  end
24
32
 
25
33
  def deploy
@@ -15,7 +15,13 @@ module Hanzo
15
15
  def initialize_cli
16
16
  initialize_help and return if @type.nil?
17
17
 
18
- send "install_#{@type}"
18
+ method = "install_#{@type}"
19
+
20
+ if self.respond_to?(method)
21
+ send(method)
22
+ else
23
+ initialize_help
24
+ end
19
25
  end
20
26
 
21
27
  def initialize_help
@@ -1,3 +1,3 @@
1
1
  module Hanzo
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanzo
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
  - Samuel Garneau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-19 00:00:00.000000000 Z
11
+ date: 2013-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler