diff --git a/lib/ex_aws/dynamo.ex b/lib/ex_aws/dynamo.ex index 66ddce9e..d50a2335 100644 --- a/lib/ex_aws/dynamo.ex +++ b/lib/ex_aws/dynamo.ex @@ -1,7 +1,5 @@ defmodule ExAws.Dynamo do use ExAws.Dynamo.Client - @moduledoc false - def config_root, do: Application.get_all_env(:ex_aws) end diff --git a/lib/ex_aws/dynamo/encodable.ex b/lib/ex_aws/dynamo/encodable.ex index 6b6c2b7d..eb89e72a 100644 --- a/lib/ex_aws/dynamo/encodable.ex +++ b/lib/ex_aws/dynamo/encodable.ex @@ -33,14 +33,14 @@ end defimpl ExAws.Dynamo.Encodable, for: Any do defmacro __deriving__(module, struct, options) do - ExAws.Dynamo.Encodable.Any.do_deriving(module, struct, options) + deriving(module, struct, options) end - def do_deriving(module, _struct, options) do - if only = options[:only] do - extractor = quote(do: Map.take(struct, unquote(only))) + def deriving(module, _struct, options) do + extractor = if only = options[:only] do + quote(do: Map.take(struct, unquote(only))) else - extractor = quote(do: :maps.remove(:__struct__, struct)) + quote(do: :maps.remove(:__struct__, struct)) end quote do @@ -58,7 +58,7 @@ end defimpl ExAws.Dynamo.Encodable, for: Map do defmacro __deriving__(module, struct, options) do - ExAws.Dynamo.Encodable.Any.do_deriving(module, struct, options) + ExAws.Dynamo.Encodable.Any.deriving(module, struct, options) end def encode(map, options) do diff --git a/lib/ex_aws/kinesis.ex b/lib/ex_aws/kinesis.ex index 2b736bdd..dd167cab 100644 --- a/lib/ex_aws/kinesis.ex +++ b/lib/ex_aws/kinesis.ex @@ -1,8 +1,5 @@ defmodule ExAws.Kinesis do use ExAws.Kinesis.Client - @moduledoc false - def config_root, do: Application.get_all_env(:ex_aws) - end diff --git a/lib/ex_aws/kinesis/client.ex b/lib/ex_aws/kinesis/client.ex index d854a6eb..122e522e 100644 --- a/lib/ex_aws/kinesis/client.ex +++ b/lib/ex_aws/kinesis/client.ex @@ -66,7 +66,6 @@ defmodule ExAws.Kinesis.Client do Same as describe_stream/1,2 except the shards key is a stream and will automatically handle pagination Returns the normally shaped AWS response, except the Shards key is now a stream """ - @doc "Stream Shards" defcallback stream_shards(stream_name :: stream_name) :: Enumerable.t defcallback stream_shards(stream_name :: stream_name, opts :: describe_stream_opts) :: Enumerable.t diff --git a/lib/ex_aws/lambda.ex b/lib/ex_aws/lambda.ex index 846a639f..94060f88 100644 --- a/lib/ex_aws/lambda.ex +++ b/lib/ex_aws/lambda.ex @@ -1,7 +1,5 @@ defmodule ExAws.Lambda do use ExAws.Lambda.Client - @moduledoc false - def config_root, do: Application.get_all_env(:ex_aws) end diff --git a/lib/ex_aws/s3.ex b/lib/ex_aws/s3.ex index 173cb5a8..984c876a 100644 --- a/lib/ex_aws/s3.ex +++ b/lib/ex_aws/s3.ex @@ -1,7 +1,5 @@ defmodule ExAws.S3 do use ExAws.S3.Client - @moduledoc false - def config_root, do: Application.get_all_env(:ex_aws) end diff --git a/mix.exs b/mix.exs index 93f0bb16..fc22a23e 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule ExAws.Mixfile do def project do [app: :ex_aws, - version: "0.4.12", + version: "0.4.13", elixir: "~> 1.0", description: "AWS client. Currently supports Dynamo, Kinesis, Lambda, S3, SQS", name: "ExAws", @@ -25,7 +25,7 @@ defmodule ExAws.Mixfile do defp deps(:test_dev) do [ - {:sweet_xml, "~> 0.4.0", optional: true}, + {:sweet_xml, "~> 0.5", optional: true}, {:earmark, "~> 0.1", only: :dev}, {:ex_doc, "~> 0.7", only: :dev}, {:httpoison, "~> 0.7", optional: true}, diff --git a/mix.lock b/mix.lock index 0c841da2..395096f5 100644 --- a/mix.lock +++ b/mix.lock @@ -9,4 +9,4 @@ "mixunit": {:hex, :mixunit, "0.9.2"}, "poison": {:hex, :poison, "1.2.1"}, "ssl_verify_hostname": {:hex, :ssl_verify_hostname, "1.0.5"}, - "sweet_xml": {:hex, :sweet_xml, "0.4.0"}} + "sweet_xml": {:hex, :sweet_xml, "0.5.0"}} diff --git a/test/lib/ex_aws/dynamo/encoder_test.exs b/test/lib/ex_aws/dynamo/encoder_test.exs index e5b45ff4..68f675cc 100644 --- a/test/lib/ex_aws/dynamo/encoder_test.exs +++ b/test/lib/ex_aws/dynamo/encoder_test.exs @@ -16,11 +16,6 @@ defmodule ExAws.Dynamo.EncoderTest do assert %{"M" => %{"bar" => %{"M" => %{"baz" => %{"N" => "2"}, "zounds" => %{"S" => "asdf"}}}, "foo" => %{"N" => "1"}}} == result end - test "Encoder handles hashdicts" do - dict = %{foo: 1, bar: 2} |> Enum.into(HashDict.new) - assert dict |> Encoder.encode == %{"M" => %{"bar" => %{"N" => "2"}, "foo" => %{"N" => "1"}}} - end - test "Encoder can handle floats" do assert Encoder.encode(0.4) == %{"N" => "0.4"} end diff --git a/test/test_helper.exs b/test/test_helper.exs index 7279437b..3ff3cfc6 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -2,7 +2,7 @@ Code.require_file("default_helper.exs", __DIR__) Code.require_file("alternate_helper.exs", __DIR__) defmodule Test.User do - @derive [ExAws.Dynamo.Encodable] + @derive ExAws.Dynamo.Encodable defstruct [:email, :name, :age, :admin] defimpl ExAws.Dynamo.Decodable do