testlab 0.4.4 → 0.4.5

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.
@@ -134,7 +134,13 @@ class TestLab
134
134
  end
135
135
 
136
136
  def ip
137
- (@config[:vagrant][:ip] || "192.168.33.10")
137
+ (@config[:vagrant][:ip] || "192.168.33.#{last_octet}")
138
+ end
139
+
140
+ def last_octet
141
+ hash = instance_id.hash
142
+ hash = (hash < 0 ? (hash * -1) : hash)
143
+ (hash.modulo(254) + 1)
138
144
  end
139
145
 
140
146
  def port
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -279,18 +279,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
279
279
  - - ! '>='
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
- segments:
283
- - 0
284
- hash: -1362977712829590677
285
282
  required_rubygems_version: !ruby/object:Gem::Requirement
286
283
  none: false
287
284
  requirements:
288
285
  - - ! '>='
289
286
  - !ruby/object:Gem::Version
290
287
  version: '0'
291
- segments:
292
- - 0
293
- hash: -1362977712829590677
294
288
  requirements: []
295
289
  rubyforge_project:
296
290
  rubygems_version: 1.8.25