summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-22 14:48:23 -0700
committerAndre Arko <andre@arko.net>2010-04-22 14:48:33 -0700
commit4097d78cecda8e63ebb471455d7d286bebd30c16 (patch)
tree9aef6c465623400e7dd42324fbf23e0e5fd80889
parent3e1563427a9d033e07a948da24b2c365d9ed8618 (diff)
downloadbundler-4097d78cecda8e63ebb471455d7d286bebd30c16.tar.gz
Fetch submodules for git sources
Closes #299
-rw-r--r--CHANGELOG.md10
-rw-r--r--lib/bundler/source.rb2
-rw-r--r--spec/install/git_spec.rb18
3 files changed, 30 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 84c5b619ea..2f351a13e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 0.9.24 (April 22, 2010)
+
+Features:
+
+ -
+
+Bugfixes:
+
+ -
+
## 0.9.23 (April 20, 2010)
Bugfixes:
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index e55e2464f7..efa15a47f9 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -395,6 +395,8 @@ module Bundler
Dir.chdir(path) do
git "fetch --force --quiet"
git "reset --hard #{revision}"
+ git "submodule init"
+ git "submodule update"
end
end
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index 5403cfa4dc..a732caa8c4 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -307,4 +307,22 @@ describe "bundle install with git sources" do
should_be_installed "forced 1.0"
end
+ it "handles repos with submodules" do
+ build_git "submodule", "1.0"
+ build_git "has_submodule", "1.0" do |s|
+ s.add_dependency "submodule"
+ end
+ Dir.chdir(lib_path('has_submodule-1.0')) do
+ `git submodule add #{lib_path('submodule-1.0')}`
+ `git commit -m "submodulator"`
+ end
+
+ install_gemfile <<-G
+ git "#{lib_path('has_submodule-1.0')}"
+ gem "has_submodule"
+ G
+
+ should_be_installed "has_submodule 1.0"
+ end
+
end