Skip to content

Updates from rspec-dev (2016-01-06) #1522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
Expand Down Expand Up @@ -101,9 +101,9 @@ Proc:
RedundantReturn:
AllowMultipleReturnValues: true

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

# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
SignalException:
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 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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
1 change: 1 addition & 0 deletions example_app_generator/generate_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Remove the existing rails version so we can properly use master or other
# edge branches
gsub_file 'Gemfile', /^.*\bgem 'rails.*$/, ''
gsub_file "Gemfile", /.*debugger.*/, ''

# Use our version of RSpec and Rails
append_to_file 'Gemfile', <<-EOT.gsub(/^ +\|/, '')
Expand Down
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 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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
13 changes: 11 additions & 2 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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 )"
Expand Down Expand Up @@ -52,6 +52,11 @@ function run_cukes {
# the bin/cucumber approach below. That approach is faster
# (as it avoids the bundler tax), so we use it on rubies where we can.
bundle exec cucumber --strict
elif is_jruby; then
# For some reason JRuby doesn't like our improved bundler setup
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
PATH="${PWD}/bin:$PATH" \
bin/cucumber --strict
else
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
# and PATH for those that are using `rspec` or `rake`.
Expand All @@ -78,7 +83,11 @@ function run_spec_suite_for {
pushd ../$1
unset BUNDLE_GEMFILE
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
travis_retry eval "bundle install $bundle_install_flags"
if is_mri_192_plus; then
travis_retry eval "RUBYOPT=$RUBYOPT:'--enable rubygems' bundle install $bundle_install_flags"
else
travis_retry eval "bundle install $bundle_install_flags"
fi
run_specs_and_record_done
popd
else
Expand Down
14 changes: 12 additions & 2 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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 All @@ -11,6 +11,16 @@ function is_mri {
fi;
}

function is_jruby {
if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
# RUBY_ENGINE only returns 'ruby' on MRI.
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
return 0
else
return 1
fi;
}

function is_mri_192 {
if is_mri; then
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then
Expand All @@ -25,7 +35,7 @@ function is_mri_192 {

function is_mri_192_plus {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f > 1.9)"; then
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; 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 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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 2015-08-11T23:21:08+01:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T09:36:22-08: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