6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/lock_jar/runtime/install.rb', line 6
def install(jarfile_lock, groups = ['default'], opts = {}, &blk)
deps = list(jarfile_lock, groups, { with_locals: false }.merge(opts), &blk)
lockfile = LockJar::Domain::Lockfile.read(jarfile_lock)
if opts[:local_repo].nil? && lockfile.local_repository
opts[:local_repo] = lockfile.local_repository
end
resolver(opts).clear_remote_repositories if lockfile.version.to_f >= 0.11
lockfile.remote_repositories.each do |repo|
resolver(opts).add_remote_repository(repo)
end
files = resolver(opts).download(deps)
files
end
|