parallel_tests 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a6ba960e495c17a9f71bd42452aedcc1997985d
4
- data.tar.gz: dafea9c4b75f8357fff3bb5968e70a38aa051537
3
+ metadata.gz: b06b8b7a06a62107496d979771375e1ae39b260f
4
+ data.tar.gz: 4bd2bb9780dd04d4aeb42d0e12676594036b544c
5
5
  SHA512:
6
- metadata.gz: 1858b20ecd358b7c8ac0bffba7e2baa527d08621be4c15aab0f29304b621141b2ed90447136a8bbb2047c3c0883fd83da5f569459f0565b4b1adafcf61a4590b
7
- data.tar.gz: 2655960609ecadb6db278be67fc93fad2a24430b31aab80c600a6aab6c699a847abd8d98051edc2c37f14d63b337a3b8c0cf10c97d7a333d7e6fc752a970c60a
6
+ metadata.gz: 1a1193b83e575ea49b19d3dd6a327abfaeedca05e86f86304e575501ed7672cce923202cc931b0875c87d2c786d1b71d1c1f98fee86014c82bef90060c68b75b
7
+ data.tar.gz: 71435234ad10665421a4cf07e6fafcc45ba8c9fbee3f021a564c67386e1ec901b8f2369763475e544f1861db492aa6faf6e0144d7a5d19ce742e5d07678e4972
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.15.1)
4
+ parallel_tests (0.15.2)
5
5
  parallel
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -290,6 +290,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
290
290
  - [Felix Clack](https://github.com/felixclack)
291
291
  - [Izaak Alpert](https://github.com/karlhungus)
292
292
  - [Micah Geisel](https://github.com/botandrose)
293
+ - [Exoth](https://github.com/Exoth)
293
294
 
294
295
  [Michael Grosser](http://grosser.it)<br/>
295
296
  michael@grosser.it<br/>
@@ -38,9 +38,11 @@ module ParallelTests
38
38
  end
39
39
 
40
40
  def check_for_pending_migrations
41
- abort_migrations = "db:abort_if_pending_migrations"
42
- if Rake::Task.task_defined?(abort_migrations)
43
- Rake::Task[abort_migrations].invoke
41
+ ["db:abort_if_pending_migrations", "app:db:abort_if_pending_migrations"].each do |abort_migrations|
42
+ if Rake::Task.task_defined?(abort_migrations)
43
+ Rake::Task[abort_migrations].invoke
44
+ break
45
+ end
44
46
  end
45
47
  end
46
48
 
@@ -84,7 +86,8 @@ namespace :parallel do
84
86
  else
85
87
  # there is no separate dump / load for schema_format :sql -> do it safe and slow
86
88
  args = args.to_hash.merge(:non_parallel => true) # normal merge returns nil
87
- ParallelTests::Tasks.run_in_parallel('rake db:test:prepare --trace', args)
89
+ taskname = Rake::Task.task_defined?('db:test:prepare') ? 'db:test:prepare' : 'app:db:test:prepare'
90
+ ParallelTests::Tasks.run_in_parallel("rake #{taskname} --trace", args)
88
91
  end
89
92
  end
90
93
 
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.15.1'
2
+ VERSION = Version = '0.15.2'
3
3
  end
@@ -123,6 +123,7 @@ describe ParallelTests::Tasks do
123
123
  describe ".check_for_pending_migrations" do
124
124
  after do
125
125
  Rake.application.instance_variable_get('@tasks').delete("db:abort_if_pending_migrations")
126
+ Rake.application.instance_variable_get('@tasks').delete("app:db:abort_if_pending_migrations")
126
127
  end
127
128
 
128
129
  it "should do nothing if pending migrations is no defined" do
@@ -138,6 +139,15 @@ describe ParallelTests::Tasks do
138
139
  foo.should == 2
139
140
  end
140
141
 
142
+ it "should run pending migrations is app task is defined" do
143
+ foo = 1
144
+ Rake::Task.define_task("app:db:abort_if_pending_migrations") do
145
+ foo = 2
146
+ end
147
+ ParallelTests::Tasks.check_for_pending_migrations
148
+ foo.should == 2
149
+ end
150
+
141
151
  it "should not execute the task twice" do
142
152
  foo = 1
143
153
  Rake::Task.define_task("db:abort_if_pending_migrations") do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-17 00:00:00.000000000 Z
11
+ date: 2013-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel