Skip to content

Commit

Permalink
[core] Sync build with master
Browse files Browse the repository at this point in the history
This commit was imported from rspec/rspec-core@4803790.
  • Loading branch information
JonRowe committed May 2, 2020
1 parent bf6d208 commit 69f29a2
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 39 deletions.
2 changes: 1 addition & 1 deletion rspec-core/.rubocop_rspec_base.yml
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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-core/.travis.yml
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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
8 changes: 4 additions & 4 deletions rspec-core/Gemfile
Expand Up @@ -12,12 +12,12 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
end
end

if RUBY_VERSION >= '2.0.0'
gem 'rake', '>= 10.0.0'
elsif RUBY_VERSION >= '1.9.3'
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', '< 11.0.0' # rake 11 requires Ruby 1.9.3 or later
gem 'rake', '> 12.3.2'
end

gem 'yard', '~> 0.9.24', :require => false
Expand Down
2 changes: 1 addition & 1 deletion rspec-core/appveyor.yml
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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-core/script/clone_all_rspec_repos
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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-core/script/functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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
20 changes: 2 additions & 18 deletions rspec-core/script/predicate_functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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 @@ -73,18 +73,6 @@ function is_ruby_25_plus {
fi
}

function is_mri_27 {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f == 2.7)"; then
return 0
else
return 1
fi
else
return 1
fi
}

function rspec_rails_compatible {
if is_ruby_25_plus; then
return 0
Expand All @@ -109,11 +97,7 @@ function additional_specs_available {
function documentation_enforced {
if [ -x ./bin/yard ]; then
if is_mri_2plus; then
if is_mri_27; then
return 1
else
return 0
fi
return 0
else
return 1
fi
Expand Down
2 changes: 1 addition & 1 deletion rspec-core/script/run_build
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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-core/script/travis_functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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-core/script/update_rubygems_and_install_bundler
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# This file was generated on 2020-04-03T18:53:21+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
4 changes: 3 additions & 1 deletion rspec-core/spec/rspec/core/example_spec.rb
Expand Up @@ -443,7 +443,9 @@ def assert(val)

context 'memory leaks, see GH-321, GH-1921' do
def self.reliable_gc
0 != GC.method(:start).arity # older Rubies don't give us options to ensure a full GC
# older Rubies don't give us options to ensure a full GC
# TruffleRuby GC.start arity matches but GC.disable and GC.enable are mock implementations
0 != GC.method(:start).arity && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == "truffleruby")
end

def expect_gc(opts)
Expand Down
2 changes: 1 addition & 1 deletion rspec-core/spec/rspec/core/rake_task_spec.rb
Expand Up @@ -170,7 +170,7 @@ def silence_output(&block)

expect {
task.with_clean_environment = true
task.ruby_opts = '-e "puts \"Environment: #{ENV.keys}\""'
task.ruby_opts = '-e "puts \"Environment: #{ENV.keys.sort.inspect}\""'
task.run_task false
}.to avoid_outputting.to_stderr.and output(essential_shell_variables).to_stdout_from_any_process
end
Expand Down
5 changes: 3 additions & 2 deletions rspec-core/spec/support/helper_methods.rb
Expand Up @@ -15,8 +15,9 @@ def ignoring_warnings
end

# In Ruby 2.7 taint was removed and has no effect, whilst SAFE warns that it
# has no effect and will become a normal varible in 3.0.
if RUBY_VERSION >= '2.7'
# has no effect and will become a normal varible in 3.0. Other engines do not
# implement SAFE.
if RUBY_VERSION >= '2.7' || (defined?(RUBY_ENGINE) && RUBY_ENGINE != "ruby")
def with_safe_set_to_level_that_triggers_security_errors
yield
end
Expand Down

0 comments on commit 69f29a2

Please sign in to comment.