Class: OsCtld::DB::Repositories

Inherits:
DB::PooledList
  • Object
show all
Defined in:
lib/osctld/db/repositories.rb

Class Method Summary collapse

Class Method Details

.setup(pool) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/osctld/db/repositories.rb', line 5

def self.setup(pool)
  repo = Repository.new(pool, 'default')
rescue Errno::ENOENT
  Commands::Repository::Add.run(
    pool:,
    name: 'default',
    url: 'https://images.vpsadminos.org'
  )
else
  add(repo)
  repo.start
end