parallel_rspec 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: 2d143dce3b81dac87bf01778c952ad87821de77b440e11fc5d24e270a932331e
4
- data.tar.gz: f1ca46d4effc92cd59613f44dc4bf55015a3b8c70a025211dbd5a19421337730
3
+ metadata.gz: 789b0fec42e9fe3b485305a5da250915fab02f89678dba1171ec7fd2d7b0bcc5
4
+ data.tar.gz: 259d48bbffa5177861d88cf92daa4a9b942e4d40d21dff4d04ee3eb190a49dde
5
5
  SHA512:
6
- metadata.gz: d72eae09b94e9d243f99ffd7c7d3ff8f97e2c77a6905cba37a738d66002ba298ff86990cb6069cbb323a9758b2bbd5b3c4ab09db8ee42a1dbd2d0a3b76243242
7
- data.tar.gz: 486f0adb28955ae1f5f2c972ac26b0748d2691a9205b9c82a1c7b686a88c0a59deddfd9c85b5be92a98bd45ed9fe2ef616a80ea971143d86f0170bfdec97cc0b
6
+ metadata.gz: b5da7ba542f13faacb9d89906b23255c02262e228b3cfa4c72377f0f0a1addfabfcb1c6970e6c15316e4a569f4ed15b28592ce11b0cbad522b7342c67f97ed13
7
+ data.tar.gz: 4a1eac0dfaa95d8ef167380ec9922072dee901e2e9087c0c9f00b121b34dde73cd148dada9c435bf51d98cb5f6547eaf31f5aa61e9b9effa8de148843f7ee122
@@ -5,14 +5,24 @@ db_namespace = namespace :db do
5
5
  desc "Creates the test databases"
6
6
  task :create => [:load_config] do
7
7
  ParallelRSpec::Workers.new.run_test_workers do |worker|
8
- ActiveRecord::Tasks::DatabaseTasks.create ActiveRecord::Base.configurations['test']
8
+ if ActiveRecord::Base.configurations.respond_to?(:configs_for)
9
+ ActiveRecord::Base.configurations.configs_for(env_name: 'test').each do |configuration|
10
+ ActiveRecord::Tasks::DatabaseTasks.create configuration
11
+ end
12
+ else
13
+ ActiveRecord::Tasks::DatabaseTasks.create ActiveRecord::Base.configurations['test']
14
+ end
9
15
  end
10
16
  end
11
17
 
12
18
  desc "Empty the test databases"
13
19
  task :purge => %w(environment load_config) do
14
20
  ParallelRSpec::Workers.new.run_test_workers do |worker|
15
- ActiveRecord::Tasks::DatabaseTasks.purge ActiveRecord::Base.configurations['test']
21
+ if ActiveRecord::Tasks::DatabaseTasks.respond_to?(:purge_current)
22
+ ActiveRecord::Tasks::DatabaseTasks.purge_current 'test'
23
+ else
24
+ ActiveRecord::Tasks::DatabaseTasks.purge ActiveRecord::Base.configurations['test']
25
+ end
16
26
  end
17
27
  end
18
28
 
@@ -1,3 +1,3 @@
1
1
  module ParallelRSpec
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Bryant, Powershop New Zealand Ltd