bellmyer-hydra 0.20.10 → 0.20.11

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.
@@ -1,3 +1,26 @@
1
+ = IMPORTANT FORK-SPECIFIC INFO
2
+
3
+ This is bellmyer-hydra, a small fork of the main hydra gem. The only external difference is that each worker launched by hydra sets the HYDRA_WORKER_ID environment variable.
4
+
5
+ This allows truly multi-threaded operations because you can then give each worker its own database. For example, in your rails app's database.yml you can do this:
6
+
7
+ test:
8
+ adapter: mysql
9
+ database: app_test<%= ENV['HYDRA_WORKER_ID'] %>
10
+
11
+ And each hydra worker will use its own personal copy of the test database. The naming convention for testing with 4 workers would then be:
12
+
13
+ * app_test
14
+ * app_test2
15
+ * app_test3
16
+ * app_test4
17
+
18
+ Setting up and syncing these databases is up to the user. You may want to try using Sauron, my automated, multi-threaded testing toolkit. Think multi-threaded, multi-database autotest. In fact, that's why I created this fork of hydra in the first place:
19
+
20
+ http://github.com/bellmyer/sauron
21
+ http://rubygems.org/gems/sauron
22
+
23
+
1
24
  = Hydra
2
25
 
3
26
  Spread your tests over processors and/or multiple machines to test your code faster.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.20.10
1
+ 0.20.11
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bellmyer-hydra}
8
- s.version = "0.20.10"
8
+ s.version = "0.20.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Gauthier", "J\303\270rgen Oreh\303\270j Erichsen", "Jaime Bellmyer"]
12
- s.date = %q{2010-07-19}
12
+ s.date = %q{2010-07-20}
13
13
  s.description = %q{Spread your tests over multiple machines to test your code faster.}
14
14
  s.email = %q{jaime@kconrails.com}
15
15
  s.extra_rdoc_files = [
@@ -19,13 +19,13 @@ module Hydra #:nodoc:
19
19
  @io = opts.fetch(:io) { raise "No IO Object" }
20
20
  @verbose = opts.fetch(:verbose) { false }
21
21
 
22
- @worker_id = opts.fetch(:worker_id).to_s
23
- @worker_id = '' if @worker_id == '0'
22
+ @worker_id = opts.fetch(:worker_id).to_i
24
23
 
25
24
  $stdout.sync = true
26
25
 
27
26
  trace 'Creating test database'
28
- ENV['HYDRA_WORKER_ID'] = @worker_id
27
+ ENV['HYDRA_WORKER_ID'] = (@worker_id == 0 ? '' :: @worker_id).to_s
28
+ ENV['TEST_ENV_NUMBER'] = (@worker_id == 0 ? '' :: @worker_id + 1).to_s
29
29
 
30
30
  trace 'Booted. Sending Request for file'
31
31
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bellmyer-hydra
3
3
  version: !ruby/object:Gem::Version
4
- hash: 91
4
+ hash: 89
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 20
9
- - 10
10
- version: 0.20.10
9
+ - 11
10
+ version: 0.20.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Gauthier
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-07-19 00:00:00 -05:00
20
+ date: 2010-07-20 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency