class SyncWrap::TarpitGem

Provision for the rjack-tarpit rubygem

Host component dependencies: RunUser?, <ruby>

Attributes

tarpit_version[RW]

Tarpit version to install (Default: 2.1.2)

user_install[W]

Perform a #user_install as the run_user? (Default: false)

Public Class Methods

new( opts = {} ) click to toggle source
Calls superclass method SyncWrap::Component.new
# File lib/syncwrap/components/tarpit_gem.rb, line 41
def initialize( opts = {} )
  @tarpit_version = '2.1.2'
  @user_install = false
  super
end

Public Instance Methods

install() click to toggle source
# File lib/syncwrap/components/tarpit_gem.rb, line 47
def install
  opts = { version: tarpit_version, user_install: user_install? && run_user }

  # tarpit depends on rake, etc. which could be installed with it,
  # so use format_executable even though tarpit doesn't have any
  # bin scripts
  opts[ :format_executable ] = true if ruby_command == 'jruby'

  gem_install( 'rjack-tarpit', opts )
end

Protected Instance Methods

user_install?() click to toggle source
# File lib/syncwrap/components/tarpit_gem.rb, line 35
def user_install?
  @user_install
end