after_use_jruby 0000664 00000000442 14751162567 0007677 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/jruby"
if [[ "${rvm_ruby_string}" =~ "jruby" ]]
then
jruby_ngserver_start
jruby_options_append "--ng" "${PROJECT_JRUBY_OPTS[@]}"
else
jruby_options_remove "--ng" "${PROJECT_JRUBY_OPTS[@]}"
jruby_clean_project_options
fi
after_use_current 0000664 00000001055 14751162567 0010227 0 ustar 00 #!/usr/bin/env bash
function set_current_alias()
{
typeset __current_ruby
if
__current_ruby="${rvm_environments_path}/current" &&
[[ -L "${__current_ruby:-}" ]]
then
__current_ruby="$( readlink "${__current_ruby:-}" )"
__current_ruby="${__current_ruby##*/}"
fi
if
[[ -z "${__current_ruby}" || "${__current_ruby}" != "${rvm_ruby_string}" ]]
then
"$rvm_scripts_path/alias" create current "${rvm_ruby_string}"
fi
}
if
[[ $TM_WRAPPING != "1" ]]
then
export TM_WRAPPING="1"
set_current_alias
unset TM_WRAPPING
fi
after_use_maglev 0000775 00000000223 14751162567 0010017 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/maglev"
if
[[ "${rvm_ruby_string}" =~ "maglev" ]]
then
_maglev_gemstone start
fi
after_use_rbx_opts 0000664 00000000353 14751162567 0010405 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/rbx"
if [[ "${rvm_ruby_string}" =~ "rbx" ]]
then
rbx_options_append "${PROJECT_RBXOPT[@]}"
else
rbx_options_remove "${PROJECT_RBXOPT[@]}"
rbx_clean_project_options
fi
after_use_home_bin 0000664 00000000366 14751162567 0010331 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/binstubs"
function add_binstubs_to_path()
{
remove_binstubs_from_path "${2:-$1}"
export PATH="$1:$PATH"
}
if
[[ -d "${HOME}/bin" ]]
then
add_binstubs_to_path "${HOME}/bin"
fi
after_cd_install_vendored_gems 0000664 00000000223 14751162567 0012702 0 ustar 00 #!/usr/bin/env bash
# From @mpapis
if
which bundle >/dev/null &&
[[ -d vendor/cache ]] &&
[[ -f Gemfile ]]
then
bundle install --local
fi
after_install_auto_gem 0000775 00000000676 14751162567 0011232 0 ustar 00 #!/usr/bin/env bash
if
[[ -f "/etc/gentoo-release" ||
"${RUBYOPT:-}" =~ "-rauto_gem"
]]
then
typeset __sitelib
__sitelib="$( $rvm_ruby_binary -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']" )"
if [[ -n "${__sitelib}" ]]
then touch "${__sitelib}/auto_gem.rb"
else echo "WARN: Installed ruby does not have valid 'sitelibdir', no 'auto_gem.rb' was created, please report a bug here: https://github.com/rvm/rvm/issues"
fi
fi
after_use_jruby_opts 0000664 00000000375 14751162567 0010751 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/jruby"
if [[ "${rvm_ruby_string}" =~ "jruby" ]]
then
jruby_options_append "${PROJECT_JRUBY_OPTS[@]}"
else
jruby_options_remove "${PROJECT_JRUBY_OPTS[@]}"
jruby_clean_project_options
fi
after_cd_bundler 0000664 00000003226 14751162567 0007774 0 ustar 00 #!/usr/bin/env bash
\. "${rvm_path}/scripts/functions/hooks/binstubs"
function add_binstubs_to_path()
{
remove_binstubs_from_path "${2:-$1}"
export PATH="$1:$PATH"
export LAST_BUNDLER_BIN_PATH="$1"
}
BUNDLER_BIN_PATH=""
# see BUNDLE_BIN is set in the current directories .bundle/config
if
[[ -f .bundle/config && -r .bundle/config ]] &&
BUNDLER_BIN_PATH="$(\awk -F": " '$1=="BUNDLE_BIN"{print $2}' .bundle/config)" &&
[[ -n "$BUNDLER_BIN_PATH" ]]
then
case "$BUNDLER_BIN_PATH" in
(/*)
true # it's all fine
;;
(\~*)
BUNDLER_BIN_PATH="${BUNDLER_BIN_PATH/\~/$HOME}"
;;
(*HOME*)
eval BUNDLER_BIN_PATH=\"${BUNDLER_BIN_PATH}\"
;;
(*)
BUNDLER_BIN_PATH="$PWD/${BUNDLER_BIN_PATH}"
;;
esac
if
[[ ":$PATH:" =~ ":$BUNDLER_BIN_PATH:" ]]
then
echo "The bundler binstubs directory is already on path."
add_binstubs_to_path "${BUNDLER_BIN_PATH}"
else
case "${BUNDLER_BIN_PATH}" in
(${PWD}*)
if
__rvm_ask_for \
"The bundler binstubs directory is in the current directory, which may be unsafe.
Consider using rubygems-bundler instead => https://github.com/rvm/rubygems-bundler
Remove the BUNDLE_BIN line from .bundle/config to disable this prompt.
Are you sure you want to add the bundler binstubs directory to the path?" \
'Yes'
then
add_binstubs_to_path "${BUNDLER_BIN_PATH}" "${LAST_BUNDLER_BIN_PATH}"
fi
;;
(*)
add_binstubs_to_path "${BUNDLER_BIN_PATH}" "${LAST_BUNDLER_BIN_PATH}"
;;
esac
fi
else
# There is no BUNDLE_BIN setting
remove_binstubs_from_path "${LAST_BUNDLER_BIN_PATH}"
fi
after_use_textmate 0000664 00000002160 14751162567 0010376 0 ustar 00 #!/usr/bin/env bash
#
# Automatically sets the wrappers for textmate's use
# Based on article posted: http://www.christopherirish.com/2010/06/28/how-to-setup-textmate-to-use-rvm/
# Set up the TM_RUBY shell variable as described and remove the Builder as described and restart TextMate
#
# Make this script executable and you should be good to go! TextMate will stay in sync with rvm, which
# generally means the last project folder you switched into from terminal shell.
#
function set_textmate_wrapper()
{
typeset __current_ruby __textmate_ruby
__current_ruby=${RUBY_VERSION:-${GEM_HOME##*/}}
if
__textmate_ruby="$( \which textmate_ruby 2>/dev/null )" &&
[[ -n "${__textmate_ruby:-}" ]]
then
__textmate_ruby="$( readlink "${__textmate_ruby:-}" )"
__textmate_ruby="${__textmate_ruby%/ruby}"
__textmate_ruby="${__textmate_ruby%/bin}"
fi
if
[[ -z "${__textmate_ruby}" || "${__textmate_ruby}" != "${__current_ruby:-}" ]]
then
rvm wrapper ${RUBY_VERSION:-${GEM_HOME##*/}} textmate
fi
}
if
[[ $TM_WRAPPING != "1" ]]
then
export TM_WRAPPING="1"
set_textmate_wrapper
unset TM_WRAPPING
fi
after_install_codesign 0000664 00000002462 14751162567 0011215 0 ustar 00 #!/usr/bin/env bash
####################################################
# Signing compiled ruby for OSX, for details visit #
# https://rvm.io/rubies/codesign/ #
####################################################
# Go to subprocess so we can use returns and 'use' ruby temporarily
(
# Require Mac OS
[[ "${_system_type}" == Darwin ]] || return 1
# Require 10.7 - FIXME: Should be 10.7 or newer.
[[ "${_system_version}" == 10.7* ]] || return 2
# Find out ruby executable to sign
typeset _ruby_name
_ruby_name="$(sed -n '/^ruby_install_name=/ {s/ruby_install_name="\(.*\)"/\1/; p; };' "$MY_RUBY_HOME/config" )"
# Require rvm_codesign_identity
[[ -n "${rvm_codesign_identity:-}" ]] || {
rvm_warn "'rvm_codesign_identity' is not set so RVM can't sign ${_ruby_name}\n" \
"Set it in ~/.rvmrc after reading the following about OS X code signing:\n" \
"https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"
return 3
}
# Require using ruby - btw this should not happen
__rvm_use || {
rvm_warn "can not use ruby which was just installed ... so can not sign it neither"
return 4
}
# Sign ruby
/usr/bin/codesign -f -s "${rvm_codesign_identity}" "$(which "${_ruby_name}")"
)