Skip to content

Commit

Permalink
Merge pull request #2244 from rspec/update-travis-build-scripts-2019-…
Browse files Browse the repository at this point in the history
…12-20-for-master

Update travis build scripts 2019 12 20 for master
  • Loading branch information
JonRowe committed Jan 12, 2020
1 parent cc11915 commit 203ea45
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 40 deletions.
12 changes: 0 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,4 @@ matrix:
- rvm: 2.3.8
env: RAILS_VERSION='~> 5.0.0'

# Rails 4.2 Builds >= 1.9.3
- rvm: 2.5.5
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.4.6
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.4.6
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.3.8
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.3.8
env: RAILS_VERSION='~> 4.2.0'

fast_finish: true
9 changes: 0 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,12 @@ else
gem 'sqlite3', '~> 1.3.6', platforms: [:ruby]
end

if RUBY_VERSION >= '2.4.0'
gem 'json', '>= 2.0.2'
end

gem 'ffi', '~> 1.9.25'

gem 'rake', '~> 12'

gem 'mime-types', "~> 3"

# Version 5.12 of minitest requires Ruby 2.4
if RUBY_VERSION < '2.4.0'
gem 'minitest', '< 5.12.0'
end

gem 'capybara', '~> 2.13', require: false

if MAJOR < 6
Expand Down
4 changes: 0 additions & 4 deletions Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ else
gem "puma"
end

if RUBY_VERSION < "2.5"
gem "sprockets", "~> 3.0"
end

if version.gsub(/[^\d\.]/,'').to_f >= 6.0
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
else
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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.

version: "{build}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def capture_exec(*ops)
# Necessary to ignore warnings from Rails code base
out = io.readlines.
reject { |line| line =~ /warning: circular argument reference/ }.
reject { |line| line =~ /Gem::Specification#rubyforge_project=/ }.
join.
chomp
CaptureExec.new(out, $?.exitstatus)
Expand Down
3 changes: 3 additions & 0 deletions script/after_update_travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ set -e

echo "Restoring custom Travis config"
mv .travis.yml{.update_backup,}

echo "Removing Base rubocop, Rspec-Rails does not use it"
rm '.rubocop_rspec_base.yml'
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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
Expand Down
8 changes: 5 additions & 3 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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 )"
source $SCRIPT_DIR/travis_functions.sh
source $SCRIPT_DIR/predicate_functions.sh

# If JRUBY_OPTS isn't set, use these.
# see http://docs.travis-ci.com/user/ci-environment/
# see https://docs.travis-ci.com/user/ci-environment/
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
SPECS_HAVE_RUN_FILE=specs.out
MAINTENANCE_BRANCH=`cat maintenance-branch`
Expand Down Expand Up @@ -187,7 +187,9 @@ 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"
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
if rspec_rails_compatible; then
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
fi

if rspec_support_compatible; then
fold "rspec-support specs" run_spec_suite_for "rspec-support"
Expand Down
10 changes: 5 additions & 5 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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 {
Expand Down Expand Up @@ -57,16 +57,16 @@ function is_mri_2plus {
fi
}

function is_ruby_23 {
if ruby -e "exit(RUBY_VERSION.to_f == 2.3)"; then
function is_ruby_23_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
return 0
else
return 1
fi
}

function is_ruby_23_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
function rspec_rails_compatible {
if is_ruby_23_plus; then
return 0
else
return 1
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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:
Expand Down
4 changes: 2 additions & 2 deletions script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
# This file was generated on 2019-12-18T14:01:39+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
yes | gem update --system
gem install bundler
yes | gem install bundler
else
echo "Warning installing older versions of Rubygems / Bundler"
gem update --system '2.7.8'
Expand Down
2 changes: 1 addition & 1 deletion spec/sanity_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def with_clean_env
end
end

it "passes when libraries are required" do
it "passes when libraries are required", unless: RSpec::Support::Ruby.jruby? do
script = tmp_root.join("pass_sanity_check")
File.open(script, "w") do |f|
f.write <<-EOF.gsub(/^\s+\|/, '')
Expand Down

0 comments on commit 203ea45

Please sign in to comment.