Skip to content

Commit 79aca21

Browse files
author
Adi Iyengar
authored
Merge pull request #56 from aditya7iyengar/1.3.0-rc
Rummage 1.3.0-rc
2 parents a10a3da + c99191a commit 79aca21

30 files changed

+2541
-1224
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ erl_crash.dump
1818

1919
# Inch CI
2020
/docs
21+
22+
*.sqlite3
23+
*.sqlite3-*

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
elixir 1.4.5
2+
erlang 20.1

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
language: elixir
22
elixir:
3-
- 1.3.4
43
- 1.4.5
54
- 1.5.2
65
otp_release:
7-
- 19.0
6+
- 20.1
87
sudo: false
98
env:
109
- MIX_ENV=test ECTO_PGSQL_USER=postgres ECTO_PGSQL_PASSWORD=
1110
script:
1211
- mix test
1312
after_script:
13+
- mix hex.audit
1414
- mix coveralls.travis
1515
- mix credo
1616
- mix deps.get --only docs

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Versions CHANGELOG
22

3+
## Version: 1.3.0
4+
5+
### TODO:
6+
7+
- Bring back `__using__`
8+
- Make default hooks more generalized
9+
- Add NoPrimaryKey pagination hook or add a generalized version of current hook
10+
- Change the way configurations are done
11+
- Update Documentation
12+
13+
### DONE:
14+
15+
16+
## Version: 1.2.0
17+
18+
- Faster Pagination Hooks
19+
320
## Version: 1.1.0
421

522
### Changes to Rummage as whole:

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@ This package is [available in Hex](https://hexdocs.pm/rummage_ecto/), and can be
7070
```elixir
7171
config :rummage_ecto,
7272
Rummage.Ecto,
73-
default_search: MyApp.SearchModule
73+
search: MyApp.SearchModule
7474
```
7575

7676
- For configuring a repo:
7777

7878
```elixir
7979
config :rummage_ecto,
8080
Rummage.Ecto,
81-
default_repo: MyApp.Repo # This can be overridden per model basis, if need be.
81+
repo: MyApp.Repo # This can be overridden per model basis, if need be.
8282
```
8383

84-
- Other config options are: `default_repo`, `default_sort`, `default_paginate`, `default_per_page`
84+
- Other config options are: `repo`, `sort`, `paginate`, `per_page`
8585

86-
- `Rummage.Ecto` can be configured globally with a `default_per_page` value (which can be overridden for a model).
86+
- `Rummage.Ecto` can be configured globally with a `per_page` value (which can be overridden for a model).
8787
If you want to set different `per_page` for different the models, add it to `model.exs` file while using `Rummage.Ecto`
8888
as shown in the [Advanced Usage Section](#advanced-usage).
8989

@@ -99,8 +99,8 @@ Below are the ways `Rummage.Ecto` can be used:
9999
100100
```elixir
101101
config :rummage_ecto, Rummage.Ecto,
102-
default_repo: MyApp.Repo,
103-
default_per_page: 10
102+
repo: MyApp.Repo,
103+
per_page: 10
104104
```
105105
106106
- And you should be able to use `Rummage.Ecto` with any `Ecto` model.
@@ -112,9 +112,9 @@ Below are the ways `Rummage.Ecto` can be used:
112112
113113
```elixir
114114
config :rummage_ecto, Rummage.Ecto,
115-
default_repo: MyApp.Repo,
116-
default_search: MyApp.SearchModule,
117-
default_paginate: MyApp.PaginateModule
115+
repo: MyApp.Repo,
116+
search: MyApp.SearchModule,
117+
paginate: MyApp.PaginateModule
118118
```
119119
120120
- When using `Rummage.Ecto` with an app that has multiple `Repo`s, or when there's a need to configure `Repo` per model basis, it can be passed along with

config/test.exs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ use Mix.Config
33
config :logger, :console,
44
level: :error
55

6-
config :rummage_ecto, Rummage.Ecto,[
7-
default_repo: Rummage.Ecto.Repo,
8-
default_per_page: 2,
9-
]
6+
config :rummage_ecto, Rummage.Ecto,
7+
repo: Rummage.Ecto.Repo,
8+
per_page: 2
109

1110
config :rummage_ecto, ecto_repos: [Rummage.Ecto.Repo]
1211

1312
config :rummage_ecto, Rummage.Ecto.Repo,
1413
adapter: Ecto.Adapters.Postgres,
15-
username: System.get_env("ECTO_PGSQL_USER"),
16-
password: System.get_env("ECTO_PGSQL_PASSWORD"),
17-
database: "rummage_ecto_test",
18-
hostname: "localhost",
14+
database: "rummage_ecto_test.sqlite3",
1915
pool: Ecto.Adapters.SQL.Sandbox

help/nomenclature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Nomenclature

help/walkthrough.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Walkthrough

0 commit comments

Comments
 (0)