Sha256: e2961c619c8c4d49494c9b504f23752adb53ff8d314ec02886d93febb2530cb7
Contents?: true
Size: 931 Bytes
Versions: 5
Compression:
Stored size: 931 Bytes
Contents
module Sprinkle module Installers class Gem < Installer attr_accessor :gem def initialize(parent, gem, options = {}, &block) super parent, options, &block @gem = gem end def source(location = nil) # package defines an installer called source so here we specify a method directly # rather than rely on the automatic options processing since packages' method missing # won't be run return @options[:source] unless location @options[:source] = location end protected # rubygems 0.9.5+ installs dependencies by default, and does platform selection def install_commands cmd = "gem install #{gem}" cmd << " --version '#{version}'" if version cmd << " --source #{source}" if source cmd << " --install-dir #{repository}" if repository cmd end end end end
Version data entries
5 entries across 5 versions & 3 rubygems