Skip to content

Commit 065a300

Browse files
authoredNov 25, 2017
Merge pull request #1249 from code-corps/update-cloudex
Update Cloudex
2 parents d27b1ef + 74f5bb6 commit 065a300

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed
 

‎lib/code_corps/accounts/accounts.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ defmodule CodeCorps.Accounts do
130130
defp upload_github_photo_async(%User{} = user), do: user
131131

132132
defp upload_github_photo(%User{github_avatar_url: github_avatar_url} = user) do
133-
[ok: %Cloudex.UploadedImage{public_id: cloudinary_public_id}] =
133+
{:ok, %Cloudex.UploadedImage{public_id: cloudinary_public_id}} =
134134
github_avatar_url
135135
|> CodeCorps.Cloudex.Uploader.upload()
136136

‎lib/code_corps/cloudex/cloudex_test.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ defmodule CloudexTest do
1414
end
1515
end
1616

17-
@spec upload(String.t) :: %Cloudex.UploadedImage{}
17+
@spec upload(String.t) :: {:ok, %Cloudex.UploadedImage{}}
1818
def upload(_url) do
19-
[ok: %Cloudex.UploadedImage{public_id: fake_cloudinary_id()}]
19+
{:ok, %Cloudex.UploadedImage{public_id: fake_cloudinary_id()}}
2020
end
2121

2222
defp fake_cloudinary_id do

‎lib/code_corps/cloudex/cloudinary_url.ex

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
defmodule CodeCorps.Cloudex.CloudinaryUrl do
2-
32
@cloudex Application.get_env(:code_corps, :cloudex)
43

54
def for(nil, _options, version, default_color, type) do
@@ -17,5 +16,4 @@ defmodule CodeCorps.Cloudex.CloudinaryUrl do
1716

1817
defp add_https(base_url) when is_list(base_url) and length(base_url) > 0, do: "https://" <> List.last(base_url)
1918
defp add_https(url), do: url
20-
2119
end

‎mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defmodule CodeCorps.Mixfile do
5454
{:cowboy, "~> 1.0"},
5555
{:benchfella, "~> 0.3.0", only: :dev},
5656
{:bypass, "~> 0.8.1", only: :test},
57-
{:cloudex, "~> 0.2.2"},
57+
{:cloudex, "~> 1.0"},
5858
{:comeonin, "~> 3.2"},
5959
{:corsica, "~> 1.0"}, # CORS
6060
{:credo, "~> 0.8", only: [:dev, :test]}, # Code style suggestions

‎mix.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], []},
77
"bypass": {:hex, :bypass, "0.8.1", "16d409e05530ece4a72fabcf021a3e5c7e15dcc77f911423196a0c551f2a15ca", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}]},
88
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], []},
9-
"cloudex": {:hex, :cloudex, "0.2.2", "da554dab88672163346a1614917df2a27ae82d07e956ee31de758f0b04c163bf", [:mix], [{:httpoison, "~> 0.13.0", [hex: :httpoison, optional: false]}, {:poison, "~> 3.1.0", [hex: :poison, optional: false]}, {:timex, "~> 3.1.7", [hex: :timex, optional: false]}, {:tzdata, "~> 0.5.11", [hex: :tzdata, optional: false]}]},
9+
"cloudex": {:hex, :cloudex, "1.0.0", "944886f408fd18d4a460cc93c22ee1790aca552599b76b92ad5d8374cf005820", [:mix], [{:httpoison, "~> 0.13.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:poison, "~> 3.1.0", [hex: :poison, repo: "hexpm", optional: false]}, {:timex, "~> 3.1.7", [hex: :timex, repo: "hexpm", optional: false]}, {:tzdata, "~> 0.5.11", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm"},
1010
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], []},
1111
"comeonin": {:hex, :comeonin, "3.2.0", "cb10995a22aed6812667efb3856f548818c85d85394d8132bc116fbd6995c1ef", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, optional: false]}]},
1212
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [], []},

‎test/lib/code_corps/cloudex/uploader_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule CodeCorps.Cloudex.UploaderTest do
33
use ExUnit.Case, async: true
44

55
test "returns the public_id" do
6-
[ok: %Cloudex.UploadedImage{public_id: public_id}] =
6+
{:ok, %Cloudex.UploadedImage{public_id: public_id}} =
77
"https://placehold.it/500x500"
88
|> Uploader.upload
99

0 commit comments

Comments
 (0)