ci_reporter 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +8 -8
- data/History.txt +4 -0
- data/README.rdoc +11 -0
- data/acceptance/spinach/Gemfile.lock +2 -2
- data/ci_reporter.gemspec +2 -2
- data/lib/ci/reporter/rspec.rb +7 -6
- data/lib/ci/reporter/version.rb +1 -1
- data/spec/ci/reporter/rspec_spec.rb +6 -2
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -26,14 +26,14 @@ GEM
|
|
26
26
|
rake (0.9.2.2)
|
27
27
|
rcov (1.0.0)
|
28
28
|
rdoc (3.9.2)
|
29
|
-
rspec (2.
|
30
|
-
rspec-core (~> 2.
|
31
|
-
rspec-expectations (~> 2.
|
32
|
-
rspec-mocks (~> 2.
|
33
|
-
rspec-core (2.
|
34
|
-
rspec-expectations (2.
|
35
|
-
diff-lcs (~> 1.1.
|
36
|
-
rspec-mocks (2.
|
29
|
+
rspec (2.12.0)
|
30
|
+
rspec-core (~> 2.12.0)
|
31
|
+
rspec-expectations (~> 2.12.0)
|
32
|
+
rspec-mocks (~> 2.12.0)
|
33
|
+
rspec-core (2.12.1)
|
34
|
+
rspec-expectations (2.12.0)
|
35
|
+
diff-lcs (~> 1.1.3)
|
36
|
+
rspec-mocks (2.12.0)
|
37
37
|
rubyforge (2.0.4)
|
38
38
|
json_pure (>= 1.1.7)
|
39
39
|
spinach (0.1.5.3)
|
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -14,15 +14,21 @@ CI::Reporter works best with projects that use a +Rakefile+ along with the stand
|
|
14
14
|
|
15
15
|
require 'ci/reporter/rake/rspec' # use this if you're using RSpec
|
16
16
|
require 'ci/reporter/rake/cucumber' # use this if you're using Cucumber
|
17
|
+
require 'ci/reporter/rake/spinach' # use this if you're using Spinach
|
17
18
|
require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit
|
18
19
|
require 'ci/reporter/rake/minitest' # use this if you're using Ruby 1.9 or minitest
|
19
20
|
|
21
|
+
Note: If you use both cucumber and spinach, you are likely to see strange errors, due to
|
22
|
+
`gherkin` and `gherkin-ruby` both being loaded. So, you should choose only one of
|
23
|
+
cucumber and spinach.
|
24
|
+
|
20
25
|
2. Next, either modify your Rakefile to make the <code>ci:setup:rspec</code>, <code>ci:setup:cucumber</code>, <code>ci:setup:testunit</code> or <code>ci:setup:minitest</code> task a dependency of your test tasks, or run one of these rake tasks:
|
21
26
|
|
22
27
|
rake ci:setup:testunit test
|
23
28
|
rake ci:setup:minitest test
|
24
29
|
rake ci:setup:rspec spec
|
25
30
|
rake ci:setup:cucumber features
|
31
|
+
rake ci:setup:spinach features
|
26
32
|
|
27
33
|
== Jenkins setup
|
28
34
|
|
@@ -41,6 +47,7 @@ If you don't have control over the Rakefile or don't want to modify it, CI::Repo
|
|
41
47
|
rake -f GEM_PATH/stub.rake ci:setup:minitest test
|
42
48
|
rake -f GEM_PATH/stub.rake ci:setup:rspec spec
|
43
49
|
rake -f GEM_PATH/stub.rake ci:setup:cucumber features
|
50
|
+
rake -f GEM_PATH/stub.rake ci:setup:spinach features
|
44
51
|
|
45
52
|
If for some reason you can't use the above technique to inject CI::Reporter (e.g., you're not using Rake), you'll have to do one of these:
|
46
53
|
|
@@ -55,6 +62,10 @@ If for some reason you can't use the above technique to inject CI::Reporter (e.g
|
|
55
62
|
|
56
63
|
ruby -r GEM_PATH/lib/ci/reporter/rake/cucumber_loader -S cucumber --format CI::Reporter::Cucumber
|
57
64
|
|
65
|
+
4. If you're using Spinach, you'll want to do this:
|
66
|
+
|
67
|
+
ruby -r GEM_PATH/lib/ci/reporter/rake/spinach_loader -S spinach
|
68
|
+
|
58
69
|
There's a bit of a chicken and egg problem because rubygems needs to be loaded before you can require any CI::Reporter files. If you cringe hard-coding a full path to a specific version of the gem, you can also copy the +cucumber_loader+ file into your project and require it directly -- the contents are version-agnostic and are not likely to change in future releases.
|
59
70
|
|
60
71
|
== Environment Variables
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../..
|
3
3
|
specs:
|
4
|
-
ci_reporter (1.
|
4
|
+
ci_reporter (1.8.2)
|
5
5
|
builder (>= 2.1.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
rspec-expectations (2.8.0)
|
20
20
|
diff-lcs (~> 1.1.2)
|
21
21
|
rspec-mocks (2.8.0)
|
22
|
-
spinach (0.
|
22
|
+
spinach (0.6.0)
|
23
23
|
colorize
|
24
24
|
gherkin-ruby (~> 0.2.0)
|
25
25
|
|
data/ci_reporter.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "ci_reporter"
|
5
|
-
s.version = "1.8.
|
5
|
+
s.version = "1.8.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-12-
|
9
|
+
s.date = "2012-12-04"
|
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"]
|
data/lib/ci/reporter/rspec.rb
CHANGED
@@ -14,6 +14,11 @@ module CI
|
|
14
14
|
BaseFormatter = ::RSpec::Core::Formatters::BaseFormatter
|
15
15
|
ProgressFormatter = ::RSpec::Core::Formatters::ProgressFormatter
|
16
16
|
DocFormatter = ::RSpec::Core::Formatters::DocumentationFormatter
|
17
|
+
# See https://github.com/nicksieger/ci_reporter/issues/76 and
|
18
|
+
# https://github.com/nicksieger/ci_reporter/issues/80
|
19
|
+
require 'rspec/version'
|
20
|
+
RSpec_2_12_0_bug = (::RSpec::Version::STRING == '2.12.0' &&
|
21
|
+
!BaseFormatter.instance_methods(false).map(&:to_s).include?("format_backtrace"))
|
17
22
|
rescue LoadError => first_error
|
18
23
|
begin
|
19
24
|
require 'spec/runner/formatter/progress_bar_formatter'
|
@@ -75,12 +80,8 @@ module CI
|
|
75
80
|
output = []
|
76
81
|
output.push "#{exception.class.name << ":"}" unless exception.class.name =~ /RSpec/
|
77
82
|
output.push @exception.message
|
78
|
-
|
79
|
-
format_metadata =
|
80
|
-
@example.metadata
|
81
|
-
else
|
82
|
-
@example
|
83
|
-
end
|
83
|
+
|
84
|
+
format_metadata = RSpecFormatters::RSpec_2_12_0_bug ? @example.metadata : @example
|
84
85
|
|
85
86
|
[@formatter.format_backtrace(@exception.backtrace, format_metadata)].flatten.each do |backtrace_info|
|
86
87
|
backtrace_info.lines.each do |line|
|
data/lib/ci/reporter/version.rb
CHANGED
@@ -132,8 +132,12 @@ describe "The RSpec reporter" do
|
|
132
132
|
before(:each) do
|
133
133
|
@formatter = mock "formatter"
|
134
134
|
@formatter.should_receive(:format_backtrace).and_return("backtrace")
|
135
|
-
@rspec20_example = mock('RSpec2.0 Example',
|
136
|
-
|
135
|
+
@rspec20_example = mock('RSpec2.0 Example',
|
136
|
+
:execution_result => {:exception_encountered => StandardError.new('rspec2.0 ftw')},
|
137
|
+
:metadata => {})
|
138
|
+
@rspec22_example = mock('RSpec2.2 Example',
|
139
|
+
:execution_result => {:exception => StandardError.new('rspec2.2 ftw')},
|
140
|
+
:metadata => {})
|
137
141
|
end
|
138
142
|
|
139
143
|
it 'should handle rspec (< 2.2) execution results' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
prerelease:
|
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-12-
|
12
|
+
date: 2012-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -238,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
segments:
|
240
240
|
- 0
|
241
|
-
hash:
|
241
|
+
hash: 2792942240812227939
|
242
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
243
|
none: false
|
244
244
|
requirements:
|