Permalink
Browse files

Change git dependency from canonical gem repository to fork

 - Forked version includes additional hooks for grabbing git metadata
  • Loading branch information...
1 parent 7f2b71b commit 2807cae6877813793948650a31a5d9c5cae16c06 @kattrali kattrali committed May 25, 2012
Showing with 27 additions and 13 deletions.
  1. +1 −0 .gitignore
  2. +26 −13 Rakefile
View
@@ -47,3 +47,4 @@ vendor/swt
vendor/jruby-complete.jar
vendor/redcar-xulrunner-win
vendor/zip
+vendor/json
View
@@ -26,24 +26,37 @@ end
desc "Download dependencies"
task :init do
- vendor = REDCAR_ROOT + "/vendor"
+ vendor = File.join(REDCAR_ROOT, "vendor")
sh("curl -L #{JRUBY_JAR_LOCATION} > #{vendor}/jruby-complete.jar")
- gems = ["git",
-# "spoon",
- "lucene", #"~> 0.5.0.beta.1",
- "jruby-openssl",
- "ruby-blockcache",
- "bouncy-castle-java",
- "swt",
- "plugin_manager",
- "redcar-xulrunner-win",
- "zip"
- ]#, ">= 1.5")
+ github_exts = {
+ "mscharley/ruby-git" => "git"
+ }
+
+ gems = [
+ # "git",
+ # "spoon",
+ "lucene", #"~> 0.5.0.beta.1",
+ "jruby-openssl",
+ "ruby-blockcache",
+ "bouncy-castle-java",
+ "swt",
+ "plugin_manager",
+ "redcar-xulrunner-win",
+ "zip"
+ ]#, ">= 1.5")
+
+ github_exts.each do |repo,reponame|
+ target = File.join(vendor,reponame)
+ unless File.exists?(target)
+ sh("git clone https://github.com/#{repo}.git #{target}")
+ end
+ end
+
gems.each do |gem_name|
puts "fetching #{gem_name}"
data = JSON.parse(Net::HTTP.get(URI.parse("http://rubygems.org/api/v1/gems/#{gem_name}.json")))
- gem_file = "#{vendor}/#{gem_name}-#{data["version"]}.gem"
+ gem_file = "#{vendor}/#{gem_name}-#{data["version"]}.gem"
sh("curl -L #{data["gem_uri"]} > #{gem_file}")
gem_dir = "#{vendor}/#{gem_name}"
rm_rf(gem_dir)

0 comments on commit 2807cae

Please sign in to comment.