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.
Files changed (2) hide show
  1. data/lib/bleetz.rb +13 -9
  2. 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.0"
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
- @@actions[action.to_sym].each { |c|
80
- if c.is_a? Symbol
81
- abort "Undefined task: :#{c}. You have to define it." unless @@tasks.include?(c)
82
- format_cmds(c)
83
- else
84
- @cmd_to_exec << c
85
- end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bleetz
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: