Skip to content

Commit

Permalink
Fix CircleCI build
Browse files Browse the repository at this point in the history
CircleCI changed the way it runs tests for elixir. This change updates
our current configuration to keep up to date with CircleCI 2.0.
  • Loading branch information
pablo-co authored Jan 24, 2018
1 parent 9bfcfef commit 8f281f2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 66 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
jobs:
build:
working_directory: ~/bamboo_postmark
docker:
- image: elixir:1.5.3
steps:
- checkout
- run: mix local.hex --force
- run: mix local.rebar
- run: mix deps.get
- run: mix test
17 changes: 0 additions & 17 deletions circle.yml

This file was deleted.

36 changes: 0 additions & 36 deletions circle_pre_build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions elixir_buildpack.config

This file was deleted.

22 changes: 11 additions & 11 deletions lib/bamboo/postmark_helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ defmodule Bamboo.PostmarkHelper do
## Example
template(email, "9746128")
template(email, "9746128", %{"name" => "Name", "content" => "John"})
template(email, "9746128")
template(email, "9746128", %{"name" => "Name", "content" => "John"})
"""
def template(email, template_id, template_model \\ %{}) do
email
Expand All @@ -43,15 +43,15 @@ defmodule Bamboo.PostmarkHelper do
## Example
put_param(email, "TrackLinks", "HtmlAndText")
put_param(email, "TrackOpens", true)
put_param(email, "Attachments", [
%{
Name: "file.txt",
Content: "/some/file.txt" |> File.read!() |> Base.encode64(),
ContentType: "txt"
}
])
put_param(email, "TrackLinks", "HtmlAndText")
put_param(email, "TrackOpens", true)
put_param(email, "Attachments", [
%{
Name: "file.txt",
Content: "/some/file.txt" |> File.read!() |> Base.encode64(),
ContentType: "txt"
}
])
"""
def put_param(%Email{private: %{message_params: _}} = email, key, value) do
put_in(email.private[:message_params][key], value)
Expand Down

0 comments on commit 8f281f2

Please sign in to comment.