defmodule Loopback.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/stefanchrobot/loopback" def project do [ app: :loopback, version: @version, elixir: "~> 1.19", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), description: description(), package: package(), name: "Loopback", source_url: @source_url, docs: docs() ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger], mod: {Loopback.Application, []} ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_env), do: ["lib"] # Run "mix help deps" to learn about dependencies. defp deps do [ {:nimble_ownership, "~> 1.0"}, {:ex_doc, "~> 0.40", only: :dev, runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, # Clients with interceptors with versions matching what's declared in the README. # hackney 2.x, 3.x, 4.0.0 and 4.0.1 lack functions that Tesla and HTTPoison use. {:finch, "~> 0.24", optional: true}, {:hackney, "~> 1.21 or ~> 4.0 and >= 4.0.2", optional: true}, {:tesla, "~> 1.22", optional: true}, # Clients built on the ones above. {:httpoison, "~> 2.2 or ~> 3.0", only: :test}, {:req, "~> 0.5", only: :test}, # For Tesla.Adapter.Gun, which Tesla defines when gun is loaded. {:gun, "~> 2.0", only: :test} ] end defp description do "Run your tests against fake external services." end defp package do [ licenses: ["MIT"], links: %{ "GitHub" => @source_url, "Changelog" => "https://loopback.hexdocs.pm/changelog.html" } ] end defp docs do [ main: "readme", extras: ["README.md", "CHANGELOG.md"], source_ref: "v#{@version}", before_closing_body_tag: &before_closing_body_tag/1, filter_modules: fn module, _metadata -> module not in [Loopback.Dispatcher, Loopback.ModuleOverride] end, skip_code_autolink_to: [ "Loopback.Dispatcher", "Loopback.ModuleOverride", "Loopback.HTTPFake.request/2" ], groups_for_modules: [ Interception: [ Loopback.Interceptor, Loopback.Interceptors.Finch, Loopback.Interceptors.Hackney, Loopback.Interceptors.Httpc, Loopback.Interceptors.TeslaGun, Loopback.Interceptors.TeslaMint ], Fakes: [Loopback.HTTPFake, Loopback.HTTPFake.Router], HTTP: [Loopback.HTTPRequest, Loopback.HTTPResponse, Loopback.HTTPError] ] ] end # Renders ```mermaid code blocks, see https://ex-doc.hexdocs.pm/readme.html#rendering-mermaid-graphs defp before_closing_body_tag(:html) do """ """ end defp before_closing_body_tag(:epub), do: "" end