Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
b998838d
Commit
b998838d
authored
Sep 06, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #627 from sstephenson/list-custom-definitions
Fix `rbenv install --list` for definitions auto-discovery
parents
7a17175f
311d96f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
bin/rbenv-install
+9
-9
test/rbenv.bats
+18
-1
No files found.
bin/rbenv-install
View file @
b998838d
...
@@ -51,6 +51,15 @@ indent() {
...
@@ -51,6 +51,15 @@ indent() {
sed
's/^/ /'
sed
's/^/ /'
}
}
# Add `share/ruby-build/` directory from each rbenv plugin to the list of
# paths where build definitions are looked up.
shopt
-s
nullglob
for
plugin_path
in
"
$RBENV_ROOT
"
/plugins/
*
/share/ruby-build
;
do
RUBY_BUILD_DEFINITIONS
=
"
${
RUBY_BUILD_DEFINITIONS
}
:
${
plugin_path
}
"
done
export
RUBY_BUILD_DEFINITIONS
shopt
-u
nullglob
unset
FORCE
unset
FORCE
unset
SKIP_EXISTING
unset
SKIP_EXISTING
unset
KEEP
unset
KEEP
...
@@ -162,15 +171,6 @@ if [ -z "${RUBY_BUILD_CACHE_PATH}" ] && [ -d "${RBENV_ROOT}/cache" ]; then
...
@@ -162,15 +171,6 @@ if [ -z "${RUBY_BUILD_CACHE_PATH}" ] && [ -d "${RBENV_ROOT}/cache" ]; then
export
RUBY_BUILD_CACHE_PATH
=
"
${
RBENV_ROOT
}
/cache"
export
RUBY_BUILD_CACHE_PATH
=
"
${
RBENV_ROOT
}
/cache"
fi
fi
# Add `share/ruby-build/` directory from each rbenv plugin to the list of
# paths where build definitions are looked up.
shopt
-s
nullglob
for
plugin_path
in
"
$RBENV_ROOT
"
/plugins/
*
/share/ruby-build
;
do
RUBY_BUILD_DEFINITIONS
=
"
${
RUBY_BUILD_DEFINITIONS
}
:
${
plugin_path
}
"
done
export
RUBY_BUILD_DEFINITIONS
shopt
-u
nullglob
# Default RBENV_VERSION to the globally-specified Ruby version. (The
# Default RBENV_VERSION to the globally-specified Ruby version. (The
# REE installer requires an existing Ruby installation to run. An
# REE installer requires an existing Ruby installation to run. An
# unsatisfied local .ruby-version file can cause the installer to
# unsatisfied local .ruby-version file can cause the installer to
...
...
test/rbenv.bats
View file @
b998838d
...
@@ -88,8 +88,25 @@ OUT
...
@@ -88,8 +88,25 @@ OUT
stub_ruby_build "echo \$RUBY_BUILD_DEFINITIONS | tr ':' $'\\n'"
stub_ruby_build "echo \$RUBY_BUILD_DEFINITIONS | tr ':' $'\\n'"
run rbenv-install 2.1.2
run rbenv-install 2.1.2
assert_success <<OUT
assert_success
assert_output <<OUT
${RBENV_ROOT}/plugins/bar/share/ruby-build
${RBENV_ROOT}/plugins/bar/share/ruby-build
${RBENV_ROOT}/plugins/foo/share/ruby-build
${RBENV_ROOT}/plugins/foo/share/ruby-build
OUT
OUT
}
}
@test "list build definitions from plugins" {
mkdir -p "${RBENV_ROOT}/plugins/foo/share/ruby-build"
mkdir -p "${RBENV_ROOT}/plugins/bar/share/ruby-build"
stub_ruby_build "--definitions : echo \$RUBY_BUILD_DEFINITIONS | tr ':' $'\\n'"
run rbenv-install --list
assert_success
assert_output <<OUT
Available versions:
${RBENV_ROOT}/plugins/bar/share/ruby-build
${RBENV_ROOT}/plugins/foo/share/ruby-build
OUT
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment