Current section
44 Versions
Jump to
Current section
44 Versions
Compare versions
5
files changed
+10
additions
-9
deletions
| @@ -57,4 +57,4 @@ | |
| 57 57 | {<<"optional">>,false}, |
| 58 58 | {<<"repository">>,<<"hexpm">>}, |
| 59 59 | {<<"requirement">>,<<"~> 1.1">>}]]}. |
| 60 | - {<<"version">>,<<"2.2.2">>}. |
| 60 | + {<<"version">>,<<"2.2.3">>}. |
| @@ -10,7 +10,7 @@ defmodule Fluminus.API.Module.ExternalMultimedia do | |
| 10 10 | alias Fluminus.{API, Authorization, HTTPClient} |
| 11 11 | alias Fluminus.API.Module.ExternalMultimedia.Child |
| 12 12 | |
| 13 | - @spec from_api(any()) :: __MODULE__.t() |
| 13 | + @spec from_api(map()) :: __MODULE__.t() |
| 14 14 | def from_api(%{"id" => id, "name" => name}) when is_binary(id) and is_binary(name) do |
| 15 15 | %__MODULE__{id: id, name: name, children: nil} |
| 16 16 | end |
| @@ -26,7 +26,7 @@ defmodule Fluminus.Application do | |
| 26 26 | end |
| 27 27 | |
| 28 28 | defp load_ets do |
| 29 | - :ets.new(@ets_cassettes_table_name, [:named_table]) |
| 29 | + @ets_cassettes_table_name = :ets.new(@ets_cassettes_table_name, [:named_table]) |
| 30 30 | :ets.insert(@ets_cassettes_table_name, {Fluminus.MockAPIServer, load_cassettes("api")}) |
| 31 31 | :ets.insert(@ets_cassettes_table_name, {Fluminus.MockAuthorizationServer, load_cassettes("authorization")}) |
| 32 32 | end |
| @@ -98,16 +98,16 @@ defmodule Fluminus.HTTPClient do | |
| 98 98 | defp download_loop(response = %HTTPoison.AsyncResponse{id: id}, file, verbose, counter \\ 0) do |
| 99 99 | receive do |
| 100 100 | %HTTPoison.AsyncStatus{code: 200, id: ^id} -> |
| 101 | - HTTPoison.stream_next(response) |
| 101 | + {:ok, _} = HTTPoison.stream_next(response) |
| 102 102 | download_loop(response, file, verbose, counter) |
| 103 103 | |
| 104 104 | %HTTPoison.AsyncHeaders{id: ^id} -> |
| 105 | - HTTPoison.stream_next(response) |
| 105 | + {:ok, _} = HTTPoison.stream_next(response) |
| 106 106 | download_loop(response, file, verbose, counter) |
| 107 107 | |
| 108 108 | %HTTPoison.AsyncChunk{chunk: chunk, id: ^id} -> |
| 109 | - IO.binwrite(file, chunk) |
| 110 | - HTTPoison.stream_next(response) |
| 109 | + :ok = IO.binwrite(file, chunk) |
| 110 | + {:ok, _} = HTTPoison.stream_next(response) |
| 111 111 | |
| 112 112 | if counter >= @verbose_download_size do |
| 113 113 | if verbose, do: IO.write(".") |
| @@ -4,7 +4,7 @@ defmodule Fluminus.MixProject do | |
| 4 4 | def project do |
| 5 5 | [ |
| 6 6 | app: :fluminus, |
| 7 | - version: "2.2.2", |
| 7 | + version: "2.2.3", |
| 8 8 | elixir: "~> 1.6", |
| 9 9 | elixirc_paths: elixirc_paths(Mix.env()), |
| 10 10 | start_permanent: Mix.env() == :prod, |
| @@ -27,7 +27,8 @@ defmodule Fluminus.MixProject do | |
| 27 27 | ], |
| 28 28 | dialyzer: [ |
| 29 29 | plt_add_apps: [:cookie, :floki, :jason, :html_entities, :html_sanitize_ex, :ffmpex], |
| 30 | - plt_file: {:no_warn, "priv/plts/dialyzer.plt"} |
| 30 | + plt_file: {:no_warn, "priv/plts/dialyzer.plt"}, |
| 31 | + flags: [:error_handling, :race_conditions, :underspecs, :unmatched_returns] |
| 31 32 | ] |
| 32 33 | ] |
| 33 34 | end |