Skip to content

Commit 2dde068

Browse files
committed
extract support compat and use for clone too
1 parent 8966a58 commit 2dde068

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

travis/script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if is_mri; then
1010
clone_repo "rspec-expectations"
1111
clone_repo "rspec-mocks"
1212

13-
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ]; then
13+
if rspec_support_compatible; then
1414
clone_repo "rspec-support"
1515
fi
1616

travis/script/functions.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ function is_mri_192 {
4949
fi
5050
}
5151

52+
function rspec_support_compatible {
53+
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
54+
return 0
55+
else
56+
return 1
57+
fi
58+
}
59+
60+
5261
function clone_repo {
5362
if [ ! -d $1 ]; then # don't clone if the dir is already there
5463
travis_retry git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH

travis/script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if is_mri; then
1111
run_spec_suite_for "rspec-expectations"
1212
run_spec_suite_for "rspec-mocks"
1313

14-
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
14+
if rspec_support_compatible; then
1515
run_spec_suite_for "rspec-support"
1616
fi
1717
else

0 commit comments

Comments
 (0)