parallel_tests 4.6.0 → 4.6.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: 82339af23324161c5818c27e55fdadcbcac91ab832f76ce791a6deb289f77233
4
- data.tar.gz: 0fd923d52f7e368ef4c8e99e7874a465c7213960b1fd6e455404e472dc00ab90
3
+ metadata.gz: a00430ce92cb7dbfe80737cb601f269f463d60cdf6652e8932398bce2386dc2b
4
+ data.tar.gz: 8638d842e945665c779e433b40b70775719a30839dc0a59476d1e7987df5ef1e
5
5
  SHA512:
6
- metadata.gz: ee5cb110a617b78e8761c5e01894827b63cccbe6a239b491841949bf2ebe2e9d68a43d4bb0d0a5600cdc6904e8cffba816eb424ca5883865daf661cf7b208f91
7
- data.tar.gz: e23de90f4aed3c4571252385a251c3765718c3e2fd34aaf342307667b6710819aff652b4c1709dab2152fe0b81217f2d2fb1b98cf308d8c40e3190d91374337d
6
+ metadata.gz: b6ced0d1c0d23f42c14992977493f3712d8b60c6a0a933b2b0cfcd1ba413119dbe3084853f6915471946535e26399b0132fa8f7520bb002131941da09553eb6c
7
+ data.tar.gz: 5d2d5a3d8b400e337345a0e0e13ae5e94a4a1a8a4c5ef6fa3132091c1d8f66f6dabddda1dd0f9f880adade03345d9fc84bed44a7b22432490e759094b8b77d9d
data/Readme.md CHANGED
@@ -61,17 +61,17 @@ test:
61
61
  rake parallel:features # Cucumber
62
62
  rake parallel:features-spinach # Spinach
63
63
 
64
- rake parallel:test[1] --> force 1 CPU --> 86 seconds
64
+ rake "parallel:test[1]" --> force 1 CPU --> 86 seconds
65
65
  rake parallel:test --> got 2 CPUs? --> 47 seconds
66
66
  rake parallel:test --> got 4 CPUs? --> 26 seconds
67
67
  ...
68
68
 
69
69
  Test by pattern with Regex (e.g. use one integration server per subfolder / see if you broke any 'user'-related tests)
70
70
 
71
- rake parallel:test[^test/unit] # every test file in test/unit folder
72
- rake parallel:test[user] # run users_controller + user_helper + user tests
73
- rake parallel:test['user|product'] # run user and product related tests
74
- rake parallel:spec['spec\/(?!features)'] # run RSpec tests except the tests in spec/features
71
+ rake "parallel:test[^test/unit]" # every test file in test/unit folder
72
+ rake "parallel:test[user]" # run users_controller + user_helper + user tests
73
+ rake "parallel:test['user|product']" # run user and product related tests
74
+ rake "parallel:spec['spec\/(?!features)']" # run RSpec tests except the tests in spec/features
75
75
 
76
76
 
77
77
  ### Example output
@@ -87,9 +87,9 @@ Test by pattern with Regex (e.g. use one integration server per subfolder / see
87
87
  ```Bash
88
88
  RAILS_ENV=test parallel_test -e "rake my:custom:task"
89
89
  # or
90
- rake parallel:rake[my:custom:task]
90
+ rake "parallel:rake[my:custom:task]"
91
91
  # limited parallelism
92
- rake parallel:rake[my:custom:task,2]
92
+ rake "parallel:rake[my:custom:task,2]"
93
93
  ```
94
94
 
95
95
 
@@ -57,8 +57,8 @@ module ParallelTests
57
57
  Tempfile.open 'parallel_tests-lock' do |lock|
58
58
  ParallelTests.with_pid_file do
59
59
  simulate_output_for_ci options[:serialize_stdout] do
60
- Parallel.map(items, in_threads: num_processes) do |item|
61
- result = yield(item)
60
+ Parallel.map_with_index(items, in_threads: num_processes) do |item, index|
61
+ result = yield(item, index)
62
62
  reprint_output(result, lock.path) if options[:serialize_stdout]
63
63
  ParallelTests.stop_all_processes if options[:fail_fast] && result[:exit_status] != 0
64
64
  result
@@ -81,8 +81,8 @@ module ParallelTests
81
81
  end
82
82
 
83
83
  report_number_of_tests(groups) unless options[:quiet]
84
- test_results = execute_in_parallel(groups, groups.size, options) do |group|
85
- run_tests(group, groups.index(group), num_processes, options)
84
+ test_results = execute_in_parallel(groups, groups.size, options) do |group, index|
85
+ run_tests(group, index, num_processes, options)
86
86
  end
87
87
  report_results(test_results, options) unless options[:quiet]
88
88
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ParallelTests
3
- VERSION = '4.6.0'
3
+ VERSION = '4.6.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.6.0
4
+ version: 4.6.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: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -69,8 +69,8 @@ licenses:
69
69
  - MIT
70
70
  metadata:
71
71
  bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
72
- documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.6.0/Readme.md
73
- source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.6.0
72
+ documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.6.1/Readme.md
73
+ source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.6.1
74
74
  wiki_uri: https://github.com/grosser/parallel_tests/wiki
75
75
  post_install_message:
76
76
  rdoc_options: []