Current section
Files
Jump to
Current section
Files
mix.exs
defmodule Ramp.MixProject do
use Mix.Project
@source_url "https://github.com/iamkanishka/ramp"
@version "1.0.0"
def project do
[
app: :ramp,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
package: package(),
description: description(),
name: "ramp",
source_url: @source_url,
docs: docs(),
dialyzer: [
plt_add_apps: [:mix, :ex_unit],
flags: [:error_handling, :underspecs]
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test
]
]
end
def application do
[
extra_applications: [:logger, :inets, :ssl, :crypto, :public_key]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# Required
{:jason, "~> 1.4"},
{:telemetry, "~> 1.2"},
# Dev / docs only
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test}
# Note: the test suite intentionally does not depend on Bypass/Plug/Mox --
# test/support/mock_server.ex is a small, dependency-free HTTP/1.1 mock
# server built on :gen_tcp, keeping this package's dependency footprint
# minimal end-to-end, including in tests.
]
end
defp description do
"""
A production-grade Elixir client for the Ramp Developer API
(v1): cards, users, transactions, limits, bills, vendors, accounting sync,
reimbursements, webhooks, and more -- with OAuth2 token management, automatic
retries, cursor pagination many more.
"""
end
defp package do
[
name: "ramp",
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Ramp API Docs" => "https://docs.ramp.com/developer-api/v1/overview/introduction"
},
files: ~w(lib .formatter.exs mix.exs README.md CHANGELOG.md LICENSE)
]
end
defp docs do
[
main: "readme",
extras: ["README.md", "CHANGELOG.md", "LICENSE"],
groups_for_modules: [
Client: [Ramp, Ramp.Client, Ramp.TokenManager],
Transport: [Ramp.HTTP, Ramp.Error, Ramp.Pagination, Ramp.Poller],
Resources: [
Ramp.Accounting,
Ramp.AuditLogs,
Ramp.Bills,
Ramp.Business,
Ramp.Cards,
Ramp.Cashbacks,
Ramp.Departments,
Ramp.Entities,
Ramp.Limits,
Ramp.Locations,
Ramp.Merchants,
Ramp.Reimbursements,
Ramp.SpendPrograms,
Ramp.Statements,
Ramp.Transactions,
Ramp.Users,
Ramp.Vendors,
Ramp.WebhookSubscriptions
],
Webhooks: [Ramp.Webhooks, Ramp.Webhooks.Event, Ramp.Webhooks.Handler],
"Shared Types": [
Ramp.Money,
Ramp.Address,
Ramp.Page,
Ramp.DeferredTaskRef,
Ramp.AccountingFieldSelection,
Ramp.PolicyViolation
]
]
]
end
end