Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper tests #11

Merged
merged 13 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
otp_version: [19.3,20.3,21,22,23]
otp_version: [20.3,21,22,23,24]
os: [ubuntu-latest]

container:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
*.beam
/ebin/depcache.app
/.rebar/erlcinfo
doc/
_build
rebar3
doc/*
!doc/style.css
!doc/overview.edoc
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,23 @@ compile: $(REBAR)

test: $(REBAR)
$(REBAR) eunit
$(REBAR) as test proper -n 10

xref: $(REBAR)
$(REBAR) xref

dialyzer: $(REBAR)
$(REBAR) dialyzer
$(REBAR) as test dialyzer

edoc:
$(REBAR) edoc

edoc_private:
$(REBAR) as edoc_private edoc

clean:
$(REBAR) clean
rm -rf doc

./rebar3:
erl -noshell -s inets start -s ssl start \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Usage

Start a depcache server like this:

{ok, Server} = depcache:start_link([])
{ok, Server} = depcache:start_link([]).

Now you can get and set values using the returned `Server` pid.

Expand Down
6 changes: 6 additions & 0 deletions doc/overview.edoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@author Arjan Scherpenisse <arjan@scherpenisse.net>
@author Marc Worrell <marc@worrell.nl>
@title depcache
@doc In-memory caching server with dependency checks and local in process memoization of lookups.
@copyright Apache-2.0 License 2022 by Marc Worrell, Arjan Scherpenisse
@reference See <a href="http://aosabook.org/en/posa/zotonic.html#posa.zotonic.depcache">The Performance of Open Source Applications</a> for more information.
71 changes: 71 additions & 0 deletions doc/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* standard EDoc style sheet */
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
margin-left: .25in;
margin-right: .2in;
margin-top: 0.2in;
margin-bottom: 0.2in;
color: #000000;
background-color: #ffffff;
}
h1,h2 {
margin-left: -0.2in;
}
div.navbar {
background-color: #add8e6;
padding: 0.2em;
}
h2.indextitle {
padding: 0.4em;
background-color: #add8e6;
}
h3.function,h3.typedecl {
background-color: #add8e6;
padding-left: 1em;
}
div.spec {
margin-left: 2em;

background-color: #eeeeee;
}
a.module {
text-decoration:none
}
a.module:hover {
background-color: #eeeeee;
}
ul.definitions {
list-style-type: none;
}
ul.index {
list-style-type: none;
background-color: #eeeeee;
}

/*
* Minor style tweaks
*/
ul {
list-style-type: square;
}
table {
border-collapse: collapse;
}
td {
padding: 3px;
vertical-align: middle;
}

/*
Tune styles
*/

table[summary="navigation bar"] {
background-image: url('http://zotonic.com/lib/images/logo.png');
background-repeat: no-repeat;
background-position: center;
}

code, p>tt, a>tt {
font-size: 1.2em;
}
20 changes: 19 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,28 @@
{platform_define, "^(R|1|20)", fun_stacktrace}
]}.

{project_plugins, [rebar3_proper]}.

{xref_checks, [undefined_function_calls,
locals_not_used,
deprecated_function_calls]}.

{edoc_opts, [
{preprocess, true}
{dir, "doc"}, {preprocess, true}, {stylesheet, "style.css"}, {title, "depcache"}, {application, depcache}
]}.

{profiles, [
{edoc_private, [
{edoc_opts, [
{private, true}
]}
]},
{test, [
{dialyzer, [
{warnings, [
no_return
]}
]},
{deps, [{proper, "1.4.0"}]}
]}
]}.
1 change: 0 additions & 1 deletion rebar.lock

This file was deleted.

Loading