Skip to content

Commit

Permalink
Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed Dec 12, 2018
1 parent 9e447a9 commit aad230c
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ erl_crash.dump
._*
.elixir*
.vs*
mix.lock
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sudo: false
services:
- redis-server
env:
- MIX_ENV=test
- NBX_TEST=true MIX_ENV=test
before_script:
- epmd -daemon
- mix deps.get --only test
Expand All @@ -20,5 +20,5 @@ script:
- mix credo --strict
- mix format --check-formatted
after_script:
- mix deps.get --only docs
- MIX_ENV=docs mix deps.get
- MIX_ENV=docs mix inch.report
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Change Log

## [v1.0.0](https://github.com/cabol/nebulex_redis_adapter/tree/v1.0.0) (2018-12-11)
**Implemented enhancements:**

- Add TravisCI support [\#7](https://github.com/cabol/nebulex_redis_adapter/issues/7)
- Implement `Nebulex.Adapter.Transaction` interface [\#2](https://github.com/cabol/nebulex_redis_adapter/issues/2)
- Implement `Nebulex.Adapter.Queryable` behaviour [\#1](https://github.com/cabol/nebulex_redis_adapter/issues/1)

**Merged pull requests:**

- Allow redix config using `url` [\#6](https://github.com/cabol/nebulex_redis_adapter/pull/6) ([sbennett33](https://github.com/sbennett33))



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
59 changes: 54 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Add `nebulex_redis_adapter` to your list of dependencies in `mix.exs`:
```elixir
defp deps do
[
{:nebulex, "~> 1.0"},
{:nebulex_redis_adapter, github: "cabol/nebulex_redis_adapter"}
{:nebulex_redis_adapter, "~> 1.0"}
]
end
```
Expand Down Expand Up @@ -115,13 +114,38 @@ host and port for each proxy.

## Testing

Before to run the tests, ensure you have Redis up and running on **localhiost**
and port **6379**. Then run:
First of all, ensure you have Redis up and running on **localhiost**
and port **6379** (default host and port).

Since `NebulexRedisAdapter` uses the support modules and shared tests from
Nebulex and by default its `test` folder is not included within the `hex`
dependency, it is necessary to fetch `:nebulex` dependency directly from GtiHub.
This is done by setting the environment variable `NBX_TEST`, like so:

```
$ export NBX_TEST=true
```

Fetch deps:

```
$ mix deps.get
```

Now we can run the tests:

```
$ mix test
```

Running tests with coverage:

```
$ mix coveralls.html
```

You can find the coverage report within `cover/excoveralls.html`.

## Benchmarks

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

```
$ mix run benchmarks/benchmark.exs
$ mix deps.get && mix run benchmarks/benchmark.exs
```

## Contributing

Contributions to Nebulex are very welcome and appreciated!

Use the [issue tracker](https://github.com/cabol/nebulex_redis_adapter/issues)
for bug reports or feature requests. Open a
[pull request](https://github.com/cabol/nebulex_redis_adapter/pulls)
when you are ready to contribute.

When submitting a pull request you should not update the [CHANGELOG.md](CHANGELOG.md),
and also make sure you test your changes thoroughly, include unit tests
alongside new or changed code.

Before to submit a PR it is highly recommended to run:

* `export NBX_TEST=true` to fetch Nebulex from GH directly and be able to
re-use shared tests.
* `mix test` to run tests
* `mix coveralls.html && open cover/excoveralls.html` to run tests and check
out code coverage (expected 100%).
* `mix format && mix credo --strict` to format your code properly and find code
style issues
* `mix dialyzer` to run dialyzer for type checking; might take a while on the
first invocation

## Copyright and License

Copyright (c) 2018, Carlos Bolaños.
Expand Down
1 change: 1 addition & 0 deletions config/docs.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use Mix.Config
2 changes: 1 addition & 1 deletion lib/nebulex_redis_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ defmodule NebulexRedisAdapter do
|> do_stream(cache)
end

def do_stream(pattern, cache) do
defp do_stream(pattern, cache) do
Stream.resource(
fn ->
execute_query(pattern, cache)
Expand Down
25 changes: 17 additions & 8 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
defmodule NebulexRedisAdapter.MixProject do
use Mix.Project

@version "1.0.0-dev"
@version "1.0.0"

def project do
[
app: :nebulex_redis_adapter,
version: @version,
elixir: "~> 1.5",
elixir: "~> 1.6",
deps: deps(),

# Docs
Expand Down Expand Up @@ -40,12 +40,13 @@ defmodule NebulexRedisAdapter.MixProject do

defp deps do
[
{:redix, "~> 0.8"},
{:redix, "~> 0.9"},

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

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

# Docs
{:ex_doc, "~> 0.17", only: :docs},
{:ex_doc, "~> 0.19", only: :dev, runtime: false},
{:inch_ex, "~> 0.5", only: :docs}
]
end

defp nebulex_opts do
if System.get_env("NBX_TEST") do
[github: "cabol/nebulex", tag: "v1.0.0"]
else
"~> 1.0"
end
end

defp package do
[
name: :nebulex_redis_adapter,
Expand Down
29 changes: 0 additions & 29 deletions mix.lock

This file was deleted.

0 comments on commit aad230c

Please sign in to comment.