Skip to content

Commit

Permalink
Add support for rspec 3.13. (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
doxavore committed Feb 29, 2024
1 parent faccf09 commit f2431b7
Show file tree
Hide file tree
Showing 37 changed files with 2,644 additions and 36 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rspec-${{ matrix.gemfile }}.gemfile
steps:
Expand All @@ -63,7 +64,7 @@ jobs:
bundle exec rspec \
--format json --out tmp/rspec.json \
--format documentation && bin/check_num_tests.rb
if: ${{ matrix.ruby == 3.1 && matrix.gemfile == 3.12 }}
if: ${{ matrix.ruby == 3.1 && matrix.gemfile == 3.13 }}
env:
RWX_ACCESS_TOKEN: ${{ secrets.RWX_ACCESS_TOKEN }}
timeout-minutes: 5
Expand All @@ -72,7 +73,7 @@ jobs:
bundle exec rspec \
--format json --out tmp/rspec.json \
--format documentation && bin/check_num_tests.rb
if: ${{ matrix.ruby != 3.1 || matrix.gemfile != 3.12 }}
if: ${{ matrix.ruby != 3.1 || matrix.gemfile != 3.13 }}
timeout-minutes: 5
- name: Upload Coverage
if: always()
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source "https://rubygems.org"
gemspec

# and the specific patch version of rspec
gem "rspec", "~> 3.12"
gem "rspec", "~> 3.13"

group :development do
gem "rake", "~> 13.0"
Expand Down
26 changes: 13 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: .
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -71,21 +71,21 @@ GEM
rake (13.1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.3)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.4)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.7)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (~> 3.13.0)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.12.2)
rspec-support (3.13.1)
rubocop (1.61.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand Down Expand Up @@ -167,7 +167,7 @@ DEPENDENCIES
puma (~> 6.4)
rack (~> 2.2)
rake (~> 13.0)
rspec (~> 3.12)
rspec (~> 3.13)
rspec-abq!
rspec-retry (~> 0.6.2)
rspec-snapshot!
Expand Down
4 changes: 2 additions & 2 deletions bin/generate-abq-test-output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
`bundle exec rspec --dry-run --format json | jq '.examples | length' > spec/NUM_TESTS`

# symlink the results for the latest gemfile to the results for the default gemfile
Dir['spec/**/*-rspec-3.12.gemfile.snap'].each do |path|
Dir['spec/**/*-rspec-3.13.gemfile.snap'].each do |path|
Dir.chdir(File.dirname(path)) do
source = File.basename(path)
target = source.sub('rspec-3.12.gemfile', 'Gemfile')
target = source.sub('rspec-3.13.gemfile', 'Gemfile')
FileUtils.rm(target) if File.exist? target
FileUtils.ln_s(source, target)
end
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rspec-3.10.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rspec-3.11.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rspec-3.12.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down
10 changes: 10 additions & 0 deletions gemfiles/rspec-3.13.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

source "https://rubygems.org"

# Specify your gem's dependencies in rspec-abq.gemspec
gemspec(path: "..")

# and the specific patch version of rspec
gem "rspec", "~> 3.13", "< 3.14"
gem "rspec-snapshot", github: "rwx-research/rspec-snapshot"
118 changes: 118 additions & 0 deletions gemfiles/rspec-3.13.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
GIT
remote: https://github.com/rwx-research/rspec-snapshot.git
revision: 77b3098b46190a291b32b52686d07c96cced18d5
specs:
rspec-snapshot (2.0.1)
awesome_print (> 1.0.0)
rspec (> 3.0.0)

PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
awesome_print (1.9.2)
capybara (3.40.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
capybara-inline-screenshot (2.2.1)
capybara-screenshot
capybara-screenshot (1.0.26)
capybara (>= 1.0, < 4)
launchy
coderay (1.1.3)
diff-lcs (1.5.1)
docile (1.4.0)
launchy (2.5.2)
addressable (~> 2.8)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
nio4r (2.7.0)
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.4)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8.1)
rack-test (2.1.0)
rack (>= 1.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
rubyzip (2.3.2)
selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0, < 4.11)
websocket (1.2.10)
xpath (3.2.0)
nokogiri (~> 1.8)

PLATFORMS
arm64-darwin-21
arm64-darwin-23
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
capybara (~> 3.40)
capybara-inline-screenshot (~> 2.2.1)
nokogiri (~> 1.16)
pry (~> 0.14.1)
puma (~> 6.4)
rack (~> 2.2)
rspec (~> 3.13, < 3.14)
rspec-abq!
rspec-retry (~> 0.6.2)
rspec-snapshot!
selenium-webdriver (~> 4.10.0)
simplecov (~> 0.22.0)
webdrivers (~> 5.3)

BUNDLED WITH
2.3.7
2 changes: 1 addition & 1 deletion gemfiles/rspec-3.8.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rspec-3.9.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH
remote: ..
specs:
rspec-abq (1.1.5)
rspec-core (>= 3.8.0, < 3.13.0)
rspec-core (>= 3.8.0, < 3.14.0)

GEM
remote: https://rubygems.org/
Expand Down
4 changes: 4 additions & 0 deletions lib/rspec/abq/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ module Runner
# or the configured failure exit status (1 by default) if specs
# failed.
def run_specs(example_groups)
if Gem::Version.new(RSpec::Core::Version::STRING) >= Gem::Version.new("3.11.0") && RSpec.world.rspec_is_quitting
return exit_code(false)
end

if !!ENV[ABQ_GENERATE_MANIFEST]
# before abq can start workers, it asks for a manifest
RSpec::Abq::Manifest.write_manifest(example_groups, RSpec.configuration.seed, RSpec.configuration.ordering_registry)
Expand Down
2 changes: 1 addition & 1 deletion rspec-abq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files -- lib/*`.split("\n") + %w[README.md LICENSE.md]
spec.require_paths = ["lib"]

spec.add_dependency "rspec-core", ">= 3.8.0", "< 3.13.0"
spec.add_dependency "rspec-core", ">= 3.8.0", "< 3.14.0"
spec.add_development_dependency "pry", "~> 0.14.1"
spec.add_development_dependency "rspec-retry", "~> 0.6.2"
spec.add_development_dependency "capybara", "~> 3.40"
Expand Down
Loading

0 comments on commit f2431b7

Please sign in to comment.