Skip to content

Commit

Permalink
update deps and bump to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deadtrickster committed Mar 11, 2017
1 parent 65a5ff2 commit 5a83623
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
2 changes: 1 addition & 1 deletion mix.exs
Expand Up @@ -3,7 +3,7 @@ defmodule PrometheusHTTPD.Mixfile do

def project do
[app: :prometheus_httpd,
version: "1.0.0",
version: "1.1.0",
description: description(),
package: package()]
end
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Expand Up @@ -6,7 +6,7 @@
{post, []}]}.

{post_hooks, []}.
{deps, [{prometheus, "3.1.1"},
{deps, [{prometheus, "3.2.1"},
{accept, "0.3.0"}]}.
{shell, [{apps, []}]}.
{cover_enabled, true}.
Expand Down
4 changes: 2 additions & 2 deletions rebar.lock
@@ -1,8 +1,8 @@
{"1.1.0",
[{<<"accept">>,{pkg,<<"accept">>,<<"0.3.0">>},0},
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"3.1.1">>},0}]}.
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"3.2.1">>},0}]}.
[
{pkg_hash,[
{<<"accept">>, <<"2505B60BCB992CA79BD03AB7B8FEC8A520A47D9730F286DF1A479CC98B03F94B">>},
{<<"prometheus">>, <<"B35148CC9228511E8C6E9E96721FB967E4BE38E7703DBD8A6FB26B10FF85CC05">>}]}
{<<"prometheus">>, <<"6CA14356B6960722630D15C5503B3982D710D70224F32B8BCF402BF48A0369B6">>}]}
].
19 changes: 1 addition & 18 deletions src/prometheus_http_config.erl
Expand Up @@ -40,7 +40,7 @@ valid_path_and_registry(URI, RegistryO) ->
undefined ->
validate_registry(RegistryO, registry());
Registry0 ->
case registry_exists(Registry0) of
case prometheus_registry:exists(Registry0) of
false ->
{registry_not_found, Registry0};
Registry ->
Expand Down Expand Up @@ -146,20 +146,3 @@ call_with_basic_auth(Headers, Fun) ->
parse_basic_encoded(Encoded) ->
Params = base64:decode_to_string(Encoded),
string:tokens(Params, ":").

%% TODO: move to prometheus_registry

registry_exists(Name) ->
First = ets:first(?PROMETHEUS_REGISTRY_TABLE),
registry_exists(First, iolist_to_binary(Name)).

registry_exists('$end_of_table', _) ->
false;
registry_exists(Registry, Name) ->
case atom_to_binary(Registry, utf8) of
Name ->
Registry;
_ ->
Next = ets:next(?PROMETHEUS_REGISTRY_TABLE, Registry),
registry_exists(Next, Name)
end.
3 changes: 2 additions & 1 deletion src/prometheus_httpd.app.src
@@ -1,6 +1,6 @@
{application, prometheus_httpd,
[{description, "Prometheus.io inets httpd exporter"},
{vsn, "1.0.0"},
{vsn, "1.1.0"},
{registered, []},
{applications,
[kernel,
Expand All @@ -15,6 +15,7 @@
{maintainers, ["Ilya Khaprov"]},
{licenses, ["MIT"]},
{links, [{"Github", "https://github.com/deadtrickster/prometheus.erl"},
{"Beam Dashboards", "https://github.com/deadtrickster/beam-dashboards"},
{"Prometheus", "https://hex.pm/packages/prometheus"},
{"Prometheus.ex", "https://hex.pm/packages/prometheus_ex"},
{"Ecto Instrumenter", "https://hex.pm/packages/prometheus_ecto"},
Expand Down

0 comments on commit 5a83623

Please sign in to comment.