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 +1 -1
- data/lib/test-kitchen/scaffold.rb +17 -2
- data/lib/test-kitchen/version.rb +1 -1
- metadata +2 -2
data/config/Vagrantfile
CHANGED
@@ -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
|
-
|
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
|
72
|
+
if has_metadata?(output_dir)
|
58
73
|
'cookbook'
|
59
74
|
else
|
60
75
|
'integration_test'
|
data/lib/test-kitchen/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2012-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|