test-kitchen 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.cane +5 -0
  3. data/.travis.yml +8 -3
  4. data/CHANGELOG.md +66 -0
  5. data/Guardfile +3 -1
  6. data/README.md +3 -1
  7. data/Rakefile +1 -16
  8. data/features/kitchen_command.feature +1 -0
  9. data/features/kitchen_driver_create_command.feature +1 -0
  10. data/features/kitchen_driver_discover_command.feature +1 -0
  11. data/features/kitchen_help_command.feature +16 -0
  12. data/features/kitchen_init_command.feature +2 -0
  13. data/features/kitchen_list_command.feature +42 -0
  14. data/features/support/env.rb +25 -0
  15. data/lib/kitchen.rb +0 -1
  16. data/lib/kitchen/busser.rb +2 -2
  17. data/lib/kitchen/cli.rb +80 -233
  18. data/lib/kitchen/command.rb +117 -0
  19. data/lib/kitchen/command/action.rb +44 -0
  20. data/lib/kitchen/command/console.rb +51 -0
  21. data/lib/kitchen/command/diagnose.rb +51 -0
  22. data/lib/kitchen/command/driver_discover.rb +72 -0
  23. data/lib/kitchen/command/list.rb +86 -0
  24. data/lib/kitchen/command/login.rb +42 -0
  25. data/lib/kitchen/command/sink.rb +53 -0
  26. data/lib/kitchen/command/test.rb +50 -0
  27. data/lib/kitchen/driver/ssh_base.rb +2 -1
  28. data/lib/kitchen/loader/yaml.rb +67 -29
  29. data/lib/kitchen/provisioner/base.rb +67 -4
  30. data/lib/kitchen/provisioner/chef_base.rb +50 -65
  31. data/lib/kitchen/provisioner/chef_solo.rb +3 -2
  32. data/lib/kitchen/provisioner/chef_zero.rb +11 -9
  33. data/lib/kitchen/provisioner/shell.rb +88 -0
  34. data/lib/kitchen/state_file.rb +7 -2
  35. data/lib/kitchen/util.rb +1 -1
  36. data/lib/kitchen/version.rb +1 -1
  37. data/spec/kitchen/loader/yaml_spec.rb +327 -13
  38. data/spec/spec_helper.rb +2 -7
  39. data/support/chef-client-zero.rb +1 -0
  40. data/templates/driver/README.md.erb +1 -1
  41. data/test-kitchen.gemspec +2 -2
  42. metadata +59 -46
data/spec/spec_helper.rb CHANGED
@@ -16,6 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
+ gem 'minitest'
20
+
19
21
  require 'simplecov'
20
22
  SimpleCov.adapters.define 'gem' do
21
23
  command_name 'Specs'
@@ -33,13 +35,6 @@ require 'minitest/autorun'
33
35
  require 'mocha/setup'
34
36
  require 'tempfile'
35
37
 
36
- # enable yaml symbol parsing if code is executing under guard
37
- if ENV['GUARD_NOTIFY']
38
- require 'safe_yaml'
39
- YAML.enable_symbol_parsing!
40
- SafeYAML::OPTIONS[:suppress_warnings] = true
41
- end
42
-
43
38
  # Nasty hack to redefine IO.read in terms of File#read for fakefs
44
39
  class IO
45
40
  def self.read(*args)
@@ -69,6 +69,7 @@ class ChefClientZero
69
69
 
70
70
  def run_chef_client
71
71
  system("chef-client", *ARGV)
72
+ fail if $? != 0
72
73
  end
73
74
  end
74
75
 
@@ -61,4 +61,4 @@ Created and maintained by [<%= config[:author] %>][author] (<<%= config[:email]
61
61
  [license]: https://github.com/enter-github-user/<%= config[:gem_name] %>/blob/master/LICENSE
62
62
  [repo]: https://github.com/enter-github-user/<%= config[:gem_name] %>
63
63
  [driver_usage]: http://docs.kitchen-ci.org/drivers/usage
64
- [chef_omnibus_dl]: http://www.opscode.com/chef/install/
64
+ [chef_omnibus_dl]: http://www.getchef.com/chef/install/
data/test-kitchen.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.add_dependency 'mixlib-shellout', '~> 1.2'
24
24
  gem.add_dependency 'net-scp', '~> 1.1'
25
25
  gem.add_dependency 'net-ssh', '~> 2.7'
26
- gem.add_dependency 'safe_yaml', '~> 0.9'
26
+ gem.add_dependency 'safe_yaml', '~> 1.0'
27
27
  gem.add_dependency 'thor', '~> 0.18'
28
28
 
29
29
  gem.add_development_dependency 'bundler', '~> 1.3'
@@ -31,7 +31,7 @@ Gem::Specification.new do |gem|
31
31
 
32
32
  gem.add_development_dependency 'aruba', '~> 0.5'
33
33
  gem.add_development_dependency 'fakefs', '~> 0.4'
34
- gem.add_development_dependency 'minitest', '~> 5'
34
+ gem.add_development_dependency 'minitest', '~> 5.1.0'
35
35
  gem.add_development_dependency 'mocha', '~> 0.14'
36
36
 
37
37
  gem.add_development_dependency 'cane', '~> 2.6'
metadata CHANGED
@@ -1,251 +1,251 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-kitchen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2014-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: net-scp
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-ssh
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.7'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: safe_yaml
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.9'
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.9'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.18'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.18'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: aruba
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0.5'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.5'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: fakefs
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.4'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.4'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: minitest
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '5'
145
+ version: 5.1.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '5'
152
+ version: 5.1.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: mocha
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0.14'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.14'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: cane
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: '2.6'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '2.6'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: countloc
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0.4'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.4'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: maruku
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0.6'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0.6'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: simplecov
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ~>
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0.7'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ~>
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0.7'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: tailor
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ~>
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
229
  version: '1.2'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ~>
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '1.2'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: yard
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ~>
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
243
  version: '0.8'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ~>
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0.8'
251
251
  description: Test Kitchen is an integration tool for developing and testing infrastructure
@@ -257,9 +257,10 @@ executables:
257
257
  extensions: []
258
258
  extra_rdoc_files: []
259
259
  files:
260
- - .gitignore
261
- - .travis.yml
262
- - .yardopts
260
+ - ".cane"
261
+ - ".gitignore"
262
+ - ".travis.yml"
263
+ - ".yardopts"
263
264
  - CHANGELOG.md
264
265
  - Gemfile
265
266
  - Guardfile
@@ -270,6 +271,7 @@ files:
270
271
  - features/kitchen_command.feature
271
272
  - features/kitchen_driver_create_command.feature
272
273
  - features/kitchen_driver_discover_command.feature
274
+ - features/kitchen_help_command.feature
273
275
  - features/kitchen_init_command.feature
274
276
  - features/kitchen_list_command.feature
275
277
  - features/sink_command.feature
@@ -281,6 +283,15 @@ files:
281
283
  - lib/kitchen/cli.rb
282
284
  - lib/kitchen/collection.rb
283
285
  - lib/kitchen/color.rb
286
+ - lib/kitchen/command.rb
287
+ - lib/kitchen/command/action.rb
288
+ - lib/kitchen/command/console.rb
289
+ - lib/kitchen/command/diagnose.rb
290
+ - lib/kitchen/command/driver_discover.rb
291
+ - lib/kitchen/command/list.rb
292
+ - lib/kitchen/command/login.rb
293
+ - lib/kitchen/command/sink.rb
294
+ - lib/kitchen/command/test.rb
284
295
  - lib/kitchen/config.rb
285
296
  - lib/kitchen/data_munger.rb
286
297
  - lib/kitchen/diagnostic.rb
@@ -308,6 +319,7 @@ files:
308
319
  - lib/kitchen/provisioner/chef_solo.rb
309
320
  - lib/kitchen/provisioner/chef_zero.rb
310
321
  - lib/kitchen/provisioner/dummy.rb
322
+ - lib/kitchen/provisioner/shell.rb
311
323
  - lib/kitchen/rake_tasks.rb
312
324
  - lib/kitchen/shell_out.rb
313
325
  - lib/kitchen/ssh.rb
@@ -362,17 +374,17 @@ require_paths:
362
374
  - lib
363
375
  required_ruby_version: !ruby/object:Gem::Requirement
364
376
  requirements:
365
- - - '>='
377
+ - - ">="
366
378
  - !ruby/object:Gem::Version
367
379
  version: 1.9.1
368
380
  required_rubygems_version: !ruby/object:Gem::Requirement
369
381
  requirements:
370
- - - '>='
382
+ - - ">="
371
383
  - !ruby/object:Gem::Version
372
384
  version: '0'
373
385
  requirements: []
374
386
  rubyforge_project:
375
- rubygems_version: 2.0.14
387
+ rubygems_version: 2.2.0
376
388
  signing_key:
377
389
  specification_version: 4
378
390
  summary: Test Kitchen is an integration tool for developing and testing infrastructure
@@ -381,6 +393,7 @@ test_files:
381
393
  - features/kitchen_command.feature
382
394
  - features/kitchen_driver_create_command.feature
383
395
  - features/kitchen_driver_discover_command.feature
396
+ - features/kitchen_help_command.feature
384
397
  - features/kitchen_init_command.feature
385
398
  - features/kitchen_list_command.feature
386
399
  - features/sink_command.feature