Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Updates from rspec-dev (2020-11-21) #440

Merged
merged 5 commits into from
Nov 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

name: RSpec CI
Expand All @@ -13,8 +13,8 @@ on:
- '*'
jobs:
test:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-20.04
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
strategy:
matrix:
ruby:
Expand All @@ -27,19 +27,43 @@ jobs:
- 2.2
- 2.1.9
- ruby-head
env:
-
DIFF_LCS_VERSION: "> 1.4.3"
include:
- ruby: jruby-9.2.13.0
env:
JRUBY_OPTS: "--dev"
- ruby: jruby-9.1.17.0
bundler: 1
os: ubuntu-18.04
env:
JRUBY_OPTS: "--dev"
- ruby: 2.7
name_extra: "with diff-lcs 1.3"
env:
DIFF_LCS_VERSION: "~> 1.3.0"
- ruby: 2.7
name_extra: "with diff-lcs 1.4.3"
env:
DIFF_LCS_VERSION: "1.4.3"
fail-fast: false
continue-on-error: ${{ matrix.ruby == 'jruby-9.2.13.0' || endsWith(matrix.ruby, 'head') }}
continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler: ${{ (matrix.ruby == 'jruby-9.1.17.0' && 1) || 2 }}
bundler: ${{ matrix.bundler || 2 }}
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: script/update_rubygems_and_install_bundler
env: ${{ matrix.env }}
- run: script/clone_all_rspec_repos
env: ${{ matrix.env }}
- run: bundle install --binstubs --standalone
env: ${{ matrix.env }}
- run: script/run_build
env: ${{ matrix.env }}

windows:
name: Ruby ${{ matrix.ruby }} (Windows)
Expand Down
2 changes: 1 addition & 1 deletion .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
Expand Down
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# In order to install old Rubies, we need to use old Ubuntu distibution.
Expand All @@ -20,24 +20,13 @@ rvm:
- 1.9.3
- 2.0.0
- ree
- rbx-3
- jruby-9.1.7.0 # pin JRuby to this until travis/rvm can install later versions
- jruby-head
- jruby-1.7
env:
- JRUBY_OPTS='--dev'
matrix:
include:
- rvm: jruby-1.7
env: JRUBY_OPTS='--dev --1.8'
- rvm: 2.7.1
env: DIFF_LCS_VERSION="~> 1.3.0"
- rvm: 2.7.1
env: DIFF_LCS_VERSION="1.4.3"
allow_failures:
- rvm: jruby-head
- rvm: ruby-head
- rvm: rbx-3
fast_finish: true
branches:
only:
Expand Down
8 changes: 5 additions & 3 deletions lib/rspec/support/ruby_features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def truffleruby?
module RubyFeatures
module_function

if Ruby.jruby?
if Ruby.jruby? && RUBY_VERSION.to_f < 1.9
# On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
# but when you try to fork, it raises an error:
# NotImplementedError: fork is not available on this platform
Expand Down Expand Up @@ -111,8 +111,10 @@ def supports_taint?
ripper_requirements.push(Ruby.jruby_version >= '1.7.5')
# Ripper on JRuby 9.0.0.0.rc1 - 9.1.8.0 reports wrong line number
# or cannot parse source including `:if`.
# Ripper on JRuby 9.x.x.x < 9.2.1.0 can't handle keyword arguments.
ripper_requirements.push(!Ruby.jruby_version.between?('9.0.0.0.rc1', '9.2.0.0'))
# Ripper on JRuby 9.x.x.x < 9.1.17.0 can't handle keyword arguments
# Neither can JRuby 9.2, e.g. < 9.2.1.0
ripper_requirements.push(!Ruby.jruby_version.between?('9.0.0.0.rc1', '9.1.16.0'))
ripper_requirements.push(!Ruby.jruby_version.between?('9.1.999.0', '9.1.999.0'))
end

if ripper_requirements.all?
Expand Down
6 changes: 4 additions & 2 deletions lib/rspec/support/spec/shell_out.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def run_ruby_with_current_load_path(ruby_command, *flags)
%r{bundler/source/rubygems},
# Ignore bundler + rubygems warning.
%r{site_ruby/\d\.\d\.\d/rubygems},
%r{jruby-\d\.\d\.\d\.\d/lib/ruby/stdlib/rubygems},
%r{jruby-\d\.\d\.\d+\.\d/lib/ruby/stdlib/rubygems},
# This is required for windows for some reason
%r{lib/bundler/rubygems},
# This is a JRuby file that generates warnings on 9.0.3.0
Expand All @@ -70,8 +70,10 @@ def run_ruby_with_current_load_path(ruby_command, *flags)
%r{ffi-1\.13\.\d+-java},
%r{uninitialized constant FFI},
# These are related to the above, there is a warning about io from FFI
%r{jruby-\d\.\d\.\d\.\d/lib/ruby/stdlib/io},
%r{jruby-\d\.\d\.\d+\.\d/lib/ruby/stdlib/io},
%r{io/console on JRuby shells out to stty for most operations},
# This is a JRuby 9.1.17.0 error on Github Actions
%r{io/console not supported; tty will not be manipulated},
]

def strip_known_warnings(input)
Expand Down
2 changes: 1 addition & 1 deletion script/ci_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# Taken from:
Expand Down
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

function is_mri {
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
# This file was generated on 2020-11-21T12:40:56+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down