Skip to content

Commit 071b7d8

Browse files
authored
Misc doc changes (#231)
List of changes: - Mix format module config - Use common source url - Bump and ex_doc to latest version - Add changelog to html doc - Add missing date to changelog
1 parent 9752b81 commit 071b7d8

File tree

2 files changed

+46
-32
lines changed

2 files changed

+46
-32
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# Changelog
22

3-
## v2.3.1
3+
## v2.3.1 (2020-11-25)
44

55
* Enhancements
66
* Add `:connection_listeners` to `DBConnection.start_link/2`
77
* Allow connection `~> 1.0`
88

9-
## v2.3.0
9+
## v2.3.0 (2020-10-14)
1010

1111
This release requires Elixir v1.7+.
1212

1313
* Bug fixes
1414
* Fix deprecation warnings related to the use of `System.stacktrace()`
1515

16-
## v2.2.2
16+
## v2.2.2 (2020-04-22)
1717

1818
* Bug fixes
1919
* Make sure all idle connections in the pool are pinged on each idle interval
2020

21-
## v2.2.1
21+
## v2.2.1 (2020-02-04)
2222

2323
* Enhancements
2424
* Remove warnings
2525

26-
## v2.2.0
26+
## v2.2.0 (2019-12-11)
2727

2828
* Enhancements
2929
* Add `:idle_time` to `DBConnection.LogEntry`

mix.exs

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,48 @@
11
defmodule DBConnection.Mixfile do
22
use Mix.Project
33

4+
@source_url "https://github.com/elixir-ecto/db_connection"
45
@pools [:connection_pool, :ownership]
56
@version "2.3.1"
67

78
def project do
8-
[app: :db_connection,
9-
version: @version,
10-
elixir: "~> 1.7",
11-
deps: deps(),
12-
docs: docs(),
13-
description: description(),
14-
package: package(),
15-
build_per_environment: false,
16-
consolidate_protocols: false,
17-
test_paths: test_paths(Mix.env()),
18-
aliases: ["test.all": ["test", "test.pools"],
19-
"test.pools": &test_pools/1],
20-
preferred_cli_env: ["test.all": :test]]
9+
[
10+
app: :db_connection,
11+
version: @version,
12+
elixir: "~> 1.7",
13+
deps: deps(),
14+
docs: docs(),
15+
description: description(),
16+
package: package(),
17+
build_per_environment: false,
18+
consolidate_protocols: false,
19+
test_paths: test_paths(Mix.env()),
20+
aliases: ["test.all": ["test", "test.pools"], "test.pools": &test_pools/1],
21+
preferred_cli_env: ["test.all": :test]
22+
]
2123
end
2224

2325
def application do
24-
[applications: [:logger, :connection],
25-
mod: {DBConnection.App, []}]
26+
[
27+
applications: [:logger, :connection],
28+
mod: {DBConnection.App, []}
29+
]
2630
end
2731

2832
defp deps do
29-
[{:connection, "~> 1.0"},
30-
{:ex_doc, "~> 0.12", only: :dev}]
33+
[
34+
{:connection, "~> 1.0"},
35+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
36+
]
3137
end
3238

3339
defp docs do
34-
[source_url: "https://github.com/elixir-ecto/db_connection",
35-
source_ref: "v#{@version}",
36-
main: DBConnection]
40+
[
41+
source_url: @source_url,
42+
source_ref: "v#{@version}",
43+
main: DBConnection,
44+
extras: ["CHANGELOG.md"]
45+
]
3746
end
3847

3948
defp description do
@@ -43,9 +52,11 @@ defmodule DBConnection.Mixfile do
4352
end
4453

4554
defp package do
46-
%{licenses: ["Apache-2.0"],
55+
%{
56+
licenses: ["Apache-2.0"],
4757
maintainers: ["James Fish"],
48-
links: %{"Github" => "https://github.com/elixir-ecto/db_connection"}}
58+
links: %{"GitHub" => @source_url}
59+
}
4960
end
5061

5162
defp test_paths(pool) when pool in @pools, do: ["integration_test/#{pool}"]
@@ -56,12 +67,15 @@ defmodule DBConnection.Mixfile do
5667
end
5768

5869
defp env_run(env, args) do
59-
args = if IO.ANSI.enabled?(), do: ["--color"|args], else: ["--no-color"|args]
70+
args = if IO.ANSI.enabled?(), do: ["--color" | args], else: ["--no-color" | args]
6071

61-
IO.puts "==> Running tests for MIX_ENV=#{env} mix test"
62-
{_, res} = System.cmd "mix", ["test"|args],
63-
into: IO.binstream(:stdio, :line),
64-
env: [{"MIX_ENV", to_string(env)}]
72+
IO.puts("==> Running tests for MIX_ENV=#{env} mix test")
73+
74+
{_, res} =
75+
System.cmd("mix", ["test" | args],
76+
into: IO.binstream(:stdio, :line),
77+
env: [{"MIX_ENV", to_string(env)}]
78+
)
6579

6680
if res > 0 do
6781
System.at_exit(fn _ -> exit({:shutdown, 1}) end)

0 commit comments

Comments
 (0)