Skip to content

Commit 9639766

Browse files
committed
Bootstrap Elixir project
1 parent d2eadc0 commit 9639766

7 files changed

+98
-1
lines changed

.formatter.exs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
shin-*.tar
24+
25+
# Temporary files, for example, from tests.
26+
/tmp/

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@
88

99
This package aims to provide lightweight utilities that can be used to ensure that primitives are well validated and trusted for usage by auth providers.
1010

11-
### Roadmap
11+
## Roadmap
1212

1313
This package is currently a work in progress. Those are the features ordered by priority:
1414

1515
- [ ] OIDC discovery endpoint validator
1616
- [ ] SAML response validator
1717
- [ ] SAML logout request validator
1818
- [ ] SAML logout response validator
19+
20+
## Getting started
21+
22+
The package can be installed by adding `shin` to your list of dependencies in `mix.exs`:
23+
24+
```elixir
25+
def deps do
26+
[
27+
{:shin, "~> 0.1.0"}
28+
]
29+
end
30+
```

lib/shin.ex

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
defmodule Shin do
2+
@moduledoc """
3+
Documentation for `Shin`.
4+
"""
5+
6+
@doc """
7+
Hello world.
8+
9+
## Examples
10+
11+
iex> Shin.hello()
12+
:world
13+
14+
"""
15+
def hello do
16+
:world
17+
end
18+
end

mix.exs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
defmodule Shin.MixProject do
2+
use Mix.Project
3+
4+
def project do
5+
[
6+
app: :shin,
7+
version: "0.1.0",
8+
elixir: "~> 1.15",
9+
start_permanent: Mix.env() == :prod,
10+
deps: deps()
11+
]
12+
end
13+
14+
# Run "mix help compile.app" to learn about applications.
15+
def application do
16+
[
17+
extra_applications: [:logger]
18+
]
19+
end
20+
21+
# Run "mix help deps" to learn about dependencies.
22+
defp deps do
23+
[
24+
# {:dep_from_hexpm, "~> 0.3.0"},
25+
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
26+
]
27+
end
28+
end

test/shin_test.exs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule ShinTest do
2+
use ExUnit.Case
3+
doctest Shin
4+
5+
test "greets the world" do
6+
assert Shin.hello() == :world
7+
end
8+
end

test/test_helper.exs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ExUnit.start()

0 commit comments

Comments
 (0)