Packages
altworx_runbox
26.0.0
26.0.0
25.0.1
25.0.0
24.0.0
23.1.1
23.1.0
23.0.0
22.2.0
22.1.0
22.0.0
21.2.0
21.1.2
21.1.1
21.1.0
21.0.0
20.0.0
19.0.0
18.0.0
17.2.0
17.1.0
17.0.1
17.0.0
16.2.0
16.1.0
16.0.0
15.0.0
14.1.0
14.0.1
14.0.0
13.0.3
13.0.2
13.0.1
13.0.0
12.1.0
12.0.0
11.0.1
11.0.0
10.0.0
9.0.0
8.0.0
7.0.1
7.0.0
6.0.0
5.0.0
4.0.0
3.0.0
2.1.0
2.0.0
1.4.1
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
0.1.3
0.1.2
0.1.1
0.1.0
Runbox is a library for running Altworx scenarios.
Current section
Files
Jump to
Current section
Files
altworx_runbox
mix.exs
mix.exs
defmodule Runbox.MixProject do
use Mix.Project
@version "26.0.0"
def project do
[
app: :runbox,
version: @version,
description: description(),
package: package(),
elixir: "~> 1.20",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [
list_unused_filters: true,
plt_add_apps: [:ex_unit, :mix]
],
docs: [
formatters: ["html"],
extras: ["README.md", "CHANGELOG.md"],
main: "readme",
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
# ex_doc warns when documentation references a module that `filter_modules` removed, and
# `Runbox` is `@moduledoc group: :internal`, so the plain `Runbox` mentions in CHANGELOG.md
# would fail `make check-docs`. A function rather than a list, so that the internal build --
# where nothing is filtered -- still links them.
skip_code_autolink_to: fn ref -> ref == "Runbox" and not internal_docs?() end,
nest_modules_by_prefix: [Runbox.Scenario.OutputAction],
filter_modules: fn _mod, metadata ->
internal_docs?() or Map.get(metadata, :group) != :internal
end,
groups_for_modules: [
"Runbox internals": fn metadata -> metadata[:group] == :internal end,
Messages: fn metadata -> metadata[:group] == :messages end,
"Output actions": fn metadata -> metadata[:group] == :output_actions end,
"Development and testing": fn metadata -> metadata[:group] == :dev_tools end,
Utilities: fn metadata -> metadata[:group] == :utilities end
],
source_url_pattern:
"https://preview.hex.pm/preview/altworx_runbox/#{@version}/show/%{path}#L%{line}"
]
]
end
def application do
[
extra_applications: [:logger, :eex],
mod: {Runbox.Application, []},
env: [mode: :slave]
]
end
defp aliases do
[docs: docs_tasks()]
end
# Builds the docs twice: user-facing into doc/, internal into doc/internal/.
# `DOCS_STRICT=1`, set by the `check-docs` make target, makes ex_doc warnings fatal.
defp docs_tasks do
extra = if System.get_env("DOCS_STRICT") == "1", do: " --warnings-as-errors", else: ""
[
"docs --output doc" <> extra,
# Mix runs a task once per invocation, so without reenabling, the second pass below is
# silently skipped. `:docs_target` is what `internal_docs?/0` reads to widen the filters.
fn _ -> Mix.Task.reenable("docs") end,
fn _ -> Process.put(:docs_target, :internal) end,
"docs --output doc/internal" <> extra
]
end
defp description do
"""
Runbox is a library for running Altworx scenarios.
"""
end
defp package do
[
name: :altworx_runbox,
licenses: [
"BSD-3-Clause"
],
links: %{
"Changelog" => "https://altworx-runbox.hexdocs.pm/changelog.html",
"Altworx Toolbox" => "https://hex.pm/packages/altworx_toolbox"
}
]
end
defp deps do
[
# Pinned to an exact version on purpose: the whole runtime is built on GenStage, so every
# bump deserves a deliberate review. `mix hex.outdated` surfaces a new release, and doing
# that review is what widening this requirement is for.
{:gen_stage, "1.3.2"},
{:mock, "~> 0.3.5", only: :test},
# mock pins meck ~> 0.9.2, but meck 0.9.2 fails to compile on OTP 29
# (deprecated `catch`); override to 1.x, which fixes it and works with mock.
{:meck, "~> 1.0", only: :test, override: true},
{:uuid, "~> 1.1"},
{:joken, "~> 2.3"},
{:jason, "~> 1.3"},
{:heap, "~> 3.0"},
# development tools
{:credo, "~> 1.7.11", only: [:dev, :test], runtime: false},
{:credo_naming, "~> 2.1.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.40.3", only: :dev, runtime: false},
{:junit_formatter, "~> 3.1", only: [:test]},
{:mimic, "~> 2.3", only: [:test]}
]
end
defp internal_docs?, do: Process.get(:docs_target) == :internal
end