testlab 0.4.5 → 0.4.6
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.
- data/lib/testlab/providers/vagrant.rb +3 -3
- data/lib/testlab/version.rb +1 -1
- metadata +1 -1
@@ -9,6 +9,7 @@ class TestLab
|
|
9
9
|
#
|
10
10
|
# @author Zachary Patten <zachary AT jovelabs DOT com>
|
11
11
|
class Vagrant
|
12
|
+
require 'zlib'
|
12
13
|
|
13
14
|
# States which indicate the VM is running
|
14
15
|
RUNNING_STATES = %w(running).map(&:to_sym)
|
@@ -138,9 +139,8 @@ class TestLab
|
|
138
139
|
end
|
139
140
|
|
140
141
|
def last_octet
|
141
|
-
|
142
|
-
|
143
|
-
(hash.modulo(254) + 1)
|
142
|
+
crc32 = Zlib.crc32(self.instance_id)
|
143
|
+
(crc32.modulo(254) + 1)
|
144
144
|
end
|
145
145
|
|
146
146
|
def port
|
data/lib/testlab/version.rb
CHANGED