Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Big breaking change...and replication logic #18

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
af79208
[WIP] replication factor
beardedeagle Mar 30, 2019
c293b26
[WIP] rf: cleaning up README
beardedeagle Mar 30, 2019
f940bbb
[WIP] rf: more readme cleanup
beardedeagle Mar 30, 2019
20d13a6
[WIP] rf: verbaige cleanup
beardedeagle Mar 30, 2019
fa8dd41
[WIP] rf: more doc updates
beardedeagle Apr 1, 2019
ff46854
[WIP] rf: keep the doc changes coming
beardedeagle Apr 1, 2019
5b0caf4
[WIP] rf: docs for days
beardedeagle Apr 1, 2019
db3d8c3
[WIP] rf: another api change
beardedeagle Apr 2, 2019
05941f5
[WIP] rf: dep updates (broken)
beardedeagle Apr 3, 2019
0809cd1
[WIP] rf: moar cleanup (broken)
beardedeagle Apr 3, 2019
521334b
[WIP] rf: completing supervisor todo (broken)
beardedeagle Apr 3, 2019
e497788
[WIP] rf: stubbed out 2 additional callbacks (broken)
beardedeagle Apr 3, 2019
807aa43
[WIP] rf: cursory mnesiac module changes (broken)
beardedeagle Apr 4, 2019
801d59d
[WIP] rf: build config struct in correct location
beardedeagle Apr 4, 2019
52ebeb7
[WIP] rf: fix override type
beardedeagle Apr 4, 2019
9742744
[WIP] rf: add ability to see configuration struct genearted (broken)
beardedeagle Apr 4, 2019
4c2ad3e
[WIP] rf: mnesiac module cleanup (broken)
beardedeagle Apr 5, 2019
a3de0a0
[WIP] rf: moving types to correct locations (broken)
beardedeagle Apr 10, 2019
61c498f
[WIP] rf: I'm back (broken)
beardedeagle Apr 26, 2019
da0372e
[WIP] rf: bump project deps (broken)
beardedeagle May 9, 2019
77bce0b
[WIP] for real, I'm back [skip ci]
beardedeagle Jul 1, 2019
395e42d
[WIP] bring in pr'd fixes [ci skip]
beardedeagle Jul 1, 2019
40705d8
[WIP] LOC cleanup [ci skip]
beardedeagle Jul 1, 2019
3945325
[WIP] fix handle of no records to copy [ci skip]
beardedeagle Jul 1, 2019
5b8cc8b
[WIP] more cleanup
beardedeagle Aug 6, 2019
aeca97d
[WIP] small changes, need to discuss potential fix
beardedeagle Aug 6, 2019
072126c
[WIP] working on schema fix
beardedeagle Aug 7, 2019
3af3558
[WIP] still trying to fix store macro [skip ci]
beardedeagle Aug 7, 2019
7eacf0f
[WIP] comitting current code [skip ci]
beardedeagle Aug 7, 2019
46495f4
[WIP] committing working code [skip ci]
beardedeagle Aug 7, 2019
76a0e96
[WIP] fixing tests [skip ci]
beardedeagle Aug 7, 2019
7ea5372
[WIP] fix test sup start
beardedeagle Aug 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions config/.credo.exs → .credo.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
%{
name: "default",
files: %{
included: ["lib/", "src/", "test/", "web/", "apps/", "config/"],
included: ["lib/", "src/", "test/", "web/", "apps/"],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
plugins: [],
requires: [],
strict: true,
color: true,
Expand Down Expand Up @@ -36,6 +37,7 @@
{Credo.Check.Readability.StringSigils, []},
{Credo.Check.Readability.TrailingBlankLine, []},
{Credo.Check.Readability.TrailingWhiteSpace, []},
{Credo.Check.Readability.UnnecessaryAliasExpansion, false},
{Credo.Check.Readability.VariableNames, []},
{Credo.Check.Refactor.CondStatements, []},
{Credo.Check.Refactor.CyclomaticComplexity, []},
Expand All @@ -46,12 +48,8 @@
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
{Credo.Check.Refactor.Nesting, []},
{Credo.Check.Refactor.PipeChainStart,
[
excluded_argument_types: [:atom, :binary, :fn, :keyword, :number],
excluded_functions: []
]},
{Credo.Check.Refactor.UnlessWithElse, []},
{Credo.Check.Refactor.WithClauses, []},
{Credo.Check.Warning.BoolOperationOnSameValues, []},
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
{Credo.Check.Warning.IExPry, []},
Expand All @@ -69,12 +67,16 @@
{Credo.Check.Warning.UnusedStringOperation, []},
{Credo.Check.Warning.UnusedTupleOperation, []},
{Credo.Check.Consistency.MultiAliasImportRequireUse, false},
{Credo.Check.Consistency.UnusedVariableNames, false},
{Credo.Check.Design.DuplicatedCode, false},
{Credo.Check.Readability.MultiAlias, false},
{Credo.Check.Readability.Specs, false},
{Credo.Check.Readability.SinglePipe, false},
{Credo.Check.Refactor.ABCSize, false},
{Credo.Check.Refactor.AppendSingleItem, false},
{Credo.Check.Refactor.DoubleBooleanNegation, false},
{Credo.Check.Refactor.ModuleDependencies, false},
{Credo.Check.Refactor.PipeChainStart, false},
{Credo.Check.Refactor.VariableRebinding, false},
{Credo.Check.Warning.MapGetUnsafePass, false},
{Credo.Check.Warning.UnsafeToAtom, false}
Expand Down
2 changes: 1 addition & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
inputs: ["{mix,.formatter,.credo}.exs", "{lib,test}/**/*.{ex,exs}"],
line_length: 120
]
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

I welcome any and all ideas, issues and pull requests. Be sure to follow git best practices. A couple of ground rules:

- All code must be formatted.
- All code must be documented.
- All code must pass static analysis/linter checks.
- All code must have test coverage.
- All code must be formatted, when applicable.
- All code must be documented, when applicable.
- All code must pass static analysis/linter checks, when applicable.
- All code must have test coverage, when applicable.

Exceptions should be avoided whenever possible.

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug Report
about: Report a bug to help Mnesiac improve.
---

<!-- ⚠️ Failure to follow this template will result in your report being closed. ⚠️ -->
<!-- ⚠️ Be sure to browse the opened/closed issues before submitting your issue. ⚠️ -->

## Version and Environment

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Feature Request
about: Propose a change to Mnesiac.
---

<!-- ⚠️ Failure to follow this template will result in your request being closed. ⚠️ -->
<!-- ⚠️ Be sure to browse the opened/closed issues before submitting your issue. ⚠️ -->

## Proposal
Expand Down
12 changes: 5 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

## Check list

<!-- ⚠️ Failure to follow this checklist will result in your pull request being closed. ⚠️ -->

- [ ] All new code is formatted.
- [ ] All new code is documented.
- [ ] All new code passed static analysis/linter checks.
- [ ] Added tests to ensure coverage of new code.
- [ ] All tests passed.
- [ ] If applicable, all new code is formatted.
- [ ] If applicable, all new code is documented.
- [ ] If applicable, all new code passed static analysis/linter checks.
- [ ] If applicable, added tests to ensure coverage of new code.
- [ ] If applicable, all tests passed.

## Additional info

Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ _build
.elixir_ls
.fetch
.idea
.sobelow
.sonarlint
.vscode
*.beam
Expand All @@ -14,7 +13,7 @@ cover
deps
doc
erl_crash.dump
Mnesia.nonode@nohost
Mnesia.*@*
mnesiac-*.tar
mnesiac.iml
MnesiaCore.*
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 21.2.6
elixir 1.8.1-otp-21
erlang 22.0.7
elixir 1.9.1-otp-22
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
sudo: false
language: 'elixir'
elixir:
- '1.7'
- '1.8.1'
- '1.7.4'
- '1.8.2'
- '1.9.1'
otp_release:
- '20.3'
- '21.2.6'
- '20.3.8.22'
- '21.3.8.6'
- '22.0.7'
git:
quiet: true
env:
Expand Down
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,38 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [[0.4.0]] - 2019-08-06
### Added
- Ability to specify how many copies of schema can exist, by type.
- Ability to specify how many copies of a store can exist, per store by type.
- Ability to blacklist Mnesia cluster nodes, per store.
- `init_schema/1`, `copy_schema/2`, `init_migration/1`, `rollback_migration/1`, `refresh_cluster/1`, `backup/1` overridable callbacks in `Mnesiac.Store`.
- Structs for explicit config and store contracts.
- Specs for explicit library contracts.
- Escape hatch of sorts, which allows you to override the base Mnesiac configuration struct.
- `Mnesiac.validate_config/2` which can be used to validate the configuration being passed in to Mnesiac, possible to test override functions too.

### Removed
- Removed `Mnesiac.StoreManager` module.
- Config directory. Configuration is now to be passed in directly.

### Changed
- `resolve_conflict/1` -> `resolve_conflict/2`, now accepts configuration.
- Standardized terminology in library.
- Bumped OTP version.
- Updated dependencies.

### Fixed
- More docs cleanup.

## [[0.3.3]] - 2019-02-25
### Fixed
- Apply regression fix to `copy_store/0` and `resolve_conflict/1`.
- Docs cleanup.

## [[0.3.2]] - 2019-02-22
### Fixed
- Regression that made defining a custom table name impossible.
- Regression that made defining a custom store name impossible.

## [[0.3.1]] - 2019-02-21
### Added
Expand Down Expand Up @@ -44,6 +68,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Initial release.

[0.4.0]: https://github.com/beardedeagle/mnesiac/compare/v0.3.3...v0.4.0
[0.3.3]: https://github.com/beardedeagle/mnesiac/compare/v0.3.2...v0.3.3
[0.3.2]: https://github.com/beardedeagle/mnesiac/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/beardedeagle/mnesiac/compare/v0.3.0...v0.3.1
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Contributors

- astutecat
- darrenclark
- aby2503
Loading