parallel_tests 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.9.3)
4
+ parallel_tests (0.9.4)
5
5
  parallel
6
6
 
7
7
  GEM
@@ -19,7 +19,7 @@ GEM
19
19
  gherkin (2.7.6)
20
20
  json (>= 1.4.6)
21
21
  json (1.7.5)
22
- parallel (0.6.1)
22
+ parallel (0.6.2)
23
23
  rake (10.0.3)
24
24
  rspec (2.12.0)
25
25
  rspec-core (~> 2.12.0)
data/Readme.md CHANGED
@@ -65,6 +65,14 @@ Test by pattern (e.g. use one integration server per subfolder / see if you brok
65
65
 
66
66
  Took 29.925333 seconds
67
67
 
68
+ ### Run an arbitrary task in parallel
69
+ ```Bash
70
+ RAILS_ENV=test parallel_test -e "rake my:custom:task"
71
+ # or
72
+ rake parallel:rake[my:custom:task]
73
+ ```
74
+
75
+
68
76
  Running things once
69
77
  ===================
70
78
 
@@ -74,8 +82,10 @@ Running things once
74
82
  ParallelTests.first_process? ? do_something : sleep(1)
75
83
 
76
84
  at_exit do
77
- ParallelTests.wait_for_other_processes_to_finish
78
- undo_something
85
+ if ParallelTests.first_process?
86
+ ParallelTests.wait_for_other_processes_to_finish
87
+ undo_something
88
+ end
79
89
  end
80
90
  ```
81
91
 
@@ -106,6 +106,11 @@ namespace :parallel do
106
106
  ParallelTests::Tasks.run_in_parallel("rake db:seed RAILS_ENV=#{ParallelTests::Tasks.rails_env}", args)
107
107
  end
108
108
 
109
+ desc "launch given rake command in parallel"
110
+ task :rake, :command do |t, args|
111
+ ParallelTests::Tasks.run_in_parallel("RAILS_ENV=#{ParallelTests::Tasks.rails_env} rake #{args.command}")
112
+ end
113
+
109
114
  ['test', 'spec', 'features'].each do |type|
110
115
  desc "run #{type} in parallel with parallel:#{type}[num_cpus]"
111
116
  task type, [:count, :pattern, :options] do |t, args|
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.9.3'
2
+ VERSION = Version = '0.9.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-21 00:00:00.000000000 Z
12
+ date: 2013-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  segments:
94
94
  - 0
95
- hash: -3882668074104783522
95
+ hash: -3550907709337093037
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  segments:
103
103
  - 0
104
- hash: -3882668074104783522
104
+ hash: -3550907709337093037
105
105
  requirements: []
106
106
  rubyforge_project:
107
107
  rubygems_version: 1.8.24