Class: Aptinabox::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/aptinabox/config.rb

Class Method Summary collapse

Class Method Details

.config_pathObject



5
6
7
# File 'lib/aptinabox/config.rb', line 5

def self.config_path
  File.join(Gem.user_home, '.gem', 'aptinabox')
end

.reprepro_label_listObject



19
20
21
22
23
24
25
26
# File 'lib/aptinabox/config.rb', line 19

def self.reprepro_label_list
  reprepro_label_list = Gem.configuration.load_file(config_path)['reprepro_label_list']
  unless reprepro_label_list
    raise ArgumentError, "reprepro_label_list not set in #{config_path}"
  end

  return reprepro_label_list
end

.reprepro_pathObject



10
11
12
13
14
15
16
17
# File 'lib/aptinabox/config.rb', line 10

def self.reprepro_path
  reprepro_path = Gem.configuration.load_file(config_path)['reprepro_path']
  unless reprepro_path
    raise ArgumentError, "reprepro_path not set in #{config_path}"
  end

  return reprepro_path
end