Skip to content

Commit 2a9dd51

Browse files
committed
remove umbrella
1 parent 82f2378 commit 2a9dd51

27 files changed

+74
-338
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22

33
**TODO: Add description**
44

5+
## Installation
6+
7+
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
8+
by adding `largo` to your list of dependencies in `mix.exs`:
9+
10+
```elixir
11+
def deps do
12+
[{:largo, "~> 0.1.0"}]
13+
end
14+
```
15+
16+
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
17+
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
18+
be found at [https://hexdocs.pm/largo](https://hexdocs.pm/largo).
19+

apps/database/.gitignore

-20
This file was deleted.

apps/database/README.md

-19
This file was deleted.

apps/database/config/config.exs

-40
This file was deleted.

apps/database/lib/database.ex

-18
This file was deleted.

apps/database/lib/database/repo.ex

-3
This file was deleted.

apps/database/mix.exs

-43
This file was deleted.

apps/slack_integration/.gitignore

-20
This file was deleted.

apps/slack_integration/README.md

-19
This file was deleted.

apps/slack_integration/config/config.exs

-30
This file was deleted.

apps/slack_integration/lib/slack_integration/application.ex

-23
This file was deleted.

apps/slack_integration/lib/slack_integration/responders/responder.ex

-3
This file was deleted.

apps/slack_integration/mix.exs

-41
This file was deleted.

apps/slack_integration/test/slack_integration_test.exs

-8
This file was deleted.

apps/slack_integration/test/test_helper.exs

-1
This file was deleted.

config/config.exs

+10-17
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
# and its dependencies with the aid of the Mix.Config module.
33
use Mix.Config
44

5-
# By default, the umbrella project as well as each child
6-
# application will require this configuration file, ensuring
7-
# they all use the same configuration. While one could
8-
# configure all applications here, we prefer to delegate
9-
# back to each application for organization purposes.
10-
import_config "../apps/*/config/config.exs"
5+
config :largo, Largo.Repo,
6+
adapter: Ecto.Adapters.Postgres,
7+
database: "largo",
8+
username: "postgres",
9+
password: "postgres",
10+
hostname: "localhost",
11+
port: 15432
1112

12-
# Sample configuration (overrides the imported configuration above):
13-
#
14-
# config :logger, :console,
15-
# level: :info,
16-
# format: "$date $time [$level] $metadata$message\n",
17-
# metadata: [:user_id]
18-
#
13+
config :largo, ecto_repos: [Database.Repo]
1914

2015

2116
configs = ["#{Mix.env}.exs", "#{Mix.env}.secret.exs"]
22-
Enum.map(configs, fn f ->
17+
18+
Enum.map(configs, fn f ->
2319
if File.exists? "config/" <> f do
24-
IO.puts "loading config #{f}"
2520
import_config f
26-
else
27-
IO.puts "not loading config #{f}"
2821
end
2922
end)

apps/slack_integration/lib/slack_integration.ex lib/largo.ex

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defmodule SlackIntegration do
1+
defmodule Largo do
22
use Slack
33

44
def handle_connect(slack, state) do
@@ -34,14 +34,14 @@ defmodule SlackIntegration do
3434
end
3535
{:ok, state}
3636
end
37-
37+
3838
def handle_event(_, _, state), do: {:ok, state}
39-
40-
@responders [SlackIntegration.HelloResponder,
41-
SlackIntegration.MemmoryResponder]
39+
40+
@responders [Largo.Responders.HelloResponder,
41+
Largo.Responders.MemmoryResponder]
4242

4343
defp respond(text, channel, slack) do
44-
resp = Enum.reduce_while(@responders, "", fn responder, acc ->
44+
resp = Enum.reduce_while(@responders, "", fn responder, _acc ->
4545
case responder.respond(text) do
4646
{:ok, response} ->
4747
{:halt, response}

0 commit comments

Comments
 (0)