mailgun / mailgun/mailgun-ruby
Testmode not correctly initialized from global setting
@alex-leb is already working on this.
Since Jun 26, 2026.
- Dominant language
- Ruby
- Stars
- 489
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Description
In Release 1.4.1, the global `test_mode` setting was implemented to be respected. In the initial implementation `!!Mailgun.test_mode` was used, which correctly initialized the setting. Later in 1.4.2, ruboco was added and with it an erroneous fix was implemented: now the testmode is inited with `!Mailgun.test_mode.nil?`. This is in fact not logically identical and thus the test mode is enabled with any other value than `nil` and only disabled with `nil`. Assigning it to `false` will thus result in an enabled test mode! Regression added in https://github.com/mailgun/mailgun-ruby/commit/3c9c4974998dfb847ec23966b326f01804f7a71a
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.