Skip to content

Commit 98755dd

Browse files
committed
Merge pull request rspec#2057 from rspec/update-travis-build-scripts-2015-08-11-for-master
Updates from rspec-dev (2015-08-11)
2 parents d161550 + 76d85d9 commit 98755dd

File tree

8 files changed

+42
-9
lines changed

8 files changed

+42
-9
lines changed

.rubocop_rspec_base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# This file contains defaults for RSpec projects. Individual projects

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
language: ruby

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
version: "{build}"

script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
2+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/functions.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -11,6 +11,12 @@ export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
1111
SPECS_HAVE_RUN_FILE=specs.out
1212
MAINTENANCE_BRANCH=`cat maintenance-branch`
1313

14+
# Don't allow rubygems to pollute what's loaded. Also, things boot faster
15+
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+
16+
if is_mri_192_plus; then
17+
export RUBYOPT="--disable=gem"
18+
fi
19+
1420
function clone_repo {
1521
if [ ! -d $1 ]; then # don't clone if the dir is already there
1622
travis_retry eval "git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
@@ -46,10 +52,15 @@ function run_cukes {
4652
# the bin/cucumber approach below. That approach is faster
4753
# (as it avoids the bundler tax), so we use it on rubies where we can.
4854
bundle exec cucumber --strict
55+
elif is_jruby; then
56+
# For some reason JRuby doesn't like our improved bundler setup
57+
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
58+
PATH="${PWD}/bin:$PATH" \
59+
bin/cucumber --strict
4960
else
5061
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
5162
# and PATH for those that are using `rspec` or `rake`.
52-
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
63+
RUBYOPT="${RUBYOPT} -I${PWD}/../bundle -rbundler/setup" \
5364
PATH="${PWD}/bin:$PATH" \
5465
bin/cucumber --strict
5566
fi

script/predicate_functions.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {
@@ -11,6 +11,16 @@ function is_mri {
1111
fi;
1212
}
1313

14+
function is_jruby {
15+
if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
16+
# RUBY_ENGINE only returns 'ruby' on MRI.
17+
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
18+
return 0
19+
else
20+
return 1
21+
fi;
22+
}
23+
1424
function is_mri_192 {
1525
if is_mri; then
1626
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then
@@ -23,6 +33,18 @@ function is_mri_192 {
2333
fi
2434
}
2535

36+
function is_mri_192_plus {
37+
if is_mri; then
38+
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then
39+
return 0
40+
else
41+
return 1
42+
fi
43+
else
44+
return 1
45+
fi
46+
}
47+
2648
function is_mri_2plus {
2749
if is_mri; then
2850
if ruby -e "exit(RUBY_VERSION.to_f > 2.0)"; then

script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
2+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/travis_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-01T02:04:28-04:00 from the rspec-dev repo.
1+
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:

0 commit comments

Comments
 (0)