Skip to content

Commit

Permalink
project_36 - Update elixir libraries, fix test for credo, add version… (
Browse files Browse the repository at this point in the history
#35)

* project_36 - Update elixir libraries, fix test for credo, add version checks

co-authored-by: Richard Jones <rjones@hntb.com>
  • Loading branch information
2 people authored and ScottMillard committed Jun 28, 2019
1 parent 82a68ca commit e29d156
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ before_install:
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
- mix local.rebar --force;
- mix local.rebar --force
- mix local.hex --force
- mix deps.get
script:
- mix format --check-formatted
- mix credo
script:
- mix hex.outdated
- mix test
deploy:
skip_cleanup: true
Expand Down
3 changes: 3 additions & 0 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ config :divo,
}
}
}

config :husky,
pre_commit: "mix format --check-formatted && mix credo && mix hex.outdated"
5 changes: 2 additions & 3 deletions lib/divo/helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ defmodule Divo.Helper do
"""
@spec fetch_config() :: map() | String.t() | [tuple()]
def fetch_config() do
with {:ok, config} <- Application.fetch_env(fetch_name(), :divo) do
config
else
case Application.fetch_env(fetch_name(), :divo) do
{:ok, config} -> config
:error -> raise ArgumentError, message: "no services were defined in application config"
end
end
Expand Down
7 changes: 4 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Divo.MixProject do
def project do
[
app: :divo,
version: "1.1.6",
version: "1.1.7",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand All @@ -25,12 +25,13 @@ defmodule Divo.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:credo, "~> 1.0", only: [:dev, :test], runtime: false},
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:jason, "~> 1.1"},
{:placebo, "~> 1.2", only: [:dev, :test]},
{:ex_doc, "~> 0.19", only: :dev},
{:patiently, "~> 0.2"},
{:temporary_env, "~> 2.0", only: [:dev, :test]}
{:temporary_env, "~> 2.0", only: [:dev, :test]},
{:husky, "~> 1.0", only: :dev, runtime: false}
]
end

Expand Down
3 changes: 2 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
%{
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"},
"credo": {:hex, :credo, "1.0.5", "fdea745579f8845315fe6a3b43e2f9f8866839cfbc8562bb72778e9fdaa94214", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
"credo": {:hex, :credo, "1.1.0", "e0c07b2fd7e2109495f582430a1bc96b2c71b7d94c59dfad120529f65f19872f", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
"earmark": {:hex, :earmark, "1.3.2", "b840562ea3d67795ffbb5bd88940b1bed0ed9fa32834915125ea7d02e35888a5", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.20.2", "1bd0dfb0304bade58beb77f20f21ee3558cc3c753743ae0ddbb0fd7ba2912331", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"husky": {:hex, :husky, "1.0.1", "c4859acf68849c219e2114da5795861a7183facc3b141c47432a9deb0032169e", [:mix], [{:poison, ">= 1.2.1", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
Expand Down

0 comments on commit e29d156

Please sign in to comment.