This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree 3 files changed +20
-2
lines changed
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ if is_mri; then
12
12
clone_repo " rspec-core"
13
13
clone_repo " rspec-expectations"
14
14
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
16
20
17
21
if rspec_support_compatible; then
18
22
clone_repo " rspec-support"
Original file line number Diff line number Diff line change 19
19
20
20
function clone_repo {
21
21
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?} "
23
29
fi ;
24
30
}
25
31
Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ function rspec_rails_compatible {
81
81
fi
82
82
}
83
83
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
+
84
92
function rspec_support_compatible {
85
93
if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
86
94
return 0
You can’t perform that action at this time.
0 commit comments