Class: Gem::Resolver::GitSpecification
- Inherits:
-
SpecSpecification
- Object
- Specification
- SpecSpecification
- Gem::Resolver::GitSpecification
- 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.
Instance Attribute Summary
Attributes inherited from Specification
#dependencies, #name, #platform, #required_ruby_version, #required_rubygems_version, #set, #source, #spec, #version
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#add_dependency(dependency) ⇒ Object
:nodoc:.
-
#install(options = {}) {|installer| ... } ⇒ Object
Installing a git gem only involves building the extensions and generating the executables.
-
#pretty_print(q) ⇒ Object
:nodoc:.
Methods inherited from SpecSpecification
#dependencies, #full_name, #initialize, #name, #platform, #required_ruby_version, #required_rubygems_version, #version
Methods inherited from Specification
#download, #fetch_development_dependencies, #full_name, #initialize, #installable_platform?, #local?
Constructor Details
This class inherits a constructor from Gem::Resolver::SpecSpecification
Instance Method Details
#==(other) ⇒ Object
:nodoc:
8 9 10 11 12 13 |
# 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) ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/rubygems/resolver/git_specification.rb', line 15 def add_dependency(dependency) # :nodoc: spec.dependencies << dependency end |
#install(options = {}) {|installer| ... } ⇒ Object
Installing a git gem only involves building the extensions and generating the executables.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rubygems/resolver/git_specification.rb', line 23 def install( = {}) require 'rubygems/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) ⇒ Object
:nodoc:
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# 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 |