Class: Gem::Resolver::GitSpecification
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
SpecSpecification ,
Specification
|
|
Instance Chain:
self,
SpecSpecification ,
Specification
|
|
Inherits: |
Gem::Resolver::SpecSpecification
|
Defined in: | lib/rubygems/resolver/git_specification.rb |
Overview
A GitSpecification represents a gem that is sourced from a git repository and is being loaded through a gem dependencies file through the git:
option.
Class Method Summary
SpecSpecification
- Inherited
.new | A SpecSpecification is created for a |
Specification
- Inherited
.new | Sets default instance variables for the specification. |
Instance Attribute Summary
Specification
- Inherited
#dependencies | The dependencies of the gem for this specification. |
#installable_platform? | Returns true if this specification is installable on this platform. |
#name | The name of the gem for this specification. |
#platform | The platform this gem works on. |
#required_ruby_version | The required_ruby_version constraint for this specification. |
#required_rubygems_version | The required_ruby_version constraint for this specification. |
#set | The set this specification came from. |
#source | The source for this specification. |
#spec | The |
#version | The version of the gem for this specification. |
#local? |
Instance Method Summary
-
#install(options = {}) {|installer| ... }
Installing a git gem only involves building the extensions and generating the executables.
- #==(other) Internal use only
- #add_dependency(dependency) Internal use only
- #pretty_print(q) Internal use only
SpecSpecification
- Inherited
#dependencies | The dependencies of the gem for this specification. |
#full_name | The name and version of the specification. |
#name | The name of the gem for this specification. |
#platform | The platform this gem works on. |
#required_ruby_version | The required_ruby_version constraint for this specification. |
#required_rubygems_version | The required_rubygems_version constraint for this specification. |
#version | The version of the gem for this specification. |
Specification
- Inherited
#download, | |
#full_name | The name and version of the specification. |
#install | Installs this specification using the |
#fetch_development_dependencies | Fetches development dependencies if the source does not provide them by default (see |
Constructor Details
This class inherits a constructor from Gem::Resolver::SpecSpecification
Instance Method Details
#==(other)
# File 'lib/rubygems/resolver/git_specification.rb', line 8
def ==(other) # :nodoc: self.class === other and @set == other.set and @spec == other.spec and @source == other.source end
#add_dependency(dependency)
# File 'lib/rubygems/resolver/git_specification.rb', line 15
def add_dependency(dependency) # :nodoc: spec.dependencies << dependency end
#install(options = {}) {|installer| ... }
Installing a git gem only involves building the extensions and generating the executables.
# File 'lib/rubygems/resolver/git_specification.rb', line 23
def install( = {}) require_relative '../installer' installer = Gem::Installer.for_spec spec, yield installer if block_given? installer.run_pre_install_hooks installer.build_extensions installer.run_post_build_hooks installer.generate_bin installer.run_post_install_hooks end
#pretty_print(q)
# File 'lib/rubygems/resolver/git_specification.rb', line 37
def pretty_print(q) # :nodoc: q.group 2, '[GitSpecification', ']' do q.breakable q.text "name: #{name}" q.breakable q.text "version: #{version}" q.breakable q.text 'dependencies:' q.breakable q.pp dependencies q.breakable q.text "source:" q.breakable q.pp @source end end