Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made binstubs from bundler overwrite gem generated stubs ... #289

Merged
merged 6 commits into from Jun 6, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -12,4 +12,5 @@ tmp/
*.rbc
pkg/
.rvmrc
.DS_Store
.DS_Store
.idea
1 change: 1 addition & 0 deletions config/Gemfile
@@ -0,0 +1 @@
source :rubygems
6 changes: 3 additions & 3 deletions scripts/functions/bundler
Expand Up @@ -18,10 +18,10 @@ bundle()

if (unset bundle ; command -v bundle >/dev/null 2>&1)
then
printf "Bundling your gems. This may take a few minutes on first run.\n"
if [[ "$*" =~ *install* ]]
if [[ "$*" =~ 'install' && ! "$*" =~ '--help' ]]
then
command bundle "$@" --binstubs
printf "Bundling your gems. This may take a few minutes on first run.\n"
command bundle "$@" --binstubs=$GEM_HOME/bin
else
command bundle "$@"
fi
Expand Down
16 changes: 9 additions & 7 deletions scripts/functions/rvmrc
Expand Up @@ -237,6 +237,11 @@ __rvm_project_rvmrc()
source "${rvm_scripts_path:-"$rvm_path/scripts"}/initialize"
fi

if [[ -n "${rvm_config_path}" || -n "${rvm_path}" ]]
then
export BUNDLE_GEMFILE="${rvm_config_path:-"$rvm_path/config"}/Gemfile"
fi

# Get the first argument or the pwd.
working_dir="${1:-"$PWD"}"

Expand All @@ -257,6 +262,10 @@ __rvm_project_rvmrc()
fi
break
else
if [[ -f "$working_dir/Gemfile" ]]
then
export BUNDLE_GEMFILE="$working_dir/Gemfile"
fi
if [[ -f "$working_dir/.rvmrc" ]]
then
if [[ "${rvm_current_rvmrc:-""}" != "$working_dir/.rvmrc" ]]
Expand Down Expand Up @@ -344,13 +353,6 @@ fi
# rvm gemset import \"\$filename\" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
# fi

#
# If you use bundler and would like to run bundle each time you enter the
# directory, you can uncomment the following code.
#
# export PATH=\"./bin:\$PATH\"
#

" >> .rvmrc

else
Expand Down
15 changes: 8 additions & 7 deletions scripts/info
Expand Up @@ -78,13 +78,14 @@ info_environment()
{
rvm_info="
environment:
PATH: \"${PATH:-""}\"
GEM_HOME: \"${GEM_HOME:-""}\"
GEM_PATH: \"${GEM_PATH:-""}\"
MY_RUBY_HOME: \"${MY_RUBY_HOME:-""}\"
IRBRC: \"${IRBRC:-""}\"
RUBYOPT: \"${RUBYOPT:-""}\"
gemset: \"$(__rvm_current_gemset)\"\n
PATH: \"${PATH:-""}\"
GEM_HOME: \"${GEM_HOME:-""}\"
GEM_PATH: \"${GEM_PATH:-""}\"
MY_RUBY_HOME: \"${MY_RUBY_HOME:-""}\"
IRBRC: \"${IRBRC:-""}\"
RUBYOPT: \"${RUBYOPT:-""}\"
gemset: \"$(__rvm_current_gemset)\"
BUNDLE_GEMFILE: \"${BUNDLE_GEMFILE:-""}\"\n
"

if [[ -n "${MAGLEV_HOME:-""}" ]] ; then
Expand Down