parallel_tests 0.4.8 → 0.4.9

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.
data/Readme.md CHANGED
@@ -111,6 +111,7 @@ You can run any kind of code with -e / --execute
111
111
 
112
112
  TIPS
113
113
  ====
114
+ - [Capybara + Selenium] add to env.rb: `Capybara.server_port = 8888 + ENV['TEST_ENV_NUMBER'].to_i`
114
115
  - [RSpec] add a `spec/parallel_spec.opts` to use different options, e.g. no --drb (default: `spec/spec.opts`)
115
116
  - [RSpec] if something looks fishy try to delete `script/spec`
116
117
  - [RSpec] if `script/spec` is missing parallel:spec uses just `spec` (which solves some issues with double-loaded environment.rb)
@@ -143,6 +144,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
143
144
  - [Terence Lee](http://hone.heroku.com/)
144
145
  - [Will Bryant](http://willbryant.net/)
145
146
  - [Fred Wu](http://fredwu.me)
147
+ - [xxx](https://github.com/xxx)
146
148
 
147
149
  [Michael Grosser](http://pragmatig.wordpress.com)
148
150
  grosser.michael@gmail.com
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.8
1
+ 0.4.9
@@ -6,27 +6,34 @@ namespace :parallel do
6
6
  abort unless system(command)
7
7
  end
8
8
 
9
- desc "create test databases by running db:create for each test db --> parallel:create[num_cpus]"
9
+ desc "create test databases via db:create --> parallel:create[num_cpus]"
10
10
  task :create, :count do |t,args|
11
11
  run_in_parallel('rake db:create RAILS_ENV=test', args)
12
12
  end
13
13
 
14
- desc "update test databases by running db:test:prepare for each test db --> parallel:prepare[num_cpus]"
15
- task :prepare, :count do |t,args|
16
- run_in_parallel('rake db:test:prepare', args)
14
+ desc "update test databases by dumping and loading --> parallel:prepare[num_cpus]"
15
+ task(:prepare, [:count] => 'db:abort_if_pending_migrations') do |t,args|
16
+ if ActiveRecord::Base.schema_format == :ruby
17
+ # dump then load in parallel
18
+ Rake::Task['db:schema:dump'].invoke
19
+ Rake::Task['parallel:load_schema'].invoke(args[:count])
20
+ else
21
+ # there is no separate dump / load for schema_format :sql, schema file can get corrupted
22
+ run_in_parallel('rake db:test:prepare', args)
23
+ end
17
24
  end
18
25
 
19
26
  # when dumping/resetting takes too long
20
- desc "update test databases by running db:mgrate for each test db --> parallel:migrate[num_cpus]"
27
+ desc "update test databases via db:mgrate --> parallel:migrate[num_cpus]"
21
28
  task :migrate, :count do |t,args|
22
29
  run_in_parallel('rake db:migrate RAILS_ENV=test', args)
23
30
  end
24
31
 
25
- # Do not want a development db on integration server.
26
- # and always dump a complete schema ?
27
- desc "load dumped schema for each test db --> parallel:load_schema[num_cpus]"
32
+ # just load the schema (good for integration server <-> no development db)
33
+ desc "load dumped schema for test databases via db:schema:load --> parallel:load_schema[num_cpus]"
28
34
  task :load_schema, :count do |t,args|
29
- run_in_parallel('rake db:schema:load RAILS_ENV=test', args)
35
+ puts args.inspect
36
+ run_in_parallel('rake db:test:load', args)
30
37
  end
31
38
 
32
39
  ['test', 'spec', 'features'].each do |type|
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{parallel_tests}
8
- s.version = "0.4.8"
8
+ s.version = "0.4.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2010-11-23}
12
+ s.date = %q{2010-12-01}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.executables = ["parallel_spec", "parallel_cucumber", "parallel_test"]
15
15
  s.files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 8
10
- version: 0.4.8
9
+ - 9
10
+ version: 0.4.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-23 00:00:00 +01:00
18
+ date: 2010-12-01 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency