This release of mailgun allows a user to mock MailgunProvider
for testing and also uses the correct EventLoop
for Request
extension Application.Mailgun.Provider {
static var fake: Self {
.init {
$0.mailgun.use { app, _ in
MockMailgun(eventLoop: app.eventLoopGroup.next())
}
}
}
}
This release also renames the package name and url to be more concise.
So now installing mailgun will look like
.package(url: "https://github.com/vapor-community/mailgun.git", from: "5.0.0")
.target(name: "App", dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "Mailgun", package: "mailgun")
])