You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/02/23 03:57:46 UTC
[couchdb-b64url] 05/31: Rename app to b64url
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-b64url.git
commit 9acc9d2da7df4c24596f57abb8529c1efccacc5f
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Nov 21 13:34:40 2013 -0600
Rename app to b64url
---
c_src/{couch_seqs_b64.c => b64url.c} | 2 +-
rebar.config | 2 +-
src/b64url.app.src | 6 ++++++
src/{couch_seqs_b64url.erl => b64url.erl} | 4 ++--
src/couch_seqs.app.src | 6 ------
test/{couch_seqs_b64url_tests.erl => b64url_tests.erl} | 16 ++++++++--------
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/c_src/couch_seqs_b64.c b/c_src/b64url.c
similarity index 99%
rename from c_src/couch_seqs_b64.c
rename to c_src/b64url.c
index a631792..d1e5765 100644
--- a/c_src/couch_seqs_b64.c
+++ b/c_src/b64url.c
@@ -625,6 +625,6 @@ static ErlNifFunc funcs[] = {
};
-ERL_NIF_INIT(couch_seqs_b64url, funcs, &load, &reload, &upgrade, &unload);
+ERL_NIF_INIT(b64url, funcs, &load, &reload, &upgrade, &unload);
diff --git a/rebar.config b/rebar.config
index 5a9da0f..2dae006 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,5 +1,5 @@
{port_specs, [
- {"priv/couch_seqs_b64.so", ["c_src/*.c"]}
+ {"priv/b64url.so", ["c_src/*.c"]}
]}.
{port_env, [
diff --git a/src/b64url.app.src b/src/b64url.app.src
new file mode 100644
index 0000000..839e9b1
--- /dev/null
+++ b/src/b64url.app.src
@@ -0,0 +1,6 @@
+{application, b64url, [
+ {description, "A small NIF for encoding Base64 URL encoding/decoding."},
+ {vsn, git},
+ {registered, []},
+ {applications, [kernel]}
+]}.
diff --git a/src/couch_seqs_b64url.erl b/src/b64url.erl
similarity index 94%
rename from src/couch_seqs_b64url.erl
rename to src/b64url.erl
index cd53f30..e4b1f55 100644
--- a/src/couch_seqs_b64url.erl
+++ b/src/b64url.erl
@@ -1,4 +1,4 @@
--module(couch_seqs_b64url).
+-module(b64url).
-on_load(init/0).
@@ -52,7 +52,7 @@ init() ->
Path ->
Path
end,
- erlang:load_nif(filename:join(PrivDir, "couch_seqs_b64"), 0).
+ erlang:load_nif(filename:join(PrivDir, "b64url"), 0).
encode_loop(IoData, St) ->
diff --git a/src/couch_seqs.app.src b/src/couch_seqs.app.src
deleted file mode 100644
index 44b6a3d..0000000
--- a/src/couch_seqs.app.src
+++ /dev/null
@@ -1,6 +0,0 @@
-{application, couch_seqs, [
- {description, "A library for handling couch sequences"},
- {vsn, git},
- {registered, []},
- {applications, [kernel]}
-]}.
diff --git a/test/couch_seqs_b64url_tests.erl b/test/b64url_tests.erl
similarity index 89%
rename from test/couch_seqs_b64url_tests.erl
rename to test/b64url_tests.erl
index aea784f..5b01606 100644
--- a/test/couch_seqs_b64url_tests.erl
+++ b/test/b64url_tests.erl
@@ -1,4 +1,4 @@
--module(couch_seqs_b64url_tests).
+-module(b64url_tests).
-compile(export_all).
-include_lib("proper/include/proper.hrl").
@@ -6,7 +6,7 @@
table_test_() ->
- ?_assertEqual(ok, couch_seqs_b64url:check_tables()).
+ ?_assertEqual(ok, b64url:check_tables()).
proper_test_() ->
@@ -21,7 +21,7 @@ proper_test_() ->
prop_encode_binary() ->
?FORALL(Bin, binary(), begin
A = couch_encode_base64url(Bin),
- B = couch_seqs_b64url:encode(Bin),
+ B = b64url:encode(Bin),
A == B
end).
@@ -29,7 +29,7 @@ prop_encode_binary() ->
prop_encode_iolist() ->
?FORALL(IoList, shallow_iolist(), begin
A = couch_encode_base64url(iolist_to_binary(IoList)),
- B = couch_seqs_b64url:encode(IoList),
+ B = b64url:encode(IoList),
A == B
end).
@@ -37,7 +37,7 @@ prop_encode_iolist() ->
prop_decode_binary() ->
?FORALL(Bin, binary(), begin
B64UrlBin = couch_encode_base64url(Bin),
- Dec = couch_seqs_b64url:decode(B64UrlBin),
+ Dec = b64url:decode(B64UrlBin),
Dec == Bin
end).
@@ -45,14 +45,14 @@ prop_decode_binary() ->
prop_decode_iolist() ->
?FORALL(IoList, shallow_b64_iolist(), begin
A = couch_decode_base64url(iolist_to_binary(IoList)),
- B = couch_seqs_b64url:decode(IoList),
+ B = b64url:decode(IoList),
A == B
end).
prop_decode_binary_error() ->
?FORALL({ErrBin, BlockPos}, bad_binary(), begin
- Dec = couch_seqs_b64url:decode(ErrBin),
+ Dec = b64url:decode(ErrBin),
Dec == {error, {bad_block, BlockPos}}
end).
@@ -60,7 +60,7 @@ prop_decode_binary_error() ->
prop_decode_bad_length() ->
?FORALL(Bin, bad_len_binary(), begin
try
- couch_seqs_b64url:decode(Bin),
+ b64url:decode(Bin),
false
catch error:badarg ->
true