rspec-abq 1.1.4 → 1.2.0

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: 8fcc7527789801cfb1094fee318218a52cab5bd3b0925398bed7dac2b8deb664
4
- data.tar.gz: 3701f56451563118b5d7f869606bea912e72b3fb278dd51a89c06a35e26b166d
3
+ metadata.gz: 4981ef40bdbb50ac4e89c78713e13eb64dfa7527a828b6f748f914bedc6f4f00
4
+ data.tar.gz: ba3ab95a526e074b75bfdcbe6a5546230b9ee2b23fd4f2f0ec90a8b57ab86dfc
5
5
  SHA512:
6
- metadata.gz: 36325877c6ba0a9f01c3d445e24008056d6aee6421af09065b87e8e0e30dbf41bf953f622e99eacb41c50cc4277cae3e4f8e8a7bc4cfd85a9d09e8d3c3a88da3
7
- data.tar.gz: 0afbd05fff935a8b1b4b2809cc97049609b87ce4a1a0bbacabb42966cbe152483f397c2bd7136a4bc3d6a45721b5ca455a8839cef401739a3c30f67ef92cf61d
6
+ metadata.gz: ac9cb3808e6fdaf81032bd2cc69ff388e06834f09594e9a0072276951417fe36ef6f5243b1f5edccc755b15603fde75a5261361a7368b40ec1fe01395b95680b
7
+ data.tar.gz: c5b702af12ad956ee040c45a4e8d7a8a84ab8278315dc1ccb968b681e96577aba986dfd6d39d9a22427985aa47249e0803d4d7f606afb8b427f62b640a2ff5ea
data/README.md CHANGED
@@ -1,85 +1,42 @@
1
- # Rspec::Abq
1
+ # RSpec bindings for ABQ
2
2
 
3
- This gem helps you use rspec with abq.
3
+ :globe_with_meridians: [website](https://www.rwx.com/abq)  
4
+ :bird: [@rwx_research](https://twitter.com/rwx_research)  
5
+ :speech_balloon: [discord](https://www.rwx.com/discord)  
6
+ :books: [documentation](https://www.rwx.com/docs/abq)
4
7
 
5
- ## Installation
8
+ :octocat: [rwx-research/abq](https://github.com/rwx-research/abq)
6
9
 
7
- Add this line to your application's Gemfile:
10
+ ABQ is a universal test runner that runs test suites in parallel.
11
+ It’s the best tool for splitting test suites into parallel jobs locally or on CI.
8
12
 
9
- ```ruby
10
- group :test do
11
- gem 'rspec-core'
12
- ...
13
- gem 'rspec-abq'
14
- end
15
- ```
13
+ The `rspec-abq` gem provides the RSpec bindings for ABQ.
16
14
 
17
- And then execute:
15
+ To use ABQ, check out the documentation on [getting started](https://www.rwx.com/docs/abq/getting-started).
18
16
 
19
- ```bash
20
- bundle
21
- ```
17
+ ## Demo
22
18
 
23
- ## Usage
19
+ Here's a demo of running an RSpec test suite, and then using `abq` to run it in parallel.
20
+ ABQ invokes any test command passed to it, so you can continue using your native test framework CLI with any arguments it supports.
24
21
 
25
- Use the included binary with abq:
22
+ ![abq-demo.svg](abq-demo.svg)
26
23
 
27
- ```bash
28
- abq test -- bundle exec rspec
29
- ```
24
+ ## Installation
30
25
 
31
- If abq displays "Worker quit before sending protocol version", try adding this line to your application's `spec/spec_helper.rb`:
26
+ Include the `rspec-abq` gem in your `Gemfile`.
27
+ Commonly, it's added under a test group.
32
28
 
33
29
  ```ruby
34
- require 'rspec/abq'
30
+ group :test do
31
+ gem "rspec-abq"
32
+ end
35
33
  ```
36
34
 
37
- ## Compatibility
38
-
39
- This gem is actively tested against
40
-
41
- - rubies 2.7-3.1
42
- - rspecs 3.5-3.12
43
-
44
- as well as a handful of rspec plugins:
45
-
46
- - rspec-retry 0.6.2
47
- - capybara 3.36.0
48
- - selenium-webdriver 4.1.0
49
- - capybara-inline-screenshot 2.2.1 (see note below)
50
-
51
- ### Usage with capybara-inline-screenshot (or capybara-screenshot)
52
-
53
- #### tldr
54
-
55
- 1. run rspec with a compatible `--format` option:
56
-
57
- ```sh
58
- abq test -- bundle exec rspec --format documentation
59
- ```
60
-
61
- 2. check for screenshots in the worker output
62
-
63
- #### What's happening?
64
-
65
- By default, rspec-abq only sends rspec-output to the test process. Because of this, custom formatting (e.g. that
66
- done by capybara-inline-screenshot) is lost.
67
-
68
- If you want to enable custom formatting (which will show inline screenshots), enable a
69
- capybara-inline-screenshot compatible formatter (`progress` or `documentation`). This will output rspec results
70
- (including screenshots) from the worker processeses.
71
-
72
- Note: the test process output will still only have the aggregate results without screenshots.
35
+ See [the docs](https://www.rwx.com/docs/abq/test-frameworks/rspec) for more notes on installation and compatibility with other RSpec libraries.
73
36
 
74
37
  ## Development
75
38
 
76
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
77
-
78
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
79
-
80
- ### Releasing the gem
81
-
82
- use the release script, `./release_gem.rb`
39
+ For working on `rspec-abq` itself, see [DEVELOPMENT.md](DEVELOPMENT.md)
83
40
 
84
41
  ## Contributing
85
42
 
@@ -119,6 +119,10 @@ module RSpec
119
119
  # or the configured failure exit status (1 by default) if specs
120
120
  # failed.
121
121
  def run_specs(example_groups)
122
+ if Gem::Version.new(RSpec::Core::Version::STRING) >= Gem::Version.new("3.11.0") && RSpec.world.rspec_is_quitting
123
+ return exit_code(false)
124
+ end
125
+
122
126
  if !!ENV[ABQ_GENERATE_MANIFEST]
123
127
  # before abq can start workers, it asks for a manifest
124
128
  RSpec::Abq::Manifest.write_manifest(example_groups, RSpec.configuration.seed, RSpec.configuration.ordering_registry)
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Abq
3
3
  # current version!
4
- VERSION = "1.1.4"
4
+ VERSION = "1.2.0"
5
5
  end
6
6
  end
data/lib/rspec/abq.rb CHANGED
@@ -145,6 +145,7 @@ module RSpec
145
145
  # @return [void]
146
146
  def self.setup_extensions_if_enabled!
147
147
  return unless enabled?
148
+ perform_handshake!
148
149
  Extensions.setup!
149
150
  end
150
151
 
@@ -199,6 +200,7 @@ module RSpec
199
200
  RSpec.configuration.color_mode = :on
200
201
  else
201
202
  RSpec.configuration.color = true
203
+ RSpec.configuration.tty = true
202
204
  end
203
205
 
204
206
  # RSpec only adds a default formatter if there are no formatters.
@@ -252,6 +254,8 @@ module RSpec
252
254
  # the target_test_case is the test case the abq worker wants results for
253
255
  # @!visibility private
254
256
  attr_reader :target_test_case
257
+
258
+ alias_method :perform_handshake!, :socket
255
259
  end
256
260
 
257
261
  # pulls next example from the abq worker and sets it to #target_test_case
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-abq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - rwx
7
8
  - Ayaz Hafiz
8
9
  - Michael Glass
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 1980-01-01 00:00:00.000000000 Z
13
+ date: 2024-03-01 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rspec-core
@@ -17,20 +18,20 @@ dependencies:
17
18
  requirements:
18
19
  - - ">="
19
20
  - !ruby/object:Gem::Version
20
- version: 3.5.0
21
+ version: 3.8.0
21
22
  - - "<"
22
23
  - !ruby/object:Gem::Version
23
- version: 3.13.0
24
+ version: 3.14.0
24
25
  type: :runtime
25
26
  prerelease: false
26
27
  version_requirements: !ruby/object:Gem::Requirement
27
28
  requirements:
28
29
  - - ">="
29
30
  - !ruby/object:Gem::Version
30
- version: 3.5.0
31
+ version: 3.8.0
31
32
  - - "<"
32
33
  - !ruby/object:Gem::Version
33
- version: 3.13.0
34
+ version: 3.14.0
34
35
  - !ruby/object:Gem::Dependency
35
36
  name: pry
36
37
  requirement: !ruby/object:Gem::Requirement
@@ -65,84 +66,84 @@ dependencies:
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: 3.38.0
69
+ version: '3.40'
69
70
  type: :development
70
71
  prerelease: false
71
72
  version_requirements: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - "~>"
74
75
  - !ruby/object:Gem::Version
75
- version: 3.38.0
76
+ version: '3.40'
76
77
  - !ruby/object:Gem::Dependency
77
78
  name: selenium-webdriver
78
79
  requirement: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - "~>"
81
82
  - !ruby/object:Gem::Version
82
- version: 4.8.0
83
+ version: 4.10.0
83
84
  type: :development
84
85
  prerelease: false
85
86
  version_requirements: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - "~>"
88
89
  - !ruby/object:Gem::Version
89
- version: 4.8.0
90
+ version: 4.10.0
90
91
  - !ruby/object:Gem::Dependency
91
92
  name: nokogiri
92
93
  requirement: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - "~>"
95
96
  - !ruby/object:Gem::Version
96
- version: 1.14.2
97
+ version: '1.16'
97
98
  type: :development
98
99
  prerelease: false
99
100
  version_requirements: !ruby/object:Gem::Requirement
100
101
  requirements:
101
102
  - - "~>"
102
103
  - !ruby/object:Gem::Version
103
- version: 1.14.2
104
+ version: '1.16'
104
105
  - !ruby/object:Gem::Dependency
105
106
  name: webdrivers
106
107
  requirement: !ruby/object:Gem::Requirement
107
108
  requirements:
108
109
  - - "~>"
109
110
  - !ruby/object:Gem::Version
110
- version: 5.2.0
111
+ version: '5.3'
111
112
  type: :development
112
113
  prerelease: false
113
114
  version_requirements: !ruby/object:Gem::Requirement
114
115
  requirements:
115
116
  - - "~>"
116
117
  - !ruby/object:Gem::Version
117
- version: 5.2.0
118
+ version: '5.3'
118
119
  - !ruby/object:Gem::Dependency
119
120
  name: rack
120
121
  requirement: !ruby/object:Gem::Requirement
121
122
  requirements:
122
123
  - - "~>"
123
124
  - !ruby/object:Gem::Version
124
- version: 2.2.6.4
125
+ version: '2.2'
125
126
  type: :development
126
127
  prerelease: false
127
128
  version_requirements: !ruby/object:Gem::Requirement
128
129
  requirements:
129
130
  - - "~>"
130
131
  - !ruby/object:Gem::Version
131
- version: 2.2.6.4
132
+ version: '2.2'
132
133
  - !ruby/object:Gem::Dependency
133
134
  name: puma
134
135
  requirement: !ruby/object:Gem::Requirement
135
136
  requirements:
136
137
  - - "~>"
137
138
  - !ruby/object:Gem::Version
138
- version: 6.1.0
139
+ version: '6.4'
139
140
  type: :development
140
141
  prerelease: false
141
142
  version_requirements: !ruby/object:Gem::Requirement
142
143
  requirements:
143
144
  - - "~>"
144
145
  - !ruby/object:Gem::Version
145
- version: 6.1.0
146
+ version: '6.4'
146
147
  - !ruby/object:Gem::Dependency
147
148
  name: capybara-inline-screenshot
148
149
  requirement: !ruby/object:Gem::Requirement
@@ -175,8 +176,7 @@ description: RSpec::Abq is an rspec plugin that replaces its ordering with one t
175
176
  is controlled by abq. It allows for parallelization of rspec on a single machine
176
177
  or across multiple workers.
177
178
  email:
178
- - ayaz@rwx.com
179
- - me@rwx.com
179
+ - support@rwx.com
180
180
  executables: []
181
181
  extensions: []
182
182
  extra_rdoc_files: []
@@ -208,14 +208,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
209
  - - ">="
210
210
  - !ruby/object:Gem::Version
211
- version: '0'
211
+ version: 3.0.0
212
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - ">="
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.3.7
218
+ rubygems_version: 3.4.19
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: RSpec::Abq allows for parallel rspec runs using abq