Skip to content

Commit

Permalink
[support] Sync build with master
Browse files Browse the repository at this point in the history
This commit was imported from rspec/rspec-support@3fd32d5.
  • Loading branch information
JonRowe committed May 2, 2020
1 parent 89b4886 commit 1dc762e
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 20 deletions.
2 changes: 1 addition & 1 deletion 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
Expand Down
10 changes: 5 additions & 5 deletions 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.
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions rspec-support/Gemfile
Expand Up @@ -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'

Expand Down
12 changes: 8 additions & 4 deletions rspec-support/Rakefile
Expand Up @@ -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
2 changes: 1 addition & 1 deletion 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}"
Expand Down
2 changes: 1 addition & 1 deletion rspec-support/rspec-support.gemspec
Expand Up @@ -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
2 changes: 1 addition & 1 deletion 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
Expand Down
3 changes: 1 addition & 2 deletions 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 )"
Expand Down Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions 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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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:
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit 1dc762e

Please sign in to comment.