summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-10-23 03:50:52 -0700
committerelijah <elijah@riseup.net>2012-10-23 03:50:52 -0700
commitd385da49ef6c17c64cf8be66002f5744c1ee38f7 (patch)
tree6e19772d6adf2b302e73dbd9229eb3618d19bab0 /Gemfile
parent3a27d87e6a28e4b58842ca4cb7a1ddc4e6637b36 (diff)
patched supply_drop gem and vendored it
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
index e45e65f..7ee6bbf 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,2 +1,32 @@
source :rubygems
gemspec
+
+#
+# Specify support gems used that we might also develop locally.
+#
+# Available options:
+#
+# :dev_path - the development path of the gem. this path is used if running in 'development mode'.
+#
+# :vendor_path - where this gem is vendored. this path is used if it exists and we are running in 'production mode'
+#
+development_gems = {
+ 'supply_drop' => {:dev_path => '../gems/supply_drop', :vendor_path => 'vendor/supply_drop'}
+}
+
+#
+# A little bit of code to magically pick the correct gem
+#
+
+mode = :production
+
+gem_root = File.dirname(__FILE__)
+path_key = mode == :development ? :dev_path : :vendor_path
+development_gems.each do |gem_name, options|
+ path = File.expand_path(options[path_key], gem_root)
+ if File.directory?(path)
+ gem gem_name, :path => path
+ else
+ gem gem_name
+ end
+end \ No newline at end of file