From bfd13aa29471713154c969931a85c8695fef3a8c Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 9 Feb 2022 11:08:52 +0000 Subject: [PATCH 01/19] Bump RSPEC_VERSION in CI to 3.12.0.pre --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a678a1598..5e16665094 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: env: RSPEC_CI: true # This tells rspec-rails what branch to run in ci - RSPEC_VERSION: '= 3.11.0.pre' + RSPEC_VERSION: '= 3.12.0.pre' jobs: rubocop: name: Rubocop From 6eafe09e4a6a62d5cd4953eef97e041952c08556 Mon Sep 17 00:00:00 2001 From: Igor Victor Date: Wed, 23 Mar 2022 19:41:45 +0100 Subject: [PATCH 02/19] Add TruffleRuby support --- lib/rspec/core/formatters/exception_presenter.rb | 4 ++++ spec/rspec/core_spec.rb | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lib/rspec/core/formatters/exception_presenter.rb b/lib/rspec/core/formatters/exception_presenter.rb index 26757a19a1..5a759e294f 100644 --- a/lib/rspec/core/formatters/exception_presenter.rb +++ b/lib/rspec/core/formatters/exception_presenter.rb @@ -242,6 +242,10 @@ def find_failed_line line_regex = RSpec.configuration.in_project_source_dir_regex loaded_spec_files = RSpec.configuration.loaded_spec_files + exception_backtrace.reject! do |line| + line.start_with?(" Date: Tue, 29 Mar 2022 11:38:42 +0200 Subject: [PATCH 03/19] Filter out internal messages from the backtrace --- lib/rspec/core/formatters/exception_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/core/formatters/exception_presenter.rb b/lib/rspec/core/formatters/exception_presenter.rb index 5a759e294f..e90a769282 100644 --- a/lib/rspec/core/formatters/exception_presenter.rb +++ b/lib/rspec/core/formatters/exception_presenter.rb @@ -244,7 +244,7 @@ def find_failed_line exception_backtrace.reject! do |line| line.start_with?(" Date: Thu, 31 Mar 2022 18:45:21 +0200 Subject: [PATCH 04/19] Adapt exit spec's expected output for TruffleRuby --- spec/integration/spec_file_load_errors_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/integration/spec_file_load_errors_spec.rb b/spec/integration/spec_file_load_errors_spec.rb index 118c1103ea..c6508e7101 100644 --- a/spec/integration/spec_file_load_errors_spec.rb +++ b/spec/integration/spec_file_load_errors_spec.rb @@ -95,6 +95,17 @@ While loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit. Failure/Error: Unable to find org/jruby/RubyKernel.java to read failed line + SystemExit: + exit + # ./helper_with_exit.rb:1#{spec_line_suffix} + EOS + elsif RSpec::Support::Ruby.truffleruby? + # No extra ./helper_with_exit.rb:1:in `exit' line on truffleruby, Kernel#exit is defined in Ruby code + expect(output).to eq unindent(<<-EOS) + + While loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit. + Failure/Error: exit 999 + SystemExit: exit # ./helper_with_exit.rb:1#{spec_line_suffix} From 97553efa2e8dc9dc31ef1c3673df0844eeb76f1c Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 31 Mar 2022 18:49:44 +0200 Subject: [PATCH 05/19] Generalize exit spec to depend less implementation-specific details --- spec/integration/spec_file_load_errors_spec.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/spec/integration/spec_file_load_errors_spec.rb b/spec/integration/spec_file_load_errors_spec.rb index c6508e7101..7daa3bb5e9 100644 --- a/spec/integration/spec_file_load_errors_spec.rb +++ b/spec/integration/spec_file_load_errors_spec.rb @@ -89,23 +89,15 @@ run_command "--require ./helper_with_exit.rb" }.to raise_error(SystemExit) output = normalize_durations(last_cmd_stdout) + # Remove extra line which is only shown on CRuby + output = output.sub("# ./helper_with_exit.rb:1:in `exit'\n", "") + if defined?(JRUBY_VERSION) && !JRUBY_VERSION.empty? expect(output).to eq unindent(<<-EOS) While loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit. Failure/Error: Unable to find org/jruby/RubyKernel.java to read failed line - SystemExit: - exit - # ./helper_with_exit.rb:1#{spec_line_suffix} - EOS - elsif RSpec::Support::Ruby.truffleruby? - # No extra ./helper_with_exit.rb:1:in `exit' line on truffleruby, Kernel#exit is defined in Ruby code - expect(output).to eq unindent(<<-EOS) - - While loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit. - Failure/Error: exit 999 - SystemExit: exit # ./helper_with_exit.rb:1#{spec_line_suffix} @@ -118,7 +110,6 @@ SystemExit: exit - # ./helper_with_exit.rb:1:in `exit' # ./helper_with_exit.rb:1#{spec_line_suffix} EOS end From d11c74351e7f083526c3bd6695420046f4d76933 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 1 Apr 2022 09:08:08 +0100 Subject: [PATCH 06/19] Pin ffi on Ruby 2.3 on Windows --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 9e95b7753d..b8ec6d6765 100644 --- a/Gemfile +++ b/Gemfile @@ -47,6 +47,8 @@ end if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) gem 'ffi', '< 1.10' +elsif RUBY_VERSION < '2.4.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) + gem 'ffi', '< 1.15' elsif RUBY_VERSION < '2.0' gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19 elsif RUBY_VERSION < '2.3.0' From ccf1d30a0da32f5159a1dbd269d4eda84970e49e Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 1 Apr 2022 10:12:06 +0100 Subject: [PATCH 07/19] Pin rake on older Ruby --- Gemfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index b8ec6d6765..2498254ba8 100644 --- a/Gemfile +++ b/Gemfile @@ -16,8 +16,10 @@ if RUBY_VERSION < '1.9.3' gem 'rake', '< 11.0.0' # rake 11 requires Ruby 1.9.3 or later elsif RUBY_VERSION < '2.0.0' gem 'rake', '< 12.0.0' # rake 12 requires Ruby 2.0.0 or later +elsif RUBY_VERSION < '2.2.0' + gem 'rake', '< 13.0.0' # rake 13 requires Ruby 2.2.0 or later else - gem 'rake', '>= 12.3.3' + gem 'rake', '>= 13.0.0' end if ENV['DIFF_LCS_VERSION'] From c9f899a9b96eea768bcdf8cc55afead17eca12c7 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 1 Apr 2022 10:42:03 +0100 Subject: [PATCH 08/19] Pin childprocess on older Rubies --- Gemfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 2498254ba8..087d8a2515 100644 --- a/Gemfile +++ b/Gemfile @@ -63,8 +63,10 @@ if RUBY_VERSION < '2.3.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|min gem "childprocess", "< 1.0.0" elsif RUBY_VERSION < '2.0.0' gem "childprocess", "< 1.0.0" +elsif RUBY_VERSION < '2.3.0' + gem "childprocess", "< 3.0.0" else - gem "childprocess", "> 1.0.0" + gem "childprocess", ">= 3.0.0" end platforms :jruby do From bf49c78d7a92e253d557924a3f85fd6991e32ca3 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 30 Jan 2022 10:09:30 -0800 Subject: [PATCH 09/19] Loosen the cucumber version restriction and handle varying tag syntax This change looses the cucumber version restriction, allowing recent cucumbers. It also handles the change in the 'not' syntax for tags, allowing it to run on a wide range of Ruby versions Don't use Fixnum in the described_class test. Add an 'outer' test. --- Gemfile | 4 ++++ cucumber.yml | 9 +++++++-- features/command_line/init.feature | 2 +- features/metadata/described_class.feature | 6 +++++- features/step_definitions/additional_cli_steps.rb | 2 +- features/support/diff_lcs_versions.rb | 8 ++++---- features/support/jruby.rb | 6 +++++- features/support/require_expect_syntax_in_aruba_specs.rb | 5 ++++- features/support/rubinius.rb | 6 +++++- features/support/ruby_27_support.rb | 2 +- rspec-core.gemspec | 2 +- 11 files changed, 38 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 087d8a2515..79481c8c78 100644 --- a/Gemfile +++ b/Gemfile @@ -94,6 +94,10 @@ if RUBY_VERSION < '2.4.0' gem 'minitest', '< 5.12.0' end +if RUBY_VERSION < '2.0.0' + gem 'cucumber', "<= 1.3.22" +end + gem 'contracts', '< 0.16' if RUBY_VERSION < '1.9.0' eval File.read('Gemfile-custom') if File.exist?('Gemfile-custom') diff --git a/cucumber.yml b/cucumber.yml index e37a8bcc15..fd434e1e93 100644 --- a/cucumber.yml +++ b/cucumber.yml @@ -1,6 +1,11 @@ <% + +USE_TILDE_TAGS = !defined?(::RUBY_ENGINE_VERSION) || (::RUBY_ENGINE_VERSION < '2.0.0') +NOT_WIP_TAG = USE_TILDE_TAGS ? '~@wip' : '"not @wip"' +NOT_JRUBY_TAG = USE_TILDE_TAGS ? '~@no-jruby' : '"not @no-jruby"' + exclusions = [] -exclusions << ' --tags ~@no-jruby' if RUBY_PLATFORM == 'java' +exclusions << " --tags #{NOT_JRUBY_TAG}" if RUBY_PLATFORM == 'java' %> -default: --require features --strict --format progress --tags ~@wip<%= exclusions.join %> features +default: --require features --strict --format progress --tags <%= NOT_WIP_TAG %><%= exclusions.join %> features wip: --require features --tags @wip:30 --wip features diff --git a/features/command_line/init.feature b/features/command_line/init.feature index 74ea6c5409..92c5defb27 100644 --- a/features/command_line/init.feature +++ b/features/command_line/init.feature @@ -25,7 +25,7 @@ Feature: `--init` option Scenario: Accept and use the recommended settings in `spec_helper` (which are initially commented out) Given I have a brand new project with no files And I have run `rspec --init` - When I accept the recommended settings by removing `=begin` and `=end` from `spec/spec_helper.rb` + When I accept the recommended settings by removing `=begin` and `=end` from `spec_helper.rb` And I create "spec/addition_spec.rb" with the following content: """ruby RSpec.describe "Addition" do diff --git a/features/metadata/described_class.feature b/features/metadata/described_class.feature index b494f5d4d6..13d40fbba4 100644 --- a/features/metadata/described_class.feature +++ b/features/metadata/described_class.feature @@ -6,7 +6,11 @@ Feature: described class Scenario: Access the described class from the example Given a file named "spec/example_spec.rb" with: """ruby - RSpec.describe Fixnum do + RSpec.describe Symbol do + it "is available as described_class" do + expect(described_class).to eq(Symbol) + end + describe 'inner' do describe String do it "is available as described_class" do diff --git a/features/step_definitions/additional_cli_steps.rb b/features/step_definitions/additional_cli_steps.rb index 73bd6467a9..f6ada18fa9 100644 --- a/features/step_definitions/additional_cli_steps.rb +++ b/features/step_definitions/additional_cli_steps.rb @@ -114,7 +114,7 @@ set_environment_variable('RUBYOPT', ENV['RUBYOPT'] + " -I#{gem_dir}/lib") end -When "I accept the recommended settings by removing `=begin` and `=end` from `spec/spec_helper.rb`" do +When('I accept the recommended settings by removing `=begin` and `=end` from `spec_helper.rb`') do cd('.') do spec_helper = File.read("spec/spec_helper.rb") expect(spec_helper).to include("=begin", "=end") diff --git a/features/support/diff_lcs_versions.rb b/features/support/diff_lcs_versions.rb index 2217b0de92..5cb8bdab5c 100644 --- a/features/support/diff_lcs_versions.rb +++ b/features/support/diff_lcs_versions.rb @@ -1,16 +1,16 @@ require 'diff-lcs' Around "@skip-when-diff-lcs-1.4" do |scenario, block| - if Diff::LCS::VERSION.to_f >= 1.4 - warn "Skipping scenario #{scenario.title} on `diff-lcs` v#{Diff::LCS::VERSION.to_f}" + if Diff::LCS::VERSION >= '1.4' + skip_this_scenario "Skipping scenario #{scenario.name} on `diff-lcs` v#{Diff::LCS::VERSION}" else block.call end end Around "@skip-when-diff-lcs-1.3" do |scenario, block| - if Diff::LCS::VERSION.to_f < 1.4 - warn "Skipping scenario #{scenario.title} on `diff-lcs` v#{Diff::LCS::VERSION.to_f}" + if Diff::LCS::VERSION < '1.4' + skip_this_scenario "Skipping scenario #{scenario.name} on `diff-lcs` v#{Diff::LCS::VERSION}" else block.call end diff --git a/features/support/jruby.rb b/features/support/jruby.rb index 7bdad62c6d..54467bb330 100644 --- a/features/support/jruby.rb +++ b/features/support/jruby.rb @@ -1,4 +1,8 @@ Around "@broken-on-jruby-9000" do |scenario, block| require 'rspec/support/ruby_features' - block.call unless RSpec::Support::Ruby.jruby_9000? + if RSpec::Support::Ruby.jruby_9000? + skip_this_scenario "Skipping scenario #{scenario.name} not supported on JRuby 9000" + else + block.call + end end diff --git a/features/support/require_expect_syntax_in_aruba_specs.rb b/features/support/require_expect_syntax_in_aruba_specs.rb index 5bd2519093..8bfacee141 100644 --- a/features/support/require_expect_syntax_in_aruba_specs.rb +++ b/features/support/require_expect_syntax_in_aruba_specs.rb @@ -1,6 +1,9 @@ if defined?(Cucumber) require 'shellwords' - Before('~@allow-should-syntax', '~@with-clean-spec-opts') do + use_tilde_tags = !defined?(::RUBY_ENGINE_VERSION) || (::RUBY_ENGINE_VERSION < '2.0.0') + exclude_allow_should_syntax = use_tilde_tags ? '~@allow-should-syntax' : 'not @allow-should-syntax' + exclude_with_clean_spec_ops = use_tilde_tags ? '~@with-clean-spec-opts' : 'not @with-clean-spec-opts' + Before(exclude_allow_should_syntax, exclude_with_clean_spec_ops) do set_environment_variable('SPEC_OPTS', "-r#{Shellwords.escape(__FILE__)}") end diff --git a/features/support/rubinius.rb b/features/support/rubinius.rb index 3907962528..34f052d363 100644 --- a/features/support/rubinius.rb +++ b/features/support/rubinius.rb @@ -2,5 +2,9 @@ ENV['RBXOPT'] = "#{ENV["RBXOPT"]} -Xcompiler.no_rbc" Around "@unsupported-on-rbx" do |scenario, block| - block.call unless defined?(Rubinius) + if defined?(Rubinius) + block.call + else + skip_this_scenario "Skipping scenario #{scenario.name} not supported on Rubinius" + end end diff --git a/features/support/ruby_27_support.rb b/features/support/ruby_27_support.rb index b44e89c69b..e6824a9335 100644 --- a/features/support/ruby_27_support.rb +++ b/features/support/ruby_27_support.rb @@ -2,6 +2,6 @@ if RUBY_VERSION.to_f == 2.7 block.call else - warn "Skipping scenario #{scenario.title} on Ruby v#{RUBY_VERSION}" + skip_this_scenario "Skipping scenario #{scenario.name} on Ruby v#{RUBY_VERSION}" end end diff --git a/rspec-core.gemspec b/rspec-core.gemspec index a778f04dde..1d6e4f76e8 100644 --- a/rspec-core.gemspec +++ b/rspec-core.gemspec @@ -45,7 +45,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency "rspec-support", "~> #{RSpec::Core::Version::STRING.split('.')[0..1].concat(['0']).join('.')}" end - s.add_development_dependency "cucumber", "~> 1.3" + s.add_development_dependency "cucumber", ">= 1.3" s.add_development_dependency "minitest", "~> 5.3" s.add_development_dependency "aruba", "~> 0.14.9" From 1b9159012c68b5936946cb9d1d25ac49a38fc9a0 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Tue, 5 Apr 2022 21:59:01 +0100 Subject: [PATCH 10/19] Updated ci build scripts (from rspec-dev)main --- .github/workflows/ci.yml | 2 +- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 5 ++++- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 10 +++++++++- script/run_build | 2 +- script/run_rubocop | 2 +- script/update_rubygems_and_install_bundler | 2 +- 11 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e16665094..755bb71ea5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 1a19dfbff1..a6aef5fa47 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/ci_functions.sh b/script/ci_functions.sh index 5c62a54c0a..ef2e7b387d 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index cc09066afb..d03914bf32 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/cucumber.sh b/script/cucumber.sh index d1a15e9c49..d9b6fd7e26 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/functions.sh b/script/functions.sh index be534f2e2e..7bc85924da 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 )" @@ -192,6 +192,9 @@ function run_all_spec_suites { fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations" fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks" if rspec_rails_compatible; then + if ! is_ruby_27_plus; then + export RAILS_VERSION='~> 6.1.0' + fi fold "rspec-rails specs" run_spec_suite_for "rspec-rails" fi diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 5b6d0eaa88..b2856af510 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index b0bc8387e5..3638db7aa4 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 { @@ -95,6 +95,14 @@ function is_ruby_25_plus { fi } +function is_ruby_27_plus { + if ruby -e "exit(RUBY_VERSION.to_f >= 2.7)"; then + return 0 + else + return 1 + fi +} + function is_ruby_31_plus { if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then return 0 diff --git a/script/run_build b/script/run_build index b34864446f..505f26787e 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/run_rubocop b/script/run_rubocop index ec26db85ba..2412e58eeb 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 00cc7d4e89..9198342e86 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. +# This file was generated on 2022-04-05T21:59:01+01: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 From 8f3ad134291a7f6a4f6e6bb92bfa2d0abc392812 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Thu, 7 Apr 2022 16:13:16 -0500 Subject: [PATCH 11/19] Update aruba timeout to use config block --- features/support/env.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/features/support/env.rb b/features/support/env.rb index 01400a3f67..c61494b134 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -3,11 +3,13 @@ Before do # Force ids to be printed unquoted for consistency set_environment_variable('SHELL', '/usr/bin/bash') +end - if RUBY_PLATFORM =~ /java/ || defined?(Rubinius) - @aruba_timeout_seconds = 120 +Aruba.configure do |config| + config.exit_timeout = if RUBY_PLATFORM =~ /java/ || defined?(Rubinius) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby') + 120 else - @aruba_timeout_seconds = 10 + 10 end end From 071692f935294f1e292b248e40a6e10cceb3ca91 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sat, 8 Jan 2022 08:51:16 -0800 Subject: [PATCH 12/19] Update to a version of Rubocop that is compatible with Ruby 2.4-3.1 --- .rubocop.yml | 32 +- .rubocop_rspec_base.yml | 83 +- .rubocop_todo.yml | 1031 +++++++++++++++++++++ Gemfile | 2 +- lib/rspec/core/configuration.rb | 3 - lib/rspec/core/formatters/html_printer.rb | 4 +- lib/rspec/core/option_parser.rb | 16 +- script/rspec_with_simplecov | 2 +- 8 files changed, 1096 insertions(+), 77 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 9a3abf924a..f34efb6cbc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,6 @@ inherit_from: - .rubocop_rspec_base.yml + - .rubocop_todo.yml AllCops: Exclude: @@ -10,21 +11,21 @@ AllCops: Metrics/ClassLength: Max: 330 -Encoding: - Exclude: - - lib/rspec/core/formatters/exception_presenter.rb +# This can be addressed once Ruby 1.8 support is removed. +Style/Encoding: + Enabled: false # This should go down over time. Metrics/AbcSize: - Max: 40 + Max: 283 # This should go down over time. -Metrics/LineLength: - Max: 130 +Layout/LineLength: + Max: 172 # This should go down over time. Metrics/MethodLength: - Max: 39 + Max: 134 # This should go down over time. Metrics/CyclomaticComplexity: @@ -33,7 +34,7 @@ Metrics/CyclomaticComplexity: Metrics/PerceivedComplexity: Max: 15 -Lint/HandleExceptions: +Lint/SuppressedException: Exclude: - lib/rspec/core/example.rb - lib/rspec/core/mocking_adapters/mocha.rb @@ -89,22 +90,11 @@ Style/RaiseArgs: - lib/rspec/core/hooks.rb - lib/rspec/core/option_parser.rb - lib/rspec/core/pending.rb - -Performance/RedundantBlockCall: - Exclude: - - lib/rspec/core/rake_task.rb + - spec/rspec/core/formatters/base_text_formatter_spec.rb Lint/IneffectiveAccessModifier: Exclude: - lib/rspec/core/memoized_helpers.rb # Fixing this file was too much of a diff -Performance/Caller: - Exclude: - # The suggested fix for this cop only works on more recent rubies. The - # speed up can be substantial (previous optimization work I've done on - # RSpec involved caller optimization) but I haven't benchmarked this - # particular case to see if it's worth introducing version branching. - - 'lib/rspec/core/example_group.rb' - Metrics/BlockLength: - Max: 193 + Max: 2373 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index a6aef5fa47..0c3d94c9e2 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -4,76 +4,73 @@ # This file contains defaults for RSpec projects. Individual projects # can customize by inheriting this file and overriding particular settings. -AccessModifierIndentation: +Layout/AccessModifierIndentation: Enabled: false # "Use alias_method instead of alias" # We're fine with `alias`. -Alias: +Style/Alias: Enabled: false -AlignParameters: - EnforcedStyle: with_first_parameter - # "Avoid the use of the case equality operator ===" # We prefer using `Class#===` over `Object#is_a?` because `Class#===` # is less likely to be monkey patched than `is_a?` on a user object. -CaseEquality: +Style/CaseEquality: Enabled: false # Warns when the class is excessively long. -ClassLength: +Metrics/ClassLength: Max: 100 -CollectionMethods: +Style/CollectionMethods: PreferredMethods: reduce: 'inject' # Over time we'd like to get this down, but this is what we're at now. -CyclomaticComplexity: +Metrics/CyclomaticComplexity: Max: 10 # We use YARD to enforce documentation. It works better than rubocop's # enforcement...rubocop complains about the places we re-open # `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments. -Documentation: +Style/Documentation: Enabled: false # We still support 1.8.7 which requires trailing dots -DotPosition: +Layout/DotPosition: EnforcedStyle: trailing -DoubleNegation: +Style/DoubleNegation: Enabled: false # each_with_object is unavailable on 1.8.7 so we have to disable this one. -EachWithObject: +Style/EachWithObject: Enabled: false -FormatString: +Style/FormatString: EnforcedStyle: percent # As long as we support ruby 1.8.7 we have to use hash rockets. -HashSyntax: +Style/HashSyntax: EnforcedStyle: hash_rockets # We can't use the new lambda syntax, since we still support 1.8.7. -Lambda: +Style/Lambda: Enabled: false # Over time we'd like to get this down, but this is what we're at now. -LineLength: +Layout/LineLength: Max: 100 # Over time we'd like to get this down, but this is what we're at now. -MethodLength: +Metrics/MethodLength: Max: 15 # Who cares what we call the argument for binary operator methods? -BinaryOperatorParameterName: +Naming/BinaryOperatorParameterName: Enabled: false -PercentLiteralDelimiters: +Style/PercentLiteralDelimiters: PreferredDelimiters: '%': () # double-quoted string '%i': '[]' # array of symbols @@ -87,41 +84,44 @@ PercentLiteralDelimiters: # We have too many special cases where we allow generator methods or prefer a # prefixed predicate due to it's improved readability. -PredicateName: +Naming/PredicateName: Enabled: false # On 1.8 `proc` is `lambda`, so we use `Proc.new` to ensure we get real procs on all supported versions. # http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/ -Proc: +Style/Proc: Enabled: false # Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue` -RescueException: +Lint/RescueException: Enabled: true # We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention. -SignalException: +Style/SignalException: Enabled: false # We've tended to use no space, so it's less of a change to stick with that. -SpaceAroundEqualsInParameterDefault: +Layout/SpaceAroundEqualsInParameterDefault: EnforcedStyle: no_space # We don't care about single vs double qoutes. -StringLiterals: +Style/StringLiterals: Enabled: false # This rule favors constant names from the English standard library which we don't load. Style/SpecialGlobalVars: Enabled: false -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: + Enabled: false + +Style/TrailingCommaInHashLiteral: Enabled: false Style/TrailingCommaInArguments: Enabled: false -TrivialAccessors: +Style/TrivialAccessors: AllowDSLWriters: true AllowPredicates: true ExactNameMatch: true @@ -135,6 +135,15 @@ Layout/EmptyLineBetweenDefs: Layout/FirstParameterIndentation: Enabled: false +Layout/ParameterAlignment: + EnforcedStyle: with_first_parameter + +Layout/SpaceInsideBlockBraces: + Enabled: false + +Layout/SpaceInsideParens: + Enabled: false + Naming/ConstantName: Enabled: false @@ -162,7 +171,10 @@ Style/IfUnlessModifier: Style/IfUnlessModifierOfIfUnless: Enabled: false -Style/MethodMissing: +Lint/MissingSuper: + Enabled: false + +Style/MissingRespondToMissing: Enabled: false Style/MixinUsage: @@ -243,24 +255,19 @@ Style/StderrPuts: Style/TernaryParentheses: Enabled: false -# This could likely be enabled, but it had a false positive on rspec-mocks -# (suggested change was not behaviour preserving) so I don't trust it. -Performance/HashEachMethods: - Enabled: false - Naming/HeredocDelimiterNaming: Enabled: false -Layout/EmptyLineAfterMagicComment: +Layout/AssignmentIndentation: Enabled: false -Layout/IndentArray: +Layout/EmptyLineAfterMagicComment: Enabled: false -Layout/IndentAssignment: +Layout/FirstArrayElementIndentation: Enabled: false -Layout/IndentHeredoc: +Layout/HeredocIndentation: Enabled: false Layout/SpaceInsidePercentLiteralDelimiters: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000000..6394a9a412 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,1031 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2022-01-09 17:19:16 UTC using RuboCop version 1.11.0. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. +# Include: **/*.gemspec +Gemspec/OrderedDependencies: + Exclude: + - 'rspec-core.gemspec' + +# Offense count: 1 +# Configuration parameters: Include. +# Include: **/*.gemspec +Gemspec/RequiredRubyVersion: + Exclude: + - 'rspec-core.gemspec' + +# Offense count: 20 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: + Exclude: + - 'benchmarks/threadsafe_let_block.rb' + - 'features/step_definitions/additional_cli_steps.rb' + - 'spec/rspec/core/backtrace_formatter_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/documentation_formatter_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/rake_task_spec.rb' + - 'spec/rspec/core/reporter_spec.rb' + - 'spec/rspec/core_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_element, with_fixed_indentation +Layout/ArrayAlignment: + Exclude: + - 'spec/rspec/core/filter_manager_spec.rb' + - 'spec/rspec/core/resources/formatter_specs.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleAlignWith, Severity. +# SupportedStylesAlignWith: start_of_line, begin +Layout/BeginEndAlignment: + Exclude: + - 'lib/rspec/core/runner.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +Layout/BlockEndNewline: + Exclude: + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/metadata_filter_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth. +# SupportedStyles: case, end +Layout/CaseIndentation: + Exclude: + - 'spec/support/matchers.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +Layout/ClosingHeredocIndentation: + Exclude: + - 'benchmarks/filter_object.rb' + - 'lib/rspec/core/formatters/html_printer.rb' + - 'lib/rspec/core/memoized_helpers.rb' + - 'lib/rspec/core/option_parser.rb' + - 'spec/rspec/core/notifications_spec.rb' + +# Offense count: 32 +# Cop supports --auto-correct. +Layout/CommentIndentation: + Exclude: + - 'benchmarks/check_inclusion.rb' + +# Offense count: 68 +# Cop supports --auto-correct. +Layout/EmptyLineAfterGuardClause: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +Layout/EmptyLines: + Exclude: + - 'spec/integration/persistence_failures_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/example_spec.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: AllowAliasSyntax, AllowedMethods. +# AllowedMethods: alias_method, public, protected, private +Layout/EmptyLinesAroundAttributeAccessor: + Exclude: + - 'lib/rspec/core/configuration.rb' + - 'lib/rspec/core/minitest_assertions_adapter.rb' + - 'spec/rspec/core/bisect/example_minimizer_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/resources/custom_example_group_runner.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +Layout/EmptyLinesAroundModuleBody: + Exclude: + - 'spec/rspec/core/world_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses +Layout/FirstArgumentIndentation: + Exclude: + - 'lib/rspec/core/bisect/fork_runner.rb' + - 'lib/rspec/core/formatters/base_bisect_formatter.rb' + - 'spec/integration/bisect_runners_spec.rb' + - 'spec/rspec/core/bisect/coordinator_spec.rb' + - 'spec/rspec/core/bisect/example_minimizer_spec.rb' + - 'spec/rspec/core/bisect/server_spec.rb' + - 'spec/rspec/core/bisect/shell_command_spec.rb' + - 'spec/rspec/core/bisect/utilities_spec.rb' + - 'spec/rspec/core/configuration_options_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/hooks_spec.rb' + - 'spec/rspec/core/notifications_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Layout/FirstHashElementIndentation: + EnforcedStyle: consistent + +# Offense count: 65 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/HashAlignment: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: normal, indented_internal_methods +Layout/IndentationConsistency: + Exclude: + - 'spec/rspec/core/metadata_filter_spec.rb' + - 'spec/support/aruba_support.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Exclude: + - 'benchmarks/respond_to_v_defined.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core_spec.rb' + - 'spec/support/aruba_support.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. +Layout/LeadingCommentSpace: + Exclude: + - 'spec/rspec/core/formatters/progress_formatter_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + +# Offense count: 68 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Layout/LineLength: + Max: 172 + +# Offense count: 8 +# Cop supports --auto-correct. +Layout/MultilineBlockLayout: + Exclude: + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/metadata_filter_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/RescueEnsureAlignment: + Exclude: + - 'lib/rspec/core/runner.rb' + +# Offense count: 49 +# Cop supports --auto-correct. +Layout/SpaceAfterComma: + Exclude: + - 'spec/rspec/core/backtrace_formatter_spec.rb' + - 'spec/rspec/core/configuration_options_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/drb_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/filter_manager_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/metadata_filter_spec.rb' + - 'spec/rspec/core/option_parser_spec.rb' + +# Offense count: 12 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceAroundEqualsInParameterDefault: + Exclude: + - 'benchmarks/singleton_example_groups/helper.rb' + - 'spec/rspec/core/bisect/coordinator_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/example_status_persister_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/SpaceAroundKeyword: + Exclude: + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + +# Offense count: 24 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceBeforeBlockBraces: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'spec/rspec/core/drb_spec.rb' + +# Offense count: 58 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideArrayLiteralBrackets: + Exclude: + - 'spec/rspec/core/bisect/shell_command_spec.rb' + - 'spec/rspec/core/configuration_options_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/example_status_persister_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/formatters/snippet_extractor_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + - 'spec/rspec/core/notifications_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + - 'spec/rspec/core/suite_hooks_spec.rb' + +# Offense count: 81 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideHashLiteralBraces: + Exclude: + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/drb_spec.rb' + - 'spec/rspec/core/filter_manager_spec.rb' + - 'spec/rspec/core/hooks_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/metadata_filter_spec.rb' + - 'spec/rspec/core/runner_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: final_newline, final_blank_line +Layout/TrailingEmptyLines: + Exclude: + - 'benchmarks/eager_vs_lazy_metadata/define_examples.rb' + - 'features/support/send_sigint_during_bisect.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/rspec_matchers_spec.rb' + - 'spec/rspec/core_spec.rb' + +# Offense count: 16 +Lint/AmbiguousBlockAssociation: + Exclude: + - 'benchmarks/threadsafe_let_block.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/example_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/formatters/syntax_highlighter_spec.rb' + - 'spec/rspec/core/formatters_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/option_parser_spec.rb' + - 'spec/rspec/core/world_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/AmbiguousOperator: + Exclude: + - 'benchmarks/threadsafe_let_block.rb' + +# Offense count: 15 +# Cop supports --auto-correct. +Lint/AmbiguousRegexpLiteral: + Exclude: + - 'features/step_definitions/additional_cli_steps.rb' + +# Offense count: 2 +# Configuration parameters: AllowSafeAssignment. +Lint/AssignmentInCondition: + Exclude: + - 'benchmarks/index_v_take_while.rb' + - 'spec/rspec/core/metadata_spec.rb' + +# Offense count: 2 +Lint/BinaryOperatorWithIdenticalOperands: + Exclude: + - 'spec/rspec/core/example_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Lint/BooleanSymbol: + Exclude: + - 'spec/rspec/core/example_group_spec.rb' + +# Offense count: 13 +# Configuration parameters: AllowedMethods. +# AllowedMethods: enums +Lint/ConstantDefinitionInBlock: + Exclude: + - 'spec/integration/bisect_spec.rb' + - 'spec/rspec/core/bisect/example_minimizer_spec.rb' + - 'spec/rspec/core/bisect/utilities_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/drb_spec.rb' + - 'spec/rspec/core/filterable_item_repository_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/hooks_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + +# Offense count: 1 +Lint/DuplicateRequire: + Exclude: + - 'benchmarks/hash_functions.rb' + +# Offense count: 10 +# Configuration parameters: AllowComments. +Lint/EmptyFile: + Exclude: + - 'spec/rspec/core/resources/a_bar.rb' + - 'spec/rspec/core/resources/a_foo.rb' + - 'spec/rspec/core/resources/acceptance/bar.rb' + - 'spec/rspec/core/resources/acceptance/foo_spec.rb' + - 'spec/support/fake_libs/coderay.rb' + - 'spec/support/fake_libs/drb/acl.rb' + - 'spec/support/fake_libs/drb/drb.rb' + - 'spec/support/fake_libs/json.rb' + - 'spec/support/fake_libs/minitest.rb' + - 'spec/support/fake_libs/rake.rb' + +# Offense count: 2 +Lint/FloatComparison: + Exclude: + - 'features/support/ruby_27_support.rb' + - 'lib/rspec/core/formatters/helpers.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: runtime_error, standard_error +Lint/InheritException: + Exclude: + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/support/fake_libs/rspec/expectations.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Lint/InterpolationCheck: + Exclude: + - 'spec/rspec/core/bisect/shell_command_spec.rb' + - 'spec/rspec/core/rake_task_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Lint/RedundantCopDisableDirective: + Exclude: + - 'lib/rspec/core/formatters/html_snippet_extractor.rb' + - 'lib/rspec/core/formatters/syntax_highlighter.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Lint/RedundantCopEnableDirective: + Exclude: + - 'lib/rspec/core/formatters/html_printer.rb' + - 'lib/rspec/core/formatters/html_snippet_extractor.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/RedundantStringCoercion: + Exclude: + - 'spec/spec_helper.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/SendWithMixinArgument: + Exclude: + - 'lib/rspec/core/configuration.rb' + +# Offense count: 1 +Lint/ShadowingOuterLocalVariable: + Exclude: + - 'benchmarks/hash_functions.rb' + +# Offense count: 1 +Lint/StructNewOverride: + Exclude: + - 'lib/rspec/core/notifications.rb' + +# Offense count: 1 +# Configuration parameters: AllowComments. +Lint/SuppressedException: + Exclude: + - 'lib/rspec/core/example.rb' + - 'lib/rspec/core/mocking_adapters/mocha.rb' + - 'lib/rspec/core/runner.rb' + - 'lib/rspec/core/test_unit_assertions_adapter.rb' + - 'script/rspec_with_simplecov' + +# Offense count: 25 +# Cop supports --auto-correct. +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'features/support/env.rb' + - 'features/support/jruby.rb' + - 'features/support/rubinius.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/formatters/json_formatter_spec.rb' + - 'spec/rspec/core/invocations_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/metadata_filter_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + - 'spec/rspec/core/notifications_spec.rb' + - 'spec/rspec/core/rake_task_spec.rb' + - 'spec/rspec/core/reporter_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. +Lint/UnusedMethodArgument: + Exclude: + - 'benchmarks/capture_block_vs_yield.rb' + - 'spec/integration/filtering_spec.rb' + - 'spec/rspec/core/formatters/snippet_extractor_spec.rb' + +# Offense count: 1 +Lint/UselessAssignment: + Exclude: + - 'benchmarks/hash_functions.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowComments. +Lint/UselessMethodDefinition: + Exclude: + - 'spec/rspec/core/rspec_matchers_spec.rb' + +# Offense count: 4 +# Configuration parameters: CheckForMethodsWithNoSideEffects. +Lint/Void: + Exclude: + - 'benchmarks/keys_each_vs_each_key.rb' + - 'spec/rspec/core/example_group_spec.rb' + +# Offense count: 1 +# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. +Metrics/AbcSize: + Max: 283 + +# Offense count: 32 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +# IgnoredMethods: refine +Metrics/BlockLength: + Max: 2373 + +# Offense count: 1 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +Metrics/MethodLength: + Max: 134 + +# Offense count: 32 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ModuleLength: + Max: 2351 + +# Offense count: 1 +# Configuration parameters: CountKeywordArgs, MaxOptionalParameters. +Metrics/ParameterLists: + Max: 6 + +# Offense count: 4 +# Configuration parameters: AsciiConstants. +Naming/AsciiIdentifiers: + Exclude: + - 'spec/rspec/core/resources/utf8_encoded.rb' + +# Offense count: 6 +# Configuration parameters: EnforcedStyleForLeadingUnderscores. +# SupportedStylesForLeadingUnderscores: disallowed, required, optional +Naming/MemoizedInstanceVariableName: + Exclude: + - 'lib/rspec/core/example_group.rb' + - 'lib/rspec/core/example_status_persister.rb' + - 'lib/rspec/core/notifications.rb' + - 'lib/rspec/core/ruby_project.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 1 +# Configuration parameters: IgnoredPatterns. +# SupportedStyles: snake_case, camelCase +Naming/MethodName: + EnforcedStyle: snake_case + Exclude: + - 'spec/rspec/core/drb_spec.rb' + +# Offense count: 14 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'benchmarks/capture_block_vs_yield.rb' + - 'lib/rspec/core/example.rb' + - 'lib/rspec/core/formatters/exception_presenter.rb' + - 'spec/rspec/core/example_status_persister_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/hooks_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/ordering_spec.rb' + - 'spec/support/formatter_support.rb' + - 'spec/support/helper_methods.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: PreferredName. +Naming/RescuedExceptionsVariableName: + Exclude: + - 'lib/rspec/core/configuration.rb' + - 'lib/rspec/core/example.rb' + - 'lib/rspec/core/example_group.rb' + - 'lib/rspec/core/formatters/exception_presenter.rb' + - 'lib/rspec/core/hooks.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/formatters/snippet_extractor_spec.rb' + - 'spec/rspec/core/notifications_spec.rb' + +# Offense count: 1 +Security/Eval: + Exclude: + - 'Gemfile' + +# Offense count: 7 +# Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols. +# SupportedStyles: inline, group +Style/AccessModifierDeclarations: + Exclude: + - 'lib/rspec/core/flat_map.rb' + - 'lib/rspec/core/ruby_project.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: separated, grouped +Style/AccessorGrouping: + Exclude: + - 'spec/rspec/core/bisect/example_minimizer_spec.rb' + +# Offense count: 1 +# Configuration parameters: AllowedChars. +# AllowedChars: © +Style/AsciiComments: + Exclude: + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Style/CaseLikeIf: + Exclude: + - 'lib/rspec/core/hooks.rb' + - 'lib/rspec/core/option_parser.rb' + - 'spec/rspec/core/bisect/shell_runner_spec.rb' + +# Offense count: 43 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: nested, compact +Style/ClassAndModuleChildren: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +# IgnoredMethods: ==, equal?, eql? +Style/ClassEqualityComparison: + Exclude: + - 'lib/rspec/core/formatters.rb' + +# Offense count: 1 +Style/ClassVars: + Exclude: + - 'benchmarks/singleton_example_groups/helper.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +Style/ColonMethodCall: + Exclude: + - 'spec/rspec/core/drb_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + - 'spec/rspec/core_spec.rb' + +# Offense count: 3 +Style/CombinableLoops: + Exclude: + - 'benchmarks/singleton_example_groups/helper.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Keywords. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE +Style/CommentAnnotation: + Exclude: + - 'lib/rspec/core/shell_escape.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/Dir: + Exclude: + - 'spec/support/spec_files.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +Style/Encoding: + Exclude: + - 'lib/rspec/core/formatters/exception_presenter.rb' + - 'rspec-core.gemspec' + - 'spec/rspec/core/example_group_constants_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/formatters/exception_presenter_spec.rb' + - 'spec/rspec/core/formatters/html_formatter_spec.rb' + - 'spec/rspec/core/resources/utf8_encoded.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +Style/EvalWithLocation: + Exclude: + - 'benchmarks/call_v_yield.rb' + - 'spec/rspec/core/filter_manager_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + - 'spec/rspec/core/world_spec.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +Style/ExpandPathArguments: + Exclude: + - 'Gemfile' + - 'benchmarks/allocations/helper.rb' + - 'features/step_definitions/additional_cli_steps.rb' + - 'lib/rspec/core.rb' + - 'lib/rspec/core/project_initializer.rb' + - 'lib/rspec/core/rake_task.rb' + - 'rspec-core.gemspec' + - 'script/rspec_with_simplecov' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/rake_task_spec.rb' + - 'spec/rspec/core_spec.rb' + +# Offense count: 16 +# Cop supports --auto-correct. +Style/ExplicitBlockArgument: + Exclude: + - 'benchmarks/allocations/helper.rb' + - 'benchmarks/capture_block_vs_yield.rb' + - 'benchmarks/flat_map_vs_inject.rb' + - 'benchmarks/map_then_flatten_vs_flat_map_benchmarks.rb' + - 'benchmarks/several_regexps_v_one_big_one.rb' + - 'benchmarks/to_proc_v_not_to_proc.rb' + - 'lib/rspec/core/configuration.rb' + - 'lib/rspec/core/example.rb' + - 'lib/rspec/core/hooks.rb' + - 'lib/rspec/core/ordering.rb' + - 'spec/rspec/core/configuration/only_failures_support_spec.rb' + - 'spec/rspec/core/drb_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: left_coerce, right_coerce, single_coerce, fdiv +Style/FloatDivision: + Exclude: + - 'lib/rspec/core/formatters/html_formatter.rb' + +# Offense count: 224 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never +Style/FrozenStringLiteralComment: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +Style/GlobalStdStream: + Exclude: + - 'spec/rspec/core/configuration_spec.rb' + +# Offense count: 20 +# Configuration parameters: AllowedVariables. +Style/GlobalVars: + Exclude: + - 'benchmarks/map_then_flatten_vs_flat_map_benchmarks.rb' + - 'benchmarks/several_regexps_v_one_big_one.rb' + - 'benchmarks/shuffle_vs_sort_by_for_random_ordering.rb' + - 'benchmarks/to_proc_v_not_to_proc.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + - 'spec/spec_helper.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/HashEachMethods: + Exclude: + - 'benchmarks/keys_each_vs_each_key.rb' + +# Offense count: 16 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +Style/HashSyntax: + Exclude: + - 'benchmarks/allocations/helper.rb' + - 'benchmarks/allocations/running_1000_groups_1_example.rb' + - 'benchmarks/allocations/running_1_group_1000_examples.rb' + - 'benchmarks/singleton_example_groups/helper.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: InverseMethods, InverseBlocks. +Style/InverseMethods: + Exclude: + - 'spec/spec_helper.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +Style/LineEndConcatenation: + Exclude: + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/option_parser_spec.rb' + +# Offense count: 37 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +Style/MethodCallWithoutArgsParentheses: + Exclude: + - 'spec/rspec/core/configuration_options_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/metadata_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline +Style/MethodDefParentheses: + Exclude: + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/json_formatter_spec.rb' + - 'spec/rspec/core/formatters/profile_formatter_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 1 +Style/MultilineBlockChain: + Exclude: + - 'spec/rspec/core/invocations_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: both, prefix, postfix +Style/NegatedIf: + Exclude: + - 'features/step_definitions/additional_cli_steps.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedOctalStyle. +# SupportedOctalStyles: zero_with_o, zero_only +Style/NumericLiteralPrefix: + Exclude: + - 'spec/integration/persistence_failures_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: Strict. +Style/NumericLiterals: + MinDigits: 11 + +# Offense count: 7 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'lib/rspec/core/formatters/bisect_progress_formatter.rb' + - 'lib/rspec/core/metadata.rb' + - 'lib/rspec/core/option_parser.rb' + - 'lib/rspec/core/output_wrapper.rb' + - 'lib/rspec/core/runner.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 33 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Exclude: + - 'benchmarks/filter_object.rb' + - 'benchmarks/several_regexps_v_one_big_one.rb' + - 'features/step_definitions/additional_cli_steps.rb' + - 'spec/rspec/core/drb_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/rake_task_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +Style/PerlBackrefs: + Exclude: + - 'features/step_definitions/additional_cli_steps.rb' + - 'spec/spec_helper.rb' + - 'spec/support/aruba_support.rb' + - 'spec/support/formatter_support.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/RandomWithOffset: + Exclude: + - 'spec/integration/spec_file_load_errors_spec.rb' + - 'spec/integration/suite_hooks_errors_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantAssignment: + Exclude: + - 'spec/rspec/core/resources/utf8_encoded.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/RedundantCapitalW: + Exclude: + - 'spec/integration/bisect_spec.rb' + - 'spec/rspec/core/bisect/shell_command_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: SafeForConstants. +Style/RedundantFetchBlock: + Exclude: + - 'spec/rspec/core/example_execution_result_spec.rb' + - 'spec/rspec/core/ordering_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantInterpolation: + Exclude: + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + +# Offense count: 23 +# Cop supports --auto-correct. +Style/RedundantPercentQ: + Exclude: + - 'benchmarks/filter_object.rb' + - 'features/step_definitions/additional_cli_steps.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/support/spec_files.rb' + +# Offense count: 11 +# Cop supports --auto-correct. +Style/RedundantRegexpEscape: + Exclude: + - 'features/step_definitions/additional_cli_steps.rb' + - 'lib/rspec/core/configuration.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/formatters/profile_formatter_spec.rb' + - 'spec/rspec/core/notifications_spec.rb' + +# Offense count: 11 +# Cop supports --auto-correct. +Style/RedundantSelf: + Exclude: + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/RescueModifier: + Exclude: + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/reporter_spec.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods. +# AllowedMethods: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'lib/rspec/core/configuration_options.rb' + - 'lib/rspec/core/drb.rb' + - 'lib/rspec/core/example.rb' + - 'lib/rspec/core/rake_task.rb' + - 'lib/rspec/core/runner.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/SelfAssignment: + Exclude: + - 'spec/rspec/core/hooks_spec.rb' + +# Offense count: 59 +# Cop supports --auto-correct. +# Configuration parameters: AllowAsExpressionSeparator. +Style/Semicolon: + Exclude: + - 'benchmarks/keys_each_vs_each_key.rb' + - 'benchmarks/threadsafe_let_block.rb' + - 'spec/rspec/core/aggregate_failures_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/example_spec.rb' + - 'spec/rspec/core/filter_manager_spec.rb' + - 'spec/rspec/core/formatters/json_formatter_spec.rb' + - 'spec/rspec/core/hooks_filtering_spec.rb' + - 'spec/rspec/core/hooks_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + +# Offense count: 16 +# Cop supports --auto-correct. +# Configuration parameters: AllowIfMethodIsEmpty. +Style/SingleLineMethods: + Exclude: + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/shared_example_group_spec.rb' + - 'spec/support/fake_libs/rspec/expectations.rb' + - 'spec/support/fake_libs/rspec/mocks.rb' + +# Offense count: 42 +# Cop supports --auto-correct. +Style/StringConcatenation: + Exclude: + - 'features/step_definitions/additional_cli_steps.rb' + - 'features/step_definitions/core_standalone_steps.rb' + - 'lib/rspec/core/bisect/utilities.rb' + - 'lib/rspec/core/did_you_mean.rb' + - 'lib/rspec/core/example_group.rb' + - 'lib/rspec/core/notifications.rb' + - 'lib/rspec/core/option_parser.rb' + - 'script/console' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/did_you_mean_spec.rb' + - 'spec/rspec/core/formatters/base_text_formatter_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/option_parser_spec.rb' + - 'spec/support/spec_files.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods. +# AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym +Style/TrivialAccessors: + Exclude: + - 'benchmarks/define_method_v_attr_reader_v_def.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, MinSize, WordRegex. +# SupportedStyles: percent, brackets +Style/WordArray: + Exclude: + - 'spec/integration/order_spec.rb' + - 'spec/rspec/core/configuration_options_spec.rb' + - 'spec/rspec/core/configuration_spec.rb' + - 'spec/rspec/core/example_group_spec.rb' + - 'spec/rspec/core/formatters/snippet_extractor_spec.rb' + - 'spec/rspec/core/memoized_helpers_spec.rb' + - 'spec/rspec/core/shared_context_spec.rb' diff --git a/Gemfile b/Gemfile index 79481c8c78..521807c5d1 100644 --- a/Gemfile +++ b/Gemfile @@ -84,7 +84,7 @@ end # No need to run rubocop on earlier versions if RUBY_VERSION >= '2.4' && RUBY_ENGINE == 'ruby' - gem "rubocop", "~> 0.52.1" + gem "rubocop", "~> 1.0", "< 1.12" end gem 'test-unit', '~> 3.0' if RUBY_VERSION.to_f >= 2.2 diff --git a/lib/rspec/core/configuration.rb b/lib/rspec/core/configuration.rb index 4bf80f01f4..0f5632bccc 100644 --- a/lib/rspec/core/configuration.rb +++ b/lib/rspec/core/configuration.rb @@ -502,8 +502,6 @@ def bisect_runner=(value) # @private attr_reader :backtrace_formatter, :ordering_manager, :loaded_spec_files - # rubocop:disable Metrics/AbcSize, Metrics/MethodLength - # Build an object to store runtime configuration options and set defaults def initialize # rubocop:disable Style/GlobalVars @@ -561,7 +559,6 @@ def initialize define_built_in_hooks end - # rubocop:enable Metrics/MethodLength, Metrics/AbcSize # @private # diff --git a/lib/rspec/core/formatters/html_printer.rb b/lib/rspec/core/formatters/html_printer.rb index 16f96df659..79d27e1f37 100644 --- a/lib/rspec/core/formatters/html_printer.rb +++ b/lib/rspec/core/formatters/html_printer.rb @@ -33,10 +33,8 @@ def print_example_passed(description, run_time) "#{formatted_run_time}s" end - # rubocop:disable Metrics/ParameterLists def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content) - # rubocop:enable Metrics/ParameterLists formatted_run_time = "%.5f" % run_time @output.puts "
" @@ -215,7 +213,7 @@ def indentation_style(number_of_parents) } } EOF - # rubocop:enable LineLength + # rubocop:enable Layout/LineLength GLOBAL_STYLES = <<-EOF #rspec-header { diff --git a/lib/rspec/core/option_parser.rb b/lib/rspec/core/option_parser.rb index 3af69eefd7..cb198d90b5 100644 --- a/lib/rspec/core/option_parser.rb +++ b/lib/rspec/core/option_parser.rb @@ -32,11 +32,9 @@ def parse(source=nil) private - # rubocop:disable MethodLength - # rubocop:disable Metrics/AbcSize - # rubocop:disable CyclomaticComplexity - # rubocop:disable PerceivedComplexity - # rubocop:disable Metrics/BlockLength + # rubocop:disable Metrics/MethodLength + # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Metrics/PerceivedComplexity def parser(options) OptionParser.new do |parser| parser.summary_width = 34 @@ -303,11 +301,9 @@ def parser(options) end end end - # rubocop:enable Metrics/BlockLength - # rubocop:enable Metrics/AbcSize - # rubocop:enable MethodLength - # rubocop:enable CyclomaticComplexity - # rubocop:enable PerceivedComplexity + # rubocop:enable Metrics/MethodLength + # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/PerceivedComplexity def add_tag_filter(options, filter_type, tag_name, value=true) (options[filter_type] ||= {})[tag_name] = value diff --git a/script/rspec_with_simplecov b/script/rspec_with_simplecov index 92635dce93..fc7c6469de 100755 --- a/script/rspec_with_simplecov +++ b/script/rspec_with_simplecov @@ -34,7 +34,7 @@ begin minimum_coverage(100) end end -rescue LoadError +rescue LoadError # rubocop:disable Lint/SuppressedException ensure $VERBOSE = old_verbose end From e0d2516a4534116ec090df7aec1c2ad684035e21 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Tue, 11 Jan 2022 23:36:48 -0800 Subject: [PATCH 13/19] Do some tweaking of the rubocop settings --- .rubocop.yml | 13 +++++++++---- benchmarks/singleton_example_groups/helper.rb | 6 ++++-- lib/rspec/core/configuration.rb | 5 +++++ lib/rspec/core/option_parser.rb | 2 ++ spec/rspec/core/filterable_item_repository_spec.rb | 5 ++++- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f34efb6cbc..fa3b63edc3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -17,15 +17,18 @@ Style/Encoding: # This should go down over time. Metrics/AbcSize: - Max: 283 + Max: 40 # This should go down over time. Layout/LineLength: - Max: 172 + Max: 130 + Exclude: + - features/**/* + - spec/**/* # This should go down over time. Metrics/MethodLength: - Max: 134 + Max: 39 # This should go down over time. Metrics/CyclomaticComplexity: @@ -97,4 +100,6 @@ Lint/IneffectiveAccessModifier: - lib/rspec/core/memoized_helpers.rb # Fixing this file was too much of a diff Metrics/BlockLength: - Max: 2373 + Max: 206 + Exclude: + - spec/**/*.rb diff --git a/benchmarks/singleton_example_groups/helper.rb b/benchmarks/singleton_example_groups/helper.rb index 8f543c1e25..7e93e18d18 100644 --- a/benchmarks/singleton_example_groups/helper.rb +++ b/benchmarks/singleton_example_groups/helper.rb @@ -34,8 +34,10 @@ def old_configure_example(*) class BenchmarkHelpers def self.prepare_implementation(prefix) RSpec.world = RSpec::Core::World.new # clear our state - RSpec::Core::Example.__send__ :alias_method, :with_around_and_singleton_context_hooks, :"#{prefix}_with_around_and_singleton_context_hooks" - RSpec::Core::Hooks::HookCollections.__send__ :alias_method, :register_global_singleton_context_hooks, :"#{prefix}_register_global_singleton_context_hooks" + RSpec::Core::Example.__send__ :alias_method, :with_around_and_singleton_context_hooks, + :"#{prefix}_with_around_and_singleton_context_hooks" + RSpec::Core::Hooks::HookCollections.__send__ :alias_method, :register_global_singleton_context_hooks, + :"#{prefix}_register_global_singleton_context_hooks" RSpec::Core::Configuration.__send__ :alias_method, :configure_example, :"#{prefix}_configure_example" end diff --git a/lib/rspec/core/configuration.rb b/lib/rspec/core/configuration.rb index 0f5632bccc..d44902449c 100644 --- a/lib/rspec/core/configuration.rb +++ b/lib/rspec/core/configuration.rb @@ -502,6 +502,9 @@ def bisect_runner=(value) # @private attr_reader :backtrace_formatter, :ordering_manager, :loaded_spec_files + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength + # Build an object to store runtime configuration options and set defaults def initialize # rubocop:disable Style/GlobalVars @@ -559,6 +562,8 @@ def initialize define_built_in_hooks end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength # @private # diff --git a/lib/rspec/core/option_parser.rb b/lib/rspec/core/option_parser.rb index cb198d90b5..35ed0c9501 100644 --- a/lib/rspec/core/option_parser.rb +++ b/lib/rspec/core/option_parser.rb @@ -32,6 +32,7 @@ def parse(source=nil) private + # rubocop:disable Metrics/AbcSize # rubocop:disable Metrics/MethodLength # rubocop:disable Metrics/CyclomaticComplexity # rubocop:disable Metrics/PerceivedComplexity @@ -301,6 +302,7 @@ def parser(options) end end end + # rubocop:enable Metrics/AbcSize # rubocop:enable Metrics/MethodLength # rubocop:enable Metrics/CyclomaticComplexity # rubocop:enable Metrics/PerceivedComplexity diff --git a/spec/rspec/core/filterable_item_repository_spec.rb b/spec/rspec/core/filterable_item_repository_spec.rb index b1a91597c4..99a526f93b 100644 --- a/spec/rspec/core/filterable_item_repository_spec.rb +++ b/spec/rspec/core/filterable_item_repository_spec.rb @@ -3,6 +3,8 @@ module Core RSpec.describe FilterableItemRepository, "#items_for" do FilterableItem = Struct.new(:name) + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength def self.it_behaves_like_a_filterable_item_repo(&when_the_repo_has_items_with_metadata) let(:repo) { described_class.new(:any?) } let(:item_1) { FilterableItem.new("Item 1") } @@ -166,7 +168,8 @@ def self.it_behaves_like_a_filterable_item_repo(&when_the_repo_has_items_with_me end end end - + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength describe FilterableItemRepository::UpdateOptimized do it_behaves_like_a_filterable_item_repo end From bc9bb2da423b2cf6b7e53f1307c3ef2d24fceb7b Mon Sep 17 00:00:00 2001 From: Christian Adamini Date: Sun, 10 Apr 2022 02:56:47 +0200 Subject: [PATCH 14/19] Update warnings_option.feature --- features/command_line/warnings_option.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/command_line/warnings_option.feature b/features/command_line/warnings_option.feature index 5b2dc0d135..25eadb8f7e 100644 --- a/features/command_line/warnings_option.feature +++ b/features/command_line/warnings_option.feature @@ -1,6 +1,6 @@ Feature: `--warnings` option (run with warnings enabled) - You can use the `--warnings` option to run specs with warnings enabled + Use the `--warnings` option to run specs with warnings enabled. @unsupported-on-rbx Scenario: From 814c1c1ecf79d2191718b2795b6d12d9d522f60b Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 1 Jun 2022 12:50:45 +0200 Subject: [PATCH 15/19] Updated ci build scripts (from rspec-dev)main --- .github/workflows/ci.yml | 10 +++++----- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 2 +- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/run_rubocop | 2 +- script/update_rubygems_and_install_bundler | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 755bb71ea5..fc799abfdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 @@ -20,7 +20,7 @@ jobs: name: Rubocop runs-on: 'ubuntu-20.04' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' @@ -72,7 +72,7 @@ jobs: continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }} env: ${{ matrix.env }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: bundler: ${{ matrix.bundler || '2.2.22' }} @@ -117,7 +117,7 @@ jobs: LEGACY_CI: true JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: ${{ matrix.container.pre }} - run: script/legacy_setup.sh - run: bundle exec bin/rspec @@ -138,7 +138,7 @@ jobs: - 2.1.9 fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: bundler: '2.2.22' diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 0c3d94c9e2..318d54f1bf 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/ci_functions.sh b/script/ci_functions.sh index ef2e7b387d..c45cb2d84c 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index d03914bf32..0977e16a8a 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/cucumber.sh b/script/cucumber.sh index d9b6fd7e26..4a4aa1a809 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/functions.sh b/script/functions.sh index 7bc85924da..63379b3292 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index b2856af510..50fd48257e 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 3638db7aa4..b3b14c6a47 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 { diff --git a/script/run_build b/script/run_build index 505f26787e..e089d17683 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/run_rubocop b/script/run_rubocop index 2412e58eeb..42b3fc2b2b 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 9198342e86..37b9d5da0e 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-04-05T21:59:01+01:00 from the rspec-dev repo. +# This file was generated on 2022-06-01T12:50:45+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 From 47db7b102d27ecacd4915ea4518e38b7fd501ff7 Mon Sep 17 00:00:00 2001 From: Alex <93376818+sashashura@users.noreply.github.com> Date: Fri, 2 Sep 2022 15:57:41 +0100 Subject: [PATCH 16/19] Update ci.yml Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com> --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc799abfdb..b1ab97d72a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ on: pull_request: branches: - '*' +permissions: + contents: read env: RSPEC_CI: true # This tells rspec-rails what branch to run in ci From e29d1bfa52f21c4c72cd95d0d354d9f7e6bad5e3 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 8 Sep 2022 12:41:59 +0100 Subject: [PATCH 17/19] Updated ci build scripts (from rspec-dev)main --- .github/workflows/ci.yml | 2 +- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 2 +- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/run_rubocop | 2 +- script/update_rubygems_and_install_bundler | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1ab97d72a..e63f485908 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 318d54f1bf..1f77f17e6b 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/ci_functions.sh b/script/ci_functions.sh index c45cb2d84c..bac93360d7 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 0977e16a8a..60bc403f33 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/cucumber.sh b/script/cucumber.sh index 4a4aa1a809..7be6f49da8 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/functions.sh b/script/functions.sh index 63379b3292..b582eeeac0 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 50fd48257e..8899376f56 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index b3b14c6a47..d3a3563c82 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 { diff --git a/script/run_build b/script/run_build index e089d17683..448a825ff5 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/run_rubocop b/script/run_rubocop index 42b3fc2b2b..8fe1774b2c 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 37b9d5da0e..8d51f56cab 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:50:45+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:41:59+01: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 From 24c9e1207ce240de9c3b2acf025fd060beee4de8 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 26 Oct 2022 19:05:44 +0100 Subject: [PATCH 18/19] Set maintenace branch --- maintenance-branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance-branch b/maintenance-branch index ba2906d066..90ed1bf04f 100644 --- a/maintenance-branch +++ b/maintenance-branch @@ -1 +1 @@ -main +3-12-maintenance From d147546a0662a32d1d60d009df115aad39f4558d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 26 Oct 2022 19:07:17 +0100 Subject: [PATCH 19/19] v3.12.0 --- .github/workflows/ci.yml | 2 +- Changelog.md | 7 ++++++- lib/rspec/core/version.rb | 2 +- script/clone_all_rspec_repos | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e63f485908..6bf925b9de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ permissions: env: RSPEC_CI: true # This tells rspec-rails what branch to run in ci - RSPEC_VERSION: '= 3.12.0.pre' + RSPEC_VERSION: '= 3.12.0' jobs: rubocop: name: Rubocop diff --git a/Changelog.md b/Changelog.md index 69c725a3f2..16051a8188 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ ### Development -[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.11.0...main) +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.0...3-12-maintenance) + +### 3.12.0 / 2022-10-26 +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.11.0...v3.12.0) + +* No changes, released to support other gems. ### 3.11.0 / 2022-02-09 [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.2...v3.11.0) diff --git a/lib/rspec/core/version.rb b/lib/rspec/core/version.rb index a4620887b3..b2667445af 100644 --- a/lib/rspec/core/version.rb +++ b/lib/rspec/core/version.rb @@ -3,7 +3,7 @@ module Core # Version information for RSpec Core. module Version # Current version of RSpec Core, in semantic versioning format. - STRING = '3.12.0.pre' + STRING = '3.12.0' end end end diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 60bc403f33..bd9bf2bbcd 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -12,7 +12,7 @@ if is_mri; then clone_repo "rspec-core" clone_repo "rspec-expectations" clone_repo "rspec-mocks" - clone_repo "rspec-rails" + clone_repo "rspec-rails" "6-0-maintenance" if rspec_support_compatible; then clone_repo "rspec-support"