Skip to content

Commit 8e33a52

Browse files
authored
Merge pull request #90 from beardedeagle/0.3.13
fix test output
2 parents 7603cae + 614e2fd commit 8e33a52

File tree

10 files changed

+46
-22
lines changed

10 files changed

+46
-22
lines changed

.doctor.exs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
%Doctor.Config{
2+
exception_moduledoc_required: true,
3+
failed: false,
4+
ignore_modules: [],
5+
ignore_paths: [],
6+
min_module_doc_coverage: 40,
7+
min_module_spec_coverage: 0,
8+
min_overall_doc_coverage: 50,
9+
min_overall_moduledoc_coverage: 100,
10+
min_overall_spec_coverage: 0,
11+
raise: false,
12+
reporter: Doctor.Reporters.Full,
13+
struct_type_spec_required: true,
14+
umbrella: false
15+
}

.formatter.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[
2-
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
2+
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"],
33
line_length: 120
44
]

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ cover
1313
deps
1414
doc
1515
erl_crash.dump
16-
Mnesia.*@*
16+
Mnesia*
1717
mnesiac-*.tar
1818
mnesiac.iml
19-
MnesiaCore.*
2019
test0*
20+
tmp

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
minimum_pre_commit_version: 2.7.1
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v3.4.0
4+
rev: v4.4.0
55
hooks:
66
- id: check-added-large-files
77
- id: check-case-conflict

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [[0.3.13]] - 2023-05-07
8+
### Changed
9+
- Updated GitHub repo files.
10+
- Removed inch in favor of doctor for doc coverage reporting.
11+
12+
### Fixed
13+
- Fixed test suite polluting output with warnings about unused variables.
14+
715
## [[0.3.12]] - 2023-05-06
816
### Changed
917
- Changed `get_table_cookies/1` and `get_table_cookies/2` to utilize `table_load_timeout/0` for `:rpc.call/5` calls.
@@ -112,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112120
### Added
113121
- Initial release.
114122

123+
[0.3.13]: https://github.com/beardedeagle/mnesiac/compare/v0.3.12...v0.3.13
115124
[0.3.12]: https://github.com/beardedeagle/mnesiac/compare/v0.3.11...v0.3.12
116125
[0.3.11]: https://github.com/beardedeagle/mnesiac/compare/v0.3.10...v0.3.11
117126
[0.3.10]: https://github.com/beardedeagle/mnesiac/compare/v0.3.9...v0.3.10

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributors
22

3+
- aby2503
34
- astutecat
45
- darrenclark
56
- davidwebster48
6-
- aby2503

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Mnesia auto clustering made easy!
66

77
Docs can be found at [https://hexdocs.pm/mnesiac](https://hexdocs.pm/mnesiac).
88

9-
**_NOTICE:_** Mnesiac, while stable, is still considered pre `1.0`. This means the API can, and may, change at any time. Please ensure you review the docs and changelog prior to updating.
9+
**_NOTICE:_** Mnesiac, while stable, is still considered pre `1.0`. This means the API can, and may, change at any time. Please ensure you review the docs and changelog prior to updating, or pin the version of mnesiac you are using in `mix.exs` if necessary.
1010

1111
**_NOTICE:_** Mnesiac allows a significant amount of freedom with how it behaves. This allows you to customize Mnesiac to suit your needs. However, this also allows for a fair amount of foot gunning. Please ensure you've done your due diligence when using this library, or Mnesia itself for that matter. It isn't a silver bullet, and it shouldn't be treated as one.
1212

mix.exs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
defmodule Mnesiac.MixProject do
22
@moduledoc false
3-
require Logger
43
use Mix.Project
54

65
def project do
76
[
87
app: :mnesiac,
9-
version: "0.3.12",
8+
version: "0.3.13",
109
elixir: "~> 1.8",
1110
elixirc_paths: elixirc_paths(Mix.env()),
1211
test_coverage: [tool: ExCoveralls],
@@ -46,8 +45,8 @@ defmodule Mnesiac.MixProject do
4645
check: [
4746
"format --check-formatted --dry-run",
4847
"compile --warning-as-errors --force",
49-
"credo --strict --all",
50-
"inch"
48+
"doctor",
49+
"credo --strict --all"
5150
],
5251
"purge.db": &purge_db/1
5352
],
@@ -72,18 +71,18 @@ defmodule Mnesiac.MixProject do
7271
{:libcluster, "~> 3.3", optional: true},
7372
{:credo, "~> 1.7", only: [:dev], runtime: false},
7473
{:dialyxir, "~> 1.3", only: [:dev], runtime: false},
74+
{:doctor, "~> 0.21", only: [:dev], runtime: false},
7575
{:ex_doc, "~> 0.29", only: [:dev], runtime: false},
7676
{:ex_unit_clustered_case, "~> 0.5", only: [:test]},
77-
{:excoveralls, "~> 0.16", only: [:test], runtime: false},
78-
{:inch_ex, "~> 2.0", only: [:dev], runtime: false}
77+
{:excoveralls, "~> 0.16", only: [:test], runtime: false}
7978
]
8079
end
8180

8281
defp purge_db(_) do
8382
if Mix.env() in [:dev, :test] do
8483
Mix.shell().cmd("rm -rf ./test0* ./Mnesia.nonode@nohost")
8584
else
86-
Logger.info("[mnesiac:#{node()}] purge.db can only be used in dev and test env")
85+
Mix.shell().info("[mnesiac:#{node()}] purge.db can only be used in dev and test env")
8786
end
8887
end
8988
end

mix.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
33
"certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"},
44
"credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"},
5+
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
56
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
7+
"doctor": {:hex, :doctor, "0.21.0", "20ef89355c67778e206225fe74913e96141c4d001cb04efdeba1a2a9704f1ab5", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "a227831daa79784eb24cdeedfa403c46a4cb7d0eab0e31232ec654314447e4e0"},
68
"earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"},
79
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
810
"ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"},
@@ -11,7 +13,6 @@
1113
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
1214
"hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~> 2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"},
1315
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
14-
"inch_ex": {:hex, :inch_ex, "2.0.0", "24268a9284a1751f2ceda569cd978e1fa394c977c45c331bb52a405de544f4de", [:mix], [{:bunt, "~> 0.2", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "96d0ec5ecac8cf63142d02f16b7ab7152cf0f0f1a185a80161b758383c9399a8"},
1516
"jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"},
1617
"libcluster": {:hex, :libcluster, "3.3.2", "84c6ebfdc72a03805955abfb5ff573f71921a3e299279cc3445445d5af619ad1", [:mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8b691ce8185670fc8f3fc0b7ed59eff66c6889df890d13411f8f1a0e6871d8a5"},
1718
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},

test/mnesiac_test.exs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ defmodule MnesiacTest do
8787
test "cluster status", %{cluster: cluster} do
8888
[node_a] = Cluster.members(cluster)
8989

90-
assert [{:running_nodes, [node_a]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
90+
assert [{:running_nodes, [^node_a]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
9191
end
9292

9393
test "running nodes", %{cluster: cluster} do
9494
[node_a] = Cluster.members(cluster)
9595

96-
assert [node_a] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
96+
assert [^node_a] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
9797
end
9898

9999
test "node in cluster", %{cluster: cluster} do
@@ -128,13 +128,13 @@ defmodule MnesiacTest do
128128
test "cluster status", %{cluster: cluster} do
129129
[node_a] = Cluster.members(cluster)
130130

131-
assert [{:running_nodes, [node_a]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
131+
assert [{:running_nodes, [^node_a]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
132132
end
133133

134134
test "running nodes", %{cluster: cluster} do
135135
[node_a] = Cluster.members(cluster)
136136

137-
assert [node_a] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
137+
assert [^node_a] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
138138
end
139139

140140
test "node in cluster", %{cluster: cluster} do
@@ -178,15 +178,15 @@ defmodule MnesiacTest do
178178
test "cluster status", %{cluster: cluster} do
179179
[node_a, node_b] = Cluster.members(cluster)
180180

181-
assert [{:running_nodes, [node_a, node_b]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
182-
assert [{:running_nodes, [node_a, node_b]}] = Cluster.call(node_b, Mnesiac, :cluster_status, [])
181+
assert [{:running_nodes, [^node_b, ^node_a]}] = Cluster.call(node_a, Mnesiac, :cluster_status, [])
182+
assert [{:running_nodes, [^node_a, ^node_b]}] = Cluster.call(node_b, Mnesiac, :cluster_status, [])
183183
end
184184

185185
test "running nodes", %{cluster: cluster} do
186186
[node_a, node_b] = Cluster.members(cluster)
187187

188-
assert [node_a, node_b] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
189-
assert [node_a, node_b] = Cluster.call(node_b, Mnesiac, :running_nodes, [])
188+
assert [^node_b, ^node_a] = Cluster.call(node_a, Mnesiac, :running_nodes, [])
189+
assert [^node_a, ^node_b] = Cluster.call(node_b, Mnesiac, :running_nodes, [])
190190
end
191191

192192
test "node in cluster", %{cluster: cluster} do

0 commit comments

Comments
 (0)