From 8e8ce1edbc5d8145d1c45edacdbbaca21620d7a3 Mon Sep 17 00:00:00 2001 From: Andrzej Magdziarz Date: Mon, 27 Jun 2022 15:24:48 +0200 Subject: [PATCH] Bump version to 0.3.0 --- CHANGELOG.md | 2 +- README.md | 10 +++------- lib/existence.ex | 4 ++-- mix.exs | 2 +- mix.lock | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb56ed0..fb81ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.3.0 unreleased +## v0.3.0 [2022-06-27] ### Enhancements * [Existence] Added `:on_state_change` option. diff --git a/README.md b/README.md index 6aae965..affdc09 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Add `Existence` library to your application dependencies: ```elixir def deps do [ - {:existence, "~> 0.1.1"} + {:existence, "~> 0.3.0"} ] end ``` @@ -53,8 +53,8 @@ defmodule MyApp.Checks do end ``` -Check functions above are for illustrative purposes only, please refer to the `Existence` module -documentation for more realistic dependencies checks examples. +Dependencies checks functions above are for illustrative purposes only, please refer to the +`Existence` module documentation for more realistic dependencies checks examples. Configure your Phoenix router to respond to the `/healthcheck` endpoint requests using for example `Plug.Router.forward/2`: @@ -77,7 +77,3 @@ List individual dependencies checks current states: iex> Existence.get_checks() [check_1: :ok, check_2: :ok] ``` - -## TODO -- [ ] add `telemetry` event emitted on an overall health-check state change. - diff --git a/lib/existence.ex b/lib/existence.ex index 0a4bea4..35c4705 100644 --- a/lib/existence.ex +++ b/lib/existence.ex @@ -91,8 +91,8 @@ defmodule Existence do * `:checks` - keyword list with user defined dependencies checks parameters, see description below for details. Default: `[]`. * `:state` - initial overall `Existence` instance health-check state. Default: `:error`. - * `:on_state_change` - MFA tuple pointing at user function which will be executed on the overall - state change. + * `:on_state_change` - MFA tuple pointing at user function which will be synchronously applied + on the overall health-check state change. User function should be of two arity. As a first argument it will receive current state as `:ok | :error` atom. As a second argument function will receive static arg given in the MFA tuple. Default: `nil`. diff --git a/mix.exs b/mix.exs index 985bc6c..355f5b7 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule Existence.MixProject do use Mix.Project @source_url "https://github.com/Recruitee/existence" - @version "0.2.0" + @version "0.3.0" def project do [ diff --git a/mix.lock b/mix.lock index c8445ae..4c228cf 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,5 @@ %{ - "earmark_parser": {:hex, :earmark_parser, "1.4.25", "2024618731c55ebfcc5439d756852ec4e85978a39d0d58593763924d9a15916f", [:mix], [], "hexpm", "56749c5e1c59447f7b7a23ddb235e4b3defe276afc220a6227237f3efe83f51e"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"},