Skip to content

Commit 4b36694

Browse files
committed
Point rspec-rails sub-build
1. Clone rspec-rails' main branch for sub-builds 2. Trick rspec-rails' sub-builds into using 4.0.0.pre ============= Starting rspec-rails specs =============== Running specs for rspec-rails ~/work/rspec-mocks/rspec-rails ~/work/rspec-mocks/rspec-mocks Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Bundler could not find compatible versions for gem "rspec-core": In Gemfile: rspec-core rspec-rails was resolved to 4.1.0.pre, which depends on rspec-core (= 3.11.0.pre) Could not find gem 'rspec-core (= 3.11.0.pre)', which is required by gem 'rspec-rails', in any of the relevant sources: source at `/home/runner/work/rspec-mocks/rspec-core`
1 parent 34f7367 commit 4b36694

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

ci/.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
branches:
1010
- '*'
11+
env:
12+
RSPEC_CI: true
1113
jobs:
1214
test:
1315
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}

ci/script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if is_mri; then
99
clone_repo "rspec-core"
1010
clone_repo "rspec-expectations"
1111
clone_repo "rspec-mocks"
12-
clone_repo "rspec-rails"
12+
clone_repo "rspec-rails" "main"
1313
clone_repo "rspec-support"
1414

1515
popd

ci/script/functions.sh

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

1717
function clone_repo {
1818
if [ ! -d $1 ]; then # don't clone if the dir is already there
19-
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
19+
if [ -z "$2" ]; then
20+
BRANCH_TO_CLONE="$MAINTENANCE_BRANCH"
21+
else
22+
BRANCH_TO_CLONE="$2"
23+
fi
24+
25+
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $BRANCH_TO_CLONE"
2026
fi;
2127
}
2228

0 commit comments

Comments
 (0)