ci_reporter 1.7.1 → 1.7.2

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.
@@ -1,3 +1,8 @@
1
+ == 1.7.2 (9/10/12)
2
+
3
+ - #73: do not search ancestors when checking Test::Unit.const_defined? (Sean Walbran)
4
+ - #68: make sure @suite is not nil (Patrick Cheng)
5
+
1
6
  == 1.7.1 (08/16/12)
2
7
 
3
8
  - #58: Use const_defined? for checking a constant is defined (Kouhei Sutou)
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ci_reporter"
5
- s.version = "1.7.1"
5
+ s.version = "1.7.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Nick Sieger"]
9
- s.date = "2012-08-16"
9
+ s.date = "2012-09-10"
10
10
  s.description = "CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows you to generate XML reports of your test, spec and/or feature runs. The resulting files can be read by a continuous integration system that understands Ant's JUnit report XML format, thus allowing your CI system to track test/spec successes and failures."
11
11
  s.email = "nick@nicksieger.com"
12
12
  s.extra_rdoc_files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc"]
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
15
15
  s.rdoc_options = ["--main", "README.rdoc", "-SHN", "-f", "darkfish"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = "caldersphere"
18
- s.rubygems_version = "1.8.15"
18
+ s.rubygems_version = "1.8.24"
19
19
  s.summary = "CI::Reporter allows you to generate reams of XML for use with continuous integration systems."
20
- s.test_files = ["spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb"]
20
+ s.test_files = ["spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb"]
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 3
@@ -116,9 +116,11 @@ module CI
116
116
  return
117
117
  end
118
118
  @test_case.finish
119
- @test_case.failures << CucumberFailure.new(table_row) if table_row.failed?
120
- test_suite.testcases << @test_case
121
- @test_case = nil
119
+ if table_row.respond_to? :failed?
120
+ @test_case.failures << CucumberFailure.new(table_row) if table_row.failed?
121
+ test_suite.testcases << @test_case
122
+ @test_case = nil
123
+ end
122
124
  end
123
125
  end
124
126
  end
@@ -203,8 +203,10 @@ module CI
203
203
  end
204
204
 
205
205
  def write_report
206
- @suite.finish
207
- @report_manager.write_report(@suite)
206
+ if @suite
207
+ @suite.finish
208
+ @report_manager.write_report(@suite)
209
+ end
208
210
  end
209
211
 
210
212
  def new_suite(name)
@@ -11,10 +11,30 @@ module CI
11
11
  # Factory for constructing either a CI::Reporter::TestUnitFailure or CI::Reporter::TestUnitError depending on the result
12
12
  # of the test.
13
13
  class Failure
14
+ CONST_DEFINED_ARITY = Module.method(:const_defined?).arity
15
+
16
+ def self.omission_constant?
17
+ if CONST_DEFINED_ARITY == 1 # 1.8.7 varieties
18
+ Test::Unit.const_defined?(:Omission)
19
+ else
20
+ Test::Unit.const_defined?(:Omission, false)
21
+ end
22
+ end
23
+
24
+ def self.notification_constant?
25
+ if CONST_DEFINED_ARITY == 1 # 1.8.7 varieties
26
+ Test::Unit.const_defined?(:Notification)
27
+ else
28
+ Test::Unit.const_defined?(:Notification, false)
29
+ end
30
+ end
31
+
14
32
  def self.new(fault)
15
33
  return TestUnitFailure.new(fault) if fault.kind_of?(Test::Unit::Failure)
16
- return TestUnitSkipped.new(fault) if Test::Unit.const_defined?(:Omission) && (fault.kind_of?(Test::Unit::Omission) || fault.kind_of?(Test::Unit::Pending))
17
- return TestUnitNotification.new(fault) if Test::Unit.const_defined?(:Notification) && fault.kind_of?(Test::Unit::Notification)
34
+ return TestUnitSkipped.new(fault) if omission_constant? &&
35
+ (fault.kind_of?(Test::Unit::Omission) || fault.kind_of?(Test::Unit::Pending))
36
+ return TestUnitNotification.new(fault) if notification_constant? &&
37
+ fault.kind_of?(Test::Unit::Notification)
18
38
  TestUnitError.new(fault)
19
39
  end
20
40
  end
@@ -6,6 +6,6 @@
6
6
 
7
7
  module CI
8
8
  module Reporter
9
- VERSION = "1.7.1"
9
+ VERSION = "1.7.2"
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,155 +1,175 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ci_reporter
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.2
4
5
  prerelease:
5
- version: 1.7.1
6
6
  platform: ruby
7
- authors:
8
- - Nick Sieger
7
+ authors:
8
+ - Nick Sieger
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-08-16 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: builder
17
- version_requirements: &id001 !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.1.2
23
- requirement: *id001
24
- prerelease: false
25
- type: :runtime
26
- - !ruby/object:Gem::Dependency
27
- name: rubyforge
28
- version_requirements: &id002 !ruby/object:Gem::Requirement
29
- none: false
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.0.4
34
- requirement: *id002
35
- prerelease: false
36
- type: :development
37
- - !ruby/object:Gem::Dependency
38
- name: hoe
39
- version_requirements: &id003 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- version: "2.12"
45
- requirement: *id003
46
- prerelease: false
47
- type: :development
48
- - !ruby/object:Gem::Dependency
49
- name: rdoc
50
- version_requirements: &id004 !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
53
- - - ~>
54
- - !ruby/object:Gem::Version
55
- version: "3.10"
56
- requirement: *id004
57
- prerelease: false
58
- type: :development
59
- description: CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows you to generate XML reports of your test, spec and/or feature runs. The resulting files can be read by a continuous integration system that understands Ant's JUnit report XML format, thus allowing your CI system to track test/spec successes and failures.
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: builder
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 2.1.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.1.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: rubyforge
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.0.4
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.0.4
46
+ - !ruby/object:Gem::Dependency
47
+ name: hoe
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.12'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.12'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rdoc
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '3.10'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '3.10'
78
+ description: CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows
79
+ you to generate XML reports of your test, spec and/or feature runs. The resulting
80
+ files can be read by a continuous integration system that understands Ant's JUnit
81
+ report XML format, thus allowing your CI system to track test/spec successes and
82
+ failures.
60
83
  email: nick@nicksieger.com
61
84
  executables: []
62
-
63
85
  extensions: []
64
-
65
- extra_rdoc_files:
66
- - History.txt
67
- - LICENSE.txt
68
- - Manifest.txt
69
- - README.rdoc
70
- files:
71
- - .travis.yml
72
- - Gemfile
73
- - Gemfile.lock
74
- - History.txt
75
- - LICENSE.txt
76
- - Manifest.txt
77
- - README.rdoc
78
- - Rakefile
79
- - acceptance/cucumber/cucumber_example.feature
80
- - acceptance/cucumber/step_definitions/development_steps.rb
81
- - acceptance/minitest_example_test.rb
82
- - acceptance/rspec_example_spec.rb
83
- - acceptance/test_unit_example_test.rb
84
- - acceptance/verification_spec.rb
85
- - ci_reporter.gemspec
86
- - lib/ci/reporter/core.rb
87
- - lib/ci/reporter/cucumber.rb
88
- - lib/ci/reporter/minitest.rb
89
- - lib/ci/reporter/rake/cucumber.rb
90
- - lib/ci/reporter/rake/cucumber_loader.rb
91
- - lib/ci/reporter/rake/minitest.rb
92
- - lib/ci/reporter/rake/minitest_loader.rb
93
- - lib/ci/reporter/rake/rspec.rb
94
- - lib/ci/reporter/rake/rspec_loader.rb
95
- - lib/ci/reporter/rake/test_unit.rb
96
- - lib/ci/reporter/rake/test_unit_loader.rb
97
- - lib/ci/reporter/rake/utils.rb
98
- - lib/ci/reporter/report_manager.rb
99
- - lib/ci/reporter/rspec.rb
100
- - lib/ci/reporter/test_suite.rb
101
- - lib/ci/reporter/test_unit.rb
102
- - lib/ci/reporter/version.rb
103
- - spec/ci/reporter/cucumber_spec.rb
104
- - spec/ci/reporter/output_capture_spec.rb
105
- - spec/ci/reporter/rake/rake_tasks_spec.rb
106
- - spec/ci/reporter/report_manager_spec.rb
107
- - spec/ci/reporter/rspec_spec.rb
108
- - spec/ci/reporter/test_suite_spec.rb
109
- - spec/ci/reporter/test_unit_spec.rb
110
- - spec/spec_helper.rb
111
- - stub.rake
112
- - tasks/ci_reporter.rake
113
- - .gemtest
86
+ extra_rdoc_files:
87
+ - History.txt
88
+ - LICENSE.txt
89
+ - Manifest.txt
90
+ - README.rdoc
91
+ files:
92
+ - .travis.yml
93
+ - Gemfile
94
+ - Gemfile.lock
95
+ - History.txt
96
+ - LICENSE.txt
97
+ - Manifest.txt
98
+ - README.rdoc
99
+ - Rakefile
100
+ - acceptance/cucumber/cucumber_example.feature
101
+ - acceptance/cucumber/step_definitions/development_steps.rb
102
+ - acceptance/minitest_example_test.rb
103
+ - acceptance/rspec_example_spec.rb
104
+ - acceptance/test_unit_example_test.rb
105
+ - acceptance/verification_spec.rb
106
+ - ci_reporter.gemspec
107
+ - lib/ci/reporter/core.rb
108
+ - lib/ci/reporter/cucumber.rb
109
+ - lib/ci/reporter/minitest.rb
110
+ - lib/ci/reporter/rake/cucumber.rb
111
+ - lib/ci/reporter/rake/cucumber_loader.rb
112
+ - lib/ci/reporter/rake/minitest.rb
113
+ - lib/ci/reporter/rake/minitest_loader.rb
114
+ - lib/ci/reporter/rake/rspec.rb
115
+ - lib/ci/reporter/rake/rspec_loader.rb
116
+ - lib/ci/reporter/rake/test_unit.rb
117
+ - lib/ci/reporter/rake/test_unit_loader.rb
118
+ - lib/ci/reporter/rake/utils.rb
119
+ - lib/ci/reporter/report_manager.rb
120
+ - lib/ci/reporter/rspec.rb
121
+ - lib/ci/reporter/test_suite.rb
122
+ - lib/ci/reporter/test_unit.rb
123
+ - lib/ci/reporter/version.rb
124
+ - spec/ci/reporter/cucumber_spec.rb
125
+ - spec/ci/reporter/output_capture_spec.rb
126
+ - spec/ci/reporter/rake/rake_tasks_spec.rb
127
+ - spec/ci/reporter/report_manager_spec.rb
128
+ - spec/ci/reporter/rspec_spec.rb
129
+ - spec/ci/reporter/test_suite_spec.rb
130
+ - spec/ci/reporter/test_unit_spec.rb
131
+ - spec/spec_helper.rb
132
+ - stub.rake
133
+ - tasks/ci_reporter.rake
134
+ - .gemtest
114
135
  homepage: http://caldersphere.rubyforge.org/ci_reporter
115
136
  licenses: []
116
-
117
137
  post_install_message:
118
- rdoc_options:
119
- - --main
120
- - README.rdoc
121
- - -SHN
122
- - -f
123
- - darkfish
124
- require_paths:
125
- - lib
126
- required_ruby_version: !ruby/object:Gem::Requirement
138
+ rdoc_options:
139
+ - --main
140
+ - README.rdoc
141
+ - -SHN
142
+ - -f
143
+ - darkfish
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
127
147
  none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 2
132
- segments:
133
- - 0
134
- version: "0"
135
- required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ segments:
153
+ - 0
154
+ hash: -4021450856772659022
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
136
156
  none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: "0"
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
141
161
  requirements: []
142
-
143
162
  rubyforge_project: caldersphere
144
- rubygems_version: 1.8.15
163
+ rubygems_version: 1.8.24
145
164
  signing_key:
146
165
  specification_version: 3
147
- summary: CI::Reporter allows you to generate reams of XML for use with continuous integration systems.
148
- test_files:
149
- - spec/ci/reporter/cucumber_spec.rb
150
- - spec/ci/reporter/output_capture_spec.rb
151
- - spec/ci/reporter/report_manager_spec.rb
152
- - spec/ci/reporter/rspec_spec.rb
153
- - spec/ci/reporter/test_suite_spec.rb
154
- - spec/ci/reporter/test_unit_spec.rb
155
- - spec/ci/reporter/rake/rake_tasks_spec.rb
166
+ summary: CI::Reporter allows you to generate reams of XML for use with continuous
167
+ integration systems.
168
+ test_files:
169
+ - spec/ci/reporter/cucumber_spec.rb
170
+ - spec/ci/reporter/output_capture_spec.rb
171
+ - spec/ci/reporter/rake/rake_tasks_spec.rb
172
+ - spec/ci/reporter/report_manager_spec.rb
173
+ - spec/ci/reporter/rspec_spec.rb
174
+ - spec/ci/reporter/test_suite_spec.rb
175
+ - spec/ci/reporter/test_unit_spec.rb