ci_reporter 1.9.3 → 2.0.0.alpha1

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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +22 -0
  3. data/.travis.yml +2 -6
  4. data/Gemfile +0 -9
  5. data/History.txt +0 -4
  6. data/LICENSE.txt +23 -21
  7. data/README.md +90 -0
  8. data/Rakefile +5 -99
  9. data/ci_reporter.gemspec +23 -52
  10. data/gemfiles/.gitignore +1 -0
  11. data/lib/ci/reporter/core.rb +0 -4
  12. data/lib/ci/reporter/internal.rb +31 -0
  13. data/lib/ci/reporter/rake/utils.rb +0 -4
  14. data/lib/ci/reporter/report_manager.rb +7 -11
  15. data/lib/ci/reporter/test_suite.rb +1 -9
  16. data/lib/ci/reporter/version.rb +1 -7
  17. data/spec/ci/reporter/output_capture_spec.rb +3 -7
  18. data/spec/ci/reporter/report_manager_spec.rb +6 -10
  19. data/spec/ci/reporter/test_suite_spec.rb +0 -4
  20. data/spec/spec_helper.rb +0 -7
  21. metadata +29 -138
  22. data/.gemtest +0 -0
  23. data/.hoerc +0 -2
  24. data/.travis.before_install.sh +0 -13
  25. data/Manifest.txt +0 -50
  26. data/README.rdoc +0 -111
  27. data/acceptance/cucumber/cucumber_example.feature +0 -19
  28. data/acceptance/cucumber/step_definitions/development_steps.rb +0 -40
  29. data/acceptance/minitest_example_test.rb +0 -17
  30. data/acceptance/rspec_example_spec.rb +0 -24
  31. data/acceptance/spinach/features/spinach_example.feature +0 -24
  32. data/acceptance/spinach/features/steps/example_spinach_feature.rb +0 -34
  33. data/acceptance/test_unit_example_test.rb +0 -23
  34. data/acceptance/verification_spec.rb +0 -185
  35. data/lib/ci/reporter/cucumber.rb +0 -127
  36. data/lib/ci/reporter/minitest.rb +0 -226
  37. data/lib/ci/reporter/rake/cucumber.rb +0 -17
  38. data/lib/ci/reporter/rake/cucumber_loader.rb +0 -6
  39. data/lib/ci/reporter/rake/minitest.rb +0 -15
  40. data/lib/ci/reporter/rake/minitest_loader.rb +0 -9
  41. data/lib/ci/reporter/rake/rspec.rb +0 -31
  42. data/lib/ci/reporter/rake/rspec_loader.rb +0 -6
  43. data/lib/ci/reporter/rake/spinach.rb +0 -19
  44. data/lib/ci/reporter/rake/spinach_loader.rb +0 -5
  45. data/lib/ci/reporter/rake/test_unit.rb +0 -15
  46. data/lib/ci/reporter/rake/test_unit_loader.rb +0 -38
  47. data/lib/ci/reporter/rspec.rb +0 -220
  48. data/lib/ci/reporter/spinach.rb +0 -80
  49. data/lib/ci/reporter/test_unit.rb +0 -163
  50. data/spec/ci/reporter/cucumber_spec.rb +0 -230
  51. data/spec/ci/reporter/rake/rake_tasks_spec.rb +0 -110
  52. data/spec/ci/reporter/rspec_spec.rb +0 -156
  53. data/spec/ci/reporter/test_unit_spec.rb +0 -152
  54. data/stub.rake +0 -16
  55. data/tasks/ci_reporter.rake +0 -20
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2012 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require 'fileutils'
6
2
 
7
3
  module CI #:nodoc:
@@ -12,15 +8,15 @@ module CI #:nodoc:
12
8
  @basename = "#{@basedir}/#{prefix.upcase}"
13
9
  FileUtils.mkdir_p(@basedir)
14
10
  end
15
-
11
+
16
12
  def write_report(suite)
17
13
  File.open(filename_for(suite), "w") do |f|
18
14
  f << suite.to_xml
19
15
  end
20
16
  end
21
-
17
+
22
18
  private
23
-
19
+
24
20
 
25
21
  # creates a uniqe filename per suite
26
22
  # to prevent results from being overwritten
@@ -39,16 +35,16 @@ module CI #:nodoc:
39
35
  def filename_for(suite)
40
36
  basename = "#{@basename}-#{suite.name.gsub(/[^a-zA-Z0-9]+/, '-')}"
41
37
  suffix = "xml"
42
-
38
+
43
39
  # shorten basename if it exceeds 240 characters
44
40
  # most filesystems have a 255 character limit
45
41
  # so leave some room for the sidesteps
46
42
  max_filename_size = (ENV['MAX_FILENAME_SIZE'] || MAX_FILENAME_SIZE).to_i
47
43
  basename = basename[0..max_filename_size] if basename.length > max_filename_size
48
-
44
+
49
45
  # the initial filename, e.g. SPEC-MailsController.xml
50
46
  filename = [basename, suffix].join(".")
51
-
47
+
52
48
  # if the initial filename is already in use
53
49
  # do sidesteps, beginning with SPEC-MailsController.0.xml
54
50
  i = 0
@@ -56,7 +52,7 @@ module CI #:nodoc:
56
52
  filename = [basename, i, suffix].join(".")
57
53
  i += 1
58
54
  end
59
-
55
+
60
56
  filename
61
57
  end
62
58
  end
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2012, 2014 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require 'delegate'
6
2
  require 'stringio'
7
3
  require 'time'
@@ -19,11 +15,7 @@ module CI
19
15
  end
20
16
 
21
17
  def self.wrap(io, &assign)
22
- if defined?(RUBY_ENGINE) # JRuby, Ruby 1.9, etc.
23
- Delegate.new(io, &assign)
24
- else # Ruby 1.8 requires streams to be subclass of IO
25
- IO.new(io.fileno, "w").tap {|x| x.extend self; x.capture(io, &assign) }
26
- end
18
+ Delegate.new(io, &assign)
27
19
  end
28
20
 
29
21
  # Start capturing IO, using the given block to assign self to the proper IO global.
@@ -1,11 +1,5 @@
1
- #--
2
- # Copyright (c) 2006-2014 Nick Sieger <nicksieger@gmail.com>
3
- # See the file LICENSE.txt included with the distribution for
4
- # software license details.
5
- #++
6
-
7
1
  module CI
8
2
  module Reporter
9
- VERSION = "1.9.3"
3
+ VERSION = "2.0.0.alpha1"
10
4
  end
11
5
  end
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2012 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require File.dirname(__FILE__) + "/../../spec_helper.rb"
6
2
  require 'rexml/document'
7
3
 
@@ -41,7 +37,7 @@ describe "Output capture" do
41
37
  $stdout.object_id.should == out.object_id
42
38
  $stderr.object_id.should == err.object_id
43
39
  end
44
-
40
+
45
41
  it "should capture only during run of owner test suite" do
46
42
  $stdout.print "A"
47
43
  $stderr.print "A"
@@ -54,11 +50,11 @@ describe "Output capture" do
54
50
  @suite.stdout.should == "B"
55
51
  @suite.stderr.should == "B"
56
52
  end
57
-
53
+
58
54
  it "should not barf when commands are executed with back-ticks" do
59
55
  @suite.start
60
56
  `echo "B"`
61
57
  @suite.finish
62
58
  end
63
-
59
+
64
60
  end
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2014 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require File.dirname(__FILE__) + "/../../spec_helper.rb"
6
2
 
7
3
  describe "The ReportManager" do
@@ -17,14 +13,14 @@ describe "The ReportManager" do
17
13
 
18
14
  it "should create the report directory according to the given prefix" do
19
15
  CI::Reporter::ReportManager.new("spec")
20
- File.directory?(@reports_dir).should be_true
16
+ File.directory?(@reports_dir).should be true
21
17
  end
22
18
 
23
19
  it "should create the report directory based on CI_REPORTS environment variable if set" do
24
20
  @reports_dir = "#{Dir.getwd}/dummy"
25
21
  ENV["CI_REPORTS"] = @reports_dir
26
22
  CI::Reporter::ReportManager.new("spec")
27
- File.directory?(@reports_dir).should be_true
23
+ File.directory?(@reports_dir).should be true
28
24
  end
29
25
 
30
26
  it "should write reports based on name and xml content of a test suite" do
@@ -34,7 +30,7 @@ describe "The ReportManager" do
34
30
  suite.should_receive(:to_xml).and_return("<xml></xml>")
35
31
  reporter.write_report(suite)
36
32
  filename = "#{REPORTS_DIR}/SPEC-some-test-suite-name.xml"
37
- File.exist?(filename).should be_true
33
+ File.exist?(filename).should be true
38
34
  File.open(filename) {|f| f.read.should == "<xml></xml>"}
39
35
  end
40
36
 
@@ -47,7 +43,7 @@ describe "The ReportManager" do
47
43
  reporter.write_report(suite)
48
44
  filename = "#{REPORTS_DIR}/SPEC-#{very_long_name}"[0..CI::Reporter::ReportManager::MAX_FILENAME_SIZE].gsub(/\s/, '-') + ".xml"
49
45
  filename.length.should be <= 255
50
- File.exist?(filename).should be_true
46
+ File.exist?(filename).should be true
51
47
  File.open(filename) {|f| f.read.should == "<xml></xml>"}
52
48
  end
53
49
 
@@ -61,7 +57,7 @@ describe "The ReportManager" do
61
57
  reporter.write_report(suite)
62
58
  filename = "#{REPORTS_DIR}/SPEC-#{very_long_name}"[0..170].gsub(/\s/, '-') + ".xml"
63
59
  filename.length.should be <= 188
64
- File.exist?(filename).should be_true
60
+ File.exist?(filename).should be true
65
61
  File.open(filename) {|f| f.read.should == "<xml></xml>"}
66
62
  end
67
63
 
@@ -74,6 +70,6 @@ describe "The ReportManager" do
74
70
  suite.should_receive(:name).and_return("colliding test suite name")
75
71
  suite.should_receive(:to_xml).and_return("<xml></xml>")
76
72
  reporter.write_report(suite)
77
- File.exist?(filename.sub('.xml', '.0.xml')).should be_true
73
+ File.exist?(filename.sub('.xml', '.0.xml')).should be true
78
74
  end
79
75
  end
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2013 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require File.dirname(__FILE__) + "/../../spec_helper.rb"
6
2
  require 'rexml/document'
7
3
 
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2006-2013 Nick Sieger <nicksieger@gmail.com>
2
- # See the file LICENSE.txt included with the distribution for
3
- # software license details.
4
-
5
1
  require 'rubygems'
6
2
  begin
7
3
  require 'rspec'
@@ -17,8 +13,5 @@ unless defined?(CI_REPORTER_LIB)
17
13
  end
18
14
 
19
15
  require 'ci/reporter/core'
20
- require 'ci/reporter/test_unit'
21
- require 'ci/reporter/rspec'
22
16
 
23
- Test::Unit.run = true
24
17
  REPORTS_DIR = File.dirname(__FILE__) + "/reports" unless defined?(REPORTS_DIR)
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 2.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
8
+ - Jake Goulding
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
12
+ date: 2014-06-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: builder
@@ -25,192 +26,86 @@ dependencies:
25
26
  - !ruby/object:Gem::Version
26
27
  version: 2.1.2
27
28
  - !ruby/object:Gem::Dependency
28
- name: rdoc
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '4.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '4.0'
41
- - !ruby/object:Gem::Dependency
42
- name: hoe-git
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 1.5.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.5.0
55
- - !ruby/object:Gem::Dependency
56
- name: cucumber
29
+ name: rake
57
30
  requirement: !ruby/object:Gem::Requirement
58
31
  requirements:
59
32
  - - ">="
60
33
  - !ruby/object:Gem::Version
61
- version: 1.3.3
34
+ version: '0'
62
35
  type: :development
63
36
  prerelease: false
64
37
  version_requirements: !ruby/object:Gem::Requirement
65
38
  requirements:
66
39
  - - ">="
67
40
  - !ruby/object:Gem::Version
68
- version: 1.3.3
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">"
74
- - !ruby/object:Gem::Version
75
- version: 2.0.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">"
81
- - !ruby/object:Gem::Version
82
- version: 2.0.0
83
- - !ruby/object:Gem::Dependency
84
- name: test-unit
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">"
88
- - !ruby/object:Gem::Version
89
- version: 2.4.9
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">"
95
- - !ruby/object:Gem::Version
96
- version: 2.4.9
41
+ version: '0'
97
42
  - !ruby/object:Gem::Dependency
98
- name: minitest
43
+ name: rdoc
99
44
  requirement: !ruby/object:Gem::Requirement
100
45
  requirements:
101
46
  - - "~>"
102
47
  - !ruby/object:Gem::Version
103
- version: 2.2.0
48
+ version: '4.0'
104
49
  type: :development
105
50
  prerelease: false
106
51
  version_requirements: !ruby/object:Gem::Requirement
107
52
  requirements:
108
53
  - - "~>"
109
54
  - !ruby/object:Gem::Version
110
- version: 2.2.0
111
- - !ruby/object:Gem::Dependency
112
- name: spinach
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: 0.8.7
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 0.8.7
55
+ version: '4.0'
125
56
  - !ruby/object:Gem::Dependency
126
- name: hoe
57
+ name: rspec
127
58
  requirement: !ruby/object:Gem::Requirement
128
59
  requirements:
129
60
  - - "~>"
130
61
  - !ruby/object:Gem::Version
131
- version: '3.12'
62
+ version: '2.0'
132
63
  type: :development
133
64
  prerelease: false
134
65
  version_requirements: !ruby/object:Gem::Requirement
135
66
  requirements:
136
67
  - - "~>"
137
68
  - !ruby/object:Gem::Version
138
- version: '3.12'
139
- description: CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows
140
- you to generate XML reports of your test, spec and/or feature runs. The resulting
141
- files can be read by a continuous integration system that understands Ant's JUnit
142
- report XML format, thus allowing your CI system to track test/spec successes and
143
- failures.
144
- email: nick@nicksieger.com
69
+ version: '2.0'
70
+ description: CI::Reporter is an add-on to Ruby testing frameworks that allows you
71
+ to generate XML reports of your test runs. The resulting files can be read by a
72
+ continuous integration system that understands Ant's JUnit report format.
73
+ email:
74
+ - nick@nicksieger.com
75
+ - jake.goulding@gmail.com
145
76
  executables: []
146
77
  extensions: []
147
78
  extra_rdoc_files:
148
79
  - History.txt
149
80
  - LICENSE.txt
150
- - Manifest.txt
151
- - README.rdoc
81
+ - README.md
152
82
  files:
153
- - ".gemtest"
154
- - ".hoerc"
83
+ - ".gitignore"
155
84
  - ".rspec"
156
- - ".travis.before_install.sh"
157
85
  - ".travis.yml"
158
86
  - Gemfile
159
87
  - History.txt
160
88
  - LICENSE.txt
161
- - Manifest.txt
162
- - README.rdoc
89
+ - README.md
163
90
  - Rakefile
164
- - acceptance/cucumber/cucumber_example.feature
165
- - acceptance/cucumber/step_definitions/development_steps.rb
166
- - acceptance/minitest_example_test.rb
167
- - acceptance/rspec_example_spec.rb
168
- - acceptance/spinach/features/spinach_example.feature
169
- - acceptance/spinach/features/steps/example_spinach_feature.rb
170
- - acceptance/test_unit_example_test.rb
171
- - acceptance/verification_spec.rb
172
91
  - ci_reporter.gemspec
92
+ - gemfiles/.gitignore
173
93
  - lib/ci/reporter/core.rb
174
- - lib/ci/reporter/cucumber.rb
175
- - lib/ci/reporter/minitest.rb
176
- - lib/ci/reporter/rake/cucumber.rb
177
- - lib/ci/reporter/rake/cucumber_loader.rb
178
- - lib/ci/reporter/rake/minitest.rb
179
- - lib/ci/reporter/rake/minitest_loader.rb
180
- - lib/ci/reporter/rake/rspec.rb
181
- - lib/ci/reporter/rake/rspec_loader.rb
182
- - lib/ci/reporter/rake/spinach.rb
183
- - lib/ci/reporter/rake/spinach_loader.rb
184
- - lib/ci/reporter/rake/test_unit.rb
185
- - lib/ci/reporter/rake/test_unit_loader.rb
94
+ - lib/ci/reporter/internal.rb
186
95
  - lib/ci/reporter/rake/utils.rb
187
96
  - lib/ci/reporter/report_manager.rb
188
- - lib/ci/reporter/rspec.rb
189
- - lib/ci/reporter/spinach.rb
190
97
  - lib/ci/reporter/test_suite.rb
191
- - lib/ci/reporter/test_unit.rb
192
98
  - lib/ci/reporter/version.rb
193
- - spec/ci/reporter/cucumber_spec.rb
194
99
  - spec/ci/reporter/output_capture_spec.rb
195
- - spec/ci/reporter/rake/rake_tasks_spec.rb
196
100
  - spec/ci/reporter/report_manager_spec.rb
197
- - spec/ci/reporter/rspec_spec.rb
198
101
  - spec/ci/reporter/test_suite_spec.rb
199
- - spec/ci/reporter/test_unit_spec.rb
200
102
  - spec/spec_helper.rb
201
- - stub.rake
202
- - tasks/ci_reporter.rake
203
- homepage: https://github.com/nicksieger/ci_reporter
103
+ homepage: https://github.com/ci-reporter/ci_reporter
204
104
  licenses:
205
105
  - MIT
206
106
  metadata: {}
207
107
  post_install_message:
208
- rdoc_options:
209
- - "--main"
210
- - README.rdoc
211
- - "-SHN"
212
- - "-f"
213
- - darkfish
108
+ rdoc_options: []
214
109
  require_paths:
215
110
  - lib
216
111
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -220,21 +115,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
115
  version: '0'
221
116
  required_rubygems_version: !ruby/object:Gem::Requirement
222
117
  requirements:
223
- - - ">="
118
+ - - ">"
224
119
  - !ruby/object:Gem::Version
225
- version: '0'
120
+ version: 1.3.1
226
121
  requirements: []
227
122
  rubyforge_project:
228
123
  rubygems_version: 2.2.2
229
124
  signing_key:
230
125
  specification_version: 4
231
- summary: CI::Reporter allows you to generate reams of XML for use with continuous
232
- integration systems.
126
+ summary: Connects Ruby test frameworks to CI systems via JUnit reports.
233
127
  test_files:
234
- - spec/ci/reporter/cucumber_spec.rb
235
128
  - spec/ci/reporter/output_capture_spec.rb
236
- - spec/ci/reporter/rake/rake_tasks_spec.rb
237
129
  - spec/ci/reporter/report_manager_spec.rb
238
- - spec/ci/reporter/rspec_spec.rb
239
130
  - spec/ci/reporter/test_suite_spec.rb
240
- - spec/ci/reporter/test_unit_spec.rb
131
+ - spec/spec_helper.rb