bleetz 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bleetz.rb +7 -3
- metadata +3 -3
data/lib/bleetz.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'net/ssh'
|
3
3
|
require 'yaml'
|
4
|
+
require 'bleetz/conf.rb'
|
5
|
+
require 'bleetz/object.rb'
|
4
6
|
|
5
7
|
class Bleetz
|
6
8
|
|
7
|
-
VERSION = "1.
|
9
|
+
VERSION = "1.3"
|
8
10
|
|
9
11
|
USAGE = <<-EOF
|
10
12
|
Usage: bleetz [-c conf_file -h -l -s][[-t -v -c conf_file] action]
|
@@ -24,11 +26,13 @@ EOF
|
|
24
26
|
begin
|
25
27
|
if @file.nil?
|
26
28
|
cnf = YAML::load(File.open("#{Dir.pwd}/.bleetz"))
|
27
|
-
require 'bleetz/conf.rb'
|
28
|
-
require 'bleetz/object.rb'
|
29
29
|
@file = cnf[:config] || cnf['config']
|
30
30
|
end
|
31
31
|
load @file
|
32
|
+
rescue TypeError
|
33
|
+
abort "Didn't you make a mistake in .bleetz file ?"
|
34
|
+
rescue ArgumentError
|
35
|
+
abort "Did you configure attribute like this: 'attribute: <value>'"
|
32
36
|
rescue Exception => e
|
33
37
|
abort "Problem during configuration loading: #{e.message}"
|
34
38
|
end
|
metadata
CHANGED