test-kitchen 0.5.2 → 0.5.4

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.
@@ -33,8 +33,10 @@ module TestKitchen
33
33
  runner = TestKitchen::Runner.for_platform(env,
34
34
  {:platform => platform, :configuration => configuration})
35
35
  runner.preflight_check
36
+ runner.prepare
36
37
  begin
37
- runner.provision
38
+ runner.create
39
+ runner.converge
38
40
  runner.test
39
41
  rescue
40
42
  raise
@@ -37,9 +37,13 @@ module TestKitchen
37
37
  def preflight_command(cmd = nil)
38
38
  return nil unless lint
39
39
  parent_dir = File.join(root_path, '..')
40
+ ignore_tags = ''
41
+ if lint.respond_to?(:has_key?) && lint[:ignore].respond_to?(:join)
42
+ ignore_tags = " -t ~#{lint[:ignore].join(' -t ~')}"
43
+ end
40
44
  set_or_return(:preflight_command, cmd, :default =>
41
45
  "knife cookbook test -o #{parent_dir} #{name}" +
42
- " && foodcritic -f ~FC007 -f correctness #{root_path}")
46
+ " && foodcritic -f ~FC007 -f correctness#{ignore_tags} #{root_path}")
43
47
  end
44
48
 
45
49
  def script(arg=nil)
@@ -34,10 +34,18 @@ module TestKitchen
34
34
  @configuration = options[:configuration]
35
35
  end
36
36
 
37
- def provision
37
+ def prepare
38
38
  assemble_cookbooks!
39
39
  end
40
40
 
41
+ def create
42
+ raise NotImplementedError
43
+ end
44
+
45
+ def converge
46
+ raise NotImplementedError
47
+ end
48
+
41
49
  def run_list
42
50
  ['test-kitchen::default']
43
51
  end
@@ -27,9 +27,12 @@ module TestKitchen
27
27
  @env, @options = env, options
28
28
  end
29
29
 
30
- def provision
31
- super
32
- vagrant_env.cli(vagrant_cli_argv('up'))
30
+ def create
31
+ vagrant_env.cli(vagrant_cli_argv(['up', '--no-provision']))
32
+ end
33
+
34
+ def converge
35
+ vagrant_env.cli(vagrant_cli_argv('provision'))
33
36
  end
34
37
 
35
38
  def status
@@ -36,7 +36,7 @@ module TestKitchen
36
36
  <<-eos
37
37
  source :rubygems
38
38
 
39
- gem 'test-kitchen', :git => 'git@github.com:opscode/test-kitchen.git'
39
+ gem 'test-kitchen'
40
40
  eos
41
41
 
42
42
  scaffold_file 'test/kitchen/Kitchenfile',
@@ -17,5 +17,5 @@
17
17
  #
18
18
 
19
19
  module TestKitchen
20
- VERSION = "0.5.2"
20
+ VERSION = "0.5.4"
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-kitchen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
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: 2012-08-18 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: foodcritic
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.4.0
21
+ version: '1.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.4.0
29
+ version: '1.4'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: hashr
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -180,12 +180,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
180
  - - ! '>='
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
+ segments:
184
+ - 0
185
+ hash: 3834866993864711664
183
186
  required_rubygems_version: !ruby/object:Gem::Requirement
184
187
  none: false
185
188
  requirements:
186
189
  - - ! '>='
187
190
  - !ruby/object:Gem::Version
188
191
  version: '0'
192
+ segments:
193
+ - 0
194
+ hash: 3834866993864711664
189
195
  requirements: []
190
196
  rubyforge_project:
191
197
  rubygems_version: 1.8.23