Skip to content

Commit

Permalink
Add support for elixir 1.2. Fix warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
merqlove committed Jul 27, 2016
1 parent b3a27cc commit 32eb26c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
language: elixir

elixir:
- 1.2.6
- 1.3.2

matrix:
include:
- otp_release: 18.3
elixir: 1.2.6
- otp_release: 18.3
elixir: 1.3.2
- otp_release: 19.0
Expand All @@ -15,6 +21,7 @@ env:
- ELIXIR_ERL_OPTIONS="+T 9"
install:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get --only test
script:
- mix test --trace
- MIX_ENV=test mix coveralls.travis
8 changes: 4 additions & 4 deletions lib/redix/pubsub/fastlane/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ defmodule Redix.PubSub.Fastlane.Server do
{:noreply, state}
end

def handle_info({:EXIT, _, _reason}, state) do
{:noreply, state}
end

@doc """
Connection establishment and shutdown loop
On init, an initial conection to redis is attempted when starting `:redix`
Expand All @@ -112,10 +116,6 @@ defmodule Redix.PubSub.Fastlane.Server do
:ok
end

def handle_info({:EXIT, _, _reason}, state) do
{:noreply, state}
end

defp broadcast_message(channels, channel, message, state) do
case _find(channels, channel) do
{:ok, %{subscription: subscription}} ->
Expand Down
10 changes: 7 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule RedixPubsubFastlane.Mixfile do
def project do
[app: :redix_pubsub_fastlane,
version: @version,
elixir: "~> 1.0",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand Down Expand Up @@ -37,9 +37,9 @@ defmodule RedixPubsubFastlane.Mixfile do
{:redix_pubsub, "~> 0.1"},
{:poolboy, "~> 1.5.1 or ~> 1.6"},
{:poison, "~> 2.0", only: :test},
{:ex_doc, "~> 0.11.1", only: :docs},
{:ex_doc, "~> 0.11", only: :docs},
{:earmark, ">= 0.0.0", only: :docs},
{:ex_spec, "~> 2.0.0", only: :test},
{:ex_spec, ex_12_13("~> 1.1.0", "~> 2.0.0"), only: :test},
{:excoveralls, "~> 0.5", only: :test},
]
end
Expand All @@ -48,6 +48,10 @@ defmodule RedixPubsubFastlane.Mixfile do
Enum.reduce(tasks, [], fn(key, acc) -> Keyword.put(acc, :"#{key}", env) end)
end

defp ex_12_13(v12, v13), do: if ex_13, do: v13, else: v12

defp ex_13, do: Version.match?(System.version, ">= 1.3.0")

defp package do
[
name: "Redix.Pubsub.Fastlane",
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%{"certifi": {:hex, :certifi, "0.4.0", "a7966efb868b179023618d29a407548f70c52466bf1849b9e8ebd0e34b7ea11f", [:rebar3], []},
"connection": {:hex, :connection, "1.0.3", "3145f7416be3df248a4935f24e3221dc467c1e3a158d62015b35bd54da365786", [:mix], []},
"earmark": {:hex, :earmark, "0.2.1", "ba6d26ceb16106d069b289df66751734802777a3cbb6787026dd800ffeb850f3", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.11.5", "0dc51cb84f8312162a2313d6c71573a9afa332333d8a332bb12540861b9834db", [:mix], [{:earmark, "~> 0.1.17 or ~> 0.2", [hex: :earmark, optional: true]}]},
"earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.13.0", "aa2f8fe4c6136a2f7cfc0a7e06805f82530e91df00e2bff4b4362002b43ada65", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]},
"ex_spec": {:hex, :ex_spec, "2.0.0", "7fedc6f3f7fe9b5bc14f17f94199cac4d2abe389727291467ee7708dcf6544a0", [:mix], []},
"excoveralls": {:hex, :excoveralls, "0.5.5", "d97b6fc7aa59c5f04f2fa7ec40fc0b7555ceea2a5f7e7c442aad98ddd7f79002", [:mix], [{:exjsx, "~> 3.0", [hex: :exjsx, optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, optional: false]}]},
"exjsx": {:hex, :exjsx, "3.2.0", "7136cc739ace295fc74c378f33699e5145bead4fdc1b4799822d0287489136fb", [:mix], [{:jsx, "~> 2.6.2", [hex: :jsx, optional: false]}]},
Expand Down

0 comments on commit 32eb26c

Please sign in to comment.