minitest-chef-handler 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.6.0 / 07-13-2012
2
+
3
+ * 1 new feature:
4
+
5
+ * Support for delivering test results in JUnit format using ci-reporter gem.
6
+
1
7
  === 0.5.4 / 07-10-2012
2
8
 
3
9
  * 1 bub fix:
data/README.md CHANGED
@@ -2,14 +2,7 @@
2
2
 
3
3
  Run minitest suites after your Chef recipes to check the status of your system.
4
4
 
5
- ## Motivation
6
-
7
- Working at Engine Yard I have to maintain a quite complicated set of Chef recipes that we use to set up our customers' instances. I need to be sure that everytime someone modifies those recipes, mostly myself, the provisioned services continue working as expected.
8
-
9
- There are other solutions that evaluate the configured node after the recipes
10
- are loaded without arriving to the converge phase, like [ChefSpec](https://github.com/acrmp/chefspec) or [rspec-chef](https://github.com/calavera/rspec-chef), but I needed something to write integration tests easily. I checked [chef-minitest](https://github.com/fujin/chef-minitest) but I'm still amazed by the ugly code that I have to write into the recipes to make it work.
11
-
12
- ## Installation
5
+ # Installation
13
6
 
14
7
  ```
15
8
  $ gem install minitest-chef-handler
@@ -109,6 +102,7 @@ These are the options the handler accepts:
109
102
  * :filter => filter test names on pattern
110
103
  * :seed => set random seed
111
104
  * :verbose => show progress processing files.
105
+ * :ci_reports => path to write out the result of each test in a JUnit-compatible XML file, parseable by many CI platforms.
112
106
 
113
107
  Example:
114
108
 
@@ -3,6 +3,7 @@ require 'minitest-chef-handler/resources'
3
3
  require 'minitest-chef-handler/unit'
4
4
  require 'minitest-chef-handler/spec'
5
5
  require 'minitest-chef-handler/runner'
6
+ require 'minitest-chef-handler/ci_runner'
6
7
 
7
8
  require 'minitest-chef-handler/assertions'
8
9
  require 'minitest-chef-handler/infections'
@@ -23,7 +24,13 @@ module MiniTest
23
24
  return if failed?
24
25
 
25
26
  require_test_suites(@options.delete(:path))
26
- runner = Runner.new(run_status)
27
+
28
+ if @options[:ci_reports]
29
+ ENV['CI_REPORTS'] = @options[:ci_reports]
30
+ runner = CIRunner.new(run_status)
31
+ else
32
+ runner = Runner.new(run_status)
33
+ end
27
34
 
28
35
  if custom_runner?
29
36
  runner._run(miniunit_options)
@@ -0,0 +1,13 @@
1
+ require 'ci/reporter/minitest'
2
+ module MiniTest
3
+ module Chef
4
+ class CIRunner < CI::Reporter::Runner
5
+ attr_reader :run_status
6
+
7
+ def initialize(run_status)
8
+ @run_status = run_status
9
+ super()
10
+ end
11
+ end
12
+ end
13
+ end
@@ -11,9 +11,10 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
12
12
  gem.name = "minitest-chef-handler"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = '0.5.4'
14
+ gem.version = '0.6.0'
15
15
 
16
16
  gem.add_dependency('minitest')
17
17
  gem.add_dependency('chef')
18
+ gem.add_dependency('ci_reporter')
18
19
  gem.add_development_dependency('rake')
19
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-chef-handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-10 00:00:00.000000000 Z
12
+ date: 2012-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &70166575600100 !ruby/object:Gem::Requirement
16
+ requirement: &70290942684140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70166575600100
24
+ version_requirements: *70290942684140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: chef
27
- requirement: &70166575599660 !ruby/object:Gem::Requirement
27
+ requirement: &70290942683620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70166575599660
35
+ version_requirements: *70290942683620
36
+ - !ruby/object:Gem::Dependency
37
+ name: ci_reporter
38
+ requirement: &70290942683140 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70290942683140
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rake
38
- requirement: &70166575599240 !ruby/object:Gem::Requirement
49
+ requirement: &70290942682660 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,7 +54,7 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70166575599240
57
+ version_requirements: *70290942682660
47
58
  description: Run Minitest suites as Chef report handlers
48
59
  email:
49
60
  - david.calavera@gmail.com
@@ -81,6 +92,7 @@ files:
81
92
  - examples/spec_examples/templates/default/foo.erb
82
93
  - lib/minitest-chef-handler.rb
83
94
  - lib/minitest-chef-handler/assertions.rb
95
+ - lib/minitest-chef-handler/ci_runner.rb
84
96
  - lib/minitest-chef-handler/context.rb
85
97
  - lib/minitest-chef-handler/infections.rb
86
98
  - lib/minitest-chef-handler/lookup.rb
@@ -107,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
119
  version: '0'
108
120
  segments:
109
121
  - 0
110
- hash: -1477087555170879978
122
+ hash: -3584139202160582113
111
123
  required_rubygems_version: !ruby/object:Gem::Requirement
112
124
  none: false
113
125
  requirements:
@@ -116,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
128
  version: '0'
117
129
  segments:
118
130
  - 0
119
- hash: -1477087555170879978
131
+ hash: -3584139202160582113
120
132
  requirements: []
121
133
  rubyforge_project:
122
134
  rubygems_version: 1.8.11