~cosmicrose/liberator

ref: 51f354644721107fe4206a7a69e92bcec474b95c liberator/mix.exs -rw-r--r-- 2.6 KiB
51f35464Rosa Richter Fix Earthfile 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT

defmodule Liberator.MixProject do
  use Mix.Project

  def project do
    [
      app: :liberator,
      description: "An Elixir library for building controllers that obey the HTTP spec.",
      package: package(),
      docs: docs(),
      version: "2.0.0",
      elixir: "~> 1.9",
      start_permanent: Mix.env() == :prod,
      compilers: [:gettext] ++ Mix.compilers(),
      deps: deps()
    ]
  end

  defp package do
    [
      maintainers: ["Rosa Richter"],
      licenses: ["MIT", "CC-BY-4.0", "CC0-1.0"],
      links: %{
        "GitHub" => "https://github.com/Cantido/liberator",
        "sourcehut" => "https://sr.ht/~cosmicrose/liberator",
        "Sponsor" => "https://liberapay.com/rosa"
      }
    ]
  end

  def docs do
    [
      main: "Liberator.Resource",
      source_url: "https://github.com/Cantido/liberator",
      extras: [
        "README.md",
        "CHANGELOG.md",
        "CONTRIBUTING.md",
        "SECURITY.md",
        "code_of_conduct.md",
        "guides/getting_started.md",
        "guides/decision_tree.md"
      ],
      groups_for_modules: [
        # Ungrouped:
        #
        # Liberator
        # Liberator.Evaluator
        # Liberator.Resource

        "Content Negotiation": [
          Liberator.Codec,
          Liberator.ContentNegotiation,
          Liberator.Encoding.Deflate,
          Liberator.Encoding.Gzip,
          Liberator.Encoding.Identity,
          Liberator.MediaType.TextPlain
        ],
        Debugging: [
          Liberator.Trace
        ],
        Exceptions: [
          Liberator.InvalidLastModifiedValueException,
          Liberator.InvalidRetryAfterValueException,
          Liberator.CompressionCodecInvalidResultException,
          Liberator.CompressionCodecNotFoundException,
          Liberator.MediaTypeCodecInvalidResultException,
          Liberator.MediaTypeCodecNotFoundException,
          Liberator.UnknownStepException
        ]
      ]
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      extra_applications: [:logger]
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:plug_cowboy, "~> 2.0"},
      {:gettext, "~> 0.18.2"},
      {:jason, "~> 1.2"},
      {:telemetry, "~> 0.4"},
      {:timex, "~> 3.6"},
      {:credo, "~> 1.5.0-rc.2", only: [:dev, :test], runtime: false},
      {:hex_licenses, "~> 0.2.0", only: :dev, runtime: false},
      {:sobelow, "~> 0.8", only: :dev},
      {:ex_doc, "~> 0.14", only: :dev, runtime: false}
    ]
  end
end