From 2bf39e5797ca0711b7b0e1607bbae4ab238fb3e3 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sun, 30 Jan 2022 10:38:31 +0000 Subject: [PATCH 01/28] 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 | 9 +++++++-- 11 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index daf8df1e..6a678a15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 13974fe8..1a19dfbf 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/script/ci_functions.sh b/script/ci_functions.sh index add930da..5c62a54c 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # Taken from: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index e786c16d..cc09066a 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-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/cucumber.sh b/script/cucumber.sh index 1710fe80..d1a15e9c 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/functions.sh b/script/functions.sh index f15e4b20..be534f2e 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 0f4430af..5b6d0eaa 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 18bf6198..b0bc8387 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. function is_mri { diff --git a/script/run_build b/script/run_build index 2fc33753..b3486444 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/run_rubocop b/script/run_rubocop index d8caff16..ec26db85 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 42194ea1..00cc7d4e 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,11 +1,16 @@ #!/bin/bash -# This file was generated on 2022-01-26T13:58:53+00:00 from the rspec-dev repo. +# This file was generated on 2022-01-30T10:38:31+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e source script/functions.sh -if is_ruby_23_plus; then +if is_ruby_31_plus; then + echo "Installing rubygems 3.3.6 / bundler 2.3.6" + yes | gem update --system '3.3.6' + yes | gem install bundler -v '2.3.6' +elif is_ruby_23_plus; then + echo "Installing rubygems 3.2.22 / bundler 2.2.22" yes | gem update --system '3.2.22' yes | gem install bundler -v '2.2.22' else From b499cf01532ba68ebf90ef33ab9832e5cc2c2d6d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 9 Feb 2022 09:45:28 +0000 Subject: [PATCH 02/28] Version 3.11.0 --- Changelog.md | 8 ++++++++ lib/rspec/support/version.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 12f14dcf..b08e602a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,11 @@ +### Development +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.0...main) + +### 3.11.0 / 2022-02-09 +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.3...v3.11.0) + +No changes. Released to support other RSpec releases. + ### 3.10.3 / 2021-11-03 [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.2...v3.10.3) diff --git a/lib/rspec/support/version.rb b/lib/rspec/support/version.rb index 8cd1d042..bbc6365d 100644 --- a/lib/rspec/support/version.rb +++ b/lib/rspec/support/version.rb @@ -1,7 +1,7 @@ module RSpec module Support module Version - STRING = '3.11.0.pre' + STRING = '3.12.0.pre' end end end From 7e3a98b0b485acec662052d8cf268e1a4acb8e23 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 9 Feb 2022 10:52:04 +0000 Subject: [PATCH 03/28] 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 6a678a15..5e166650 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 623608b4f49c063fca2616cb3e35ae62ea5fe5cf Mon Sep 17 00:00:00 2001 From: Igor Victor Date: Tue, 15 Feb 2022 13:48:53 +0100 Subject: [PATCH 04/28] Allow specs to run with TruffleRuby (#533) Adds an internal line filter to backtracing required by some rubies, and skips a test on truffle. --- lib/rspec/support/caller_filter.rb | 2 +- spec/rspec/support/spec/stderr_splitter_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rspec/support/caller_filter.rb b/lib/rspec/support/caller_filter.rb index cd59a30f..ce709214 100644 --- a/lib/rspec/support/caller_filter.rb +++ b/lib/rspec/support/caller_filter.rb @@ -25,7 +25,7 @@ class CallerFilter # when `CallerFilter.first_non_rspec_line` is called from the top level of a required # file, but it depends on if rubygems is loaded or not. We don't want to have to deal # with this complexity in our `RSpec.deprecate` calls, so we ignore it here. - IGNORE_REGEX = Regexp.union(LIB_REGEX, "rubygems/core_ext/kernel_require.rb") + IGNORE_REGEX = Regexp.union(LIB_REGEX, "rubygems/core_ext/kernel_require.rb", " Date: Tue, 22 Feb 2022 21:58:51 +0100 Subject: [PATCH 05/28] Implement RubyFeatures.distincts_kw_args_from_positional_hash? (#535) Extracted from: https://github.com/rspec/rspec-mocks/pull/1461 Co-authored-by: Jean Boussier --- lib/rspec/support/ruby_features.rb | 6 +++++- spec/rspec/support/ruby_features_spec.rb | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/rspec/support/ruby_features.rb b/lib/rspec/support/ruby_features.rb index daba00ea..1b2d5511 100644 --- a/lib/rspec/support/ruby_features.rb +++ b/lib/rspec/support/ruby_features.rb @@ -57,7 +57,7 @@ def truffleruby? # # Provides query methods for ruby features that differ among # implementations. - module RubyFeatures + module RubyFeatures # rubocop:disable Metrics/ModuleLength module_function if Ruby.jruby? && RUBY_VERSION.to_f < 1.9 @@ -126,6 +126,10 @@ def ripper_supported? end end + def distincts_kw_args_from_positional_hash? + RUBY_VERSION >= '3.0.0' + end + if Ruby.mri? def kw_args_supported? RUBY_VERSION >= '2.0.0' diff --git a/spec/rspec/support/ruby_features_spec.rb b/spec/rspec/support/ruby_features_spec.rb index d9622a5f..a7df8af1 100644 --- a/spec/rspec/support/ruby_features_spec.rb +++ b/spec/rspec/support/ruby_features_spec.rb @@ -91,6 +91,10 @@ module Support RubyFeatures.required_kw_args_supported? end + specify "distincts_kw_args_from_positional_hash?" do + RubyFeatures.distincts_kw_args_from_positional_hash? + end + specify "#supports_rebinding_module_methods? exists" do RubyFeatures.supports_rebinding_module_methods? end From b276ec51e2e13cd0772fabf91c3cb18466473928 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Tue, 22 Feb 2022 21:01:21 +0000 Subject: [PATCH 06/28] Add changelog for #535 --- Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.md b/Changelog.md index b08e602a..a8677ffe 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,12 @@ ### Development [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.0...main) +Enhancements: + +* Add `RSpec::Support::RubyFeatures.distincts_kw_args_from_positional_hash?` + (Jean byroot Boussier, #535) + + ### 3.11.0 / 2022-02-09 [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.3...v3.11.0) From 2a1fcfaeb28c074b8ce0e4b2f349d8a81bbaff30 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 1 Apr 2022 08:57:18 +0100 Subject: [PATCH 07/28] Pin ffi on Ruby 2.3 on Windows (#538) --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index b19de7d4..0b9f29ed 100644 --- a/Gemfile +++ b/Gemfile @@ -50,6 +50,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' # ffi dropped Ruby 1.8 support in 1.9.19 and Ruby 1.9 support in 1.11.0 gem 'ffi', '< 1.9.19' From 48c1146217ae712b602a2912133de53c447bc324 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Tue, 5 Apr 2022 22:19:26 +0100 Subject: [PATCH 08/28] Updated ci build scripts (from rspec-dev)main (#539) --- .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 5e166650..755bb71e 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 1a19dfbf..a6aef5fa 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 5c62a54c..ef2e7b38 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 cc09066a..d03914bf 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 d1a15e9c..d9b6fd7e 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 be534f2e..7bc85924 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 5b6d0eaa..b2856af5 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 b0bc8387..3638db7a 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 b3486444..505f2678 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 ec26db85..2412e58e 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 00cc7d4e..9198342e 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 2d0890e84f5e9c35a0e58bd31fabf4537032e936 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Sun, 9 Jan 2022 09:50:44 -0800 Subject: [PATCH 09/28] Update to a version of Rubocop that is compatible with Ruby 2.4-3.1 --- .rubocop.yml | 16 +- .rubocop_rspec_base.yml | 83 ++-- .rubocop_todo.yml | 424 ++++++++++++++++++ Gemfile | 2 +- lib/rspec/support/comparable_version.rb | 2 +- lib/rspec/support/differ.rb | 8 +- .../support/method_signature_verifier.rb | 4 +- lib/rspec/support/spec/in_sub_process.rb | 2 +- 8 files changed, 485 insertions(+), 56 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index e6d4f3a1..10dee368 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,12 +1,16 @@ inherit_from: - .rubocop_rspec_base.yml + - .rubocop_todo.yml +# Over time we'd like to get this down, but this is what we're at now. Metrics/AbcSize: Max: 28 +# Over time we'd like to get this down, but this is what we're at now. Metrics/BlockLength: - Max: 86 + Max: 834 +# Over time we'd like to get this down, but this is what we're at now. Metrics/PerceivedComplexity: Max: 10 @@ -18,16 +22,10 @@ Style/EvalWithLocation: Exclude: # eval is only used here to check syntax - 'lib/rspec/support/ruby_features.rb' + - 'benchmarks/skip_frames_for_caller_filter.rb' + - 'spec/rspec/support/method_signature_verifier_spec.rb' Lint/AssignmentInCondition: Exclude: # The pattern makes sense here - 'lib/rspec/support/mutex.rb' - -# Over time we'd like to get this down, but this is what we're at now. -Metrics/AbcSize: - Max: 22 - -# Over time we'd like to get this down, but this is what we're at now. -Metrics/PerceivedComplexity: - Max: 9 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index a6aef5fa..0c3d94c9 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 00000000..108ab183 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,424 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2022-01-09 17:43:27 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 +# Configuration parameters: Include. +# Include: **/*.gemspec +Gemspec/RequiredRubyVersion: + Exclude: + - 'rspec-support.gemspec' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: + Exclude: + - 'spec/rspec/support_spec.rb' + +# Offense count: 17 +# Cop supports --auto-correct. +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'benchmarks/caller_vs_caller_locations_vs_raise.rb' + - 'lib/rspec/support.rb' + - 'lib/rspec/support/differ.rb' + - 'lib/rspec/support/method_signature_verifier.rb' + - 'lib/rspec/support/mutex.rb' + - 'lib/rspec/support/recursive_const_methods.rb' + - 'lib/rspec/support/reentrant_mutex.rb' + - 'lib/rspec/support/source.rb' + - 'lib/rspec/support/source/location.rb' + - 'lib/rspec/support/source/token.rb' + - 'lib/rspec/support/spec/library_wide_checks.rb' + - 'lib/rspec/support/spec/stderr_splitter.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Layout/EmptyLines: + Exclude: + - 'benchmarks/caller.rb' + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowAliasSyntax, AllowedMethods. +# AllowedMethods: alias_method, public, protected, private +Layout/EmptyLinesAroundAttributeAccessor: + Exclude: + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + - 'spec/rspec/support/method_signature_verifier_spec.rb' + +# Offense count: 8 +# 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: + Exclude: + - 'lib/rspec/support/source/token.rb' + - 'rspec-support.gemspec' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: normal, indented_internal_methods +Layout/IndentationConsistency: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Exclude: + - 'lib/rspec/support/method_signature_verifier.rb' + - 'lib/rspec/support/ruby_features.rb' + +# Offense count: 50 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Layout/LineLength: + Max: 156 + +# Offense count: 13 +# Cop supports --auto-correct. +Layout/SpaceAfterComma: + Exclude: + - 'rspec-support.gemspec' + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceAroundEqualsInParameterDefault: + Exclude: + - 'spec/rspec/support/encoded_string_spec.rb' + - 'spec/rspec/support/method_signature_verifier_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideArrayLiteralBrackets: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + +# Offense count: 20 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideHashLiteralBraces: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideReferenceBrackets: + Exclude: + - 'benchmarks/map_hash.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: final_newline, final_blank_line +Layout/TrailingEmptyLines: + Exclude: + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + +# Offense count: 4 +Lint/AmbiguousBlockAssociation: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/encoded_string_spec.rb' + - 'spec/rspec/support/ruby_features_spec.rb' + - 'spec/rspec/support_spec.rb' + +# Offense count: 2 +Lint/BinaryOperatorWithIdenticalOperands: + Exclude: + - 'spec/rspec/support/object_formatter_spec.rb' + - 'spec/rspec/support/source/token_spec.rb' + +# Offense count: 3 +# Configuration parameters: AllowedMethods. +# AllowedMethods: enums +Lint/ConstantDefinitionInBlock: + Exclude: + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + - 'spec/rspec/support/recursive_const_methods_spec.rb' + - 'spec/rspec/support/spec/in_sub_process_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowedImplicitNamespaces. +# AllowedImplicitNamespaces: Gem +Lint/RaiseException: + Exclude: + - 'spec/rspec/support_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/RedundantCopDisableDirective: + Exclude: + - 'lib/rspec/support/spec/in_sub_process.rb' + +# Offense count: 1 +Lint/StructNewOverride: + Exclude: + - 'spec/rspec/support_spec.rb' + +# Offense count: 3 +# Configuration parameters: AllowComments. +Lint/SuppressedException: + Exclude: + - 'spec/rspec/support_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. +Lint/UselessAccessModifier: + Exclude: + - 'lib/rspec/support/encoded_string.rb' + +# Offense count: 12 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +# IgnoredMethods: refine +Metrics/BlockLength: + Max: 834 + +# Offense count: 8 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ModuleLength: + Max: 836 + +# Offense count: 1 +# Configuration parameters: IgnoredMethods. +Metrics/PerceivedComplexity: + Max: 10 + +# Offense count: 6 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'benchmarks/caller_vs_caller_locations_vs_raise.rb' + - 'spec/rspec/support/method_signature_verifier_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: PreferredName. +Naming/RescuedExceptionsVariableName: + Exclude: + - 'benchmarks/caller_vs_caller_locations_vs_raise.rb' + - 'lib/rspec/support.rb' + - 'lib/rspec/support/spec/in_sub_process.rb' + +# Offense count: 1 +Security/Eval: + Exclude: + - 'Gemfile' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: percent_q, bare_percent +Style/BarePercentLiterals: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/object_formatter_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/CaseLikeIf: + Exclude: + - 'lib/rspec/support/directory_maker.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: nested, compact +Style/ClassAndModuleChildren: + Exclude: + - 'spec/rspec/support/comparable_version_spec.rb' + - 'spec/rspec/support/directory_maker_spec.rb' + - 'spec/rspec/support/encoded_string_spec.rb' + - 'spec/rspec/support/source/node_spec.rb' + - 'spec/rspec/support/source/token_spec.rb' + - 'spec/rspec/support/source_spec.rb' + - 'spec/rspec/support/with_keywords_when_needed_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +# IgnoredMethods: ==, equal?, eql? +Style/ClassEqualityComparison: + Exclude: + - 'lib/rspec/support/comparable_version.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/ColonMethodCall: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/EmptyLiteral: + Exclude: + - 'spec/rspec/support/method_signature_verifier_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/Encoding: + Exclude: + - 'rspec-support.gemspec' + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/encoded_string_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Style/ExpandPathArguments: + Exclude: + - 'Gemfile' + - 'benchmarks/caller.rb' + - 'rspec-support.gemspec' + - 'spec/rspec/support/caller_filter_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: format, sprintf, percent +Style/FormatString: + Exclude: + - 'spec/rspec/support/encoded_string_spec.rb' + +# Offense count: 68 +# 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/support/spec/stderr_splitter_spec.rb' + +# Offense count: 3 +# Configuration parameters: AllowedVariables. +Style/GlobalVars: + Exclude: + - 'spec/rspec/support/caller_filter_spec.rb' + - 'spec/rspec/support/spec/stderr_splitter_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +Style/HashSyntax: + Exclude: + - 'benchmarks/class_exec_vs_klass_exec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/LineEndConcatenation: + Exclude: + - 'spec/rspec/support_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +Style/MethodCallWithoutArgsParentheses: + Exclude: + - 'spec/rspec/support/method_signature_verifier_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedOctalStyle. +# SupportedOctalStyles: zero_with_o, zero_only +Style/NumericLiteralPrefix: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/object_formatter_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Strict. +Style/NumericLiterals: + MinDigits: 6 + +# Offense count: 1 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'lib/rspec/support/spec/in_sub_process.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/object_formatter_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: lower_case_q, upper_case_q +Style/PercentQLiterals: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantPercentQ: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods. +# AllowedMethods: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'lib/rspec/support/mutex.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowAsExpressionSeparator. +Style/Semicolon: + Exclude: + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowIfMethodIsEmpty. +Style/SingleLineMethods: + Exclude: + - 'spec/rspec/support/differ_spec.rb' + - 'spec/rspec/support/fuzzy_matcher_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: WordRegex. +# SupportedStyles: percent, brackets +Style/WordArray: + EnforcedStyle: percent + MinSize: 3 diff --git a/Gemfile b/Gemfile index 0b9f29ed..bdf4efb9 100644 --- a/Gemfile +++ b/Gemfile @@ -63,7 +63,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 eval File.read('Gemfile-custom') if File.exist?('Gemfile-custom') diff --git a/lib/rspec/support/comparable_version.rb b/lib/rspec/support/comparable_version.rb index 2afa0a4f..d17b713f 100644 --- a/lib/rspec/support/comparable_version.rb +++ b/lib/rspec/support/comparable_version.rb @@ -10,7 +10,7 @@ def initialize(string) @string = string end - def <=>(other) # rubocop:disable Metrics/AbcSize + def <=>(other) other = self.class.new(other) unless other.is_a?(self.class) return 0 if string == other.string diff --git a/lib/rspec/support/differ.rb b/lib/rspec/support/differ.rb index b8118423..71a8694c 100644 --- a/lib/rspec/support/differ.rb +++ b/lib/rspec/support/differ.rb @@ -6,7 +6,7 @@ module RSpec module Support - # rubocop:disable ClassLength + # rubocop:disable Metrics/ClassLength class Differ def diff(actual, expected) diff = "" @@ -24,7 +24,7 @@ def diff(actual, expected) diff.to_s end - # rubocop:disable MethodLength + # rubocop:disable Metrics/MethodLength def diff_as_string(actual, expected) encoding = EncodedString.pick_encoding(actual, expected) @@ -52,7 +52,7 @@ def diff_as_string(actual, expected) rescue Encoding::CompatibilityError handle_encoding_errors(actual, expected) end - # rubocop:enable MethodLength + # rubocop:enable Metrics/MethodLength def diff_as_object(actual, expected) actual_as_string = object_to_string(actual) @@ -210,6 +210,6 @@ def handle_encoding_errors(actual, expected) end end end - # rubocop:enable ClassLength + # rubocop:enable Metrics/ClassLength end end diff --git a/lib/rspec/support/method_signature_verifier.rb b/lib/rspec/support/method_signature_verifier.rb index 16736224..c4eb432a 100644 --- a/lib/rspec/support/method_signature_verifier.rb +++ b/lib/rspec/support/method_signature_verifier.rb @@ -8,7 +8,7 @@ module Support # keyword args of a given method. # # @private - class MethodSignature # rubocop:disable ClassLength + class MethodSignature # rubocop:disable Metrics/ClassLength attr_reader :min_non_kw_args, :max_non_kw_args, :optional_kw_args, :required_kw_args def initialize(method) @@ -285,7 +285,7 @@ def initialize(signature, args=[]) @arbitrary_kw_args = @unlimited_args = false end - def with_expectation(expectation) # rubocop:disable MethodLength, Metrics/PerceivedComplexity + def with_expectation(expectation) # rubocop:disable Metrics/MethodLength return self unless MethodSignatureExpectation === expectation if expectation.empty? diff --git a/lib/rspec/support/spec/in_sub_process.rb b/lib/rspec/support/spec/in_sub_process.rb index 85196997..2f5025ec 100644 --- a/lib/rspec/support/spec/in_sub_process.rb +++ b/lib/rspec/support/spec/in_sub_process.rb @@ -7,7 +7,7 @@ module InSubProcess # Useful as a way to isolate a global change to a subprocess. - def in_sub_process(prevent_warnings=true) # rubocop:disable MethodLength, Metrics/AbcSize + def in_sub_process(prevent_warnings=true) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize exception_reader, exception_writer = IO.pipe result_reader, result_writer = IO.pipe From 8a9d45fa3430f5a8fb682b8992d9ae93db2ddbe4 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Tue, 11 Jan 2022 23:46:45 -0800 Subject: [PATCH 10/28] Tweak Rubocop settings to exclude spec from BlockLength check --- .rubocop.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 10dee368..a91a0fe3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,7 +8,9 @@ Metrics/AbcSize: # Over time we'd like to get this down, but this is what we're at now. Metrics/BlockLength: - Max: 834 + Max: 86 + Exclude: + - spec/**/* # Over time we'd like to get this down, but this is what we're at now. Metrics/PerceivedComplexity: From 1811c9c6adfaa975217a1935bf203eba6629c83d Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Wed, 6 Apr 2022 18:38:18 -0700 Subject: [PATCH 11/28] Fix lints --- lib/rspec/support/ruby_features.rb | 2 +- spec/rspec/support/spec/stderr_splitter_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec/support/ruby_features.rb b/lib/rspec/support/ruby_features.rb index 1b2d5511..7a8410dc 100644 --- a/lib/rspec/support/ruby_features.rb +++ b/lib/rspec/support/ruby_features.rb @@ -57,7 +57,7 @@ def truffleruby? # # Provides query methods for ruby features that differ among # implementations. - module RubyFeatures # rubocop:disable Metrics/ModuleLength + module RubyFeatures module_function if Ruby.jruby? && RUBY_VERSION.to_f < 1.9 diff --git a/spec/rspec/support/spec/stderr_splitter_spec.rb b/spec/rspec/support/spec/stderr_splitter_spec.rb index ecc84ca9..7cb7f6d5 100644 --- a/spec/rspec/support/spec/stderr_splitter_spec.rb +++ b/spec/rspec/support/spec/stderr_splitter_spec.rb @@ -88,7 +88,7 @@ unless RSpec::Support::Ruby.rbx? || RSpec::Support::Ruby.truffleruby? # TruffleRuby doesn't support warnings for now - # https://github.com/oracle/truffleruby/issues/2595 + # https://github.com/oracle/truffleruby/issues/2595 it 'will fail an example which generates a warning' do true unless $undefined expect { splitter.verify_no_warnings! }.to raise_error(/Warnings were generated:/) From ddc43bc41d0d936b8160c535059b4a3a16d79d78 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Wed, 13 Apr 2022 09:40:15 -0500 Subject: [PATCH 12/28] Disable ripper in TruffleRuby due to slow performance --- lib/rspec/support/ruby_features.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rspec/support/ruby_features.rb b/lib/rspec/support/ruby_features.rb index 7a8410dc..d2bdc822 100644 --- a/lib/rspec/support/ruby_features.rb +++ b/lib/rspec/support/ruby_features.rb @@ -116,6 +116,9 @@ def supports_taint? ripper_requirements.push(!Ruby.jruby_version.between?('9.0.0.0.rc1', '9.2.0.0')) end + # TruffleRuby disables ripper due to low perforamnce + ripper_requirements.push(false) if Ruby.truffleruby? + if ripper_requirements.all? def ripper_supported? true From 5fdadceffbd87962ce3f5152c28e968152d89d30 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 14 Apr 2022 10:06:43 +0100 Subject: [PATCH 13/28] Correct spelling --- lib/rspec/support/ruby_features.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/ruby_features.rb b/lib/rspec/support/ruby_features.rb index d2bdc822..d5d6aae5 100644 --- a/lib/rspec/support/ruby_features.rb +++ b/lib/rspec/support/ruby_features.rb @@ -116,7 +116,7 @@ def supports_taint? ripper_requirements.push(!Ruby.jruby_version.between?('9.0.0.0.rc1', '9.2.0.0')) end - # TruffleRuby disables ripper due to low perforamnce + # TruffleRuby disables ripper due to low performance ripper_requirements.push(false) if Ruby.truffleruby? if ripper_requirements.all? From 594aa52c39bf8b5b75a1c9a40315b72cd88adc2b Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 1 Jun 2022 12:59:51 +0200 Subject: [PATCH 14/28] 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 755bb71e..147fcced 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:59:51+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 0c3d94c9..796dd223 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:59:51+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 ef2e7b38..25b46bb7 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:59:51+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 d03914bf..2395c3f7 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:59:51+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 d9b6fd7e..89d11e09 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:59:51+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 7bc85924..ec0e7609 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:59:51+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 b2856af5..7c7b9f6a 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:59:51+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 3638db7a..61bd206a 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:59:51+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 505f2678..cbba8716 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:59:51+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 2412e58e..4cb639c0 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:59:51+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 9198342e..1f06d97f 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:59:51+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 ba39dd1fef299865b1fff123a4a340f6d85703ce Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:17:50 +0900 Subject: [PATCH 15/28] s/skippped/skipped/ --- lib/rspec/support/caller_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/caller_filter.rb b/lib/rspec/support/caller_filter.rb index ce709214..fe210f74 100644 --- a/lib/rspec/support/caller_filter.rb +++ b/lib/rspec/support/caller_filter.rb @@ -34,7 +34,7 @@ class CallerFilter # be found in a small number of stack frames from `skip_frames`. # # Note that there is a risk to passing a `skip_frames` value that is too high: - # If it skippped the first non-rspec line, then this method would return the + # If it skipped the first non-rspec line, then this method would return the # 2nd or 3rd (or whatever) non-rspec line. Thus, you generally shouldn't pass # values for these parameters, particularly since most places that use this are # not hot spots (generally it gets used for deprecation warnings). However, From 0f860059af1bab9dccb88c19fd379f4a4b67e612 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:18:30 +0900 Subject: [PATCH 16/28] s/compatibile/compatible/ --- lib/rspec/support/encoded_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/encoded_string.rb b/lib/rspec/support/encoded_string.rb index 13c32350..89df54aa 100644 --- a/lib/rspec/support/encoded_string.rb +++ b/lib/rspec/support/encoded_string.rb @@ -60,7 +60,7 @@ def to_s # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '') # # => '' # Encoding::CompatibilityError - # when Encoding.compatibile?(str1, str2) is nil + # when Encoding.compatible?(str1, str2) is nil # e.g. utf_16le_emoji_string.split("\n") # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string # Encoding::InvalidByteSequenceError: From 6926994f4e03f5bae7681578afb1632d1f214a89 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:19:26 +0900 Subject: [PATCH 17/28] s/uneeded/unneeded/ --- lib/rspec/support/encoded_string.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec/support/encoded_string.rb b/lib/rspec/support/encoded_string.rb index 89df54aa..80c69a88 100644 --- a/lib/rspec/support/encoded_string.rb +++ b/lib/rspec/support/encoded_string.rb @@ -92,7 +92,7 @@ def matching_encoding(string) string = remove_invalid_bytes(string) string.encode(@encoding) rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError - # Originally defined as a constant to avoid uneeded allocations, this hash must + # Originally defined as a constant to avoid unneeded allocations, this hash must # be defined inline (without {}) to avoid warnings on Ruby 2.7 # # In MRI 2.1 'invalid: :replace' changed to also replace an invalid byte sequence @@ -108,7 +108,7 @@ def matching_encoding(string) # string.encode(@encoding, :invalid => :replace, :undef => :replace, :replace => REPLACE) rescue Encoding::ConverterNotFoundError - # Originally defined as a constant to avoid uneeded allocations, this hash must + # Originally defined as a constant to avoid unneeded allocations, this hash must # be defined inline (without {}) to avoid warnings on Ruby 2.7 string.dup.force_encoding(@encoding).encode(:invalid => :replace, :replace => REPLACE) end From 698362938f41f9fdbc97caba34e104503630dfd2 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:20:05 +0900 Subject: [PATCH 18/28] s/formating/formatting/ --- lib/rspec/support/mutex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/mutex.rb b/lib/rspec/support/mutex.rb index 1bc3ccf6..778e9bb4 100644 --- a/lib/rspec/support/mutex.rb +++ b/lib/rspec/support/mutex.rb @@ -9,7 +9,7 @@ module Support # Some methods we don't need are deleted. Anything I don't # understand (there's quite a bit, actually) is left in. # - # Some formating changes are made to appease the robot overlord: + # Some formatting changes are made to appease the robot overlord: # https://travis-ci.org/rspec/rspec-core/jobs/54410874 # @private class Mutex From f66e67b3ff73c714ea858571da0cfd71ca3659f6 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:22:55 +0900 Subject: [PATCH 19/28] s/argments/arguments/ --- lib/rspec/support/spec/stderr_splitter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/spec/stderr_splitter.rb b/lib/rspec/support/spec/stderr_splitter.rb index 03b50e93..6da084cc 100644 --- a/lib/rspec/support/spec/stderr_splitter.rb +++ b/lib/rspec/support/spec/stderr_splitter.rb @@ -39,7 +39,7 @@ def to_io def write(line) return if line =~ %r{^\S+/gems/\S+:\d+: warning:} # http://rubular.com/r/kqeUIZOfPG - # Ruby 2.7.0 warnings from keyword argments span multiple lines, extend check above + # Ruby 2.7.0 warnings from keyword arguments span multiple lines, extend check above # to look for the next line. return if @last_line =~ %r{^\S+/gems/\S+:\d+: warning:} && line =~ %r{warning: The called method .* is defined here} From a5c54350a93095bb1014c5abbc94093b87ca193a Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:23:28 +0900 Subject: [PATCH 20/28] s/explictly/explicitly/ --- lib/rspec/support/with_keywords_when_needed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/with_keywords_when_needed.rb b/lib/rspec/support/with_keywords_when_needed.rb index 56b67e70..dc76b5ee 100644 --- a/lib/rspec/support/with_keywords_when_needed.rb +++ b/lib/rspec/support/with_keywords_when_needed.rb @@ -9,7 +9,7 @@ module WithKeywordsWhenNeeded module_function if RSpec::Support::RubyFeatures.kw_args_supported? - # Remove this in RSpec 4 in favour of explictly passed in kwargs where + # Remove this in RSpec 4 in favour of explicitly passed in kwargs where # this is used. Works around a warning in Ruby 2.7 def class_exec(klass, *args, &block) From 5129b9b1cae8a97c2b753ae2920f2cadcc71f72c Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:24:11 +0900 Subject: [PATCH 21/28] s/laoded/loaded/ --- spec/rspec/support/caller_filter_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rspec/support/caller_filter_spec.rb b/spec/rspec/support/caller_filter_spec.rb index 4c7004cb..b47a107b 100644 --- a/spec/rspec/support/caller_filter_spec.rb +++ b/spec/rspec/support/caller_filter_spec.rb @@ -54,7 +54,7 @@ def in_rspec_support_lib(name) it 'does not match rubygems lines from `require` statements' do with_isolated_stderr do - require 'rubygems' # ensure rubygems is laoded + require 'rubygems' # ensure rubygems is loaded end in_rspec_support_lib("test_dir") do |dir| From 43c2a7958fb9a42b7d858ada5e5be7750b90c086 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Tue, 21 Jun 2022 06:17:20 +0900 Subject: [PATCH 22/28] s/seperator/separator/ --- spec/rspec/support/ruby_features_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rspec/support/ruby_features_spec.rb b/spec/rspec/support/ruby_features_spec.rb index a7df8af1..a45e8a07 100644 --- a/spec/rspec/support/ruby_features_spec.rb +++ b/spec/rspec/support/ruby_features_spec.rb @@ -21,12 +21,12 @@ module Support end describe ".windows_file_path?" do - it "returns true when the file alt seperator is a colon" do + it "returns true when the file alt separator is a colon" do stub_const("File::ALT_SEPARATOR", "\\") unless OS.windows? expect(OS).to be_windows_file_path end - it "returns false when file alt seperator is not present" do + it "returns false when file alt separator is not present" do stub_const("File::ALT_SEPARATOR", nil) if OS.windows? expect(OS).to_not be_windows_file_path end From 528d88ce6fac5f83390bf430d1c47608e9d8d29a Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Tue, 21 Jun 2022 06:17:34 +0900 Subject: [PATCH 23/28] s/overriden/overridden/ --- spec/rspec/support_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/rspec/support_spec.rb b/spec/rspec/support_spec.rb index 477a63d5..2bb28351 100644 --- a/spec/rspec/support_spec.rb +++ b/spec/rspec/support_spec.rb @@ -50,7 +50,7 @@ def method_missing(name, *args, &block) end it 'fails with `NameError` when an undefined method is fetched ' + - 'from an object that has overriden `method` to raise an Exception' do + 'from an object that has overridden `method` to raise an Exception' do object = double allow(object).to receive(:method).and_raise(Exception) expect { @@ -59,7 +59,7 @@ def method_missing(name, *args, &block) end it 'fails with `NameError` when a method is fetched from an object ' + - 'that has overriden `method` to not return a method' do + 'that has overridden `method` to not return a method' do object = proxy_class.new(double(:method => :baz)) expect { Support.method_handle_for(object, :=~) @@ -102,7 +102,7 @@ def method_missing(name, *args, &block) expect(Support.method_handle_for(object, :foo).call).to eq :bar end - it 'works when `method` has been overriden', :if => supports_rebinding_module_methods? do + it 'works when `method` has been overridden', :if => supports_rebinding_module_methods? do object = basic_class_with_method_override.new expect(Support.method_handle_for(object, :foo).call).to eq :bar end From 63af2b166a8ae01994a97791bca676041f1c32ca Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 8 Sep 2022 15:30:45 +0100 Subject: [PATCH 24/28] Updated ci build scripts (from rspec-dev)main (#544) --- .github/workflows/ci.yml | 4 +++- .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, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 147fcced..1aff97ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 @@ -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 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 796dd223..639f64c7 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 25b46bb7..bc1852e9 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 2395c3f7..f93d50b4 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:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 89d11e09..bcc65ac5 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 ec0e7609..65ecc3e6 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 7c7b9f6a..e209ccb0 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:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 61bd206a..3b43860e 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 cbba8716..479329b4 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 4cb639c0..07cff529 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2022-06-01T12:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 1f06d97f..a9919792 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:59:51+02:00 from the rspec-dev repo. +# This file was generated on 2022-09-08T12:42:05+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 e4aed5fb56f6187d626ef78cb9f7f9b0e63edab4 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 12 Sep 2022 16:22:05 +0100 Subject: [PATCH 25/28] Add missing changelog entry for #541 --- Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index a8677ffe..99e1144e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,10 @@ Enhancements: (Jean byroot Boussier, #535) +Bug Fixes: + +* Fix ripper detection on TruffleRuby. (Brandon Fish, #541) + ### 3.11.0 / 2022-02-09 [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.3...v3.11.0) From 5d653dfd130d45a742ab2300662b624e191f76a0 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 12 Sep 2022 16:22:56 +0100 Subject: [PATCH 26/28] v3.11.1 --- Changelog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 99e1144e..007bd9f5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,11 +1,13 @@ ### Development -[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.0...main) +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.1...main) Enhancements: * Add `RSpec::Support::RubyFeatures.distincts_kw_args_from_positional_hash?` (Jean byroot Boussier, #535) +### 3.11.1 / 2022-09-12 +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.0...v3.11.1) Bug Fixes: From 4b58e538321940f268f34b580bb187b5eb296085 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 26 Oct 2022 18:34:51 +0100 Subject: [PATCH 27/28] Set 3.12 maintenance branch --- maintenance-branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance-branch b/maintenance-branch index ba2906d0..90ed1bf0 100644 --- a/maintenance-branch +++ b/maintenance-branch @@ -1 +1 @@ -main +3-12-maintenance From 7e1eddd9162209977a3572c079f0d8c059338d97 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 26 Oct 2022 18:32:56 +0100 Subject: [PATCH 28/28] v3.12.0 --- .github/workflows/ci.yml | 2 +- Changelog.md | 4 +++- lib/rspec/support/version.rb | 2 +- script/clone_all_rspec_repos | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1aff97ad..63f10c4f 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 007bd9f5..e1f42050 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,8 @@ ### Development -[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.1...main) +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.12.0...3-12-maintenance) +### 3.12.0 / 2022-10-26 +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.11.1...v3.12.0) Enhancements: * Add `RSpec::Support::RubyFeatures.distincts_kw_args_from_positional_hash?` diff --git a/lib/rspec/support/version.rb b/lib/rspec/support/version.rb index bbc6365d..7421355e 100644 --- a/lib/rspec/support/version.rb +++ b/lib/rspec/support/version.rb @@ -1,7 +1,7 @@ module RSpec module Support module Version - 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 f93d50b4..d9924d85 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"