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

[Close #11] Euen.11.rebar3 #12

Merged
merged 3 commits into from
May 17, 2017
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ util/*.beam
cover_report/
test/*.beam
test/*.log
log*/

.eunit

Expand All @@ -18,3 +19,5 @@ test/*.log
erl_crash.dump

.DS_Store

_build/
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PROJECT = fusco

REBAR := ./rebar
REBAR := rebar3
DIALYZER = dialyzer

APPS = kernel stdlib sasl inets ssl public_key crypto compiler
Expand All @@ -13,12 +13,12 @@ compile:
$(REBAR) compile

doc:
$(REBAR) doc
$(REBAR) edoc

test: compile
$(REBAR) eunit ct

release: all dialyze test
release: all dialyzer test
$(REBAR) release

clean:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ list of all available options, please check OTP's ssl module manpage.
disconnect(Client :: pid())
```

Running Tests
----
You can execute all test with
```bash
> make test
```
And you can check [this repo](https://github.com/esl/fusco_eqc) and run the Erlang QuickCheck tests
27 changes: 27 additions & 0 deletions elvis.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[{elvis, [
{config, [
#{dirs => ["src", "test"],
filter => "*.erl",
rules => [
{elvis_style, line_length, #{limit => 80}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 30}},
{elvis_style, operator_spaces, disable},
{elvis_style, invalid_dynamic_call, disable},
{elvis_style, variable_naming_convention, #{regex => "^([_A-Z][0-9a-zA-Z]*)$"}},
{elvis_style, function_naming_convention, #{regex => "^([a-z_][a-z0-9]*_?)*$"}}
],
ruleset => erl_files
},
#{dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config,
rules => [
{elvis_project, protocol_for_deps_rebar, disable} %% until elvis supports pkgs with versions
]
},
#{dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config
}
]}
]}].
6 changes: 3 additions & 3 deletions include/fusco.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
value :: binary(),
expires :: {{integer(), integer(), integer()},
{integer(), integer(), integer()}} | atom(),
path :: binary(),
path_tokens :: [binary()],
path :: binary() | undefined,
path_tokens :: [binary()] | undefined,
max_age :: integer() | atom(),
domain :: binary()
domain :: binary() | undefined
}).

-record(response, {socket,
Expand Down
2 changes: 1 addition & 1 deletion include/fusco_types.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
-type result() ::
{ok, {{binary(), binary()}, headers(), body(),
non_neg_integer(), pos_timeout()}} |
{error, atom()}.
{error, atom()}.
Empty file modified priv/fusco_drv.so
100755 → 100644
Empty file.
Binary file removed rebar
Binary file not shown.
77 changes: 74 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,77 @@
{erl_opts, [debug_info,
{platform_define, "R1[45]", no_binary_to_integer}]}.
{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et

%% == Erlang Compiler ==

%% Erlang compiler options
{erl_opts, [ warn_unused_vars
, warn_export_all
, warn_shadow_vars
, warn_unused_import
, warn_unused_function
, warn_bif_clash
, warn_unused_record
, warn_deprecated_function
, warn_obsolete_guard
, strict_validation
, warn_export_vars
, warn_exported_vars
, debug_info
, {platform_define, "R1[45]", no_binary_to_integer}]}.

{profiles, [
{test, [
{deps, [ {katana_test, {git, "https://github.com/inaka/katana-test.git", {tag, "0.0.5"}}}
, {mixer, {git, "https://github.com/inaka/mixer.git", {tag, "0.1.5"}}}
, {meck, "0.8.4"}
, {xref_runner, {git, "https://github.com/inaka/xref_runner", {tag, "0.2.6"}}}
]}
]}
]}.

%% == Common Test ==

{ct_compile_opts, [ warn_unused_vars
, warn_export_all
, warn_shadow_vars
, warn_unused_import
, warn_unused_function
, warn_bif_clash
, warn_unused_record
, warn_deprecated_function
, warn_obsolete_guard
, strict_validation
, warn_export_vars
, warn_exported_vars
, debug_info]}.

{ct_opts, [ {sys_config, ["test/test.config"]}
, {logdir, "./logs"}
, {verbose, true}
]}.

%% == Cover ==

{cover_enabled, true}.

{cover_opts, [verbose]}.

{cover_export_enabled, true}.

{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.

%% == Dependencies ==

{deps, []}.

%% == Dialyzer ==

{dialyzer, [ {warnings, [ no_return
, unmatched_returns
, error_handling
]}
, {plt_apps, top_level_deps}
, {plt_extra_apps, []}
, {plt_location, local}
, {base_plt_apps, [stdlib, kernel]}
, {base_plt_location, global}]}.
1 change: 1 addition & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[].
5 changes: 4 additions & 1 deletion src/fusco.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{modules, []},
{registered, []},
{applications, [kernel, stdlib, ssl]},
{env, []}
{env, []},
{licenses, ["Apache 2.0"]},
{links, [{"Github", "https://github.com/esl/fusco"}]},
{build_tools, ["rebar3"]}
]}.

Loading