method
specs
v2_6_3 -
Show latest stable
- Class:
Bundler::Definition
specs()public
For given dependency list returns a SpecSet with Gemspec of all the required dependencies.
1. The method first resolves the dependencies specified in Gemfile 2. After that it tries and fetches gemspec of resolved dependencies
@return [Bundler::SpecSet]
# File lib/bundler/definition.rb, line 167
def specs
@specs ||= begin
begin
specs = resolve.materialize(Bundler.settings[:cache_all_platforms] ? dependencies : requested_dependencies)
rescue GemNotFound => e # Handle yanked gem
gem_name, gem_version = extract_gem_info(e)
locked_gem = @locked_specs[gem_name].last
raise if locked_gem.nil? || locked_gem.version.to_s != gem_version || !@remote
raise GemNotFound, "Your bundle is locked to #{locked_gem}, but that version could not " "be found in any of the sources listed in your Gemfile. If you haven't changed sources, " "that means the author of #{locked_gem} has removed it. You'll need to update your bundle " "to a version other than #{locked_gem} that hasn't been removed in order to install."
end
unless specs["bundler"].any?
bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
specs["bundler"] = bundler
end
specs
end
end Related methods
- Instance methods
- add_current_platform
- add_platform
- current_dependencies
- ensure_equivalent_gemfile_and_lockfile
- find_indexed_specs
- find_resolved_spec
- gem_version_promoter
- groups
- has_local_dependencies?
- has_rubygems_remotes?
- index
- lock
- locked_bundler_version
- locked_ruby_version
- locked_ruby_version_object
- missing_specs
- missing_specs?
- new_platform?
- new_specs
- nothing_changed?
- remove_platform
- removed_specs
- requested_specs
- resolve
- resolve_remotely!
- resolve_with_cache!
- spec_git_paths
- specs
- specs_for
- to_lock
- unlocking?
- validate_platforms!
- validate_ruby!
- validate_runtime!
- Class methods
- build
- new
- Private methods
-
additional_base_requirements_for_resolve -
change_reason -
compute_requires -
concat_ruby_version_requirements -
converge_dependencies -
converge_locals -
converge_locked_specs -
converge_path_source_to_gemspec_source -
converge_path_sources_to_gemspec_sources -
converge_paths -
converge_rubygems_sources -
converge_sources -
dependencies_for_source_changed? -
double_check_for_index -
equivalent_rubygems_remotes? -
expand_dependencies -
expanded_dependencies -
extract_gem_info -
in_locked_deps? -
lockfiles_equal? -
metadata_dependencies -
pinned_spec_names -
pretty_dep -
requested_dependencies -
requested_groups -
satisfies_locked_spec? -
source_requirements -
specs_changed? -
specs_for_source_changed?