Module: Rip

Defined in:
lib/rip/memoize.rb,
lib/rip.rb,
lib/rip/ui.rb,
lib/rip/env.rb,
lib/rip/help.rb,
lib/rip/setup.rb,
lib/rip/sh/gem.rb,
lib/rip/sh/git.rb,
lib/rip/package.rb,
lib/rip/version.rb,
lib/rip/commands.rb,
lib/rip/installer.rb,
lib/rip/package_api.rb,
lib/rip/commands/core.rb,
lib/rip/commands/ruby.rb,
lib/rip/commands/show.rb,
lib/rip/commands/build.rb,
lib/rip/commands/setup.rb,
lib/rip/package_manager.rb,
lib/rip/commands/install.rb,
lib/rip/commands/uninstall.rb,
lib/rip/packages/dir_package.rb,
lib/rip/packages/gem_package.rb,
lib/rip/packages/git_package.rb,
lib/rip/packages/file_package.rb,
lib/rip/packages/http_package.rb,
lib/rip/packages/ripfile_package.rb,
lib/rip/packages/remote_gem_package.rb

Overview

file: lib/rip/commands/build.rb

rip build Builds Ruby extensions for installed packages

Defined Under Namespace

Modules: Commands, Env, Help, Memoize, PackageAPI, Setup, Sh, Version Classes: CorruptedRipenv, DirPackage, FilePackage, GemPackage, GitPackage, HTTPPackage, Installer, Package, PackageManager, RemoteGemPackage, RipfilePackage, UI, VersionConflict

Constant Summary collapse

STARTUP_SCRIPT_TEMPLATE =
<<-end_template

# -- start rip config -- #
RIPDIR=%s
RUBYLIB="$RUBYLIB:$RIPDIR/active/lib"
PATH="$PATH:$RIPDIR/active/bin"
export RIPDIR RUBYLIB PATH
# -- end rip config -- #
end_template
FISH_CONFIG_TEMPLATE =
<<-end_template
# -- start rip config -- #
set -x RIPDIR %s
set -x RUBYLIB "$RUBYLIB:$RIPDIR/active/lib"
set PATH $RIPDIR/active/bin $PATH
# -- end rip config -- #
end_template

Class Method Summary collapse

Class Method Details

.dirObject

Returns the Rip data directory. That is, the directory which contains all the Rip environment directories.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rip.rb', line 6

def self.dir
  return @dir if @dir

  env = ENV['RIPDIR'].to_s
  if env.empty?
    dir = File.join(user_home, ".rip")
  else
    dir = File.expand_path(env)
  end

  FileUtils.mkdir_p dir unless File.exists? dir
  @dir = dir
end

.dir=(dir) ⇒ Object



20
21
22
# File 'lib/rip.rb', line 20

def self.dir=(dir)
  @dir = dir
end

.uiObject



24
25
26
# File 'lib/rip.rb', line 24

def self.ui
  @ui ||= Rip::UI.new(STDOUT)
end

.ui=(io) ⇒ Object



28
29
30
# File 'lib/rip.rb', line 28

def self.ui=(io)
  @ui = Rip::UI.new(io)
end

.user_homeObject



32
33
34
# File 'lib/rip.rb', line 32

def self.user_home
  @home ||= ENV['HOME']
end