ey_stonith 0.1.5.pre → 0.1.5.pre2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift(File.expand_path('../../lib/', __FILE__))
3
+ require 'ey_stonith'
4
+
5
+ EY::Stonith::Commands::Commands.new(ARGV).call
data/bin/stonith-help ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift(File.expand_path('../../lib/', __FILE__))
3
+ require 'ey_stonith'
4
+
5
+ EY::Stonith::Commands::Help.new(ARGV).call
@@ -3,7 +3,7 @@ module EY
3
3
  module Commands
4
4
  class NotFound < Abstract
5
5
  def invoke
6
- abort "Command not found.\n#{parser}"
6
+ abort "Command not found #{@argv.first.inspect}.\n#{parser}"
7
7
  end
8
8
  end
9
9
  end
@@ -25,8 +25,11 @@ module EY
25
25
  end
26
26
 
27
27
  def self.invoke(argv)
28
- klass = const_get(COMMANDS[argv.shift])
29
- klass.new(argv).call
28
+ if COMMANDS.keys.include?(argv.first)
29
+ exec "stonith-#{argv.join(' ')}"
30
+ else
31
+ NotFound.new(argv).call
32
+ end
30
33
  end
31
34
 
32
35
  def self.formatted_command_list
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 1
8
8
  - 5
9
- - pre
10
- version: 0.1.5.pre
9
+ - pre2
10
+ version: 0.1.5.pre2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ezra Zygmuntowicz
@@ -63,11 +63,12 @@ dependencies:
63
63
  description: Shoot The Other Node In The Head
64
64
  email: awsmdev@engineyard.com
65
65
  executables:
66
- - ey-monitor
67
66
  - stonith
68
67
  - stonith-check
69
68
  - stonith-claim
69
+ - stonith-commands
70
70
  - stonith-cron
71
+ - stonith-help
71
72
  - stonith-notify
72
73
  - stonith-reset
73
74
  - stonith-resume
@@ -102,11 +103,12 @@ files:
102
103
  - lib/ey_stonith/database.rb
103
104
  - lib/ey_stonith/history.rb
104
105
  - lib/ey_stonith.rb
105
- - bin/ey-monitor
106
106
  - bin/stonith
107
107
  - bin/stonith-check
108
108
  - bin/stonith-claim
109
+ - bin/stonith-commands
109
110
  - bin/stonith-cron
111
+ - bin/stonith-help
110
112
  - bin/stonith-notify
111
113
  - bin/stonith-reset
112
114
  - bin/stonith-resume
data/bin/ey-monitor DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/bash
2
- stonith-start