From da678b81083f208f37c55298b815e7cc240aaf74 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Fri, 22 Sep 2017 23:08:21 -0400 Subject: [PATCH 1/2] Upgrades Elixir and dependencies --- .travis.yml | 16 ++++++++-------- lib/greenbar/renderers/hipchat.ex | 2 +- lib/greenbar/renderers/slack.ex | 2 +- mix.exs | 8 ++++---- mix.lock | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8dc419c..c7f5fe1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ -sudo: required - -services: - - docker +language: elixir +elixir: + - 1.5.1 +otp_release: + - 20.0 before_install: - - docker build -t operable/greenbar-testing -f Dockerfile.ci . - -# Need the job ID in order to upload the Coveralls data + - mix do local.hex --force, local.rebar --force + - MIX_ENV=test mix deps.get script: - - docker run -it --rm --env="TRAVIS_JOB_ID=${TRAVIS_JOB_ID}" operable/greenbar-testing mix coveralls.travis + - "MIX_ENV=test mix coveralls.travis" notifications: slack: diff --git a/lib/greenbar/renderers/hipchat.ex b/lib/greenbar/renderers/hipchat.ex index f201d36..4a87d79 100644 --- a/lib/greenbar/renderers/hipchat.ex +++ b/lib/greenbar/renderers/hipchat.ex @@ -194,7 +194,7 @@ defmodule Greenbar.Renderers.HipChatRenderer do #{separator_row} | #{Enum.join(headers, " | ")} | #{separator_row} - """ |> String.strip + """ |> String.trim() end defp to_hyphens(name), diff --git a/lib/greenbar/renderers/slack.ex b/lib/greenbar/renderers/slack.ex index 4e7843c..0ef6963 100644 --- a/lib/greenbar/renderers/slack.ex +++ b/lib/greenbar/renderers/slack.ex @@ -162,7 +162,7 @@ defmodule Greenbar.Renderers.SlackRenderer do #{separator_row} | #{Enum.join(headers, " | ")} | #{separator_row} - """ |> String.strip + """ |> String.trim() end defp to_hyphens(name), diff --git a/mix.exs b/mix.exs index 8089ef8..91ebbd7 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Greenbar.Mixfile do def project do [app: :greenbar, version: "1.1.0", - elixir: "~> 1.3.1", + elixir: "~> 1.5.1", erlc_options: [:debug_info, :warnings_as_errors], leex_options: [:warnings_as_errors], elixirc_paths: elixirc_paths(Mix.env), @@ -13,7 +13,7 @@ defmodule Greenbar.Mixfile do preferred_cli_env: ["coveralls": :test, "coveralls.html": :test, "coveralls.travis": :test], - deps: deps] ++ compile_protocols(Mix.env) + deps: deps()] ++ compile_protocols(Mix.env) end def application do @@ -31,9 +31,9 @@ defmodule Greenbar.Mixfile do defp deps do [ # Direct dependencies - {:piper, github: "operable/piper"}, + {:piper, github: "davejlong/piper", branch: "elixir-upgrade"}, {:greenbar_markdown, github: "operable/greenbar_markdown"}, - {:poison, "~> 2.0"}, + {:poison, "~> 3.1"}, {:table_rex, "~> 0.8"}, # Test and Development diff --git a/mix.lock b/mix.lock index bfac6a3..cb20876 100644 --- a/mix.lock +++ b/mix.lock @@ -9,8 +9,8 @@ "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []}, "mix_test_watch": {:hex, :mix_test_watch, "0.2.6", "9fcc2b1b89d1594c4a8300959c19d50da2f0ff13642c8f681692a6e507f92cab", [:mix], [{:fs, "~> 0.9.1", [hex: :fs, optional: false]}]}, - "piper": {:git, "https://github.com/operable/piper.git", "d69e4596cd338ab00d90e4ea6831eff11d0572c0", []}, - "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, + "piper": {:git, "https://github.com/davejlong/piper.git", "356db85e82292c9d551907aec41267a6ed45e602", [branch: "elixir-upgrade"]}, + "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], []}, "table_rex": {:hex, :table_rex, "0.8.3", "1c68dfc6886d6f118f5047b0449d6402ae0ac5709064789e578c2f4659f4064b", [:mix], []}, "uuid": {:hex, :uuid, "1.1.5", "96cb36d86ee82f912efea4d50464a5df606bf3f1163d6bdbb302d98474969369", [:mix], []}} From 2dca11c0144a138877192166e0c6253043f80da2 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Fri, 22 Sep 2017 23:12:47 -0400 Subject: [PATCH 2/2] Fixes compiler warnings in tests --- test/greenbar/renderers/hipchat_processor_test.exs | 2 +- test/greenbar/renderers/slack_processor_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/greenbar/renderers/hipchat_processor_test.exs b/test/greenbar/renderers/hipchat_processor_test.exs index 9c3cfd8..b62805c 100644 --- a/test/greenbar/renderers/hipchat_processor_test.exs +++ b/test/greenbar/renderers/hipchat_processor_test.exs @@ -164,7 +164,7 @@ defmodule Greenbar.Test.Test.HipChatRendererTest do | Hello World | +-------------+ - """ |> String.strip + """ |> String.trim() assert expected == rendered end diff --git a/test/greenbar/renderers/slack_processor_test.exs b/test/greenbar/renderers/slack_processor_test.exs index 5497a98..6bdf094 100644 --- a/test/greenbar/renderers/slack_processor_test.exs +++ b/test/greenbar/renderers/slack_processor_test.exs @@ -168,7 +168,7 @@ defmodule Greenbar.Test.SlackRendererTest do | Hello World | +-------------+ ``` - """ |> String.strip + """ |> String.trim() assert expected == rendered end