Class: GemCollector::UpdateRepository
- Inherits:
-
Object
- Object
- GemCollector::UpdateRepository
- Defined in:
- app/services/gem_collector/update_repository.rb
Instance Method Summary collapse
Instance Method Details
#run(repository_id:, full_name:, html_url:, ssh_url:) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/services/gem_collector/update_repository.rb', line 2 def run(repository_id:, full_name:, html_url:, ssh_url:) host = Addressable::URI.parse(html_url).host repo = GemCollector::Repository.find_or_initialize_by(site: host, repository_id: repository_id) repo.full_name = full_name repo.ssh_url = ssh_url repo.save! repo end |