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

Updates from rspec-dev (2024-07-09) #3098

Merged
merged 4 commits into from
Jul 13, 2024
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: 2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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 @@ -20,7 +20,6 @@ env:
RSPEC_CI: true
# This tells rspec-rails what branch to run in ci
RSPEC_VERSION: '= 3.14.0.pre'
ENFORCE_COVERAGE_AFTER: "3.2"
jobs:
rubocop:
name: Rubocop
Expand Down Expand Up @@ -131,8 +130,8 @@ jobs:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
LEGACY_CI: true
NO_COVERAGE: true
JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }}
NO_COVERAGE: true
steps:
- uses: actions/checkout@v3
- run: ${{ matrix.container.pre }}
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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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
4 changes: 2 additions & 2 deletions lib/rspec/core/configuration_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ def args_from_options_file(path)
FlatMap.flat_map(config_lines, &:shellsplit)
end

# :nocov:
def options_file_as_erb_string(path)
if RUBY_VERSION >= '2.6'
ERB.new(File.read(path), :trim_mode => '-').result(binding)
else
# :nocov:
ERB.new(File.read(path), nil, '-').result(binding)
# :nocov:
end
end
# :nocov:

def custom_options_file
command_line_options[:custom_options_file]
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/formatters/exception_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def failure_slash_error_lines
end

# rubocop:disable Lint/RescueException
# :nocov:
if SyntaxError.instance_methods.include?(:detailed_message)
def exception_message_string(exception)
case exception
Expand All @@ -191,14 +192,13 @@ def exception_message_string(exception)
"A #{exception.class} for which `exception.message.to_s` raises #{other.class}."
end
else
# :nocov:
def exception_message_string(exception)
exception.message.to_s
rescue Exception => other
"A #{exception.class} for which `exception.message.to_s` raises #{other.class}."
end
# :nocov:
end
# :nocov:
# rubocop:enable Lint/RescueException

def exception_lines
Expand Down
2 changes: 2 additions & 0 deletions lib/rspec/core/option_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ def parser(options)

parser.on('-w', '--warnings', 'Enable ruby warnings') do
if Object.const_defined?(:Warning) && Warning.respond_to?(:[]=)
# :nocov: on older Ruby without Warning
Warning[:deprecated] = true
# :nocov:
end
$VERBOSE = true
end
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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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/cucumber.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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/legacy_setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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/run_rubocop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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 2024-02-23T14:21:31+00:00 from the rspec-dev repo.
# This file was generated on 2024-07-09T08:51:38+02: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
Loading