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.
@@ -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
- hash = instance_id.hash
142
- hash = (hash < 0 ? (hash * -1) : hash)
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
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "0.4.5"
4
+ VERSION = "0.4.6"
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.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: