Current section
Files
Jump to
Current section
Files
mix.exs
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(),
elixir: "~> 1.3",
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.3.0"
]
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
[
"test": ["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
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, "~> 3.3"},
# 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, "~> 3.0"},
# Connect, retry, and backoff for RabbitMQ connection
{:connection, "~> 1.0"},
# Static analysis
{:credo, "0.7.4", only: [:test]},
# Type checking
{:dialyze, "~> 0.2.1", only: [:test]},
# Access database for interpreter-server owned schemas and decode/encode JSON for using schemas
{:ecto, "~> 2.1"},
# Test Coverage
# (only works on 1.5.0-dev or newer)
{:excoveralls, "~> 0.6.3", only: :test},
# Documentation
{:ex_doc, "~> 0.15.1", only: [:dev, :test]},
# Build and create fake Ecto models (think FactoryGirl for Ecto)
{:ex_machina, "~> 2.0", 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.13.0", only: :test},
# 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"]
]
end
end