Module: Bundler

Defined in:
lib/erp_tech_svcs/application_installer.rb,
lib/erp_tech_svcs/application_installer.rb

Defined Under Namespace

Classes: RubygemsIntegration

Class Method Summary collapse

Class Method Details

.load(reload = false) ⇒ Object



41
42
43
# File 'lib/erp_tech_svcs/application_installer.rb', line 41

def self.load(reload=false)
  reload ? (@load = Runtime.new(root, definition(true))) : (@load ||= Runtime.new(root, definition))
end

.setup(reload = false, *groups) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/erp_tech_svcs/application_installer.rb', line 24

def self.setup(reload=false, *groups)
  # Just return if all groups are already loaded
  return @setup if (defined?(@setup) && !reload)

  if groups.empty?
    # Load all groups, but only once
    @setup = load(reload).setup
  else
    @completed_groups ||= []
    # Figure out which groups haven't been loaded yet
    unloaded = groups - @completed_groups
    # Record groups that are now loaded
    @completed_groups = groups
    unloaded.any? ? load(reload).setup(*groups) : load
  end
end