parallel_tests 5.1.0 → 5.2.0

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: d6c3298881c1895193a9ecea54a6d41578ea239a2f247f88bfd796cb59d6240b
4
- data.tar.gz: d4d5fc5bc795baa568a8ba3874f4d8a0e695cf72a35f10965215dbf961ac1f2f
3
+ metadata.gz: 7e72834dd1a8a2c46d1b09d8b6039c8b2189fba5b59d0e72fd738d349650f940
4
+ data.tar.gz: 1ba16b8a33eb3139b73d2c01476cfd89564cfa1de7b4c4b6a9b104afe7e229b9
5
5
  SHA512:
6
- metadata.gz: 1bdfe399bd6e3e3380853522202245562ccb6e1939ea42f25276475426ac61de386a24a1365d60467114badcac87cf5c56883028e55b5d6b39ccb531ffa9d3f7
7
- data.tar.gz: 93e6ddc6c20e98a86de94b5e6bd80dd0b1433a69cae9cfbcb8bf93f19aaa43e343b014c648435ca7a05f6ec81eb17c31ae332272fa45660445b068c3d9a2df78
6
+ metadata.gz: 6189557d6e628b1fefe65103033027e4bd78d3eb1d9bc828427fbdc3780b23fb81b827b31626b05f196e26e9d8b721813e38a494bc4813ae38809939b60bae9b
7
+ data.tar.gz: 0b5135be07485245f7533139a6f559421156bffeba26d9ddd8c483e995988132610c13369f52c2d0b0fdc0f0962b09afa15c2ab167818e2f253fb73642f99bf4
data/Readme.md CHANGED
@@ -129,7 +129,7 @@ Test groups will often run for different times, making the full test run as slow
129
129
 
130
130
  ### RSpec
131
131
 
132
- Rspec: Add to your `.rspec_parallel` (or `.rspec`) :
132
+ Rspec: Add to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
133
133
 
134
134
  --format progress
135
135
  --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
@@ -154,7 +154,7 @@ RSpec: SummaryLogger
154
154
 
155
155
  Log the test output without the different processes overwriting each other.
156
156
 
157
- Add the following to your `.rspec_parallel` (or `.rspec`) :
157
+ Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
158
158
 
159
159
  --format progress
160
160
  --format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log
@@ -168,7 +168,7 @@ Produce pasteable command-line snippets for each failed example. For example:
168
168
  rspec /path/to/my_spec.rb:123 # should do something
169
169
  ```
170
170
 
171
- Add to `.rspec_parallel` or use as CLI flag:
171
+ Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
172
172
 
173
173
  --format progress
174
174
  --format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log
@@ -188,7 +188,7 @@ Prints a single line for starting and finishing each example, to see what is cur
188
188
  [14402] [1] [PASSED] Bar bar
189
189
  ```
190
190
 
191
- Add to `.rspec_parallel` or use as CLI flag:
191
+ Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
192
192
 
193
193
  --format ParallelTests::RSpec::VerboseLogger
194
194
 
@@ -206,6 +206,8 @@ Or add the formatter to the `parallel:` profile of your `cucumber.yml`:
206
206
 
207
207
  parallel: --format progress --format ParallelTests::Cucumber::FailuresLogger --out tmp/cucumber_failures.log
208
208
 
209
+ but can also be used via `--test-options='--format x'`:
210
+
209
211
  Note if your `cucumber.yml` default profile uses `<%= std_opts %>` you may need to insert this as follows `parallel: <%= std_opts %> --format progress...`
210
212
 
211
213
  To rerun failures:
@@ -256,7 +258,8 @@ Options are:
256
258
  --failure-exit-code INT Specify the exit code to use when tests fail
257
259
  --specify-groups SPECS Use 'specify-groups' if you want to specify multiple specs running in multiple
258
260
  processes in a specific formation. Commas indicate specs in the same process,
259
- pipes indicate specs in a new process. Cannot use with --single, --isolate, or
261
+ pipes indicate specs in a new process. If SPECS is a `-` the value for this
262
+ option is read from STDIN instead. Cannot use with --single, --isolate, or
260
263
  --isolate-n. Ex.
261
264
  $ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
262
265
  Process 1 will contain 1_spec.rb and 2_spec.rb
@@ -254,7 +254,8 @@ module ParallelTests
254
254
  <<~TEXT.rstrip.split("\n").join("\n#{newline_padding}")
255
255
  Use 'specify-groups' if you want to specify multiple specs running in multiple
256
256
  processes in a specific formation. Commas indicate specs in the same process,
257
- pipes indicate specs in a new process. Cannot use with --single, --isolate, or
257
+ pipes indicate specs in a new process. If SPECS is a '-' the value for this
258
+ option is read from STDIN instead. Cannot use with --single, --isolate, or
258
259
  --isolate-n. Ex.
259
260
  $ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
260
261
  Process 1 will contain 1_spec.rb and 2_spec.rb
@@ -48,8 +48,15 @@ module ParallelTests
48
48
 
49
49
  private
50
50
 
51
+ def specified_groups(options)
52
+ groups = options[:specify_groups]
53
+ return groups if groups != '-'
54
+
55
+ $stdin.read.chomp
56
+ end
57
+
51
58
  def specify_groups(items, num_groups, options, groups)
52
- specify_test_process_groups = options[:specify_groups].split('|')
59
+ specify_test_process_groups = specified_groups(options).split('|')
53
60
  if specify_test_process_groups.count > num_groups
54
61
  raise 'Number of processes separated by pipe must be less than or equal to the total number of processes'
55
62
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ParallelTests
3
- VERSION = '5.1.0'
3
+ VERSION = '5.2.0'
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: 5.1.0
4
+ version: 5.2.0
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-03-09 00:00:00.000000000 Z
11
+ date: 2025-05-09 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/v5.1.0/CHANGELOG.md
73
- documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.1.0/Readme.md
74
- source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.1.0
72
+ changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.2.0/CHANGELOG.md
73
+ documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.2.0/Readme.md
74
+ source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.2.0
75
75
  wiki_uri: https://github.com/grosser/parallel_tests/wiki
76
76
  rubygems_mfa_required: 'true'
77
77
  post_install_message: