bleetz 1.0 → 1.1
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.
- data/lib/bleetz.rb +13 -9
- metadata +1 -1
data/lib/bleetz.rb
CHANGED
@@ -6,7 +6,7 @@ require 'bleetz/object.rb'
|
|
6
6
|
|
7
7
|
class Bleetz
|
8
8
|
|
9
|
-
VERSION = "1.
|
9
|
+
VERSION = "1.1"
|
10
10
|
|
11
11
|
USAGE = <<-EOF
|
12
12
|
Usage: bleetz [-c conf_file -h -l -s][[-t -v -c conf_file] task]
|
@@ -76,14 +76,18 @@ EOF
|
|
76
76
|
|
77
77
|
def format_cmds(action = @action)
|
78
78
|
abort "Unknown task: '#{action}'." unless @@actions.include?(action.to_sym)
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
79
|
+
begin
|
80
|
+
@@actions[action.to_sym].each { |c|
|
81
|
+
if c.is_a? Symbol
|
82
|
+
abort "Undefined task: :#{c}. You have to define it." unless @@tasks.include?(c)
|
83
|
+
format_cmds(c)
|
84
|
+
else
|
85
|
+
@cmd_to_exec << c
|
86
|
+
end
|
87
|
+
}
|
88
|
+
rescue SystemStackError => e
|
89
|
+
abort "You seem to create a call loop: #{e.message}"
|
90
|
+
end
|
87
91
|
end
|
88
92
|
|
89
93
|
def list
|