Skip to content

Commit

Permalink
Merge branch 'hotfix/1.26.3' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Nov 18, 2014
2 parents f688087 + cf5d9ca commit 1546290
Show file tree
Hide file tree
Showing 51 changed files with 185 additions and 167 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.26.2
1.26.3
2 changes: 1 addition & 1 deletion bin/rvm-prompt
Expand Up @@ -25,7 +25,7 @@ add_raw_token()

rvm_gemset_separator="${rvm_gemset_separator:-"@"}"
if
[[ "${GEM_HOME:-}" =~ rvm && "$ruby_string" != "$rvm_path/bin/ruby" ]]
[[ "${GEM_HOME:-}" == *rvm* && "$ruby_string" != "$rvm_path/bin/ruby" ]]
then
unset format
while
Expand Down
2 changes: 1 addition & 1 deletion bin/rvm-shell
Expand Up @@ -50,7 +50,7 @@ then
rvm_shell_ruby_string="$1"
shift
elif
[[ "$1" == "--path" ]] && [[ -d "$2" || "$2" =~ /* ]]
[[ "$1" == "--path" ]] && [[ -d "$2" || "$2" == "/"* ]]
then
if
[[ -d "$2" ]]
Expand Down
12 changes: 6 additions & 6 deletions binscripts/rvm-installer
Expand Up @@ -81,7 +81,7 @@ rvm_install_commands_setup()
fail "Could not find GNU compatible version of 'tar' command, make sure it's available first before continuing installation."
fi
if
[[ ! " ${rvm_tar_options:-} " =~ " --no-same-owner " ]] &&
[[ " ${rvm_tar_options:-} " != *" --no-same-owner "* ]] &&
$rvm_tar_command --help 2>&1 | GREP_OPTIONS="" \grep -- --no-same-owner >/dev/null
then
rvm_tar_options="${rvm_tar_options:-}${rvm_tar_options:+ }--no-same-owner"
Expand Down Expand Up @@ -180,10 +180,10 @@ __rvm_curl_output_control()
then
__flags+=( "--silent" "--show-error" )
elif
[[ " $*" =~ " -s" || " $*" =~ " --silent" ]]
[[ " $*" == *" -s"* || " $*" == *" --silent"* ]]
then
# make sure --show-error is used with --silent
[[ " $*" =~ " -S" || " $*" =~ " -sS" || " $*" =~ " --show-error" ]] ||
[[ " $*" == *" -S"* || " $*" == *" -sS"* || " $*" == *" --show-error"* ]] ||
{
__flags+=( "--show-error" )
}
Expand Down Expand Up @@ -481,7 +481,7 @@ rvm_install_default_settings()
{
# Tracing, if asked for.
if
[[ "$*" =~ --trace ]] || (( ${rvm_trace_flag:-0} > 0 ))
[[ "$*" == *--trace* ]] || (( ${rvm_trace_flag:-0} > 0 ))
then
set -o xtrace
rvm_trace_flag=1
Expand Down Expand Up @@ -772,7 +772,7 @@ follow this link for details how to fix:
;;
esac

if [[ "$rvm_path" != /* ]]
if [[ "$rvm_path" != "/"* ]]
then fail "The rvm install path must be fully qualified. Tried $rvm_path"
fi
}
Expand Down Expand Up @@ -860,7 +860,7 @@ rvm_install_ruby_and_gems()
"

if
[[ "${install_gems[*]}" =~ "rails" ]]
[[ "${install_gems[*]}" == *"rails"* ]]
then
printf "%b" "
* To start using rails you need to run \`rails new <project_dir>\`.
Expand Down
26 changes: 13 additions & 13 deletions binscripts/rvm-installer.asc
@@ -1,17 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABAgAGBQJUXmL3AAoJEOIGwp+/BP8XZYAQAIFDRTMUww09VHS1rhbq9hHU
TDunUCrxMXsnNOmT4LMW+aTx8X3uXQDvj4HNd5rqTJaO9VvTAnDqYFwegGPTwQKP
4RR8SmyAROqw64A219kYtuaqxQgNeOvVBCtXsSGylsJlh5/RC7QXjjoPdECckSA8
KnkJp0AQZYJrruHbjFqiQh6hmpmnWCox762VxwsiAXms/8XU+UGkA+WJPfslrPkS
OXGnJOsfX6MA6sRV0258hwEq4nh44Tp3zkL7D2b/YEoUvmEzQ9lqqtFnBGaatn1a
ktyeRaLaZCjqhvYaajgWvamD3/yxdlKcvISJIchwzqxX3GoTKxuAjrdfnXHUGI6A
QF/wadnWDZ7eNStOYRr7mkIB9l8Y7KllMZRYM36q5cGvjS3ec7x+9fGERMCsZLDw
O7GjwGz14RICfjCCbtLK8BOvBW53k7kHBsmY+WT+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-from[@gemset] ruby-to[@gemset]


## Description

Copy the `ruby-from` `gemset`s gems (`default` if omitted) to the `ruby-to` `gemset`.
9 changes: 9 additions & 0 deletions rvm-test-rvm1/exports_comment_test.sh
@@ -0,0 +1,9 @@
source "$rvm_path/scripts/rvm"

export TEST_VAR=2 # env[TEST_VAR]=/^2$/; env[rvm_old_TEST_VAR]=/^$/
rvm export TEST_VAR=3 # env[TEST_VAR]=/^3$/; env[rvm_old_TEST_VAR]=/^2$/
rvm unexport # env[TEST_VAR]=/^2$/; env[rvm_old_TEST_VAR]=/^$/

unset TEST_VAR # env[TEST_VAR]=/^$/
rvm export TEST_VAR=3 # env[TEST_VAR]=/^3$/
rvm unexport # env[TEST_VAR]=/^$/
20 changes: 14 additions & 6 deletions scripts/base
Expand Up @@ -5,12 +5,20 @@
#duplicated from scripts/rvm - rare reload issue
__rvm_has_opt()
{
# pre-gnu
if [[ -n "${ZSH_VERSION}" ]] && setopt | GREP_OPTIONS="" \command \grep "^${1}$" >/dev/null 2>&1
then return 0
elif [[ -n "${BASH_VERSION}" ]] && [[ ":$SHELLOPTS:" =~ ":${1}:" ]]
then return 0
else return 1
if # pre-gnu
[[ -n "${ZSH_VERSION}" ]]
then
setopt | GREP_OPTIONS="" \command \grep "^${1}$" >/dev/null 2>&1 || return $?
elif # mksh
[[ -n "${KSH_VERSION}" ]]
then
set +o | GREP_OPTIONS="" \command \grep "-o ${1}$" >/dev/null 2>&1 || return $?
elif # bash
[[ -n "${BASH_VERSION}" ]]
then
[[ ":$SHELLOPTS:" == *":${1}:"* ]] || return $?
else # what is this?!
return 1
fi
}

Expand Down
1 change: 0 additions & 1 deletion scripts/cd
Expand Up @@ -35,7 +35,6 @@ case "${rvm_project_rvmrc:-1}" in
__rvm_do_with_env_after
return 0
}
export -a chpwd_functions
[[ " ${chpwd_functions[*]} " == *" __rvm_cd_functions_set "* ]] ||
chpwd_functions=( "${chpwd_functions[@]}" __rvm_cd_functions_set )

Expand Down
25 changes: 12 additions & 13 deletions scripts/cli
Expand Up @@ -31,7 +31,6 @@ __rvm_parse_args_find_known_flags()
rvm_disable_binary_flag=1
;;
(--patches|--patch)
export -a rvm_patch_names
__rvm_custom_separated_array rvm_patch_names , "${2:-}"
rvm_patch_original_pwd="$PWD"
rvm_disable_binary_flag=1
Expand Down Expand Up @@ -77,7 +76,7 @@ __rvm_parse_args()
rvm_parse_break=0

if
[[ " $* " =~ " --trace " ]]
[[ " $* " == *" --trace "* ]]
then
echo "$@"
__rvm_version
Expand Down Expand Up @@ -236,9 +235,9 @@ __rvm_parse_args()
[[ -n "${next_token:-}" ]] &&
[[ -x "${next_token:-}" ||
-d "${next_token:-}" ||
"${next_token:-}" =~ ^http ||
"${next_token:-}" =~ tar.bz2$ ||
"${next_token:-}" =~ tar.gz$
"${next_token:-}" == http* ||
"${next_token:-}" == *tar.bz2 ||
"${next_token:-}" == *tar.gz
]]
do
rvm_ruby_args=("$next_token" "${rvm_ruby_args[@]}")
Expand Down Expand Up @@ -286,7 +285,9 @@ __rvm_parse_args()
if
[[ -n "$next_token" ]]
then
rvm_export_args="$next_token$@"
typeset -a ___args
___args=( "$next_token" "$@" )
rvm_export_args="${___args[*]}"
rvm_action="export"
rvm_parse_break=1
else
Expand Down Expand Up @@ -482,10 +483,10 @@ __rvm_parse_args()
fi
while
[[ -n "${next_token:-}" ]] &&
[[ "${next_token:-}" =~ ^http ||
"${next_token:-}" =~ tar.bz2$ ||
"${next_token:-}" =~ tar.gz$ ||
"${next_token:-}" =~ ":"
[[ "${next_token:-}" == http* ||
"${next_token:-}" == *tar.bz2 ||
"${next_token:-}" == *tar.gz ||
"${next_token:-}" == *":"*
]]
do
rvm_ruby_args=("${rvm_ruby_args[@]}" "$next_token")
Expand All @@ -508,7 +509,6 @@ __rvm_parse_args()
;;

--patches|--patch)
export -a rvm_patch_names
__rvm_custom_separated_array rvm_patch_names , "$next_token"
next_token="${1:-}"
(( $# == 0 )) || shift
Expand Down Expand Up @@ -815,7 +815,6 @@ __rvm_parse_args()
rvm()
{
typeset result current_result
export -a rvm_ruby_args >/dev/null 2>/dev/null
rvm_ruby_args=()

__rvm_teardown_if_broken
Expand Down Expand Up @@ -971,7 +970,7 @@ rvm()
fi
unset gem_prefix
elif
[[ "${rvm_ruby_args[*]}" =~ ^rename ]]
[[ "${rvm_ruby_args[*]}" == rename* ]]
then
typeset _command _from _to
read _command _from _to <<<"${rvm_ruby_args[*]}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/completion
Expand Up @@ -5,7 +5,7 @@ if
[[ -n "${ZSH_VERSION:-}" ]]
then
# zsh completion for Ruby Version Manager (RVM), thanks to https://github.com/JoeKun
[[ " ${fpath[*]} " =~ " ${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.zsh " ]] ||
[[ " ${fpath[*]} " == *" ${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.zsh "* ]] ||
{
fpath+=( "${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.zsh" )
if
Expand Down
6 changes: 3 additions & 3 deletions scripts/fetch
Expand Up @@ -135,7 +135,7 @@ then
__fallbacks=()
__default_ruby_url="$(__rvm_db ruby_url)"
if
[[ "${url}" =~ "${__default_ruby_url}" ]]
[[ "${url}" == "${__default_ruby_url}"* ]]
then
__iterator=1
while
Expand All @@ -146,11 +146,11 @@ then
: $(( __iterator+=1 ))
done
elif
[[ "${url}" =~ "http://" ]]
[[ "${url}" == "http://"* ]]
then
__fallbacks+=( "${url/http:/ftp:}" "${url/http:\/\//http://www.mirrorservice.org/sites/}" )
elif
[[ "${url}" =~ "https://" ]]
[[ "${url}" == "https://"* ]]
then
__fallbacks+=( "${url/https:/ftp:}" "${url/https:\/\//http://www.mirrorservice.org/sites/}" )
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/build
Expand Up @@ -16,7 +16,7 @@ __rvm_selected_compiler()
{
#TODO: add handling for rvm_configure_env
if
[[ " ${rvm_configure_flags[*]}" =~ " --with-gcc=" ]]
[[ " ${rvm_configure_flags[*]}" == *" --with-gcc="* ]]
then
typeset __compiler
for __compiler in "${rvm_configure_flags[@]}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/build_config
Expand Up @@ -364,7 +364,7 @@ __rvm_setup_compile_environment_flags_threads()
if [[ "${_system_name}" == "FreeBSD" || "${_system_name}" == "DragonFly" ]]
then rvm_make_flags+=( -B )
fi
if [[ " ${rvm_make_flags[*]}" =~ " -j" ]]
if [[ " ${rvm_make_flags[*]}" == *" -j"* ]]
then rvm_warn "Found user configured '-j' flag in 'rvm_make_flags', please note that RVM can detect number of CPU threads and set the '-j' flag automatically if you do not set it."
else rvm_make_flags+=( -j$(__rvm_detect_max_threads) )
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/build_config_system
Expand Up @@ -69,7 +69,7 @@ __rvm_setup_compile_environment_system_early_OSX()

__rvm_setup_compile_environment_system_SmartOS()
{
[[ "${_system_version}" =~ ^joyent ]] || return 0
[[ "${_system_name}" == "SmartOS" ]] || return 0

if __rvm_string_match "$1" "ruby-2.0.*"; then
__rvm_update_configure_env CFLAGS="-R -fPIC"
Expand Down
4 changes: 2 additions & 2 deletions scripts/functions/build_requirements_helpers
Expand Up @@ -49,7 +49,7 @@ __rvm_filter_installed_package_from_missing()
typeset __package
for __package
do
[[ " ${packages_missing[*]} " =~ " ${__package} " ]] || __rvm_add_once packages_installed "${__package}"
[[ " ${packages_missing[*]} " == *" ${__package} "* ]] || __rvm_add_once packages_installed "${__package}"
done
case "$rvm_autolibs_flag_number" in
(0|1|2) # just ignore
Expand Down Expand Up @@ -123,7 +123,7 @@ requirements_detect_installed()

requirements_version_minimal()
{
if [[ " ${packages_to_install[*]} " =~ " $1 " ]]
if [[ " ${packages_to_install[*]} " == *" $1 "* ]]
then return 0
fi
typeset latest_version="$(
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/cli
Expand Up @@ -284,7 +284,7 @@ if your intention was ruby installation use instead: rvm install $1
esac
case "$1" in
(stable|master|head|branch|latest|latest-*|[0-9]*.[0-9]*.[0-9]*)
__rvm_cli_get_and_execute_installer || return $?
__rvm_cli_get_and_execute_installer "$@" || return $?

typeset -x rvm_hook
rvm_hook="after_update"
Expand Down
26 changes: 16 additions & 10 deletions scripts/functions/env
Expand Up @@ -91,8 +91,14 @@ __rvm_export()
__rvm_unset_exports()
{
typeset wrap_name name value
while IFS== read -d "" wrap_name value
typeset -a __variables_list
__rvm_read_lines __variables_list <<<"$(
printenv | __rvm_sed '/=/ { s/=.*$//; p; }; d;'
)"

for wrap_name in "${__variables_list[@]}"
do
eval "value=\"\${${wrap_name}}\""
case "$wrap_name" in
rvm_old_*)
name=${wrap_name#rvm_old_}
Expand All @@ -103,7 +109,7 @@ __rvm_unset_exports()
unset $wrap_name
;;
esac
done < <(printenv_null)
done
}

__rvm_fix_path_from_gem_path()
Expand Down Expand Up @@ -210,26 +216,26 @@ __rvm_unload()
fi

# aliases
__rvm_unload_action unalias <(
__rvm_unload_action unalias <<<"$(
if [[ -n "${ZSH_VERSION:-}" ]]
then alias | __rvm_awk -F"=" '/rvm/ {print $1}'
else alias | __rvm_awk -F"[= ]" '/rvm/ {print $2}'
fi
)
)"

# variables
__rvm_unload_action unset <(
__rvm_unload_action unset <<<"$(
set |
__rvm_awk -F"=" 'BEGIN{v=0;} /^[a-zA-Z_][a-zA-Z0-9_]*=/{v=1;} v==1&&$2~/^['\''\$]/{v=2;}
v==1&&$2~/^\(/{v=3;} v==2&&/'\''$/&&!/'\'\''$/{v=1;} v==3&&/\)$/{v=1;} v{print;} v==1{v=0;}' |
__rvm_awk -F"=" '/^[^ ]*(RUBY|GEM|IRB|gem|rubies|rvm)[^ ]*=/ {print $1} /^[^ ]*=.*rvm/ {print $1}' |
__rvm_grep -vE "^PROMPT|^prompt|^PS|^BASH_SOURCE"
)
)"

# functions
__rvm_unload_action __function_unset <(
__rvm_unload_action __function_unset <<<"$(
typeset -f | __rvm_awk '$2=="()" {fun=$1} /rvm/{print fun}' | sort -u | __rvm_grep -v __rvm_unload_action
)
)"
if
[[ -n "${ZSH_VERSION:-}" ]]
then
Expand Down Expand Up @@ -268,11 +274,11 @@ __rvm_env_print()
environment_file_path="$rvm_environments_path/$(__rvm_env_string)"
# Echo the path or environment file.
if
[[ "$rvm_path_flag" == "1" || "$*" =~ "--path" ]]
[[ "$rvm_path_flag" == "1" || "$*" == *"--path"* ]]
then
echo "$environment_file_path"
elif
[[ "$rvm_cron_flag" == "1" || "$*" =~ "--cron" ]]
[[ "$rvm_cron_flag" == "1" || "$*" == *"--cron"* ]]
then
\command \cat "$environment_file_path" |
__rvm_grep -Eo "[^ ]+=[^;]+" |
Expand Down

0 comments on commit 1546290

Please sign in to comment.