Skip to content

Commit a552b5e

Browse files
committed
temp! Temporarily bring back Rails 4.2 to build matrix
1 parent 3218bd4 commit a552b5e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"
2323
before_install:
2424
- script/update_rubygems_and_install_bundler
2525
- script/clone_all_rspec_repos
26+
- script/downgrade_bundler_on_old_rails
2627

2728
before_script:
2829
# Rails 4+ complains with a bundler rails binstub in PROJECT_ROOT/bin/
@@ -84,4 +85,8 @@ matrix:
8485
- rvm: 2.3.8
8586
env: RAILS_VERSION='~> 5.0.0'
8687

88+
# Rails 4.2 REMOVE ME!
89+
- rvm: 2.5.5
90+
env: RAILS_VERSION='~> 4.2.0'
91+
8792
fast_finish: true

script/downgrade_bundler_on_old_rails

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
3+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4+
5+
set -e
6+
source script/functions.sh
7+
8+
if ruby -e "exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0].to_f < 5)"; then
9+
# On Rails versions less than 5, Bundler 2.0 is not supported
10+
echo "Warning dowgrading to older version of Bundler"
11+
echo "Current bundler versions installed: `gem list | grep '^bundler ('`"
12+
13+
gem uninstall -aIx bundler || echo "Warning error occured removing bundler via gem"
14+
15+
rvm @global do gem uninstall -aIx bundler || echo "Warning error occured removing bundler via rvm"
16+
17+
echo "Bundler version list after uninstall: `gem list | grep '^bundler ('`"
18+
19+
gem install bundler -v '1.17.3'
20+
fi

0 commit comments

Comments
 (0)