test-kitchen 0.7.0.beta.1 → 0.7.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
data/config/Vagrantfile CHANGED
@@ -103,7 +103,7 @@ project = tk_env.project
103
103
 
104
104
  chef.run_list = project.run_list + build_run_list(tk_env.cookbook_paths, test_recipe_name)
105
105
  chef.json = chef_json
106
- chef.log_level = :debug
106
+ chef.log_level = :info
107
107
  end
108
108
 
109
109
  end
@@ -17,6 +17,7 @@
17
17
  #
18
18
 
19
19
  require 'fileutils'
20
+ require 'chef/cookbook/metadata'
20
21
 
21
22
  module TestKitchen
22
23
 
@@ -50,11 +51,25 @@ module TestKitchen
50
51
  private
51
52
 
52
53
  def project_name(output_dir)
53
- File.basename(output_dir)
54
+ if has_metadata?(output_dir)
55
+ get_cookbook_name(output_dir)
56
+ else
57
+ File.basename(output_dir)
58
+ end
59
+ end
60
+
61
+ def get_cookbook_name(output_dir)
62
+ md = Chef::Cookbook::Metadata.new
63
+ md.from_file(File.join(output_dir, 'metadata.rb'))
64
+ md.name
65
+ end
66
+
67
+ def has_metadata?(output_dir)
68
+ File.exists?(File.join(output_dir, 'metadata.rb'))
54
69
  end
55
70
 
56
71
  def project_type(output_dir)
57
- if File.exists?(File.join(output_dir, 'metadata.rb'))
72
+ if has_metadata?(output_dir)
58
73
  'cookbook'
59
74
  else
60
75
  'integration_test'
@@ -17,5 +17,5 @@
17
17
  #
18
18
 
19
19
  module TestKitchen
20
- VERSION = "0.7.0.beta.1"
20
+ VERSION = "0.7.0.rc.1"
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.7.0.beta.1
4
+ version: 0.7.0.rc.1
5
5
  prerelease: 6
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-11-21 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog