Module: Gel::Catalog::Common
- Included in:
- CompactIndex, DependencyIndex, LegacyIndex
- Defined in:
- lib/gel/catalog/common.rb
Instance Method Summary collapse
- #gem_info(gem_name) ⇒ Object
- #initialize(uri, uri_identifier, httpool:, work_pool:, cache:) ⇒ Object
Instance Method Details
#gem_info(gem_name) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gel/catalog/common.rb', line 25 def gem_info(gem_name) gems_to_refresh = [] @monitor.synchronize do if info = _info(gem_name) gems_to_refresh = walk_gem_dependencies(gem_name, info) return info end end refresh_gem gem_name, true @monitor.synchronize do info = nil @refresh_cond.wait_until { info = _info(gem_name) } gems_to_refresh = walk_gem_dependencies(gem_name, info) info end ensure gems_to_refresh.each do |dep_name| refresh_gem dep_name end end |
#initialize(uri, uri_identifier, httpool:, work_pool:, cache:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gel/catalog/common.rb', line 7 def initialize(uri, uri_identifier, httpool:, work_pool:, cache:) @uri = uri @uri_identifier = uri_identifier @httpool = httpool @work_pool = work_pool @cache = cache @pinboard = nil @monitor = Monitor.new @refresh_cond = @monitor.new_cond @done_refresh = {} @gem_info = {} @error = nil end |