Skip to main content

mix.exs

defmodule Mock.Mixfile do
  use Mix.Project

  @version "0.4.1"
  @source_url "https://github.com/eisnstein/exmock"

  def project do
    [
      app: :exmock,
      name: "ExMock",
      version: @version,
      elixir: "~> 1.18",
      description: description(),
      package: package(),
      test_coverage: [tool: ExCoveralls],
      docs: [source_ref: "#{@version}", source_url: @source_url, main: "readme"],
      deps: deps()
    ]
  end

  def cli do
    [preferred_envs: [coveralls: :test, "coveralls.detail": :test, "coveralls.post": :test]]
  end

  defp deps do
    [
      {:ex_doc, "~> 0.40.3", only: :dev, runtime: false},
      {:excoveralls, "~> 0.18.5", only: :test},
      {:meck, "~> 1.2.0"}
    ]
  end

  defp description do
    """
    A mocking library for the Elixir language.

    We use the Erlang meck library to provide module mocking
    functionality for Elixir. It uses macros in Elixir to expose
    the functionality in a convenient manner for integrating in
    Elixir tests.
    """
  end

  defp package do
    [
      files: ["lib", "mix.exs", "README.md", "LICENSE.md", "CHANGELOG.md"],
      contributors: [
        "Daniel Olshansky",
        "Dave Thomas",
        "Jonathan J Hunt",
        "Joseph Wilk",
        "Josh Adams",
        "Jérémy",
        "matt.freer",
        "Mikhail S. Pobolovets",
        "parroty",
        "xieyunzi"
      ],
      maintainers: [
        "Daniel Höflehner"
      ],
      licenses: ["MIT"],
      links: %{
        "Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
        "GitHub" => @source_url
      }
    ]
  end
end