3aee5c19412dea541495e10f1c4cc7a6d8e4af50

Author
Bodo Tasche <bodo@wannawork.de>
Committer
Hakan Ensari <hakan.ensari@papercavalier.com>
Date

Message

changed names of functions and variables to fit naming conventions

Diff

 1diff --git a/plugins/bundler-exec/bundler-exec.plugin.zsh b/plugins/bundler-exec/bundler-exec.plugin.zsh
 2index cfab16c5e0d7f1a53b84805352f11931d3881601..4684dcb8d404402606c8ea74c45f02dc5ad09ac6 100644
 3--- a/plugins/bundler-exec/bundler-exec.plugin.zsh
 4+++ b/plugins/bundler-exec/bundler-exec.plugin.zsh
 5@@ -5,26 +5,26 @@ bundled_commands=(cucumber heroku rackup rails rake rspec ruby shotgun spec spor
 6 
 7 ## Functions
 8 
 9-bundler-installed()
10+_bundler-installed()
11 {
12     which bundle > /dev/null 2>&1
13 }
14 
15-within-bundled-project()
16+_within-bundled-project()
17 {
18-    local dir="$(pwd)"
19-    while [ "$(dirname $dir)" != "/" ]; do
20-        [ -f "$dir/Gemfile" ] && return
21-        dir="$(dirname $dir)"
22+    local check_dir=$PWD
23+    while [ "$(dirname $check_dir)" != "/" ]; do
24+        [ -f "$check_dir/Gemfile" ] && return
25+        dir="$(dirname $check_dir)"
26     done
27     false
28 }
29 
30-run-with-bundler()
31+_run-with-bundler()
32 {
33     local command="$1"
34     shift
35-    if bundler-installed && within-bundled-project; then
36+    if _bundler-installed && _within-bundled-project; then
37         bundle exec $command "$@"
38     else
39         $command "$@"
40@@ -33,5 +33,5 @@ run-with-bundler()
41 
42 ## Main program
43 for cmd in $bundled_commands; do
44-   alias $cmd="run-with-bundler $cmd"
45+   alias $cmd="_run-with-bundler $cmd"
46 done