Module: Bundler

Defined in:
lib/bundler/local_development.rb

Overview

Provides a simple way to switch between local and installed gems.

  • Call `Bundler.development_gems=[]` in your Gemfile, to configure

the default set of gems to override with local copies.

  • Set $DEVELOPMENT_GEMS to add extra gems to this list.

If the $GEM_DEV environment variable is set, bundler will search for gems in the path specified by $GEM_DEV_DIR (or $HOME/code/gems if not set.)

Defined Under Namespace

Classes: Definition, Dsl

Class Method Summary collapse

Class Method Details

.development_gemsObject


16
17
18
19
20
21
22
23
24
25
# File 'lib/bundler/local_development.rb', line 16

def development_gems
  # If $DEV_GEMS is provided, append to @@development_gems
  if ENV['DEV_GEMS']
    (@@development_gems ||= []) +
    ENV['DEV_GEMS'].to_s.split(';').map(&:strip).select{|s| s != "" }
  # Otherwise, default is to make all gems local
  else
    @@development_gems ||= [:all]
  end
end

.development_gems=(search_strings) ⇒ Object


13
14
15
# File 'lib/bundler/local_development.rb', line 13

def development_gems=(search_strings)
  @@development_gems = [search_strings].flatten
end