testbot 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.6.2
2
+
3
+ Fixed "invalid byte sequence in UTF-8" errors cased by test output in some cases.
4
+
1
5
  0.6.1
2
6
 
3
7
  Fixed CPU core check for OSX Lion.
@@ -64,7 +64,7 @@ Using testbot with Rails 2:
64
64
 
65
65
  # Add testbot to your Gemfile if you use bundler. You also need the plugin because
66
66
  # Rails 2 does not load raketasks from gems.
67
- ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.6.1'
67
+ ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.6.2'
68
68
  script/generate testbot --connect 192.168.0.100
69
69
 
70
70
  rake testbot:spec (or :rspec, :test, :features)
data/Rakefile CHANGED
@@ -1,12 +1,8 @@
1
1
  require 'bundler'
2
- # TODO: Add when possible. Currently "rake features" fails.
3
- # require 'bundler/setup'
4
- require 'cucumber'
5
- require 'cucumber/rake/task'
6
2
 
7
3
  Bundler::GemHelper.install_tasks
8
4
 
9
- task :default => [ :test, :features ] do
5
+ task :default => [ :test ] do
10
6
  end
11
7
 
12
8
  desc "Run Test::Unit tests"
@@ -37,17 +33,3 @@ task :restart do
37
33
  config = YAML.load_file(".deploy_config.yml")
38
34
  system(config["restart_server"]) || fail
39
35
  end
40
-
41
- Cucumber::Rake::Task.new(:features) do |t|
42
- t.cucumber_opts = "features --format progress"
43
- end
44
-
45
- # HACK: As we use RVM to install gems while running cucumber we don't want bundler
46
- # to raise an error like "rails is not part of the bundle. Add it to Gemfile.".
47
- module Cucumber::Rake
48
- class Task::ForkedCucumberRunner
49
- def runner
50
- [ RUBY ]
51
- end
52
- end
53
- end
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.join(File.dirname(__FILE__), 'runner.rb'))
2
+ require 'iconv'
2
3
 
3
4
  module Testbot::Runner
4
5
  class Job
@@ -25,7 +26,7 @@ module Testbot::Runner
25
26
  result += run_and_return_result("#{base_environment} #{adapter.command(@project, ruby_cmd, @files)}")
26
27
  end
27
28
 
28
- Server.put("/jobs/#{@id}", :body => { :result => result, :success => success?, :time => run_time })
29
+ Server.put("/jobs/#{@id}", :body => { :result => strip_invalid_utf8(result), :success => success?, :time => run_time })
29
30
  puts "Job #{@id} finished."
30
31
  end
31
32
 
@@ -39,6 +40,12 @@ module Testbot::Runner
39
40
 
40
41
  private
41
42
 
43
+ def strip_invalid_utf8(text)
44
+ # http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/
45
+ ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
46
+ ic.iconv(text + ' ')[0..-2]
47
+ end
48
+
42
49
  def measure_run_time
43
50
  start_time = Time.now
44
51
  yield
@@ -1,7 +1,7 @@
1
1
  module Testbot
2
2
  # Don't forget to update readme and changelog
3
3
  def self.version
4
- version = "0.6.1"
4
+ version = "0.6.2"
5
5
  dev_version_file = File.join(File.dirname(__FILE__), '..', '..', 'DEV_VERSION')
6
6
  if File.exists?(dev_version_file)
7
7
  version += File.read(dev_version_file)
@@ -24,7 +24,6 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency("shoulda")
25
25
  s.add_development_dependency("rack-test")
26
26
  s.add_development_dependency("flexmock")
27
- s.add_development_dependency("cucumber")
28
27
  s.add_development_dependency("rvm")
29
28
  s.add_development_dependency("rake", "0.8.7")
30
29
  s.add_development_dependency("bundler")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testbot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Joakim Kolsj\xC3\xB6"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-24 00:00:00 +01:00
18
+ date: 2012-04-19 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -171,7 +171,7 @@ dependencies:
171
171
  type: :development
172
172
  version_requirements: *id010
173
173
  - !ruby/object:Gem::Dependency
174
- name: cucumber
174
+ name: rvm
175
175
  prerelease: false
176
176
  requirement: &id011 !ruby/object:Gem::Requirement
177
177
  none: false
@@ -184,24 +184,10 @@ dependencies:
184
184
  version: "0"
185
185
  type: :development
186
186
  version_requirements: *id011
187
- - !ruby/object:Gem::Dependency
188
- name: rvm
189
- prerelease: false
190
- requirement: &id012 !ruby/object:Gem::Requirement
191
- none: false
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- hash: 3
196
- segments:
197
- - 0
198
- version: "0"
199
- type: :development
200
- version_requirements: *id012
201
187
  - !ruby/object:Gem::Dependency
202
188
  name: rake
203
189
  prerelease: false
204
- requirement: &id013 !ruby/object:Gem::Requirement
190
+ requirement: &id012 !ruby/object:Gem::Requirement
205
191
  none: false
206
192
  requirements:
207
193
  - - "="
@@ -213,11 +199,11 @@ dependencies:
213
199
  - 7
214
200
  version: 0.8.7
215
201
  type: :development
216
- version_requirements: *id013
202
+ version_requirements: *id012
217
203
  - !ruby/object:Gem::Dependency
218
204
  name: bundler
219
205
  prerelease: false
220
- requirement: &id014 !ruby/object:Gem::Requirement
206
+ requirement: &id013 !ruby/object:Gem::Requirement
221
207
  none: false
222
208
  requirements:
223
209
  - - ">="
@@ -227,11 +213,11 @@ dependencies:
227
213
  - 0
228
214
  version: "0"
229
215
  type: :development
230
- version_requirements: *id014
216
+ version_requirements: *id013
231
217
  - !ruby/object:Gem::Dependency
232
218
  name: guard
233
219
  prerelease: false
234
- requirement: &id015 !ruby/object:Gem::Requirement
220
+ requirement: &id014 !ruby/object:Gem::Requirement
235
221
  none: false
236
222
  requirements:
237
223
  - - ">="
@@ -241,11 +227,11 @@ dependencies:
241
227
  - 0
242
228
  version: "0"
243
229
  type: :development
244
- version_requirements: *id015
230
+ version_requirements: *id014
245
231
  - !ruby/object:Gem::Dependency
246
232
  name: guard-test
247
233
  prerelease: false
248
- requirement: &id016 !ruby/object:Gem::Requirement
234
+ requirement: &id015 !ruby/object:Gem::Requirement
249
235
  none: false
250
236
  requirements:
251
237
  - - ">="
@@ -255,7 +241,7 @@ dependencies:
255
241
  - 0
256
242
  version: "0"
257
243
  type: :development
258
- version_requirements: *id016
244
+ version_requirements: *id015
259
245
  description: Testbot is a test distribution tool that works with Rails, RSpec, RSpec2, Test::Unit and Cucumber.
260
246
  email:
261
247
  - joakim.kolsjo@gmail.com