ci_reporter 1.8.0 → 1.8.1
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.
- data/History.txt +4 -0
- data/Manifest.txt +7 -0
- data/Rakefile +1 -0
- data/acceptance/spinach/Gemfile +4 -0
- data/acceptance/spinach/Gemfile.lock +32 -0
- data/acceptance/spinach/features/spinach_example.feature +24 -0
- data/acceptance/spinach/features/steps/example_steps.rb +36 -0
- data/ci_reporter.gemspec +6 -3
- data/lib/ci/reporter/rake/spinach.rb +19 -0
- data/lib/ci/reporter/rake/spinach_loader.rb +5 -0
- data/lib/ci/reporter/spinach.rb +75 -0
- data/lib/ci/reporter/version.rb +1 -1
- metadata +26 -3
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -10,6 +10,10 @@ acceptance/cucumber/cucumber_example.feature
|
|
10
10
|
acceptance/cucumber/step_definitions/development_steps.rb
|
11
11
|
acceptance/minitest_example_test.rb
|
12
12
|
acceptance/rspec_example_spec.rb
|
13
|
+
acceptance/spinach/Gemfile
|
14
|
+
acceptance/spinach/Gemfile.lock
|
15
|
+
acceptance/spinach/features/spinach_example.feature
|
16
|
+
acceptance/spinach/features/steps/example_steps.rb
|
13
17
|
acceptance/test_unit_example_test.rb
|
14
18
|
acceptance/verification_spec.rb
|
15
19
|
ci_reporter.gemspec
|
@@ -22,11 +26,14 @@ lib/ci/reporter/rake/minitest.rb
|
|
22
26
|
lib/ci/reporter/rake/minitest_loader.rb
|
23
27
|
lib/ci/reporter/rake/rspec.rb
|
24
28
|
lib/ci/reporter/rake/rspec_loader.rb
|
29
|
+
lib/ci/reporter/rake/spinach.rb
|
30
|
+
lib/ci/reporter/rake/spinach_loader.rb
|
25
31
|
lib/ci/reporter/rake/test_unit.rb
|
26
32
|
lib/ci/reporter/rake/test_unit_loader.rb
|
27
33
|
lib/ci/reporter/rake/utils.rb
|
28
34
|
lib/ci/reporter/report_manager.rb
|
29
35
|
lib/ci/reporter/rspec.rb
|
36
|
+
lib/ci/reporter/spinach.rb
|
30
37
|
lib/ci/reporter/test_suite.rb
|
31
38
|
lib/ci/reporter/test_unit.rb
|
32
39
|
lib/ci/reporter/version.rb
|
data/Rakefile
CHANGED
@@ -28,6 +28,7 @@ begin
|
|
28
28
|
p.extra_dev_deps << [ 'rspec', '> 2.0.0' ]
|
29
29
|
p.extra_dev_deps << [ 'test-unit', '> 2.0.0' ]
|
30
30
|
p.extra_dev_deps << [ 'minitest', '~> 2.2.0' ]
|
31
|
+
p.extra_dev_deps << [ 'spinach', '< 0.2' ]
|
31
32
|
|
32
33
|
p.clean_globs += ["spec/reports", "acceptance/reports"]
|
33
34
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
ci_reporter (1.7.3)
|
5
|
+
builder (>= 2.1.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
builder (3.1.4)
|
11
|
+
colorize (0.5.8)
|
12
|
+
diff-lcs (1.1.3)
|
13
|
+
gherkin-ruby (0.2.1)
|
14
|
+
rspec (2.8.0)
|
15
|
+
rspec-core (~> 2.8.0)
|
16
|
+
rspec-expectations (~> 2.8.0)
|
17
|
+
rspec-mocks (~> 2.8.0)
|
18
|
+
rspec-core (2.8.0)
|
19
|
+
rspec-expectations (2.8.0)
|
20
|
+
diff-lcs (~> 1.1.2)
|
21
|
+
rspec-mocks (2.8.0)
|
22
|
+
spinach (0.5.2)
|
23
|
+
colorize
|
24
|
+
gherkin-ruby (~> 0.2.0)
|
25
|
+
|
26
|
+
PLATFORMS
|
27
|
+
ruby
|
28
|
+
|
29
|
+
DEPENDENCIES
|
30
|
+
ci_reporter!
|
31
|
+
rspec
|
32
|
+
spinach
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Feature: Example feature
|
2
|
+
As a conscientious developer who writes features
|
3
|
+
I want to be able to see my features passing on the CI Server
|
4
|
+
So that I can bask in the glow of a green bar
|
5
|
+
|
6
|
+
Scenario: Conscientious developer
|
7
|
+
Given that I am a conscientious developer
|
8
|
+
And I write cucumber features
|
9
|
+
Then I should see a green bar
|
10
|
+
|
11
|
+
Scenario: Lazy hacker
|
12
|
+
Given that I am a lazy hacker
|
13
|
+
And I don't bother writing cucumber features
|
14
|
+
Then I should be fired
|
15
|
+
|
16
|
+
Scenario: Bad coder
|
17
|
+
Given that I can't code for peanuts
|
18
|
+
And I write step definitions that throw exceptions
|
19
|
+
Then I shouldn't be allowed out in public
|
20
|
+
|
21
|
+
Scenario: Missing steps
|
22
|
+
Given that I am a lazy hacker
|
23
|
+
And I don't implement steps before I commit
|
24
|
+
Then I should be fired
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
|
3
|
+
class ExampleFeature < Spinach::FeatureSteps
|
4
|
+
include RSpec::Matchers
|
5
|
+
|
6
|
+
feature 'Example feature'
|
7
|
+
|
8
|
+
Given 'that I am a conscientious developer' do
|
9
|
+
end
|
10
|
+
|
11
|
+
And 'I write cucumber features' do
|
12
|
+
end
|
13
|
+
|
14
|
+
Then 'I should see a green bar' do
|
15
|
+
end
|
16
|
+
|
17
|
+
Given 'that I am a lazy hacker' do
|
18
|
+
end
|
19
|
+
|
20
|
+
And 'I don\'t bother writing cucumber features' do
|
21
|
+
false.should be_true
|
22
|
+
end
|
23
|
+
|
24
|
+
Then 'I should be fired' do
|
25
|
+
end
|
26
|
+
|
27
|
+
Given 'that I can\'t code for peanuts' do
|
28
|
+
end
|
29
|
+
|
30
|
+
And 'I write step definitions that throw exceptions' do
|
31
|
+
raise RuntimeError, "User error!"
|
32
|
+
end
|
33
|
+
|
34
|
+
Then 'I shouldn\'t be allowed out in public' do
|
35
|
+
end
|
36
|
+
end
|
data/ci_reporter.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
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.1"
|
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-
|
9
|
+
s.date = "2012-12-03"
|
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"]
|
13
|
-
s.files = [".travis.yml", "Gemfile", "Gemfile.lock", "History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "acceptance/cucumber/cucumber_example.feature", "acceptance/cucumber/step_definitions/development_steps.rb", "acceptance/minitest_example_test.rb", "acceptance/rspec_example_spec.rb", "acceptance/test_unit_example_test.rb", "acceptance/verification_spec.rb", "ci_reporter.gemspec", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/minitest.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/minitest.rb", "lib/ci/reporter/rake/minitest_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "lib/ci/reporter/rake/utils.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "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", "spec/spec_helper.rb", "stub.rake", "tasks/ci_reporter.rake", ".gemtest"]
|
13
|
+
s.files = [".travis.yml", "Gemfile", "Gemfile.lock", "History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "acceptance/cucumber/cucumber_example.feature", "acceptance/cucumber/step_definitions/development_steps.rb", "acceptance/minitest_example_test.rb", "acceptance/rspec_example_spec.rb", "acceptance/spinach/Gemfile", "acceptance/spinach/Gemfile.lock", "acceptance/spinach/features/spinach_example.feature", "acceptance/spinach/features/steps/example_steps.rb", "acceptance/test_unit_example_test.rb", "acceptance/verification_spec.rb", "ci_reporter.gemspec", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/minitest.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/minitest.rb", "lib/ci/reporter/rake/minitest_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/spinach.rb", "lib/ci/reporter/rake/spinach_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "lib/ci/reporter/rake/utils.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/spinach.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "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", "spec/spec_helper.rb", "stub.rake", "tasks/ci_reporter.rake", ".gemtest"]
|
14
14
|
s.homepage = "http://caldersphere.rubyforge.org/ci_reporter"
|
15
15
|
s.rdoc_options = ["--main", "README.rdoc", "-SHN", "-f", "darkfish"]
|
16
16
|
s.require_paths = ["lib"]
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency(%q<rspec>, ["> 2.0.0"])
|
30
30
|
s.add_development_dependency(%q<test-unit>, ["> 2.0.0"])
|
31
31
|
s.add_development_dependency(%q<minitest>, ["~> 2.2.0"])
|
32
|
+
s.add_development_dependency(%q<spinach>, ["< 0.2"])
|
32
33
|
s.add_development_dependency(%q<hoe>, ["~> 2.12"])
|
33
34
|
s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
|
34
35
|
else
|
@@ -38,6 +39,7 @@ Gem::Specification.new do |s|
|
|
38
39
|
s.add_dependency(%q<rspec>, ["> 2.0.0"])
|
39
40
|
s.add_dependency(%q<test-unit>, ["> 2.0.0"])
|
40
41
|
s.add_dependency(%q<minitest>, ["~> 2.2.0"])
|
42
|
+
s.add_dependency(%q<spinach>, ["< 0.2"])
|
41
43
|
s.add_dependency(%q<hoe>, ["~> 2.12"])
|
42
44
|
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
43
45
|
end
|
@@ -48,6 +50,7 @@ Gem::Specification.new do |s|
|
|
48
50
|
s.add_dependency(%q<rspec>, ["> 2.0.0"])
|
49
51
|
s.add_dependency(%q<test-unit>, ["> 2.0.0"])
|
50
52
|
s.add_dependency(%q<minitest>, ["~> 2.2.0"])
|
53
|
+
s.add_dependency(%q<spinach>, ["< 0.2"])
|
51
54
|
s.add_dependency(%q<hoe>, ["~> 2.12"])
|
52
55
|
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
53
56
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
namespace :ci do
|
2
|
+
namespace :setup do
|
3
|
+
task :spinach_report_cleanup do
|
4
|
+
rm_rf ENV["CI_REPORTS"] || "features/reports"
|
5
|
+
end
|
6
|
+
|
7
|
+
task :spinach => :spinach_report_cleanup do
|
8
|
+
loader = File.expand_path('prepare_ci_reporter.rb', ENV["SPINACH_SUPPORT_PATH"] || 'features/support')
|
9
|
+
if !File.exist? loader
|
10
|
+
File.open(loader, 'w') do |f|
|
11
|
+
f.puts "require 'ci/reporter/rake/spinach_loader'"
|
12
|
+
end
|
13
|
+
at_exit do
|
14
|
+
File.unlink loader
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'ci/reporter/core'
|
2
|
+
require 'spinach'
|
3
|
+
|
4
|
+
module CI
|
5
|
+
module Reporter
|
6
|
+
class Spinach < ::Spinach::Reporter
|
7
|
+
def initialize
|
8
|
+
@report_manager = ReportManager.new('features')
|
9
|
+
end
|
10
|
+
|
11
|
+
def before_feature_run(feature)
|
12
|
+
@test_suite = TestSuite.new(feature.is_a?(Hash) ? feature['name'] : feature.name)
|
13
|
+
@test_suite.start
|
14
|
+
end
|
15
|
+
|
16
|
+
def before_scenario_run(scenario, step_definitions = nil)
|
17
|
+
@test_case = TestCase.new(scenario.is_a?(Hash) ? scenario['name'] : scenario.name)
|
18
|
+
@test_case.start
|
19
|
+
end
|
20
|
+
|
21
|
+
def on_undefined_step(step, failure, step_definitions = nil)
|
22
|
+
@test_case.failures << SpinachFailure.new(:error, step, failure, nil)
|
23
|
+
end
|
24
|
+
|
25
|
+
def on_failed_step(step, failure, step_location, step_definitions = nil)
|
26
|
+
@test_case.failures << SpinachFailure.new(:failed, step, failure, step_location)
|
27
|
+
end
|
28
|
+
|
29
|
+
def on_error_step(step, failure, step_location, step_definitions = nil)
|
30
|
+
@test_case.failures << SpinachFailure.new(:error, step, failure, step_location)
|
31
|
+
end
|
32
|
+
|
33
|
+
def after_scenario_run(scenario, step_definitions = nil)
|
34
|
+
@test_case.finish
|
35
|
+
@test_suite.testcases << @test_case
|
36
|
+
@test_case = nil
|
37
|
+
end
|
38
|
+
|
39
|
+
def after_feature_run(feature)
|
40
|
+
@test_suite.finish
|
41
|
+
@report_manager.write_report(@test_suite)
|
42
|
+
@test_suite = nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
class SpinachFailure
|
47
|
+
def initialize(type, step, failure, step_location)
|
48
|
+
@type = type
|
49
|
+
@step = step
|
50
|
+
@failure = failure
|
51
|
+
@step_location = step_location
|
52
|
+
end
|
53
|
+
|
54
|
+
def failure?
|
55
|
+
@type == :failed
|
56
|
+
end
|
57
|
+
|
58
|
+
def error?
|
59
|
+
@type == :error
|
60
|
+
end
|
61
|
+
|
62
|
+
def name
|
63
|
+
@failure.class.name
|
64
|
+
end
|
65
|
+
|
66
|
+
def message
|
67
|
+
@failure.message
|
68
|
+
end
|
69
|
+
|
70
|
+
def location
|
71
|
+
@failure.backtrace.join("\n")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
data/lib/ci/reporter/version.rb
CHANGED
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.1
|
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
|
+
date: 2012-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 2.2.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: spinach
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - <
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - <
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0.2'
|
110
126
|
- !ruby/object:Gem::Dependency
|
111
127
|
name: hoe
|
112
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,6 +181,10 @@ files:
|
|
165
181
|
- acceptance/cucumber/step_definitions/development_steps.rb
|
166
182
|
- acceptance/minitest_example_test.rb
|
167
183
|
- acceptance/rspec_example_spec.rb
|
184
|
+
- acceptance/spinach/Gemfile
|
185
|
+
- acceptance/spinach/Gemfile.lock
|
186
|
+
- acceptance/spinach/features/spinach_example.feature
|
187
|
+
- acceptance/spinach/features/steps/example_steps.rb
|
168
188
|
- acceptance/test_unit_example_test.rb
|
169
189
|
- acceptance/verification_spec.rb
|
170
190
|
- ci_reporter.gemspec
|
@@ -177,11 +197,14 @@ files:
|
|
177
197
|
- lib/ci/reporter/rake/minitest_loader.rb
|
178
198
|
- lib/ci/reporter/rake/rspec.rb
|
179
199
|
- lib/ci/reporter/rake/rspec_loader.rb
|
200
|
+
- lib/ci/reporter/rake/spinach.rb
|
201
|
+
- lib/ci/reporter/rake/spinach_loader.rb
|
180
202
|
- lib/ci/reporter/rake/test_unit.rb
|
181
203
|
- lib/ci/reporter/rake/test_unit_loader.rb
|
182
204
|
- lib/ci/reporter/rake/utils.rb
|
183
205
|
- lib/ci/reporter/report_manager.rb
|
184
206
|
- lib/ci/reporter/rspec.rb
|
207
|
+
- lib/ci/reporter/spinach.rb
|
185
208
|
- lib/ci/reporter/test_suite.rb
|
186
209
|
- lib/ci/reporter/test_unit.rb
|
187
210
|
- lib/ci/reporter/version.rb
|
@@ -215,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
238
|
version: '0'
|
216
239
|
segments:
|
217
240
|
- 0
|
218
|
-
hash:
|
241
|
+
hash: 1579576962037098408
|
219
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
243
|
none: false
|
221
244
|
requirements:
|