Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compile warnings #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
import Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
Expand Down
8 changes: 1 addition & 7 deletions lib/chartkick.ex
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
defmodule Chartkick do
require EEx
Module.put_attribute(
__MODULE__,
:poison,
if(Code.ensure_loaded?(Poison), do: Poison, else: nil)
)
@json_serializer Application.get_env(:chartkick, :json_serializer) || @poison

gen_chart_fn = fn (chart_type) ->
def unquote(
Expand Down Expand Up @@ -89,7 +83,7 @@ defmodule Chartkick do
opts
|> Keyword.take(@options)
|> Enum.into(%{})
|> @json_serializer.encode!()
|> Poison.encode!()
end

defp options_json(opts) when is_bitstring(opts) do
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule Chartkick.Mixfile do
#
# Type `mix help compile.app` for more information
def application do
[applications: [:logger]]
[extra_applications: [:logger, :eex]]
end

defp description do
Expand Down Expand Up @@ -47,6 +47,6 @@ defmodule Chartkick.Mixfile do
# Type `mix help deps` for more examples and options
defp deps do
[{ :elixir_uuid, "~> 1.2" },
{:poison, "~> 3.0"}]
{:poison, "~> 5.0"}]
end
end
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
"elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"},
"elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"},
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
"uuid": {:hex, :uuid, "1.1.8", "e22fc04499de0de3ed1116b770c7737779f226ceefa0badb3592e64d5cfb4eb9", [:mix], [], "hexpm"},
}