summaryrefslogtreecommitdiff
path: root/Gemfile
blob: 7ee6bbf0a9c9aea3c2d6044a1a5ff73bece6728c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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