daptiv-chef-ci 0.0.4 → 0.0.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.
data/README.md CHANGED
@@ -15,7 +15,7 @@ Add a dependency for daptiv-chef-ci in your Gemfile
15
15
 
16
16
  `gem 'daptiv-chef-ci'`
17
17
 
18
- In your Rakefile require 'daptiv-chef-ci/vagrant_task' and then declare a new Vagrant::RakeTask. The minimal task declaration look like this in your rake file:
18
+ Then just add this to your Rakefile:
19
19
 
20
20
  ```
21
21
  require 'daptiv-chef-ci/vagrant_task'
@@ -43,7 +43,7 @@ Gem::Specification.new do |gem|
43
43
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
44
44
  gem.name = "daptiv-chef-ci"
45
45
  gem.require_paths = ["lib"]
46
- gem.version = '0.0.4'
46
+ gem.version = '0.0.5'
47
47
 
48
48
  gem.add_runtime_dependency "log4r", "~> 1.1.10"
49
49
  gem.add_runtime_dependency "mixlib-shellout", "~> 1.2.0"
@@ -15,15 +15,16 @@ module DaptivChefCI
15
15
  # that the user has outside Ruby/Bundler.
16
16
  #
17
17
  # @param [String] The command line to execute
18
+ # @param [Int] The number of seconds to wait for the command to finish, defaults to 600
18
19
  # @return [Array] Each entry represents a line from the stdout
19
- def exec_cmd(command)
20
+ def exec_cmd(command, timeout=600)
20
21
  path_at_start = ENV['PATH']
21
22
  begin
22
23
  ENV['PATH'] = path_without_gem_dir()
23
24
  @logger.debug("Temporarily setting PATH: #{ENV['PATH']}")
24
25
 
25
26
  @logger.info("Calling command [#{command}]")
26
- shell_out = Mixlib::ShellOut.new(command)
27
+ shell_out = Mixlib::ShellOut.new(command, :timeout => timeout)
27
28
  shell_out.run_command()
28
29
  shell_out.invalid! if shell_out.exitstatus != 0
29
30
 
@@ -20,12 +20,12 @@ module DaptivChefCI
20
20
  @shell.exec_cmd('vagrant halt')
21
21
  end
22
22
 
23
- def up()
24
- @shell.exec_cmd('vagrant up')
23
+ def up(timeout=7200)
24
+ @shell.exec_cmd('vagrant up', timeout)
25
25
  end
26
26
 
27
- def provision()
28
- @shell.exec_cmd('vagrant provision')
27
+ def provision(timeout=7200)
28
+ @shell.exec_cmd('vagrant provision', timeout)
29
29
  end
30
30
 
31
31
  def reload()
Binary file
@@ -33,7 +33,7 @@ describe DaptivChefCI::Shell, :unit => true do
33
33
  it 'should not be prefixed by the system gem dir' do
34
34
  shell = DaptivChefCI::Shell.new()
35
35
  path = shell.path_without_gem_dir()
36
- expect(path).not_to include(Bundler.bundle_path.to_s())
36
+ expect(path).not_to include(Bundler.bundle_path.to_s() + ':')
37
37
  expect(ENV['PATH']).to include(path)
38
38
  end
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daptiv-chef-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-23 00:00:00.000000000 Z
12
+ date: 2013-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: log4r
@@ -178,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  segments:
180
180
  - 0
181
- hash: -3669985751056624684
181
+ hash: 4016572917644416697
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements:
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  version: '0'
188
188
  segments:
189
189
  - 0
190
- hash: -3669985751056624684
190
+ hash: 4016572917644416697
191
191
  requirements: []
192
192
  rubyforge_project:
193
193
  rubygems_version: 1.8.23