Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 7e403b7

Browse files
committed
Use rails 4-0 branch
1 parent e9ea95a commit 7e403b7

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

script/clone_all_rspec_repos

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ if is_mri; then
1212
clone_repo "rspec-core"
1313
clone_repo "rspec-expectations"
1414
clone_repo "rspec-mocks"
15-
clone_repo "rspec-rails"
15+
if requires_rspec_rails_maintenance_branch; then
16+
clone_repo "rspec-rails" "4-0-maintenance"
17+
else
18+
clone_repo "rspec-rails"
19+
fi
1620

1721
if rspec_support_compatible; then
1822
clone_repo "rspec-support"

script/functions.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ fi
1919

2020
function clone_repo {
2121
if [ ! -d $1 ]; then # don't clone if the dir is already there
22-
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
22+
if [ -z "$2" ]; then
23+
BRANCH_TO_CLONE="${MAINTENANCE_BRANCH?}";
24+
else
25+
BRANCH_TO_CLONE="$2";
26+
fi;
27+
28+
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?}"
2329
fi;
2430
}
2531

script/predicate_functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ function rspec_rails_compatible {
8181
fi
8282
}
8383

84+
function requires_rspec_rails_maintenance_branch {
85+
if [ "$MAINTENANCE_BRANCH" == "3-10-maintenance" ]; then
86+
return 0
87+
else
88+
return 1
89+
fi
90+
}
91+
8492
function rspec_support_compatible {
8593
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
8694
return 0

0 commit comments

Comments
 (0)