parallel_tests 4.8.0 → 4.9.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40c390881f78ed6c146e2f11deee7e19fc5df5fa99494779a15743ce6a8463a0
4
- data.tar.gz: 89cc457abaea5d29160f745ccc6cd57e2ba365f53f64b82248eb3033533da804
3
+ metadata.gz: 7e815835eed992c081181431f2989b1ab60ec6a0a3c95947c90aafd5db2ebcd3
4
+ data.tar.gz: 2b70b55f1d6c8fd5980bd7373cc3d2848ff895223a55f58b669d07fe1aa396e6
5
5
  SHA512:
6
- metadata.gz: d1cc1c8645f580ea2eb43ee650e24a1c314c1af93937a5d11a8591e405bbc429b23fcfc79ed92bc50f9d15ec3a1aa35abe1db2a718927dbab50b1077a4fa91c6
7
- data.tar.gz: b50b820699c76f128d1bce2495d5f2363cac1a53e978713c6e3a51b5e298f841292153a898514ded1153d7c99c230e67c95f3f23c6a4416a78dc26991c875b11
6
+ metadata.gz: abbcf1ba23afba1f7d0e055d37f924ba4bd3d3e77c09a4a78a725d17158bb0553daf3ca739c41035c9d3833cd0413a40e304decf05ebe00f453ed35865c90193
7
+ data.tar.gz: 4dafcef1701e3584dae080953282b52733066bdc1415fa50aa2dc67bd91f292471dd9ff32939fdef16867226ee46aa94a6272e7705371900f320b1f196e38f95
data/Readme.md CHANGED
@@ -345,6 +345,7 @@ TIPS
345
345
  - [Capybara setup](https://github.com/grosser/parallel_tests/wiki)
346
346
  - [Sphinx setup](https://github.com/grosser/parallel_tests/wiki)
347
347
  - [Capistrano setup](https://github.com/grosser/parallel_tests/wiki/Remotely-with-capistrano) let your tests run on a big box instead of your laptop
348
+ - Rails vs `ArgumentError: secret_key_base`: use `config.secret_key_base = Random.hex(64)`, see [rails issue](https://github.com/rails/rails/issues/53661)
348
349
 
349
350
  Contribute your own gotchas to the [Wiki](https://github.com/grosser/parallel_tests/wiki) or even better open a PR :)
350
351
 
@@ -446,6 +447,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
446
447
  - [Josh Westbrook](https://github.com/joshwestbrook)
447
448
  - [Jay Dorsey](https://github.com/jaydorsey)
448
449
  - [hatsu](https://github.com/hatsu38)
450
+ - [Mark Huk](https://github.com/vimutter)
449
451
 
450
452
  [Michael Grosser](http://grosser.it)<br/>
451
453
  michael@grosser.it<br/>
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require 'cucumber/formatter/rerun'
3
3
  require 'parallel_tests/gherkin/io'
4
+ require 'cucumber/events'
4
5
 
5
6
  module ParallelTests
6
7
  module Cucumber
@@ -9,15 +10,23 @@ module ParallelTests
9
10
 
10
11
  def initialize(config)
11
12
  super
13
+
12
14
  @io = prepare_io(config.out_stream)
13
- end
14
15
 
15
- def done
16
- return if @failures.empty?
17
- lock_output do
18
- @failures.each do |file, lines|
19
- lines.each do |line|
20
- @io.print "#{file}:#{line} "
16
+ # Remove handler inherited from Cucumber::Formatter::Rerun that does not
17
+ # properly join file failures
18
+ handlers = config.event_bus.instance_variable_get(:@handlers)
19
+ handlers[::Cucumber::Events::TestRunFinished.to_s].pop
20
+
21
+ # Add our own handler
22
+ config.on_event :test_run_finished do
23
+ return if @failures.empty?
24
+
25
+ lock_output do
26
+ @failures.each do |file, lines|
27
+ lines.each do |line|
28
+ @io.print "#{file}:#{line} "
29
+ end
21
30
  end
22
31
  end
23
32
  end
@@ -15,7 +15,7 @@ module ParallelTests
15
15
  end
16
16
 
17
17
  def purge_before_load
18
- if Gem::Version.new(Rails.version) > Gem::Version.new('4.2.0')
18
+ if ActiveRecord.version > Gem::Version.new('4.2.0')
19
19
  Rake::Task.task_defined?('db:purge') ? 'db:purge' : 'app:db:purge'
20
20
  end
21
21
  end
@@ -90,7 +90,7 @@ module ParallelTests
90
90
  end
91
91
 
92
92
  def schema_format_based_on_rails_version
93
- if rails_7_or_greater?
93
+ if active_record_7_or_greater?
94
94
  ActiveRecord.schema_format
95
95
  else
96
96
  ActiveRecord::Base.schema_format
@@ -98,7 +98,7 @@ module ParallelTests
98
98
  end
99
99
 
100
100
  def schema_type_based_on_rails_version
101
- if rails_61_or_greater? || schema_format_based_on_rails_version == :ruby
101
+ if active_record_61_or_greater? || schema_format_based_on_rails_version == :ruby
102
102
  "schema"
103
103
  else
104
104
  "structure"
@@ -129,7 +129,7 @@ module ParallelTests
129
129
  end
130
130
 
131
131
  def configured_databases
132
- return [] unless defined?(ActiveRecord) && rails_61_or_greater?
132
+ return [] unless defined?(ActiveRecord) && active_record_61_or_greater?
133
133
 
134
134
  @@configured_databases ||= ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
135
135
  end
@@ -148,12 +148,12 @@ module ParallelTests
148
148
 
149
149
  private
150
150
 
151
- def rails_7_or_greater?
152
- Gem::Version.new(Rails.version) >= Gem::Version.new('7.0')
151
+ def active_record_7_or_greater?
152
+ ActiveRecord.version >= Gem::Version.new('7.0')
153
153
  end
154
154
 
155
- def rails_61_or_greater?
156
- Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0')
155
+ def active_record_61_or_greater?
156
+ ActiveRecord.version >= Gem::Version.new('6.1.0')
157
157
  end
158
158
  end
159
159
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ParallelTests
3
- VERSION = '4.8.0'
3
+ VERSION = '4.9.1'
4
4
  end
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: 4.8.0
4
+ version: 4.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -69,9 +69,9 @@ licenses:
69
69
  - MIT
70
70
  metadata:
71
71
  bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
72
- changelog_uri: https://github.com/grosser/parallel_tests/blob/v4.8.0/CHANGELOG.md
73
- documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.8.0/Readme.md
74
- source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.8.0
72
+ changelog_uri: https://github.com/grosser/parallel_tests/blob/v4.9.1/CHANGELOG.md
73
+ documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.9.1/Readme.md
74
+ source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.9.1
75
75
  wiki_uri: https://github.com/grosser/parallel_tests/wiki
76
76
  rubygems_mfa_required: 'true'
77
77
  post_install_message: