defmodule Blogex.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/yourorg/blogex" def project do [ app: :blogex, version: @version, elixir: "~> 1.15", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, aliases: aliases(), deps: deps(), test_coverage: test_coverage(), docs: docs(), package: package(), description: "A multi-blog engine powered by NimblePublisher for Phoenix apps" ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] def application do [ extra_applications: [:logger] ] end def cli do [ preferred_envs: [precommit: :test] ] end defp deps do [ {:nimble_publisher, "~> 2.0"}, {:makeup_elixir, ">= 0.0.0"}, {:makeup_erlang, ">= 0.0.0"}, {:phoenix, "~> 1.7"}, {:phoenix_html, "~> 4.0"}, {:phoenix_live_view, "~> 1.0"}, {:jason, "~> 1.4"}, {:plug, "~> 1.15"}, {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:rustler, "~> 0.38.0", optional: true}, {:ex_crap, "~> 0.1.1", only: [:dev, :test], runtime: false} ] end # The coverage floor the Lens pass enforces (`make verify` -> `make coverage` # in blogex/). Rule: the threshold is a FLOOR. Raise it as behavior-test yaks # land; never lower it. A drop means the change (or an exclusion) is wrong. # # Measured 2026-10-26, with the test scaffolding below excluded: 74.53% — the # same via `mix test --cover` and via `mix test --cover --export-coverage # default` + `mix test.coverage`. Floor is the integer below that. # # Excluded: the test scaffolding (Blogex.Test.*) only. Fixtures measure the # tests, not the library. Everything in lib/blogex counts, and today's gaps # are real: Blogex (the delegating facade), Blogex.Components and # Blogex.Layout are at 0% because the router tests only exercise the JSON # responses — moving this floor up is the behavior-test work. defp test_coverage do [ summary: [threshold: 74], ignore_modules: [ Blogex.Test.FakeBlog, Blogex.Test.PostBuilder, Blogex.Test.Setup ] ] end defp docs do [ main: "readme", source_url: @source_url, extras: ["README.md"] ] end # Same `precommit` alias name and shape as app/mix.exs, so both apps share # one loop: compile (warnings fatal), format, test. Heavy sensors belong in # the Lens pass (`make verify`), not here. defp aliases do [ precommit: ["compile --warning-as-errors", "format", "test"] ] end defp package do [ licenses: ["MIT"], links: %{"GitHub" => @source_url} ] end end