Skip to content

Commit

Permalink
Fix 1.4 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
drapergeek committed Mar 24, 2017
1 parent 19d9433 commit 7b6c303
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lib/redbird/plug/session/redis.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ defmodule Plug.Session.REDIS do
end

defp add_namespace(key) do
namespace <> key
namespace() <> key
end

@default_namespace "redbird_session_"
def namespace do
Application.get_env(:redbird, :key_namespace, redbird_namespace)
end

def redbird_namespace do
"redbird_session_"
Application.get_env(:redbird, :key_namespace, @default_namespace)
end

defp generate_random_key do
Expand All @@ -76,17 +73,14 @@ end

defmodule Redbird.RedisError do
defexception [:message]
@base_message "Redbird was unable to store the session in redis."

def raise([error: error, key: key]) do
message = "#{base_message} Redis Error: #{error} key: #{key}"
message = "#{@base_message} Redis Error: #{error} key: #{key}"
raise __MODULE__, message
end

def exception(message) do
%__MODULE__{message: message}
end

defp base_message do
"Redbird was unable to store the session in redis."
end
end

0 comments on commit 7b6c303

Please sign in to comment.