forked from beam-community/stripity-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
185 lines (175 loc) · 4.43 KB
/
mix.exs
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
defmodule Stripe.Mixfile do
use Mix.Project
def project do
[
app: :stripity_stripe,
deps: deps(),
description: description(),
dialyzer: [
plt_add_apps: [:mix],
plt_file: {:no_warn, "priv/plts/stripity_stripe.plt"}
],
elixir: "~> 1.7",
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
test_coverage: [tool: ExCoveralls],
version: "2.4.0",
source_url: "https://github.com/code-corps/stripity_stripe/",
docs: [
main: "readme",
extras: ["README.md"],
groups_for_modules: groups_for_modules(),
nest_modules_by_prefix: nest_modules_by_prefix()
]
]
end
# Configuration for the OTP application
def application do
[
applications: apps(Mix.env()),
env: env(),
mod: {Stripe, []}
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp env() do
[
api_base_url: "https://api.stripe.com/v1/",
api_upload_url: "https://files.stripe.com/v1/",
pool_options: [
timeout: 5_000,
max_connections: 10
],
use_connection_pool: true
]
end
defp apps(:test), do: apps()
defp apps(_), do: apps()
defp apps(), do: [:hackney, :logger, :jason, :uri_query]
defp deps do
[
{:dialyxir, "1.0.0-rc.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.20.2", only: :dev},
{:excoveralls, "~> 0.11.1", only: :test},
{:hackney, "~> 1.15"},
{:inch_ex, "~> 2.0", only: [:dev, :test]},
{:mox, "~> 0.4", only: :test},
{:jason, "~> 1.1"},
{:uri_query, "~> 0.1.2"},
{:exexec, "~> 0.1.0", only: :test}
]
end
defp description do
"""
A Stripe client for Elixir.
"""
end
defp package do
[
files: ["lib", "LICENSE*", "mix.exs", "README*"],
licenses: ["New BSD"],
links: %{
"GitHub" => "https://github.com/code-corps/stripity_stripe"
},
maintainers: ["Dan Matthews", "Josh Smith", "Nikola Begedin", "Scott Newcomer"]
]
end
defp groups_for_modules do
[
"Core Resources": [
Stripe.Balance,
Stripe.BalanceTransaction,
Stripe.Charge,
Stripe.Customer,
Stripe.Dispute,
Stripe.Event,
Stripe.FileUpload,
Stripe.PaymentIntent,
Stripe.Payout,
Stripe.Product,
Stripe.Refund,
Stripe.TaxID,
Stripe.Token
],
"Payment Methods": [
Stripe.BankAccount,
Stripe.Card,
Stripe.PaymentMethod,
Stripe.Source
],
Checkout: [
Stripe.Session
],
Billing: [
Stripe.Coupon,
Stripe.CreditNote,
Stripe.Discount,
Stripe.Invoice,
Stripe.Invoiceitem,
Stripe.LineItem,
Stripe.Product,
Stripe.Plan,
Stripe.Subscription,
Stripe.SubscriptionItem,
Stripe.SubscriptionItem.Usage,
Stripe.SubscriptionSchedule,
Stripe.TaxRate
],
Connect: [
Stripe.Account,
Stripe.ApplicationFee,
Stripe.CountrySpec,
Stripe.ExternalAccount,
Stripe.FeeRefund,
Stripe.LoginLink,
Stripe.Connect.OAuth,
Stripe.Connect.OAuth.AuthorizeResponse,
Stripe.Connect.OAuth.TokenResponse,
Stripe.Connect.OAuth.DeauthorizeResponse,
Stripe.Recipient,
Stripe.Transfer,
Stripe.TransferReversal
],
Fraud: [
Stripe.Review
],
Issuing: [
Stripe.Issuing.Authorization,
Stripe.Issuing.Card,
Stripe.Issuing.CardDetails,
Stripe.Issuing.Cardholder,
Stripe.Issuing.Dispute,
Stripe.Issuing.Transaction,
Stripe.Issuing.Types
],
"Relay/Orders": [
Stripe.Order,
Stripe.OrderItem,
Stripe.OrderReturn,
Stripe.Relay.Product,
Stripe.Sku
],
Utilities: [
Stripe.Config,
Stripe.Converter,
Stripe.Types
]
]
end
def nest_modules_by_prefix() do
[
Stripe.Connect.OAuth,
Stripe.Connect.OAuth.AuthorizeResponse,
Stripe.Connect.OAuth.TokenResponse,
Stripe.Connect.OAuth.DeauthorizeResponse
]
end
end