Class: Gemstash::GemSource::UpstreamSource
- Inherits:
-
RedirectSource
- Object
- Base
- RedirectSource
- Gemstash::GemSource::UpstreamSource
- Includes:
- Env::Helper, DependencyCaching
- Defined in:
- lib/gemstash/gem_source/upstream_source.rb
Overview
GemSource for gems in an upstream server.
Direct Known Subclasses
Constant Summary
Constants included from DependencyCaching
DependencyCaching::API_REQUEST_LIMIT
Constants included from Logging
Class Method Summary collapse
Instance Method Summary collapse
Methods included from DependencyCaching
#serve_dependencies, #serve_dependencies_json
Methods inherited from RedirectSource
capture_user_agent, matches?, #serve_actual_gem, #serve_add_gem, #serve_add_spec_json, #serve_dependencies, #serve_dependencies_json, #serve_info, #serve_latest_specs, #serve_names, #serve_prerelease_specs, #serve_remove_spec_json, #serve_root, #serve_specs, #serve_unyank, #serve_versions, #serve_yank
Methods inherited from Base
Methods included from Logging
#log, #log_error, logger, reset, setup_logger
Constructor Details
This class inherits a constructor from Gemstash::GemSource::Base
Class Method Details
.rack_env_rewriter ⇒ Object
118 119 120 |
# File 'lib/gemstash/gem_source/upstream_source.rb', line 118 def self.rack_env_rewriter @rack_env_rewriter ||= Gemstash::RackEnvRewriter.new(%r{\A/upstream/(?<upstream_url>[^/]+)}) end |
Instance Method Details
#serve_gem(id) ⇒ Object
126 127 128 |
# File 'lib/gemstash/gem_source/upstream_source.rb', line 126 def serve_gem(id) serve_cached(id, :gem) end |
#serve_marshal(id) ⇒ Object
122 123 124 |
# File 'lib/gemstash/gem_source/upstream_source.rb', line 122 def serve_marshal(id) serve_cached(id, :spec) end |