Class: Gem::Resolver::GitSpecification

Inherits:
SpecSpecification show all
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 SpecSpecification

#spec

Attributes inherited from Specification

#dependencies, #name, #platform, #set, #source, #version

Instance Method Summary collapse

Methods inherited from SpecSpecification

#dependencies, #full_name, #initialize, #name, #platform, #version

Methods inherited from Specification

#full_name, #initialize, #installable_platform?

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

#install(options) {|installer| ... } ⇒ Object

Installing a git gem only involves building the extensions and generating the executables.

Yields:

  • (installer)


19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/rubygems/resolver/git_specification.rb', line 19

def install options
  require 'rubygems/installer'

  installer = Gem::Installer.new '', options
  installer.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