Class: Gemkeeper::GemSyncer
- Inherits:
-
Object
- Object
- Gemkeeper::GemSyncer
- Defined in:
- lib/gemkeeper/gem_syncer.rb
Overview
Syncs a single gem: checks the server, reuses a built artifact, or builds from source, then uploads. Repo acquisition is delegated to RepoFetcher.
Instance Method Summary collapse
-
#initialize(config, uploader, manifest:) ⇒ GemSyncer
constructor
A new instance of GemSyncer.
- #sync(gem_def) ⇒ Object
Constructor Details
#initialize(config, uploader, manifest:) ⇒ GemSyncer
Returns a new instance of GemSyncer.
9 10 11 12 13 |
# File 'lib/gemkeeper/gem_syncer.rb', line 9 def initialize(config, uploader, manifest:) @config = config @uploader = uploader @fetcher = RepoFetcher.new(manifest, config.repos_path) end |
Instance Method Details
#sync(gem_def) ⇒ Object
15 16 17 |
# File 'lib/gemkeeper/gem_syncer.rb', line 15 def sync(gem_def) gem_def.latest? ? sync_latest(gem_def) : sync_pinned(gem_def) end |