File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
8
8
SPECS_HAVE_RUN_FILE=specs.out
9
9
MAINTENANCE_BRANCH=` cat maintenance-branch`
10
10
11
+ # Don't allow rubygems to pollute what's loaded. Also, things boot faster
12
+ # without the extra load time of rubygems. Only works on MRI Ruby 1.9+
13
+ if is_mri_192_plus; then
14
+ export RUBYOPT=" --disable=gem"
15
+ fi
16
+
11
17
function clone_repo {
12
18
if [ ! -d $1 ]; then # don't clone if the dir is already there
13
19
travis_retry eval " git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH "
@@ -74,7 +80,11 @@ function run_spec_suite_for {
74
80
pushd ../$1
75
81
unset BUNDLE_GEMFILE
76
82
bundle_install_flags=` cat .travis.yml | grep bundler_args | tr -d ' "' | grep -o " .*" `
77
- travis_retry eval " bundle install $bundle_install_flags "
83
+ if is_mri_192_plus; then
84
+ travis_retry eval " RUBYOPT=$RUBYOPT :'--enable rubygems' bundle install $bundle_install_flags "
85
+ else
86
+ travis_retry eval " bundle install $bundle_install_flags "
87
+ fi
78
88
run_specs_and_record_done
79
89
popd
80
90
else
Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ function is_mri_192 {
30
30
fi
31
31
}
32
32
33
+ function is_mri_192_plus {
34
+ if is_mri; then
35
+ if ruby -e " exit(RUBY_VERSION.to_f > 1.8)" ; then
36
+ return 0
37
+ else
38
+ return 1
39
+ fi
40
+ else
41
+ return 1
42
+ fi
43
+ }
44
+
33
45
function is_mri_2plus {
34
46
if is_mri; then
35
47
if ruby -e " exit(RUBY_VERSION.to_f > 2.0)" ; then
You can’t perform that action at this time.
0 commit comments