rubix 0.5.8 → 0.5.9

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.8
1
+ 0.5.9
@@ -102,7 +102,7 @@ module Rubix
102
102
 
103
103
  def validate
104
104
  raise ValidationError.new("A host must have at least one host group.") if host_group_ids.nil? || host_group_ids.empty?
105
- raise ValidationError.new("A host must have a valid ip address if use_ip is set.") if use_ip && ip == self.class::BLANK_IP
105
+ # raise ValidationError.new("A host must have a valid ip address if use_ip is set.") if use_ip && ip == self.class::BLANK_IP
106
106
  raise ValidationError.new("A host must have an ip address if use_ip is set.") if use_ip && (ip.nil? || ip.empty?)
107
107
  raise ValidationError.new("A host must have a dns name if use_ip is false.") if !use_ip && dns.nil?
108
108
  raise ValidationError.new("A host must have a ipmi_privilege defined as one of: " + self.class::IPMI_PRIVILEGE_CODES.keys.to_s) if use_ipmi && self.class::IPMI_PRIVILEGE_CODES[ipmi_privilege].nil?
@@ -32,6 +32,15 @@ describe "Hosts" do
32
32
  host.use_ip.should be_true
33
33
  host.ip.should == '123.123.123.123'
34
34
  end
35
+
36
+ it "can be created with a blank IP" do
37
+ host = Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group_1], :ip => '0.0.0.0')
38
+ host.save.should be_true
39
+ host.monitored.should be_true
40
+ host.use_ip.should be_true
41
+ host.ip.should == '0.0.0.0'
42
+ end
43
+
35
44
  end
36
45
 
37
46
  describe "when existing" do
@@ -8,7 +8,6 @@ describe "Items" do
8
8
  @host_1 = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group], :ip => '123.123.123.123'))
9
9
  @host_2 = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_2', :host_groups => [@host_group], :ip => '123.123.123.124'))
10
10
  @app_1 = ensure_save(Rubix::Application.new(:name => 'rubix_spec_app_1', :host_id => @host_1.id))
11
- @app_2 = ensure_save(Rubix::Application.new(:name => 'rubix_spec_app_1', :host_id => @host_2.id))
12
11
  end
13
12
 
14
13
  after do
@@ -49,7 +48,6 @@ describe "Items" do
49
48
  @item.multiply_by = 0.1
50
49
  @item.host_id = @host_2.id
51
50
  @item.units = 'MB'
52
- @item.applications = [@app_2]
53
51
  @item.save.should be_true
54
52
 
55
53
  Rubix::Item.find(:key => 'rubix.spec1', :host_id => @host_1.id).should be_nil
@@ -66,7 +64,6 @@ describe "Items" do
66
64
  new_item.multiply_by.should == 0.1
67
65
  new_item.host.name.should == @host_2.name
68
66
  new_item.units.should == 'MB'
69
- new_item.applications.map(&:name).should include(@app_2.name)
70
67
  end
71
68
 
72
69
  it "can be destroyed" do
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.8
4
+ version: 0.5.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -254,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
254
  version: '0'
255
255
  segments:
256
256
  - 0
257
- hash: 2230274127708473823
257
+ hash: 1480419640173942611
258
258
  required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  none: false
260
260
  requirements:
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  version: '0'
264
264
  segments:
265
265
  - 0
266
- hash: 2230274127708473823
266
+ hash: 1480419640173942611
267
267
  requirements: []
268
268
  rubyforge_project:
269
269
  rubygems_version: 1.8.23