rspec-abq 1.0.2 → 1.0.4

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: 47cb306f3ccae9028f66868c94bad15520483ba37a240b91a15c95799c004eea
4
- data.tar.gz: 9f9b96ff40ddb02f1d545e4c8f0032b436f099c90e8fc2dc779df79b11e7e8c3
3
+ metadata.gz: 32d3a96e24adf90ae8f04464daccb1458833022b7888eb9f0eb13d4f735cd186
4
+ data.tar.gz: 5aa909ff347fb5522a8716028bfc5f187355792e60392143c22bfa097017f4b3
5
5
  SHA512:
6
- metadata.gz: 5600f59bdb6bf10da3676b3333218d06138df69fd98c6b46b4f63cd6582d7ba41b41513482697279b49844799db3efede34156836f5a30f276f1d1021ec70642
7
- data.tar.gz: fbe86282d566d1db465018261ce241aa2a24c70109fd0878cb33a70814d89f1898c7255cd0ed71e6e83eb6d9fdb6eeceb8d8652a64bc2a841cf44155506080fb
6
+ metadata.gz: 31765589e5cebda9567807ed17bcafa96be05d285b8d757e9611a5a77230a6a60ed5163dae008cfbc4a2d9228218639b7999181b2e67d11dfde6848b1791d604
7
+ data.tar.gz: 9a983dec557fb2f606bf68480b817cc4e75b3d5e318f9c0ed8af56bbaa1362e11706a27d7107788fd45fd1f9808b47f394ee3813132018916295946ec1595edb
data/README.md CHANGED
@@ -16,7 +16,7 @@ end
16
16
 
17
17
  And then execute:
18
18
 
19
- ```
19
+ ```bash
20
20
  bundle
21
21
  ```
22
22
 
@@ -24,10 +24,16 @@ bundle
24
24
 
25
25
  Use the included binary with abq:
26
26
 
27
- ```
27
+ ```bash
28
28
  abq test -- bundle exec rspec
29
29
  ```
30
30
 
31
+ If abq displays "Worker quit before sending protocol version", try adding this line to your application's `spec/spec_helper.rb`:
32
+
33
+ ```ruby
34
+ require 'rspec/abq'
35
+ ```
36
+
31
37
  ## Compatibility
32
38
 
33
39
  This gem is actively tested against rubies 2.6-3.1 and rspecs 3.5-3.12
@@ -106,14 +106,21 @@ module RSpec
106
106
  module Runner
107
107
  # Runs the provided example groups.
108
108
  #
109
- # @param example_groups [Array<RSpec::Core::ExampleGroup>] groups to run
109
+ # @param _example_groups [Array<RSpec::Core::ExampleGroup>] groups to run.
110
+ # Ignored in favor of @world.ordered_example_groups
110
111
  # @return [Fixnum] exit status code. 0 if all specs passed,
111
112
  # or the configured failure exit code (1 by default) if specs
112
113
  # failed.
113
- def run_specs(example_groups)
114
+ def run_specs(_example_groups)
114
115
  should_quit = RSpec::Abq.setup_after_specs_loaded!
115
116
  return 0 if should_quit
116
117
 
118
+ # rspec-abq pulls the ordering from the init-message. Here we ensure the example groups are in the same ordering.
119
+ # RSpec passes to `run_specs` exactly the world ordered example groups:
120
+ # https://github.com/rspec/rspec-core/blob/522b7727d02d9648c090b56fa68bbdc18a21c04d/lib/rspec/core/runner.rb#L85-L92
121
+ # So this definition is safe.
122
+ example_groups = @world.ordered_example_groups
123
+
117
124
  examples_count = @world.example_count(example_groups)
118
125
  examples_passed = @configuration.reporter.report(examples_count) do |reporter|
119
126
  @configuration.with_suite_hooks do
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Abq
3
3
  # current version!
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.4"
5
5
  end
6
6
  end
data/lib/rspec/abq.rb CHANGED
@@ -41,7 +41,12 @@ module RSpec
41
41
  NATIVE_RUNNER_SPECIFICATION = {
42
42
  type: "abq_native_runner_specification",
43
43
  name: "rspec-abq",
44
- version: RSpec::Abq::VERSION
44
+ version: RSpec::Abq::VERSION,
45
+ test_framework: "rspec",
46
+ test_framework_version: RSpec::Core::Version::STRING,
47
+ language: RUBY_ENGINE,
48
+ language_version: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
49
+ host: RUBY_DESCRIPTION
45
50
  }
46
51
 
47
52
  # The [rpsec-abq spawned message](https://www.notion.so/rwx/ABQ-Worker-Native-Test-Runner-IPC-Interface-0959f5a9144741d798ac122566a3d887#8587ee4fd01e41ec880dcbe212562172).
@@ -101,14 +106,6 @@ module RSpec
101
106
  # before abq can start workers, it asks for a manifest
102
107
  if !!ENV[ABQ_GENERATE_MANIFEST] # the abq worker will set this env var if it needs a manifest
103
108
  RSpec::Abq::Manifest.write_manifest(RSpec.world.ordered_example_groups, RSpec.configuration.seed, RSpec.configuration.ordering_registry)
104
- # ... Maybe it's fine to just exit(0)
105
- if Gem::Version.new(RSpec::Core::Version::STRING) >= Gem::Version.new("3.10.0")
106
- RSpec.world.wants_to_quit = true # ask rspec to exit
107
- RSpec.configuration.error_exit_code = 0
108
- RSpec.world.non_example_failure = true # exit has nothing to do with tests
109
- else
110
- exit(0)
111
- end
112
109
  return true
113
110
  end
114
111
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-abq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ayaz Hafiz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 1980-01-01 00:00:00.000000000 Z
12
+ date: 2022-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-core
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubygems_version: 3.2.26
92
+ rubygems_version: 3.3.7
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: RSpec::Abq allows for parallel rspec runs using abq