defmodule Retort.Mixfile do use Mix.Project def project do [ aliases: aliases(), app: :retort, build_embedded: Mix.env() == :prod, deps: deps(), description: description(), docs: docs(), dialyzer: [ ignore_warnings: ".dialyzer_ignore", plt_add_apps: [ :ecto, :ecto_sql, :ex_unit, :postgrex, :uuid ] ], elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), package: package(), preferred_cli_env: [ coveralls: :test, "coveralls.detail": :test, "coveralls.html": :test, credo: :test, dialyze: :test, "ecto.create": :test, "ecto.drop": :test, "ecto.migrate": :test, "ecto.migrations": :test ], source_url: "https://github.com/C-S-D/retort", start_permanent: Mix.env() == :prod, test_coverage: [ tool: ExCoveralls ], version: "2.6.3-rc2" ] end # Configuration for the OTP application # # Type "mix help compile.app" for more information def application do [ applications: applications(Mix.env()), mod: {Retort, []} ] end ## Private Functions defp aliases do [ compile: ["compile --warnings-as-errors"], test: ["calcinator.ecto.wait", "ecto.drop", "ecto.create --quiet", "ecto.migrate", "test"] ] end defp applications(:test) do [:ex_machina, :faker, :postgrex, :tzdata | applications(:dev)] end defp applications(_) do ~w( amqp calcinator confex connection ecto ja_serializer logger poison )a end defp deps do # Sorted by name [ # JSONAPI document parsing and coding with automatic JSONAPI error document production {:alembic, "~> 4.0"}, # connect to RabbitMQ # ~> 0.1.4 for Erlang 18 or ~> 0.2.0 for Erlang 19 {:amqp, "~> 0.1.4 or ~> 0.2.0"}, {:calcinator, "4.1.0-rc2"}, # Runtime loading of ENV variables in configs {:confex, "~> 3.3.1"}, # Connect, retry, and backoff for RabbitMQ connection {:connection, "~> 1.0"}, # Static analysis {:credo, "0.8.6", only: :test}, # Type checking {:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false}, # Access database for interpreter-server owned schemas and decode/encode JSON for using schemas {:ecto, "~> 3.0"}, # Test Coverage # (only works on 1.5.0-dev or newer) {:excoveralls, "~> 0.7.2", only: :test}, # Documentation {:ex_doc, "~> 0.19.0", only: [:dev, :test]}, # Build and create fake Ecto models (think FactoryGirl for Ecto) {:ex_machina, "~> 2.2.2", only: :test}, # Fake data for tests, so we don't have to come up with our own sequences for ExMachina {:faker, "~> 0.8.0", only: :test}, # documentation coverage {:inch_ex, "~> 0.5.1", only: [:dev, :test]}, # `*View`s {:ja_serializer, ">= 0.11.0 and < 0.13.0"}, # JUnit output for CircleCI parsing test results {:junit_formatter, "~> 1.0", only: :test}, # JSON decoding and encoding for JSONRPC and JSONAPI {:poison, "~> 2.0 or ~> 3.0"}, # PostgreSQL DB access for Ecto for tests {:postgrex, "~> 0.14.0"}, # time calculations for `Factory` {:timex, "~> 3.0", only: :test}, # UUIDs for JSON RPC id / RabbitMQ correlation_id to match use of `SecureRandom.uuid` in Ruby {:uuid, "~> 1.1"} ] end defp description do """ JSONAPI over JSONRPC over RabbitMQ. """ end defp docs do [ extras: extras() ] end # Specifies which paths to compile per environment. defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp extras do [ "CHANGELOG.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE.md", "README.md", "UPGRADING.md" ] end defp package do [ files: ["lib", "mix.exs" | extras()], licenses: ["Apache 2.0"], links: %{ "Docs" => "https://hexdocs.pm/retort", "Github" => "https://github.com/C-S-D/retort" }, maintainers: ["Luke Imhoff", "Jeff Utter"] ] end end