testlab 1.22.3 → 1.22.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTMyYmRlNjI2NmQ1ZmMwZmE4MGJmN2VkYzI5NzA0NGQwNzY4OWY4NA==
4
+ ZDI5MmViZWZmMjk3NjY2NTA3ZDI4ZDMzMTExY2RhYjBkMTZkODUxYg==
5
5
  data.tar.gz: !binary |-
6
- Mjk5ZGJlMTQ2ZWRlOWRhM2I0MzgwNGIyNThiYmE4MDMyMDdiNzkyNw==
6
+ NWRkN2JhZDc2NGZiZTVlZWIxNjNhYzY0ZDBhZDc5MzI2YjIzNTNlYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGU3MGUzZjZlMjU4YmY1MTEwZjViMWJlNDI2MzAzMWM2OWU4MjM4N2UyYzIw
10
- YmMyYjAzN2I5YzhhNWZhNTE4YjA0NWY1ZDlmMDQ2YjYyZmQwNmIyYTU2MGNk
11
- ZmI3OGY1YjdiYTk4YTM1MDhmNGNkZGE5OWMwMjlmZmRlODAwNjQ=
9
+ ZTdjOWI1NWI1YzdiMTBmYWJkNzQ4MGNiZWZmYmMxNzU1ZWQ1YmQxYzE0M2Vi
10
+ MGQ3NjdiNmE2MTU0ZmNlYzc0OGJlOGUzZjY2MWI1ZGNlODBmNDc4Y2MzMThl
11
+ YjA3Y2NmMGEzM2Y3MTYxMWUzZjY2OGQ5ODM5ZjI4NDdjNzA3ZTU=
12
12
  data.tar.gz: !binary |-
13
- OTA0Y2I4YTkyNjNhMzdmMzk0NGU5NmFlYTQyYTBjZGJkZTJiMzM4NjNlZWI0
14
- Yzg1YzdjN2UwMDBhYjdkN2IxMzlhMTM1MmEwODg4YzE1YTg0NDRiMTc1ZTFm
15
- NWFjN2E0YzI5MWE1ZDhhNGUzMmZiZTgwNDllNDU0MjIwMWNiN2E=
13
+ ZjlmNDA0MjIzM2MyYTgxOGRlN2M5Zjg2MWM2MDc3M2ZiNDdkMWYyMzJlZTcw
14
+ ZDIyN2U3NzM0ZWU3MTlmMmNiZThjODAzZTFlYzM5YTM4NDFmNjRjODk0MWE3
15
+ ZmFkZmRkOGUwNDI1MGQ4OTA3NjVhMGJjMGRkZjlmYzFkMjljODc=
@@ -41,6 +41,15 @@ class TestLab
41
41
  [self.id, self.domain].join('.')
42
42
  end
43
43
 
44
+ # Container Alive?
45
+ #
46
+ # Is the container alive and running?
47
+ #
48
+ # @return [Boolean] True if the container is running; False otherwise.
49
+ def alive?
50
+ (self.state == :running)
51
+ end
52
+
44
53
  # Container Status
45
54
  #
46
55
  # Returns a hash of status information for the container.
@@ -50,12 +50,12 @@ EOI
50
50
  command = %(/bin/bash -x #{tempfile.path})
51
51
 
52
52
  @command.exec(command)
53
- container.bootstrap(script)
53
+ container.alive? and container.bootstrap(script)
54
54
  end
55
55
 
56
56
  def remove_hosts(container)
57
57
  @command.exec(sed_hostsfile)
58
- container.exec(sed_hostsfile('linux'))
58
+ container.alive? and container.exec(sed_hostsfile('linux'))
59
59
  end
60
60
 
61
61
  def hosts_blob(container)
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "1.22.3"
4
+ VERSION = "1.22.4"
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: 1.22.3
4
+ version: 1.22.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Patten
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  version: '0'
391
391
  requirements: []
392
392
  rubyforge_project:
393
- rubygems_version: 2.2.1
393
+ rubygems_version: 2.1.11
394
394
  signing_key:
395
395
  specification_version: 4
396
396
  summary: A toolkit for building virtual computer labs