Skip to content

Instantly share code, notes, and snippets.

View DavertMik's full-sized avatar
🤓
developing codeception & codeceptjs

Michael Bodnarchuk DavertMik

🤓
developing codeception & codeceptjs
View GitHub Profile
@danielalvarenga
danielalvarenga / puma.rb
Last active October 16, 2021 20:08
Puma config for rails 5 api
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
# More: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#threads
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
const CFG = require('../codecept.conf.js').config.myConfig
const MailSlurpClient = require('mailslurp-client') // https://www.npmjs.com/package/mailslurp-client
const emailApi = new MailSlurpClient.InboxcontrollerApi()
var assert = require('assert')
class EmailHelper extends Helper { // eslint-disable-line no-undef
async setupMailbox () {
var data =
await emailApi.createRandomInboxUsingPOST(CFG.emailApiKey)
.catch(err => { console.log(err); assert.fail(err) })