Module: Artifactory::GemImport::GemSpecs
- Defined in:
- lib/artifactory/gem_import/gem_specs.rb,
lib/artifactory/gem_import/gem_specs/specs.rb,
lib/artifactory/gem_import/gem_specs/parser.rb,
lib/artifactory/gem_import/gem_specs/downloader.rb
Defined Under Namespace
Classes: Downloader, Parser, Specs
Class Method Summary
collapse
Class Method Details
.get(repo:, only: /.+/) ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/artifactory/gem_import/gem_specs.rb', line 17
def get(repo:, only: /.+/)
specs = Specs
.new(url: repo.specs_url, headers: repo.)
.specs
rescue Net::HTTPClientException, Net::HTTPFatalError, Net::OpenTimeout, SocketError => err
raise ClientError, "Could not fetch specs. URL: #{repo.specs_url}, Reason: #{err.message}"
else
Specs.filter(specs, only: only).sort
end
|
.missing_gems(source_repo:, target_repo:, only: /.+/) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/artifactory/gem_import/gem_specs.rb', line 10
def missing_gems(source_repo:, target_repo:, only: /.+/)
source_specs = get repo: source_repo, only: only
target_specs = get repo: target_repo, only: only
source_specs - target_specs
end
|