Class: Appfuel::Repository::Initializer

Inherits:
Object
  • Object
show all
Defined in:
lib/appfuel/storage/repository/initializer.rb

Instance Method Summary collapse

Instance Method Details

#call(container) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/appfuel/storage/repository/initializer.rb', line 4

def call(container)
  config    = container[:config]
  root_path = container[:root_path]
  path      = config[:repo_mapping_path]
  unless path
    path = "#{root_path}/storage/mappings"
  end

  unless ::File.exist?(path)
    fail "Failed to load repo maps, file #{path} does not exist"
  end
  require path
end