Skip to content

Commit 93735b1

Browse files
committed
rbenv -> nodenv
1 parent f0060b3 commit 93735b1

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
## Installation
22

3-
To install rbenv-each, clone this repository into your rbenv plugins directory. (You'll need a recent version of rbenv that supports plugin bundles.)
3+
To install nodenv-each, clone this repository into your nodenv plugins directory. (You'll need a recent version of nodenv that supports plugin bundles.)
44

55

66
```
7-
$ mkdir -p "$(rbenv root)"/plugins
8-
$ git clone https://github.com/chriseppstein/rbenv-each.git "$(rbenv root)"/plugins/rbenv-each
7+
$ mkdir -p "$(nodenv root)"/plugins
8+
$ git clone https://github.com/jasonkarns/nodenv-each.git "$(nodenv root)"/plugins/nodenv-each
99
```
1010

1111
## Usage
1212

1313
```
14-
$ rbenv help each
14+
$ nodenv help each
1515
```
1616

17-
Verbose mode will print a header for each ruby so you can distinguish
17+
Verbose mode will print a header for each node so you can distinguish
1818
the output.
1919

2020
### Examples:
2121

2222
```
23-
$ rbenv each bundle install
24-
$ rbenv each -v rake test
23+
$ nodenv each bundle install
24+
$ nodenv each -v rake test
2525
```

bin/nodenv-each

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/usr/bin/env bash
22
#
3-
# Summary: Execute a command for each Ruby version
3+
# Summary: Execute a command for each Node version
44
#
5-
# Usage: rbenv each [-v] <command> [arg1 arg2...]
5+
# Usage: nodenv each [-v] <command> [arg1 arg2...]
66
#
7-
# Executes a command for each Ruby version by setting RBENV_VERSION.
7+
# Executes a command for each Node version by setting NODENV_VERSION.
88
# Failures are collected and reported at the end.
99
#
10-
# -v Verbose mode. Prints a header for each ruby.
10+
# -v Verbose mode. Prints a header for each node
1111
#
1212
set -e
13-
[ -n "$RBENV_DEBUG" ] && set -x
13+
[ -n "$NODENV_DEBUG" ] && set -x
1414

15-
# Provide rbenv completions
15+
# Provide nodenv completions
1616
if [ "$1" = "--complete" ]; then
1717
echo -v
1818
exit
@@ -25,7 +25,7 @@ fi
2525

2626
case "$1" in
2727
"" | -* )
28-
rbenv-help --usage each >&2
28+
nodenv-help --usage each >&2
2929
exit 1
3030
;;
3131
esac
@@ -42,27 +42,27 @@ if [ -t 1 ]; then
4242
NORMAL="\033[0m"
4343
fi
4444

45-
failed_rubies=""
45+
failed_nodes=""
4646

4747
trap "exit 1" INT
4848

49-
for ruby in $(rbenv versions --bare); do
49+
for node in $(nodenv versions --bare); do
5050
if [ -n "$verbose" ]; then
51-
header="===[$ruby]==================================================================="
51+
header="===[$node]==================================================================="
5252
header="${header:0:72}"
5353
header="${header/[/[${YELLOW}}"
5454
header="${header/]/${GRAY}]}"
5555
echo -e "${GRAY}${header}${NORMAL}"
5656
fi
5757

5858
STATUS=0
59-
RBENV_VERSION="$ruby" "$@" || STATUS=$?
60-
[ $STATUS -eq 0 ] || failed_rubies="$failed_rubies $ruby"
59+
NODENV_VERSION="$node" "$@" || STATUS=$?
60+
[ $STATUS -eq 0 ] || failed_nodes="$failed_nodes $node"
6161

6262
[ -n "$verbose" ] && echo
6363
done
6464

65-
if [ -n "$failed_rubies" ]; then
66-
echo -e "${RED}FAILED IN:${failed_rubies}${NORMAL}"
65+
if [ -n "$failed_nodes" ]; then
66+
echo -e "${RED}FAILED IN:${failed_nodes}${NORMAL}"
6767
exit 1
6868
fi

0 commit comments

Comments
 (0)