testbot 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/README.markdown +2 -2
- data/lib/runner/runner.rb +2 -2
- data/lib/shared/version.rb +1 -1
- data/test/runner/job_test.rb +2 -1
- data/test/runner/runner_test.rb +21 -0
- data/testbot.gemspec +1 -1
- metadata +12 -9
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
0.6.0
|
2
|
+
|
3
|
+
Fixed bug that caused the runner to crash and block the server after checking for jobs (issue #34).
|
4
|
+
|
5
|
+
Merged in https://github.com/joakimk/testbot/pull/33 (Bugfix: Run rake task testbot:before_run with bundler if present).
|
6
|
+
|
1
7
|
0.5.9
|
2
8
|
|
3
9
|
When you hit ctrl+c all related test jobs will be stopped (within about 5 seconds). You can
|
data/README.markdown
CHANGED
@@ -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.
|
67
|
+
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.6.0'
|
68
68
|
script/generate testbot --connect 192.168.0.100
|
69
69
|
|
70
70
|
rake testbot:spec (or :rspec, :test, :features)
|
@@ -108,7 +108,7 @@ Features
|
|
108
108
|
* You can access your testbot network through SSH by using the built in SSH tunneling code.
|
109
109
|
* You can use the same testbot network with multiple projects.
|
110
110
|
* You can abort a test run with ctrl+c and all remote processes will be stopped.
|
111
|
-
* Testbot is continuously tested for
|
111
|
+
* Testbot is continuously tested for compatibility with Ruby 1.8.7 and 1.9.2.
|
112
112
|
|
113
113
|
Contributing to testbot
|
114
114
|
----
|
data/lib/runner/runner.rb
CHANGED
@@ -98,7 +98,7 @@ module Testbot::Runner
|
|
98
98
|
clear_completed_instances
|
99
99
|
|
100
100
|
next_job = Server.get("/jobs/next", :query => next_params) rescue nil
|
101
|
-
last_check_found_a_job = (next_job != nil)
|
101
|
+
last_check_found_a_job = (next_job != nil && next_job.body != "")
|
102
102
|
next unless last_check_found_a_job
|
103
103
|
|
104
104
|
job = Job.new(*([ self, next_job.split(',') ].flatten))
|
@@ -127,7 +127,7 @@ module Testbot::Runner
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def before_run(job)
|
130
|
-
bundler_cmd = RubyEnv.bundler?(job.project) ? "bundle; " : ""
|
130
|
+
bundler_cmd = RubyEnv.bundler?(job.project) ? "bundle; bundle exec" : ""
|
131
131
|
system "export RAILS_ENV=test; export TEST_INSTANCES=#{@config.max_instances}; cd #{job.project}; #{bundler_cmd} rake testbot:before_run"
|
132
132
|
end
|
133
133
|
|
data/lib/shared/version.rb
CHANGED
@@ -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.
|
4
|
+
version = "0.6.0"
|
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)
|
data/test/runner/job_test.rb
CHANGED
@@ -27,8 +27,9 @@ module Testbot::Runner
|
|
27
27
|
|
28
28
|
expect_put_with(10, "result text", true)
|
29
29
|
flexmock(job).should_receive(:run_and_return_result).once.
|
30
|
-
with("export RAILS_ENV=test; export TEST_ENV_NUMBER=; cd project; export RSPEC_COLOR=true; ruby -S rspec spec/foo_spec.rb spec/bar_spec.rb").
|
30
|
+
with("export RAILS_ENV=test; export TEST_ENV_NUMBER=; cd project; export RSPEC_COLOR=true; ruby -S bundle exec rspec spec/foo_spec.rb spec/bar_spec.rb").
|
31
31
|
and_return('result text')
|
32
|
+
flexmock(RubyEnv).should_receive(:bundler?).returns(true)
|
32
33
|
job.run(0)
|
33
34
|
end
|
34
35
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '../../lib/shared/testbot.rb'))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '../../lib/runner/runner.rb'))
|
3
|
+
require 'test/unit'
|
4
|
+
require 'shoulda'
|
5
|
+
require 'flexmock/test_unit'
|
6
|
+
|
7
|
+
module Testbot::Runner
|
8
|
+
|
9
|
+
class RunnerTest < Test::Unit::TestCase
|
10
|
+
should "use bundle exec in when calling rake testbot:before_run if bundler is present" do
|
11
|
+
job = flexmock(:job, :project => "/path")
|
12
|
+
flexmock(RubyEnv).should_receive(:bundler?).with("/path").returns(true)
|
13
|
+
|
14
|
+
runner = Runner.new({:max_instances => 1})
|
15
|
+
flexmock(runner)
|
16
|
+
flexmock(runner).should_receive(:system).with("export RAILS_ENV=test; export TEST_INSTANCES=1; cd /path; bundle; bundle exec rake testbot:before_run").once
|
17
|
+
runner.send(:before_run, job)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
data/testbot.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency("flexmock")
|
27
27
|
s.add_development_dependency("cucumber")
|
28
28
|
s.add_development_dependency("rvm")
|
29
|
-
s.add_development_dependency("rake")
|
29
|
+
s.add_development_dependency("rake", "0.8.7")
|
30
30
|
s.add_development_dependency("bundler")
|
31
31
|
s.add_development_dependency("guard")
|
32
32
|
s.add_development_dependency("guard-test")
|
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:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
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: 2011-
|
18
|
+
date: 2011-09-18 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -204,12 +204,14 @@ dependencies:
|
|
204
204
|
requirement: &id013 !ruby/object:Gem::Requirement
|
205
205
|
none: false
|
206
206
|
requirements:
|
207
|
-
- - "
|
207
|
+
- - "="
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
hash:
|
209
|
+
hash: 49
|
210
210
|
segments:
|
211
211
|
- 0
|
212
|
-
|
212
|
+
- 8
|
213
|
+
- 7
|
214
|
+
version: 0.8.7
|
213
215
|
type: :development
|
214
216
|
version_requirements: *id013
|
215
217
|
- !ruby/object:Gem::Dependency
|
@@ -306,6 +308,7 @@ files:
|
|
306
308
|
- test/requester/testbot.yml
|
307
309
|
- test/requester/testbot_with_erb.yml
|
308
310
|
- test/runner/job_test.rb
|
311
|
+
- test/runner/runner_test.rb
|
309
312
|
- test/server/group_test.rb
|
310
313
|
- test/server/server_test.rb
|
311
314
|
- test/shared/adapters/adapter_test.rb
|
@@ -350,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
353
|
requirements: []
|
351
354
|
|
352
355
|
rubyforge_project:
|
353
|
-
rubygems_version: 1.
|
356
|
+
rubygems_version: 1.5.3
|
354
357
|
signing_key:
|
355
358
|
specification_version: 3
|
356
359
|
summary: A test distribution tool.
|