class SyncWrap::RakeGem
Provision for the rake rubygem and its (j)rake command
Attributes
rake_version[RW]
Rake version to install (Default: 12.1.0)
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/rake_gem.rb, line 45 def initialize( opts = {} ) @rake_version = '12.1.0' @user_install = false super end
Public Instance Methods
install()
click to toggle source
# File lib/syncwrap/components/rake_gem.rb, line 51 def install opts = { version: rake_version, user_install: user_install? && run_user } opts[ :format_executable ] = true unless rake_command == 'rake' gem_install( 'rake', opts ) end
rake_command()
click to toggle source
# File lib/syncwrap/components/rake_gem.rb, line 41 def rake_command ( ruby_command == 'jruby' ) ? 'jrake' : 'rake' end
Protected Instance Methods
user_install?()
click to toggle source
# File lib/syncwrap/components/rake_gem.rb, line 35 def user_install? @user_install end