class SyncWrap::BundlerGem

Provision for the bundler rubygem and its (j)bundle command

Host component dependencies: <ruby>

Attributes

bundler_version[RW]

Bundler version to install (Default: 1.12.5)

Public Class Methods

new( opts = {} ) click to toggle source
Calls superclass method SyncWrap::Component.new
# File lib/syncwrap/components/bundler_gem.rb, line 30
def initialize( opts = {} )
  @bundler_version = '1.12.5'
  super
end

Public Instance Methods

bundle_command() click to toggle source
# File lib/syncwrap/components/bundler_gem.rb, line 35
def bundle_command
  ( ruby_command == 'jruby' ) ? 'jbundle' : 'bundle'
end
install() click to toggle source
# File lib/syncwrap/components/bundler_gem.rb, line 39
def install
  opts = { version: bundler_version }
  opts[ :format_executable ] = true unless bundle_command == 'bundle'
  gem_install( 'bundler', opts )
end