Skip to content

Commit aad230c

Browse files
committed
Release v1.0.0
1 parent 9e447a9 commit aad230c

File tree

8 files changed

+92
-45
lines changed

8 files changed

+92
-45
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ erl_crash.dump
1616
._*
1717
.elixir*
1818
.vs*
19+
mix.lock

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sudo: false
99
services:
1010
- redis-server
1111
env:
12-
- MIX_ENV=test
12+
- NBX_TEST=true MIX_ENV=test
1313
before_script:
1414
- epmd -daemon
1515
- mix deps.get --only test
@@ -20,5 +20,5 @@ script:
2020
- mix credo --strict
2121
- mix format --check-formatted
2222
after_script:
23-
- mix deps.get --only docs
23+
- MIX_ENV=docs mix deps.get
2424
- MIX_ENV=docs mix inch.report

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Change Log
2+
3+
## [v1.0.0](https://github.com/cabol/nebulex_redis_adapter/tree/v1.0.0) (2018-12-11)
4+
**Implemented enhancements:**
5+
6+
- Add TravisCI support [\#7](https://github.com/cabol/nebulex_redis_adapter/issues/7)
7+
- Implement `Nebulex.Adapter.Transaction` interface [\#2](https://github.com/cabol/nebulex_redis_adapter/issues/2)
8+
- Implement `Nebulex.Adapter.Queryable` behaviour [\#1](https://github.com/cabol/nebulex_redis_adapter/issues/1)
9+
10+
**Merged pull requests:**
11+
12+
- Allow redix config using `url` [\#6](https://github.com/cabol/nebulex_redis_adapter/pull/6) ([sbennett33](https://github.com/sbennett33))
13+
14+
15+
16+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

README.md

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Add `nebulex_redis_adapter` to your list of dependencies in `mix.exs`:
2020
```elixir
2121
defp deps do
2222
[
23-
{:nebulex, "~> 1.0"},
24-
{:nebulex_redis_adapter, github: "cabol/nebulex_redis_adapter"}
23+
{:nebulex_redis_adapter, "~> 1.0"}
2524
]
2625
end
2726
```
@@ -115,13 +114,38 @@ host and port for each proxy.
115114

116115
## Testing
117116

118-
Before to run the tests, ensure you have Redis up and running on **localhiost**
119-
and port **6379**. Then run:
117+
First of all, ensure you have Redis up and running on **localhiost**
118+
and port **6379** (default host and port).
119+
120+
Since `NebulexRedisAdapter` uses the support modules and shared tests from
121+
Nebulex and by default its `test` folder is not included within the `hex`
122+
dependency, it is necessary to fetch `:nebulex` dependency directly from GtiHub.
123+
This is done by setting the environment variable `NBX_TEST`, like so:
124+
125+
```
126+
$ export NBX_TEST=true
127+
```
128+
129+
Fetch deps:
130+
131+
```
132+
$ mix deps.get
133+
```
134+
135+
Now we can run the tests:
120136

121137
```
122138
$ mix test
123139
```
124140

141+
Running tests with coverage:
142+
143+
```
144+
$ mix coveralls.html
145+
```
146+
147+
You can find the coverage report within `cover/excoveralls.html`.
148+
125149
## Benchmarks
126150

127151
Benchmarks were added using [benchee](https://github.com/PragTob/benchee);
@@ -130,9 +154,34 @@ to learn more, see the [benchmarks](./benchmarks) directory.
130154
To run the benchmarks:
131155

132156
```
133-
$ mix run benchmarks/benchmark.exs
157+
$ mix deps.get && mix run benchmarks/benchmark.exs
134158
```
135159

160+
## Contributing
161+
162+
Contributions to Nebulex are very welcome and appreciated!
163+
164+
Use the [issue tracker](https://github.com/cabol/nebulex_redis_adapter/issues)
165+
for bug reports or feature requests. Open a
166+
[pull request](https://github.com/cabol/nebulex_redis_adapter/pulls)
167+
when you are ready to contribute.
168+
169+
When submitting a pull request you should not update the [CHANGELOG.md](CHANGELOG.md),
170+
and also make sure you test your changes thoroughly, include unit tests
171+
alongside new or changed code.
172+
173+
Before to submit a PR it is highly recommended to run:
174+
175+
* `export NBX_TEST=true` to fetch Nebulex from GH directly and be able to
176+
re-use shared tests.
177+
* `mix test` to run tests
178+
* `mix coveralls.html && open cover/excoveralls.html` to run tests and check
179+
out code coverage (expected 100%).
180+
* `mix format && mix credo --strict` to format your code properly and find code
181+
style issues
182+
* `mix dialyzer` to run dialyzer for type checking; might take a while on the
183+
first invocation
184+
136185
## Copyright and License
137186

138187
Copyright (c) 2018, Carlos Bolaños.

config/docs.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use Mix.Config

lib/nebulex_redis_adapter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ defmodule NebulexRedisAdapter do
325325
|> do_stream(cache)
326326
end
327327

328-
def do_stream(pattern, cache) do
328+
defp do_stream(pattern, cache) do
329329
Stream.resource(
330330
fn ->
331331
execute_query(pattern, cache)

mix.exs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
defmodule NebulexRedisAdapter.MixProject do
22
use Mix.Project
33

4-
@version "1.0.0-dev"
4+
@version "1.0.0"
55

66
def project do
77
[
88
app: :nebulex_redis_adapter,
99
version: @version,
10-
elixir: "~> 1.5",
10+
elixir: "~> 1.6",
1111
deps: deps(),
1212

1313
# Docs
@@ -40,12 +40,13 @@ defmodule NebulexRedisAdapter.MixProject do
4040

4141
defp deps do
4242
[
43-
{:redix, "~> 0.8"},
43+
{:redix, "~> 0.9"},
4444

45-
# This is because adapter tests need some support modules and shared
46-
# tests from Nebulex, and the hex dep doesn't include test's folder.
47-
# For your project you should set the hex version: {:nebulex, "~> 1.0"}
48-
{:nebulex, github: "cabol/nebulex", tag: "v1.0.0", optional: true},
45+
# This is because the adapter tests need some support modules and shared
46+
# tests from nebulex dependency, and the hex dependency doesn't include
47+
# the test folder. Hence, to run the tests it is necessary to fetch
48+
# nebulex dependency directly from GH.
49+
{:nebulex, nebulex_opts()},
4950

5051
# Test
5152
{:excoveralls, "~> 0.6", only: :test},
@@ -57,11 +58,19 @@ defmodule NebulexRedisAdapter.MixProject do
5758
{:credo, "~> 0.10", optional: true, only: [:dev, :test]},
5859

5960
# Docs
60-
{:ex_doc, "~> 0.17", only: :docs},
61+
{:ex_doc, "~> 0.19", only: :dev, runtime: false},
6162
{:inch_ex, "~> 0.5", only: :docs}
6263
]
6364
end
6465

66+
defp nebulex_opts do
67+
if System.get_env("NBX_TEST") do
68+
[github: "cabol/nebulex", tag: "v1.0.0"]
69+
else
70+
"~> 1.0"
71+
end
72+
end
73+
6574
defp package do
6675
[
6776
name: :nebulex_redis_adapter,

mix.lock

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)