From 1dc762e3062d59bc7bb865fac0ae3d90eb8b238d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sat, 2 May 2020 21:16:52 +0100 Subject: [PATCH] [support] Sync build with master This commit was imported from https://github.com/rspec/rspec-support/commit/3fd32d5a5e2e88cf8d9b87cacea0ea9d015e5e3b. --- rspec-support/.rubocop_rspec_base.yml | 2 +- rspec-support/.travis.yml | 10 +++++----- rspec-support/Gemfile | 16 ++++++++++++++++ rspec-support/Rakefile | 12 ++++++++---- rspec-support/appveyor.yml | 2 +- rspec-support/rspec-support.gemspec | 2 +- rspec-support/script/clone_all_rspec_repos | 2 +- rspec-support/script/functions.sh | 3 +-- rspec-support/script/predicate_functions.sh | 12 ++++++++++-- rspec-support/script/run_build | 2 +- rspec-support/script/travis_functions.sh | 2 +- .../script/update_rubygems_and_install_bundler | 2 +- 12 files changed, 47 insertions(+), 20 deletions(-) diff --git a/rspec-support/.rubocop_rspec_base.yml b/rspec-support/.rubocop_rspec_base.yml index 4e00c2c55..27144799e 100644 --- a/rspec-support/.rubocop_rspec_base.yml +++ b/rspec-support/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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/rspec-support/.travis.yml b/rspec-support/.travis.yml index cd2c8230f..b455d4c9f 100644 --- a/rspec-support/.travis.yml +++ b/rspec-support/.travis.yml @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # In order to install old Rubies, we need to use old Ubuntu distibution. @@ -22,10 +22,10 @@ rvm: - 2.1 - 2.2.10 - 2.3.8 - - 2.4.9 - - 2.5.7 - - 2.6.5 - - 2.7.0 + - 2.4.10 + - 2.5.8 + - 2.6.6 + - 2.7.1 - ruby-head - ree - rbx-3 diff --git a/rspec-support/Gemfile b/rspec-support/Gemfile index f10540d21..d8b30d910 100644 --- a/rspec-support/Gemfile +++ b/rspec-support/Gemfile @@ -13,6 +13,22 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp end end +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 +else + gem 'rake', '>= 12.3.3' +end + +if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) + gem "childprocess", "< 1.0.0" +elsif RUBY_VERSION < '2.3.0' + gem "childprocess", "< 3.0.0" +else + gem "childprocess", ">= 3.0.0" +end + ### dep for ci/coverage gem 'simplecov', '~> 0.8' diff --git a/rspec-support/Rakefile b/rspec-support/Rakefile index 6756730f1..71c762a86 100644 --- a/rspec-support/Rakefile +++ b/rspec-support/Rakefile @@ -23,8 +23,12 @@ end task :build => :verify_private_key_present -require 'rubocop/rake_task' -desc 'Run RuboCop on the lib directory' -RuboCop::RakeTask.new(:rubocop) do |task| - task.patterns = ['lib/**/*.rb'] +begin + require 'rubocop/rake_task' + desc 'Run RuboCop on the lib directory' + RuboCop::RakeTask.new(:rubocop) do |task| + task.patterns = ['lib/**/*.rb'] + end +rescue LoadError + # No rubocop means no rubocop rake task end diff --git a/rspec-support/appveyor.yml b/rspec-support/appveyor.yml index fb9dfcf0d..6fc48f7db 100644 --- a/rspec-support/appveyor.yml +++ b/rspec-support/appveyor.yml @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. version: "{build}" diff --git a/rspec-support/rspec-support.gemspec b/rspec-support/rspec-support.gemspec index cf06bdcc1..c32cd57d4 100644 --- a/rspec-support/rspec-support.gemspec +++ b/rspec-support/rspec-support.gemspec @@ -35,6 +35,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 1.8.7' - spec.add_development_dependency "rake", "~> 10.0.0" + spec.add_development_dependency "rake", "> 10.0.0" spec.add_development_dependency "thread_order", "~> 1.1.0" end diff --git a/rspec-support/script/clone_all_rspec_repos b/rspec-support/script/clone_all_rspec_repos index 72fa6df32..2e97bc8f1 100755 --- a/rspec-support/script/clone_all_rspec_repos +++ b/rspec-support/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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/rspec-support/script/functions.sh b/rspec-support/script/functions.sh index 127aa3e93..0242a15c4 100644 --- a/rspec-support/script/functions.sh +++ b/rspec-support/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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 )" @@ -187,7 +187,6 @@ function run_all_spec_suites { fold "rspec-core specs" run_spec_suite_for "rspec-core" 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 fold "rspec-rails specs" run_spec_suite_for "rspec-rails" fi diff --git a/rspec-support/script/predicate_functions.sh b/rspec-support/script/predicate_functions.sh index d4736724d..82ef9baaf 100644 --- a/rspec-support/script/predicate_functions.sh +++ b/rspec-support/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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 { @@ -65,8 +65,16 @@ function is_ruby_23_plus { fi } +function is_ruby_25_plus { + if ruby -e "exit(RUBY_VERSION.to_f >= 2.5)"; then + return 0 + else + return 1 + fi +} + function rspec_rails_compatible { - if is_ruby_23_plus; then + if is_ruby_25_plus; then return 0 else return 1 diff --git a/rspec-support/script/run_build b/rspec-support/script/run_build index f8ce7a4cd..8d4e9fbc0 100755 --- a/rspec-support/script/run_build +++ b/rspec-support/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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/rspec-support/script/travis_functions.sh b/rspec-support/script/travis_functions.sh index 3770b23d8..e34a04ecd 100644 --- a/rspec-support/script/travis_functions.sh +++ b/rspec-support/script/travis_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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/rspec-support/script/update_rubygems_and_install_bundler b/rspec-support/script/update_rubygems_and_install_bundler index 1b4ff8b04..bf376353d 100755 --- a/rspec-support/script/update_rubygems_and_install_bundler +++ b/rspec-support/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2019-12-26T17:20:33+00:00 from the rspec-dev repo. +# This file was generated on 2020-04-03T18:53:24+03: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