class NexusAPI::ConfigManager

Public Class Methods

new(config_path:) click to toggle source
# File lib/nexus_api/config_manager.rb, line 5
def initialize(config_path:)
  if File.exist?(config_path)
    @config = YAML.safe_load(File.read(config_path)) || {}
  else
    raise "ERROR: Specified config '#{config_path}' does not exist."
  end
end

Public Instance Methods

assets_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 13
def assets_repository
  @config['assets']
end
components_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 17
def components_repository
  @config['components']
end
maven_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 29
def maven_repository
  @config['maven']
end
npm_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 33
def npm_repository
  @config['npm']
end
pypi_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 37
def pypi_repository
  @config['pypi']
end
raw_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 41
def raw_repository
  @config['raw']
end
rubygems_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 45
def rubygems_repository
  @config['rubygems']
end
search_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 21
def search_repository
  @config['search']
end
tag_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 25
def tag_repository
  @config['tag']
end
yum_repository() click to toggle source
# File lib/nexus_api/config_manager.rb, line 49
def yum_repository
  @config['yum']
end