Commit Graph

20 Commits

Author SHA1 Message Date
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Sam Saffron e2bcf55077 DEV: move send => public_send in lib folder
This handles most of the cases in `lib` where we were using send instead
of public_send
2019-05-07 12:25:44 +10:00
Sam Saffron 9be70a22cd DEV: introduce new API to look up dynamic site setting
This removes all uses of both `send` and `public_send` from consumers of
SiteSetting and instead introduces a `get` helper for dynamic lookup

This leads to much cleaner and safer code long term as we are always explicit
to test that a site setting is really there before sending an arbitrary
string to the class

It also removes a couple of risky stubs from the auth provider test
2019-05-07 11:00:30 +10:00
Guo Xiang Tan 630b4570ef Add specs for `RateLimiter::LimitExceeded#description`. 2018-06-19 07:48:03 +08:00
Neil Lalonde 320cd9a19e UX: rate limiter message will say to wait "a few seconds" instead of 0 to 3 seconds 2018-06-18 14:14:47 -04:00
Sam 5a9622163d FIX: regression around rate limiter 2017-12-04 21:44:16 +11:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Arpit Jalan 6633b92d5f FIX: do not raise exception if user not found while rate limiting 2016-04-13 20:08:03 +05:30
Robin Ward 06591022fe FEATURE: Generous badge 2016-03-15 16:08:29 -04:00
Régis Hanol 622d804d46 FEATURE: Add rejection message on rejected IncomingEmail
FIX: Better RateLimit description in rejected IncomingEmail
FEATURE: Send email when hitting a rate limit
2016-03-07 16:56:17 +01:00
Robin Ward 0b4cb5cf0d Add better error messages for rate limits. 2015-09-24 13:52:46 -04:00
Robin Ward 3620c8c85e Move descriptions for rate limiting errors into the exception 2015-09-24 13:52:46 -04:00
Robin Ward dd3953bf19 FIX: Ruby 2.2 has `include` as private 2015-04-21 13:35:00 -04:00
Robin Ward 2713b77e28 FIX: If validations were disabled some rate limits continued to run 2015-04-21 13:16:05 -04:00
Sam bb20f64cb2 use standard error so its easier to catch 2015-03-23 12:20:50 +11:00
Neil Lalonde 4f6d5d9215 FEATURE: add site settings rate_limit_new_user_create_topic and rate_limit_new_user_create_post to have different rate limits for topic and post creation for new users 2014-07-14 16:58:16 -04:00
Sam 96fdf72d5e rails master compatability 2013-12-13 17:04:45 +11:00
Régis Hanol 239cbd2d58 enforce coding convention
replaced every `and` by `&&` and every `or` by `||`
2013-03-05 01:42:44 +01:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00