right_develop 1.2.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -56,6 +56,10 @@ Jeweler::Tasks.new do |gem|
56
56
  gem.email = "support@rightscale.com"
57
57
  gem.authors = ["Tony Spataro"]
58
58
  gem.rubygems_version = "1.3.7"
59
+ gem.files.exclude ".rspec"
60
+ gem.files.exclude "Gemfile*"
61
+ gem.files.exclude "features/**/*"
62
+ gem.files.exclude "spec/**/*"
59
63
  end
60
64
 
61
65
  # This is a closed-source gem; omit gemcutter tasks so people don't accidentally
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.2
@@ -36,12 +36,12 @@ module RightDevelop::CI
36
36
  def build_testcase(duration, status, exception = nil, suffix = "")
37
37
  @time += duration
38
38
  # Use "cucumber" as a pseudo-package, and the feature name as a pseudo-class
39
- classname = "cucumber.#{@feature_name}"
39
+ classname = "cucumber.#{RightDevelop::CI::Util.pseudo_java_class_name(@feature_name)}"
40
40
  name = "#{@scenario}#{suffix}"
41
41
  pending = [:pending, :undefined].include?(status)
42
42
  passed = (status == :passed || (pending && !@options[:strict]))
43
43
 
44
- @builder.testcase(:classname => classname, :name => name, :time => "%.6f" % duration) do
44
+ @builder.testcase(:classname => classname.to_sym, :name => name, :time => "%.6f" % duration) do
45
45
  unless passed
46
46
  @builder.failure(:message => "#{status.to_s} #{name}", :type => status.to_s) do
47
47
  @builder.cdata! @output
@@ -61,6 +61,7 @@ module RightDevelop::CI
61
61
 
62
62
  def classname_for(example)
63
63
  klass = example.example_group.described_class || example.example_group.top_level_description
64
+ klass = RightDevelop::CI::Util.pseudo_java_class_name(klass.to_s)
64
65
  "rspec.#{klass}"
65
66
  end
66
67
 
@@ -80,7 +81,7 @@ module RightDevelop::CI
80
81
  full_description = full_description[classname.length..-1].strip
81
82
  end
82
83
 
83
- builder.testcase(:classname => classname, :name => full_description, :time => time) do
84
+ builder.testcase(:classname => classname.to_sym, :name => full_description, :time => time) do
84
85
  case test.metadata[:execution_result][:status]
85
86
  when "failed"
86
87
  builder.failure :message => "failed #{full_description}", :type => "failed" do
@@ -147,7 +148,7 @@ module RightDevelop::CI
147
148
  full_description = full_description[classname.length..-1].strip
148
149
  end
149
150
 
150
- builder.testcase(:classname => classname, :name => full_description, :time => @test_times[test]) do
151
+ builder.testcase(:classname => classname.to_sym, :name => full_description, :time => @test_times[test]) do
151
152
  case result
152
153
  when "failed"
153
154
  builder.failure :message => "failed #{full_description}", :type => "failed" do
@@ -182,6 +183,7 @@ module RightDevelop::CI
182
183
  # and assuming the first word is a class name
183
184
  group = @test_groups[example]
184
185
  klass = group.description.split(/\s+/).first
186
+ klass = RightDevelop::CI::Util.pseudo_java_class_name(klass)
185
187
  "rspec.#{klass}"
186
188
  end
187
189
  end
@@ -0,0 +1,30 @@
1
+ module RightDevelop::CI
2
+ module Util
3
+ module_function
4
+
5
+ # Regular expression used to determine which characters of a string are allowed
6
+ # in Java class names.
7
+ JAVA_CLASS_NAME = /[A-Za-z0-9_]/
8
+
9
+ # Make a string suitable for parsing by Jenkins JUnit display plugin by escaping any non-valid
10
+ # Java class name characters as an XML entity. This prevents Jenkins from interpreting "hi1.2"
11
+ # as a package-and-class name.
12
+ #
13
+ # @param [String] name
14
+ # @return [String] string with all non-alphanumerics replaced with an equivalent XML hex entity
15
+ def pseudo_java_class_name(name)
16
+ result = ''
17
+
18
+ name.each_char do |chr|
19
+ if chr =~ JAVA_CLASS_NAME
20
+ result << chr
21
+ else
22
+ chr = chr.unpack('U')[0].to_s(16)
23
+ result << "&#x#{chr};"
24
+ end
25
+ end
26
+
27
+ result
28
+ end
29
+ end
30
+ end
@@ -36,5 +36,6 @@ module RightDevelop
36
36
  end
37
37
 
38
38
  # Explicitly require everything else to avoid overreliance on autoload (1-module-deep rule)
39
+ require 'right_develop/ci/util'
39
40
  require 'right_develop/ci/java_cucumber_formatter'
40
41
  require 'right_develop/ci/java_spec_formatter'
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{right_develop}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tony Spataro"]
12
- s.date = %q{2013-04-29}
12
+ s.date = %q{2013-04-30}
13
13
  s.default_executable = %q{right_develop}
14
14
  s.description = %q{A toolkit of development tools created by RightScale.}
15
15
  s.email = %q{support@rightscale.com}
@@ -19,31 +19,18 @@ Gem::Specification.new do |s|
19
19
  "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
- ".rspec",
23
22
  "CHANGELOG.rdoc",
24
- "Gemfile",
25
- "Gemfile.lock",
26
23
  "LICENSE",
27
24
  "README.rdoc",
28
25
  "Rakefile",
29
26
  "VERSION",
30
27
  "bin/right_develop",
31
- "features/cucumber.feature",
32
- "features/rake_integration.feature",
33
- "features/rspec1.feature",
34
- "features/rspec2.feature",
35
- "features/step_definitions/http_client_steps.rb",
36
- "features/step_definitions/request_balancer_steps.rb",
37
- "features/step_definitions/ruby_steps.rb",
38
- "features/step_definitions/serialization_steps.rb",
39
- "features/step_definitions/server_steps.rb",
40
- "features/support/env.rb",
41
- "features/support/file_utils_bundler_mixin.rb",
42
28
  "lib/right_develop.rb",
43
29
  "lib/right_develop/ci.rb",
44
30
  "lib/right_develop/ci/java_cucumber_formatter.rb",
45
31
  "lib/right_develop/ci/java_spec_formatter.rb",
46
32
  "lib/right_develop/ci/rake_task.rb",
33
+ "lib/right_develop/ci/util.rb",
47
34
  "lib/right_develop/commands.rb",
48
35
  "lib/right_develop/commands/git.rb",
49
36
  "lib/right_develop/git.rb",
@@ -56,9 +43,7 @@ Gem::Specification.new do |s|
56
43
  "lib/right_develop/parsers/sax_parser.rb",
57
44
  "lib/right_develop/parsers/xml_post_parser.rb",
58
45
  "right_develop.gemspec",
59
- "right_develop.rconf",
60
- "spec/right_develop/parsers/sax_parser_spec.rb",
61
- "spec/spec_helper.rb"
46
+ "right_develop.rconf"
62
47
  ]
63
48
  s.homepage = %q{https://github.com/rightscale/right_develop}
64
49
  s.licenses = ["MIT"]
@@ -137,6 +122,34 @@ Gem::Specification.new do |s|
137
122
  s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
138
123
  s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
139
124
  s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
125
+ s.add_development_dependency(%q<flexmock>, ["~> 0.8.7"])
126
+ s.add_development_dependency(%q<activesupport>, [">= 0"])
127
+ s.add_development_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
128
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
129
+ s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
130
+ s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
131
+ s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
132
+ s.add_development_dependency(%q<flexmock>, ["~> 0.8.7"])
133
+ s.add_development_dependency(%q<activesupport>, [">= 0"])
134
+ s.add_development_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
135
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
136
+ s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
137
+ s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
138
+ s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
139
+ s.add_development_dependency(%q<flexmock>, ["~> 0.8.7"])
140
+ s.add_development_dependency(%q<activesupport>, [">= 0"])
141
+ s.add_development_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
142
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
143
+ s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
144
+ s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
145
+ s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
146
+ s.add_development_dependency(%q<flexmock>, ["~> 0.8.7"])
147
+ s.add_development_dependency(%q<activesupport>, [">= 0"])
148
+ s.add_development_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
149
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
150
+ s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
151
+ s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
152
+ s.add_development_dependency(%q<nokogiri>, ["~> 1.5"])
140
153
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
141
154
  s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
142
155
  s.add_development_dependency(%q<syntax>, ["~> 1.0.0"])
@@ -213,6 +226,34 @@ Gem::Specification.new do |s|
213
226
  s.add_dependency(%q<rdoc>, [">= 2.4.2"])
214
227
  s.add_dependency(%q<syntax>, ["~> 1.0.0"])
215
228
  s.add_dependency(%q<nokogiri>, ["~> 1.5"])
229
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
230
+ s.add_dependency(%q<activesupport>, [">= 0"])
231
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
232
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
233
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
234
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
235
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
236
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
237
+ s.add_dependency(%q<activesupport>, [">= 0"])
238
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
239
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
240
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
241
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
242
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
243
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
244
+ s.add_dependency(%q<activesupport>, [">= 0"])
245
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
246
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
247
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
248
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
249
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
250
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
251
+ s.add_dependency(%q<activesupport>, [">= 0"])
252
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
253
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
254
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
255
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
256
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
216
257
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
217
258
  s.add_dependency(%q<rdoc>, [">= 2.4.2"])
218
259
  s.add_dependency(%q<syntax>, ["~> 1.0.0"])
@@ -290,6 +331,34 @@ Gem::Specification.new do |s|
290
331
  s.add_dependency(%q<rdoc>, [">= 2.4.2"])
291
332
  s.add_dependency(%q<syntax>, ["~> 1.0.0"])
292
333
  s.add_dependency(%q<nokogiri>, ["~> 1.5"])
334
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
335
+ s.add_dependency(%q<activesupport>, [">= 0"])
336
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
337
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
338
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
339
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
340
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
341
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
342
+ s.add_dependency(%q<activesupport>, [">= 0"])
343
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
344
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
345
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
346
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
347
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
348
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
349
+ s.add_dependency(%q<activesupport>, [">= 0"])
350
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
351
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
352
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
353
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
354
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
355
+ s.add_dependency(%q<flexmock>, ["~> 0.8.7"])
356
+ s.add_dependency(%q<activesupport>, [">= 0"])
357
+ s.add_dependency(%q<libxml-ruby>, ["~> 2.4.0"])
358
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
359
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
360
+ s.add_dependency(%q<syntax>, ["~> 1.0.0"])
361
+ s.add_dependency(%q<nokogiri>, ["~> 1.5"])
293
362
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
294
363
  s.add_dependency(%q<rdoc>, [">= 2.4.2"])
295
364
  s.add_dependency(%q<syntax>, ["~> 1.0.0"])