From aa27dddf1814dd965d7a7a603f5eb18db1cd2d9f Mon Sep 17 00:00:00 2001 From: Michael Lilley Date: Sun, 25 Jun 2017 10:44:03 -0700 Subject: [PATCH] Update gitignore, docs --- .gitignore | 5 +++++ lib/cert_cache.ex | 13 +++++++++---- mix.exs | 3 ++- mix.lock | 4 +++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b6012c7..5797388 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,8 @@ erl_crash.dump # Also ignore archive artifacts (built via "mix archive.build"). *.ez + +# Mac garbage +*.DS_Store +._* + diff --git a/lib/cert_cache.ex b/lib/cert_cache.ex index 45c3efe..b53c5aa 100644 --- a/lib/cert_cache.ex +++ b/lib/cert_cache.ex @@ -1,6 +1,7 @@ defmodule CertCache do @moduledoc """ A certificate cache. + NOTE: Currently, certificates must be stored on disk in PEM format. """ @@ -25,12 +26,16 @@ defmodule CertCache do certfile/cacertfile/keyfile options. ex: (hackney) - mycert = CertCache.get_cert("cert.pem") - :hackney.get(url, ssl_options: [ cacerts: [ mycert ] ]) + ``` + mycert = CertCache.get_cert("cert.pem") + :hackney.get(url, ssl_options: [ cacerts: [ mycert ] ]) + ``` ex: (HTTPoison) - mycert = CertCache.get_cert("cert.pem") - HTTPoison.get(url, ssl: [ cacerts: [ mycert ] ]) + ``` + mycert = CertCache.get_cert("cert.pem") + HTTPoison.get(url, ssl: [ cacerts: [ mycert ] ]) + ``` """ def get_cert(filename, cached \\ true) do if not cached do diff --git a/mix.exs b/mix.exs index 973d24e..ce897f7 100644 --- a/mix.exs +++ b/mix.exs @@ -22,7 +22,8 @@ defmodule CertCache.Mixfile do defp deps do [ - {:credo, "~> 0.8", only: [:dev, :test], runtime: false} + {:credo, "~> 0.8", only: [:dev, :test], runtime: false}, + {:ex_doc, ">= 0.0.0", only: :dev} ] end diff --git a/mix.lock b/mix.lock index 01f5868..dabbf8d 100644 --- a/mix.lock +++ b/mix.lock @@ -1,2 +1,4 @@ %{"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"}, - "credo": {:hex, :credo, "0.8.1", "137efcc99b4bc507c958ba9b5dff70149e971250813cbe7d4537ec7e36997402", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm"}} + "credo": {:hex, :credo, "0.8.1", "137efcc99b4bc507c958ba9b5dff70149e971250813cbe7d4537ec7e36997402", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm"}, + "earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], [], "hexpm"}, + "ex_doc": {:hex, :ex_doc, "0.16.1", "b4b8a23602b4ce0e9a5a960a81260d1f7b29635b9652c67e95b0c2f7ccee5e81", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}}