testbot 0.4.0 → 0.4.1

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.4.1
2
+
3
+ Added support for quicker and more automated updates when developing testbot.
4
+
1
5
  0.4.0
2
6
 
3
7
  Fixed RSpec 2 compability issue.
data/README.markdown CHANGED
@@ -68,7 +68,7 @@ Using testbot with Rails 3:
68
68
 
69
69
  Using testbot with Rails 2:
70
70
 
71
- ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.4.0'
71
+ ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.4.1'
72
72
  script/generate testbot --connect 192.168.0.100
73
73
 
74
74
  rake testbot:spec (or :test, :features)
@@ -98,6 +98,7 @@ Features
98
98
  * You can add and remove computers at any time. Testbot simply gives abandoned jobs to other computers.
99
99
  * Testbot will try to balance the testload so that every computer finishes running the tests at the same time to reduce the time it takes to run the entire test suite. It does a good job, but has potential for further improvement.
100
100
  * You can access your testbot network through SSH by using the built in SSH tunneling code.
101
+ * You can use the same testbot network with multiple projects.
101
102
  * Testbot is continuously tested for compability with Ruby 1.8.7 and 1.9.2.
102
103
 
103
104
  Contributing to testbot
data/bin/testbot CHANGED
@@ -3,7 +3,7 @@
3
3
  require File.expand_path(File.join(File.dirname(__FILE__), '../lib/testbot.rb'))
4
4
 
5
5
  def show_help
6
- puts "Testbot #{Testbot::VERSION}"
6
+ puts "Testbot #{Testbot.version}"
7
7
  puts
8
8
  puts "Testbot is a test distribution tool that works with Rails, RSpec, Test::Unit and Cucumber."
9
9
  puts
data/lib/runner.rb CHANGED
@@ -189,10 +189,14 @@ class Runner
189
189
 
190
190
  def check_for_update
191
191
  return unless @config.auto_update
192
- version = Server.get('/version') rescue Testbot::VERSION
193
- return unless version != Testbot::VERSION
192
+ version = Server.get('/version') rescue Testbot.version
193
+ return unless version != Testbot.version
194
194
 
195
- successful_install = system "gem install testbot -v #{version}"
195
+ if version.include?(".DEV.")
196
+ successful_install = system "gem install #{@config.dev_gem_root}/testbot-#{version}.gem"
197
+ else
198
+ successful_install = system "gem install testbot -v #{version}"
199
+ end
196
200
 
197
201
  if successful_install
198
202
  File.open("/tmp/update_testbot.sh", "w") { |file| file.write("#!/bin/sh\nsleep 5\ntestbot #{ARGV.join(' ')}") }
@@ -208,7 +212,7 @@ class Runner
208
212
  end
209
213
 
210
214
  def base_params
211
- { :version => Testbot::VERSION, :uid => @uid }
215
+ { :version => Testbot.version, :uid => @uid }
212
216
  end
213
217
 
214
218
  def max_instances_running?
data/lib/server.rb CHANGED
@@ -18,7 +18,7 @@ disable :logging if ENV['DISABLE_LOGGING']
18
18
 
19
19
  class Server
20
20
  def self.valid_version?(runner_version)
21
- Testbot::VERSION == runner_version
21
+ Testbot.version == runner_version
22
22
  end
23
23
  end
24
24
 
@@ -68,5 +68,5 @@ get '/runners/available' do
68
68
  end
69
69
 
70
70
  get '/version' do
71
- Testbot::VERSION
71
+ Testbot.version
72
72
  end
data/lib/server/runner.rb CHANGED
@@ -19,11 +19,11 @@ class Runner < Sequel::Model
19
19
  end
20
20
 
21
21
  def self.find_all_outdated
22
- DB[:runners].filter("version != ? OR version IS NULL", Testbot::VERSION)
22
+ DB[:runners].filter("version != ? OR version IS NULL", Testbot.version)
23
23
  end
24
24
 
25
25
  def self.find_all_available
26
- DB[:runners].filter("version = ? AND last_seen_at > ?", Testbot::VERSION, Time.now - Runner.timeout)
26
+ DB[:runners].filter("version = ? AND last_seen_at > ?", Testbot.version, Time.now - Runner.timeout)
27
27
  end
28
28
 
29
29
  def self.available_instances
data/lib/testbot.rb CHANGED
@@ -8,7 +8,11 @@ unless defined?(Testbot)
8
8
  require 'railtie' if defined?(Rails)
9
9
 
10
10
  # Don't forget to update readme and changelog
11
- VERSION = "0.4.0"
11
+ def self.version
12
+ version = "0.4.1"
13
+ version += ".DEV.#{Time.now.to_i}" if ENV['TESTBOT_DEV_DEPLOY']
14
+ version
15
+ end
12
16
 
13
17
  if ENV['INTEGRATION_TEST']
14
18
  SERVER_PID = "/tmp/integration_test_testbot_server.pid"
@@ -34,7 +38,7 @@ unless defined?(Testbot)
34
38
  if opts[:help]
35
39
  return false
36
40
  elsif opts[:version]
37
- puts "Testbot #{Testbot::VERSION}"
41
+ puts "Testbot #{Testbot.version}"
38
42
  elsif [ true, 'run', 'start' ].include?(opts[:server])
39
43
  start_server(opts[:server])
40
44
  elsif opts[:server] == 'stop'
@@ -81,6 +85,7 @@ unless defined?(Testbot)
81
85
  :auto_update => opts[:auto_update], :max_instances => opts[:cpus],
82
86
  :ssh_tunnel => opts[:ssh_tunnel], :server_user => opts[:user],
83
87
  :max_jruby_instances => opts[:max_jruby_instances],
88
+ :dev_gem_root => opts[:dev_gem_root],
84
89
  :jruby_opts => opts[:jruby_opts])
85
90
  runner.run!
86
91
  }
data/testbot.gemspec CHANGED
@@ -4,7 +4,7 @@ require File.expand_path("lib/testbot")
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "testbot"
7
- s.version = Testbot::VERSION
7
+ s.version = Testbot.version
8
8
  s.authors = ["Joakim Kolsjö"]
9
9
  s.email = ["joakim.kolsjo@gmail.com"]
10
10
  s.homepage = "http://github.com/joakimk/testbot"
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
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: 2010-12-03 00:00:00 +01:00
18
+ date: 2010-12-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency