Skip to content

Commit 47ddd40

Browse files
committed
Merge pull request #1522 from rspec/update-travis-build-scripts-2016-01-06-for-3-4-maintenance
Updates from rspec-dev (2016-01-06)
2 parents f8f802f + 88cb35f commit 47ddd40

File tree

8 files changed

+31
-11
lines changed

8 files changed

+31
-11
lines changed

.rubocop_rspec_base.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-06T09:36:22-08: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
@@ -101,9 +101,9 @@ Proc:
101101
RedundantReturn:
102102
AllowMultipleReturnValues: true
103103

104-
# We have to rescue Exception in the `raise_error` matcher for it to work properly.
104+
# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue`
105105
RescueException:
106-
Enabled: false
106+
Enabled: true
107107

108108
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
109109
SignalException:

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-11T23:21:08+01:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-06T09:36:22-08: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}"

example_app_generator/generate_app.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# Remove the existing rails version so we can properly use master or other
1717
# edge branches
1818
gsub_file 'Gemfile', /^.*\bgem 'rails.*$/, ''
19+
gsub_file "Gemfile", /.*debugger.*/, ''
1920

2021
# Nokogiri version is pinned in rspec-rails' Gemfile since it tend to cause installation problems
2122
# on Travis CI, so we pin nokogiri in this example app also.

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-11T23:21:08+01:00 from the rspec-dev repo.
2+
# This file was generated on 2016-01-06T09:36:22-08: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: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-06T09:36:22-08: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 )"
@@ -52,6 +52,11 @@ function run_cukes {
5252
# the bin/cucumber approach below. That approach is faster
5353
# (as it avoids the bundler tax), so we use it on rubies where we can.
5454
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
5560
else
5661
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
5762
# and PATH for those that are using `rspec` or `rake`.
@@ -78,7 +83,11 @@ function run_spec_suite_for {
7883
pushd ../$1
7984
unset BUNDLE_GEMFILE
8085
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
81-
travis_retry eval "bundle install $bundle_install_flags"
86+
if is_mri_192_plus; then
87+
travis_retry eval "RUBYOPT=$RUBYOPT:'--enable rubygems' bundle install $bundle_install_flags"
88+
else
89+
travis_retry eval "bundle install $bundle_install_flags"
90+
fi
8291
run_specs_and_record_done
8392
popd
8493
else

script/predicate_functions.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-06T09:36:22-08: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
@@ -25,7 +35,7 @@ function is_mri_192 {
2535

2636
function is_mri_192_plus {
2737
if is_mri; then
28-
if ruby -e "exit(RUBY_VERSION.to_f > 1.9)"; then
38+
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then
2939
return 0
3040
else
3141
return 1

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-11T23:21:08+01:00 from the rspec-dev repo.
2+
# This file was generated on 2016-01-06T09:36:22-08: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-11T23:21:08+01:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-06T09:36:22-08: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)