Class: Gemkeeper::GemRepoResolver
- Inherits:
-
Object
- Object
- Gemkeeper::GemRepoResolver
- Defined in:
- lib/gemkeeper/gem_repo_resolver.rb
Overview
Resolves gem candidates (from lockfile sources) to git repo URLs. GIT-sourced gems are added automatically; private gem registry entries are inferred where possible (GitHub Packages) or prompted interactively.
Constant Summary collapse
- SKIP_INPUT =
"skip"
Instance Method Summary collapse
-
#initialize(candidates:, manifest:, input: $stdin, output: $stdout) ⇒ GemRepoResolver
constructor
A new instance of GemRepoResolver.
- #resolve! ⇒ Object
Constructor Details
#initialize(candidates:, manifest:, input: $stdin, output: $stdout) ⇒ GemRepoResolver
Returns a new instance of GemRepoResolver.
10 11 12 13 14 15 |
# File 'lib/gemkeeper/gem_repo_resolver.rb', line 10 def initialize(candidates:, manifest:, input: $stdin, output: $stdout) @candidates = candidates @manifest = manifest @input = input @output = output end |
Instance Method Details
#resolve! ⇒ Object
17 18 19 20 21 22 |
# File 'lib/gemkeeper/gem_repo_resolver.rb', line 17 def resolve! unresolvable = [] @candidates.each { |candidate| resolve_candidate(candidate, unresolvable) } raise_unresolvable(unresolvable) if unresolvable.any? @manifest end |