zabby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.rdoc +6 -0
- data/README.rdoc +8 -2
- data/lib/zabby.rb +3 -1
- data/lib/zabby/runner.rb +1 -4
- data/lib/zabby/version.rb +1 -1
- metadata +3 -3
data/ChangeLog.rdoc
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
List of visible changes:
|
4
4
|
|
5
|
+
== v0.1.1 (2012/03/14)
|
6
|
+
|
7
|
+
* Initialization code (the argument given to "Zabby.init") was not executed.
|
8
|
+
* Update documentation and code sample for the barebone API ot get it working on
|
9
|
+
Ruby 1.8.x.
|
10
|
+
|
5
11
|
== v0.1.0 (2012/03/14)
|
6
12
|
|
7
13
|
* Major refactoring: Zabbix items are now represented by classes instead
|
data/README.rdoc
CHANGED
@@ -177,8 +177,8 @@ The barebone API can be used in Ruby like this:
|
|
177
177
|
login
|
178
178
|
end
|
179
179
|
|
180
|
-
pp z.run { Host.get "filter" => { "host" => "master.example.com" } }
|
181
|
-
pp z.run { Item.get "host" => "master.example.com", "output" => "shorten" }
|
180
|
+
pp z.run { Zabby::Host.get "filter" => { "host" => "master.example.com" } }
|
181
|
+
pp z.run { Zabby::Item.get "host" => "master.example.com", "output" => "shorten" }
|
182
182
|
|
183
183
|
|
184
184
|
- The _server_, _user_ and _passord_ are necessary.
|
@@ -186,6 +186,12 @@ The barebone API can be used in Ruby like this:
|
|
186
186
|
to the URI automatically.
|
187
187
|
- The <em>proxy_*</em> settings are optionnal.
|
188
188
|
|
189
|
+
==== Note
|
190
|
+
|
191
|
+
When using the barebone API you have to prefix the Zabbix classes (Host, Item, Trigger, etc.) with the "Zabby::"
|
192
|
+
namespace, otherwise Ruby won't find the classes. This is apparently the way Ruby 1.8.x looks up constants, the
|
193
|
+
problem should not happen with Ruby 1.9.x...
|
194
|
+
|
189
195
|
== Requirements
|
190
196
|
|
191
197
|
- Ruby 1.8.5. <b>IT BASICALLY RUNS ANYWHERE!</b>
|
data/lib/zabby.rb
CHANGED
data/lib/zabby/runner.rb
CHANGED
@@ -20,14 +20,11 @@ module Zabby
|
|
20
20
|
|
21
21
|
attr_reader :config, :connection
|
22
22
|
|
23
|
-
def initialize
|
23
|
+
def initialize
|
24
24
|
@config = Zabby::Config.new
|
25
25
|
@connection = Zabby::Connection.new
|
26
26
|
@pure_binding = instance_eval "binding"
|
27
27
|
|
28
|
-
# Configure the application
|
29
|
-
run(&block) if block_given?
|
30
|
-
|
31
28
|
# Configure Readline for the shell, if available
|
32
29
|
if Object.const_defined?(:Readline)
|
33
30
|
@readline = true
|
data/lib/zabby/version.rb
CHANGED
metadata
CHANGED