Module: LibGems

Defined in:
lib/libgems_ext/libgems.rb,
lib/libgems_ext/installer.rb,
lib/libgems_ext/config_file.rb,
lib/libgems_ext/spec_fetcher.rb,
lib/libgems_ext/dependency_installer.rb

Defined Under Namespace

Classes: ConfigFile, DependencyInstaller, Installer, SpecFetcher

Class Method Summary collapse

Class Method Details

.config_fileObject



20
21
22
# File 'lib/libgems_ext/libgems.rb', line 20

def self.config_file
  File.join LibGems.user_home, '.spaderc'
end

.default_dirObject



12
13
14
# File 'lib/libgems_ext/libgems.rb', line 12

def self.default_dir
  File.join LibGems.user_home, Spade::SPADE_DIR
end

.default_sourcesObject



4
5
6
# File 'lib/libgems_ext/libgems.rb', line 4

def self.default_sources
  %w[https://sproutcutter.heroku.com/]
end

.dirObject



35
36
37
38
# File 'lib/libgems_ext/libgems.rb', line 35

def self.dir
  set_home(ENV['SPADE_HOME'] || LibGems.configuration.home || default_dir) unless @gem_home
  @gem_home
end

.hostObject



8
9
10
# File 'lib/libgems_ext/libgems.rb', line 8

def self.host
  @host ||= "https://sproutcutter.heroku.com"
end

.pathObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/libgems_ext/libgems.rb', line 24

def self.path
  @gem_path ||= nil

  unless @gem_path then
    paths = [ENV['SPADE_PATH'] || LibGems.configuration.path || default_path]
    set_paths paths.compact.join(File::PATH_SEPARATOR)
  end

  @gem_path
end

.user_dirObject



16
17
18
# File 'lib/libgems_ext/libgems.rb', line 16

def self.user_dir
  File.join LibGems.user_home, Spade::SPADE_DIR
end