parallel_rspec 2.1.0 → 2.1.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
  SHA256:
3
- metadata.gz: 2d143dce3b81dac87bf01778c952ad87821de77b440e11fc5d24e270a932331e
4
- data.tar.gz: f1ca46d4effc92cd59613f44dc4bf55015a3b8c70a025211dbd5a19421337730
3
+ metadata.gz: 73b85e313868cc3fb29697f15b99911c17a6ba818c80723c05ca6cf2cb450b00
4
+ data.tar.gz: a86b018f8fe152d0bf4203f3f076eb5e08583b65bbe4dd390220869a3292fb12
5
5
  SHA512:
6
- metadata.gz: d72eae09b94e9d243f99ffd7c7d3ff8f97e2c77a6905cba37a738d66002ba298ff86990cb6069cbb323a9758b2bbd5b3c4ab09db8ee42a1dbd2d0a3b76243242
7
- data.tar.gz: 486f0adb28955ae1f5f2c972ac26b0748d2691a9205b9c82a1c7b686a88c0a59deddfd9c85b5be92a98bd45ed9fe2ef616a80ea971143d86f0170bfdec97cc0b
6
+ metadata.gz: 8fa15fcdb155ba22163b604b8d2abaa7ba003e2b1c1169dd5565399b29757c714d7362626959024c26e32068fbf6974590533d0b37d7f55f7fd329d8d06755a9
7
+ data.tar.gz: 895f4135c2603f10a6e721c36d15cd0c0b9b7ba212e4f8b577fdc923030479332bcb55799bf12e78332649e6e6cecbca1946a7181416a567fffde27cfad50be4
data/CHANGES.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## 2.1.2
4
+
5
+ * Fix error when used in projects without ActiveSupport. Thanks @erikpaasonen.
6
+
7
+ ## 2.1.1
8
+
9
+ * Fix deprecation warnings from ActiveRecord::Base.configurations[].
10
+
11
+ ## 2.1.0
12
+
13
+ * Add a default parallel_rspec rake task.
14
+ * Add task descriptions for rake --tasks.
15
+
16
+ ## 2.0.0
17
+
18
+ * Remove an unnecessary dev dependency to pacify dependabot.
19
+ * Add after_fork hook and running? method. Thanks @mogest.
20
+ * Upgrade for compatibility with Rails 6.1 and RSpec 3.10. Thanks @mogest.
21
+
22
+ ## 1.2.0
23
+
24
+ * 9924295 Make the Railtie load optional.
25
+ * 6366f07 Add require to the recommended Rakefile for people not using Rails.
26
+ * 1a5ec3d Fix rake and rspec dependencies.
data/README.md CHANGED
@@ -91,6 +91,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/willbr
91
91
 
92
92
  * Charles Horn (@hornc)
93
93
  * Roger Nesbitt (@mogest)
94
+ * Erik Paasonen (@erikpaasonen)
94
95
 
95
96
 
96
97
  ## License
@@ -98,3 +99,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/willbr
98
99
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
99
100
 
100
101
  Copyright (c) Powershop New Zealand Ltd, 2015.
102
+ Copyright (c) Will Bryant, 2023.
@@ -6,8 +6,8 @@ module RSpec
6
6
  def self.any_context_hooks?
7
7
  # unfortunately the public HookCollection API doesn't make this information available, so we have to grab it from internals
8
8
  descendants.any? do |group| # despite the name, descendents includes self
9
- group.hooks.send(:matching_hooks_for, :before, :context, group).present? ||
10
- group.hooks.send(:matching_hooks_for, :after, :context, group).present?
9
+ group.hooks.send(:matching_hooks_for, :before, :context, group).any? ||
10
+ group.hooks.send(:matching_hooks_for, :after, :context, group).any?
11
11
  end
12
12
  end
13
13
  end
@@ -58,6 +58,7 @@ module ParallelRSpec
58
58
  # or the configured failure exit code (1 by default) if specs
59
59
  # failed.
60
60
  def run_specs(example_groups)
61
+ puts "running #{@world.example_count(example_groups)}"
61
62
  @configuration.reporter.report(@world.example_count(example_groups)) do |reporter|
62
63
  @configuration.with_suite_hooks do
63
64
  with_context_hooks, without_context_hooks = example_groups.partition(&:any_context_hooks?)
@@ -23,6 +23,7 @@ module ParallelRSpec
23
23
  end
24
24
 
25
25
  def example_finished(example, channel_to_client)
26
+ pp example
26
27
  reporter.example_finished(example)
27
28
  end
28
29
 
@@ -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.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Bryant, Powershop New Zealand Ltd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2023-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -50,6 +50,7 @@ extra_rdoc_files: []
50
50
  files:
51
51
  - ".gitignore"
52
52
  - ".travis.yml"
53
+ - CHANGES.md
53
54
  - Gemfile
54
55
  - LICENSE.txt
55
56
  - README.md
@@ -87,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
88
  - !ruby/object:Gem::Version
88
89
  version: '0'
89
90
  requirements: []
90
- rubygems_version: 3.0.3
91
+ rubygems_version: 3.3.26
91
92
  signing_key:
92
93
  specification_version: 4
93
94
  summary: This gem lets you run your RSpec examples in parallel across across your