Skip to content

Commit fa5c197

Browse files
committed
Clone rspec-metagem correctly
1 parent bce9bd1 commit fa5c197

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Gemfile-rspec-dependencies

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
44
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
55
gem lib, :path => library_path, :require => false
66
else
7-
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch, :require => false
7+
if lib == 'rspec'
8+
gem 'rspec', :git => "https://github.com/rspec/rspec-metagem.git", :branch => branch, :require => false
9+
else
10+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch, :require => false
11+
end
812
end
913
end

script/clone_all_rspec_repos

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source script/functions.sh
77

88
pushd ..
99

10-
clone_repo "rspec"
10+
clone_repo "rspec-metagem" "rspec"
1111
clone_repo "rspec-core"
1212
clone_repo "rspec-expectations"
1313
clone_repo "rspec-mocks"

script/functions.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ function documentation_enforced {
5454
}
5555

5656
function clone_repo {
57-
if [ ! -d $1 ]; then # don't clone if the dir is already there
58-
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
57+
if [ -z "$2" ]; then
58+
DIR_TARGET="$1"
59+
else
60+
DIR_TARGET="$2"
61+
fi
62+
63+
if [ ! -d $DIR_TARGET ]; then # don't clone if the dir is already there
64+
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH $DIR_TARGET"
5965
fi;
6066
}
6167

0 commit comments

Comments
 (0)