Skip to content

Commit

Permalink
Update gitignore, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlilley committed Jun 25, 2017
1 parent ab1f91b commit aa27ddd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez

# Mac garbage
*.DS_Store
._*

13 changes: 9 additions & 4 deletions lib/cert_cache.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
defmodule CertCache do
@moduledoc """
A certificate cache.
NOTE: Currently, certificates must be stored on disk in PEM format.
"""

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -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"}}

0 comments on commit aa27ddd

Please sign in to comment.