Skip to content

Commit e5d4287

Browse files
committed
Merge pull request websterclay#2 from vinoski/update-1.0
minor changes and cleanup for 1.0
2 parents 2885299 + 649f1b7 commit e5d4287

14 files changed

+79
-82
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ Install [rebar](https://github.com/basho/rebar). You can do that via homebrew:
99
brew update
1010
brew install rebar
1111

12-
Drop these templates in `~/.rebar/templates/`, then:
12+
Drop these templates in `~/.rebar/templates/`:
13+
14+
cp riak* ~/.rebar/templates
15+
16+
Then:
1317

1418
mkdir myapp
1519
cd myapp
@@ -22,7 +26,7 @@ Integrate this app into your node's `rebar.config`:
2226

2327
...
2428
{deps, [
25-
{riak_core, "0.14.*", {git, "git://github.com/basho/riak_core", {tag, "riak_core-0.14.1"}}},
29+
{riak_core, "1.0.*", {git, "git://github.com/basho/riak_core", "1.0"}},
2630
{myapp, ".*", {git, "[email protected]:bij/myapp.git", "HEAD"}},
2731
]}
2832
...
@@ -36,4 +40,4 @@ function, which should return `{pong, Partition}`:
3640
2> myapp:ping().
3741
{pong,753586781748746817198774991869333432010090217472}
3842

39-
Hey, distributed unicorns!
43+
Hey, distributed unicorns!

riak_core.app.src

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%% -*- erlang -*-
12
{application, {{appid}},
23
[
34
{description, ""},
@@ -10,4 +11,4 @@
1011
]},
1112
{mod, { {{appid}}_app, []}},
1213
{env, []}
13-
]}.
14+
]}.

riak_core.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
%% Public API
1010

11-
% @doc Pings a random vnode to make sure communication is functional
11+
%% @doc Pings a random vnode to make sure communication is functional
1212
ping() ->
1313
DocIdx = riak_core_util:chash_key({<<"ping">>, term_to_binary(now())}),
1414
PrefList = riak_core_apl:get_primary_apl(DocIdx, 1, {{appid}}),

riak_core.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ apps/{{appid}}/ebin
66
dev/*
77
doc/*
88
rel/{{nodeid}}
9-

riak_core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ following files:
1010
* `src/riak_{{appid}}_vnode.erl`
1111
* an implementation of the riak_core_vnode behaviour
1212
* `src/{{appid}}.erl`
13-
* the public API for interacting with your vnode
13+
* the public API for interacting with your vnode

riak_core.rebar.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{sub_dirs, ["rel", "apps/{{appid}}"]}.
2-
{cover_enabled, true.}
3-
{erl_opts, [debug_info, fail_on_warning]}.
4-
{deps, [{riak_core, "0.14..*",
5-
{git, "git://github.com/basho/riak_core", "master"}}
2+
{cover_enabled, true}.
3+
{erl_opts, [debug_info, warnings_as_errors]}.
4+
{deps, [{riak_core, "1.0.*",
5+
{git, "git://github.com/basho/riak_core", {tag, "1.0.0"}}}
66
]}.

riak_core.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{template, "riak_core.erl", "src/{{appid}}.erl"}.
55
{template, "riak_core.hrl", "src/{{appid}}.hrl"}.
66
{template, "riak_core_sup.erl", "src/{{appid}}_sup.erl"}.
7-
{template, "riak_core_vnode.erl", "src/riak_{{appid}}_vnode.erl"}.
7+
{template, "riak_core_vnode.erl", "src/{{appid}}_vnode.erl"}.
88
{template, "riak_core.rebar.config", "rebar.config"}.
99
{template, "riak_core.gitignore", ".gitignore"}.
10-
{template, "riak_core.md", "README.md"}.
10+
{template, "riak_core.md", "README.md"}.

riak_core_multinode.Makefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1+
REBAR = $(shell pwd)/rebar
2+
13
.PHONY: deps rel stagedevrel
24

35
all: deps compile
46

57
compile:
6-
./rebar compile
8+
$(REBAR) compile
79

810
deps:
9-
./rebar get-deps
11+
$(REBAR) get-deps
1012

1113
clean:
12-
./rebar clean
14+
$(REBAR) clean
1315

1416
distclean: clean devclean relclean
15-
./rebar delete-deps
17+
$(REBAR) delete-deps
1618

1719
test:
18-
./rebar skip_deps=true eunit
20+
$(REBAR) skip_deps=true eunit
1921

2022
rel: all
21-
./rebar generate
23+
$(REBAR) generate
2224

2325
relclean:
2426
rm -rf rel/{{nodeid}}
@@ -29,7 +31,7 @@ devrel: dev1 dev2 dev3
2931
### Docs
3032
###
3133
docs:
32-
./rebar skip_deps=true doc
34+
$(REBAR) skip_deps=true doc
3335

3436
##
3537
## Developer targets
@@ -51,7 +53,7 @@ devclean:
5153

5254
dev1 dev2 dev3: all
5355
mkdir -p dev
54-
(cd rel && ../rebar generate target_dir=../dev/$@ overlay_vars=vars/$@.config)
56+
(cd rel && $(REBAR) generate target_dir=../dev/$@ overlay_vars=vars/$@.config)
5557

5658

5759
##
@@ -79,9 +81,9 @@ dialyzer: deps compile
7981

8082

8183
cleanplt:
82-
@echo
84+
@echo
8385
@echo "Are you sure? It takes about 1/2 hour to re-build."
8486
@echo Deleting $(COMBO_PLT) in 5 seconds.
85-
@echo
87+
@echo
8688
sleep 5
87-
rm $(COMBO_PLT)
89+
rm $(COMBO_PLT)

riak_core_multinode.admin-runner

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ "$RUNNER_USER" -a "x$LOGNAME" != "x$RUNNER_USER" ]; then
1616
exit 1
1717
fi
1818
echo "Attempting to restart script through sudo -u $RUNNER_USER"
19-
exec sudo -u $RUNNER_USER -i $RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@
19+
exec sudo -u $RUNNER_USER -i $RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT "$@"
2020
fi
2121

2222
# Make sure CWD is set to runner base dir
@@ -145,7 +145,7 @@ case "$1" in
145145
continue
146146
fi
147147

148-
# Get the list of services that are available on the requested noe
148+
# Get the list of services that are available on the requested node
149149
SERVICES=`$NODETOOL rpcterms riak_core_node_watcher services "'${TARGETNODE}'."`
150150
echo "$SERVICES" | grep "[[,]$SVC[],]" > /dev/null 2>&1
151151
if [ "X$?" = "X0" ]; then

riak_core_multinode.app.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%% -*- erlang -*-
12
[
23
%% Riak Core config
34
{riak_core, [
@@ -18,19 +19,18 @@
1819
% {certfile, "etc/cert.pem"},
1920
% {keyfile, "etc/key.pem"}
2021
% ]},
21-
22+
2223
%% riak_handoff_port is the TCP port that Riak uses for
2324
%% intra-cluster data handoff.
2425
{handoff_port, {{handoff_port}} }
2526
]},
26-
27+
2728
%% SASL config
2829
{sasl, [
2930
{sasl_error_logger, {file, "log/sasl-error.log"}},
3031
{errlog_type, error},
3132
{error_logger_mf_dir, "log/sasl"}, % Log directory
3233
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
3334
{error_logger_mf_maxfiles, 5} % 5 files max
34-
]}
35+
]}
3536
].
36-

0 commit comments

Comments
 (0)