diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b61798..fbba291 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: # Compile - name: Compile run: | - rebar3 do compile, dialyzer, edoc, xref + rebar3 do compile, dialyzer, ex_doc, xref # Tests - name: Run tests diff --git a/.gitignore b/.gitignore index fee065d..3a6e9fa 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ rebar.lock *.log *.iml .idea/* +.DS_Store diff --git a/Makefile b/Makefile index 357abd8..1383e12 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,10 @@ edoc: profile=edown edoc: @$(rebar_cmd) edoc +.PHONY: ex_doc +ex_doc: + @$(rebar_cmd) ex_doc + .PHONY: dialyze dialyze: compile @$(rebar_cmd) dialyzer diff --git a/README.md b/README.md index af8413f..49aaec2 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ To test with an existing kafka cluster set below environment variables: - `KPRO_TEST_KAFKA_TOPIC_NAME`: Topic name for message produce/fetch test. - `KPRO_TEST_KAFKA_TOPIC_LAT_NAME`: Topic name for message produce/fetch test with `message.timestamp.type=LogAppendTime` set. - `KPRO_TEST_KAFKA_SASL_USER_PASS_FILE`: A text file having two lines for username and password. -- `KPRO_TEST_SSL_TRUE`: Set to 'TRUE' or 'true' or '1' to use `ssl => true' in connection config (if kafka ca is trusted already) +- `KPRO_TEST_SSL_TRUE`: Set to `TRUE` or `true` or '1' to use `ssl => true` in connection config (if kafka ca is trusted already) - `KPRO_TEST_SSL_CA_CERT_FILE`: Ca cert file - `KPRO_TEST_SSL_KEY_FILE`: Client private key file - `KPRO_TEST_SSL_CERT_FILE`: Client cert file diff --git a/rebar.config b/rebar.config index 9813fce..994bb84 100644 --- a/rebar.config +++ b/rebar.config @@ -27,3 +27,22 @@ {xref_checks, [undefined_function_calls, undefined_functions, locals_not_used, deprecated_function_calls, deprecated_functions]}. + +{project_plugins, [rebar3_hex, rebar3_ex_doc]}. + +{hex, [ + {doc, #{provider => ex_doc}} +]}. + +{ex_doc, [ + {extras, [ + {"changelog.md", #{title => "ChangeLog"}}, + {"README.md", #{title => "Overview"}}, + {"LICENSE", #{title => "License"}}, + {"NOTICE", #{title => "Notice"}} + ]}, + {main, "README.md"}, + {homepage_url, "https://hexdocs.pm/kafka_protocol"}, + {source_url, "https://github.com/kafka4beam/kafka_protocol"}, + {api_reference, false} +]}. diff --git a/src/kpro.erl b/src/kpro.erl index 70bea9e..a9c34a5 100644 --- a/src/kpro.erl +++ b/src/kpro.erl @@ -360,7 +360,7 @@ connect(Endpoint, ConnConfig) -> connect_any(Endpoints, ConnConfig) -> kpro_brokers:connect_any(Endpoints, ConnConfig). -%% @doc Sotp connection process. +%% @doc Stop connection process. -spec close_connection(connection()) -> ok. close_connection(Connection) -> kpro_connection:stop(Connection).