rubix 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -157,7 +157,7 @@ module Rubix
157
157
  end
158
158
 
159
159
  def self.find_params options={}
160
- get_params.merge(:filter => {:host => options[:name], id_field => options[:id]})
160
+ get_params.merge(:filter => {:host => options[:name], id_field => options[:id], :ip => options[:ip]})
161
161
  end
162
162
 
163
163
  end
@@ -36,7 +36,7 @@ describe "Hosts" do
36
36
  describe "when existing" do
37
37
  before do
38
38
  @host_group_2 = ensure_save(Rubix::HostGroup.new(:name => 'rubix_spec_host_group_2'))
39
- @host = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group_1]))
39
+ @host = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group_1], :ip => '123.123.123.123'))
40
40
  @template_1 = ensure_save(Rubix::Template.new(:name => 'rubix_spec_template_1', :host_groups => [@host_group_2]))
41
41
  @template_2 = ensure_save(Rubix::Template.new(:name => 'rubix_spec_template_2', :host_groups => [@host_group_2]))
42
42
  end
@@ -48,6 +48,12 @@ describe "Hosts" do
48
48
  hosts.first.name.should == @host.name
49
49
  end
50
50
 
51
+ it "can be found using its IP" do
52
+ h = Rubix::Host.find(:ip => '123.123.123.123')
53
+ h.should_not be_nil
54
+ h.name.should == 'rubix_spec_host_1'
55
+ end
56
+
51
57
  it "can have its name changed" do
52
58
  @host.name = 'rubix_spec_host_2'
53
59
  @host.save
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-27 00:00:00.000000000Z
12
+ date: 2012-03-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &21980180 !ruby/object:Gem::Requirement
16
+ requirement: &11179480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *21980180
24
+ version_requirements: *11179480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mysql2
27
- requirement: &21979680 !ruby/object:Gem::Requirement
27
+ requirement: &11176580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *21979680
35
+ version_requirements: *11176580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &21977020 !ruby/object:Gem::Requirement
38
+ requirement: &11176060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - <=
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *21977020
46
+ version_requirements: *11176060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: configliere
49
- requirement: &21976500 !ruby/object:Gem::Requirement
49
+ requirement: &11175540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.4.8
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *21976500
57
+ version_requirements: *11175540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: multipart-post
60
- requirement: &21976060 !ruby/object:Gem::Requirement
60
+ requirement: &11175160 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *21976060
68
+ version_requirements: *11175160
69
69
  description: Rubix provides abstractions for connecting to Zabbix's API, an ORM for
70
70
  wrapping Zabbix resources, a set of scripts for writing data to Zabbix, and a collection
71
71
  of Monitor classes for building periodic monitors.