CHANGELOG.md in lokalise_rails-1.4.0 vs CHANGELOG.md in lokalise_rails-2.0.0.rc1

- old
+ new

@@ -1,6 +1,18 @@ # Changelog +## 2.0.0.rc1 (12-Aug-21) + +* **Lokalise is introducing API rate limiting.** Access to all endpoints will be limited to 6 requests per second from 14 September, 2021. This limit is applied per API token and per IP address. If you exceed the limit, a 429 HTTP status code will be returned and a `Lokalise::Error::TooManyRequests` exception will be raised. Therefore, to overcome this issue LokaliseRails is introducing an exponential backoff mechanism for file exports. Why? Because if you have, say, 10 translation files, we'll have to send 10 separate API requests which will probably mean exceeding the limit (this is not the case with importing as we're always receiving a single archive). Thus, if the HTTP status code 429 was received, we'll do the following: + +```ruby +sleep 2 ** retries +retries += 1 +``` + +* If the maximum number of retries has been reached LokaliseRails will re-raise the `Lokalise::Error::TooManyRequests` error and give up. By default, the maximum number of retries is set to `5` but you can control it using the `max_retries_export` option. +* Enabled compression for the API client. + ## 1.4.0 (29-Jun-21) * Re-worked exception handling. Now when something goes wrong during the import or export process, this gem will re-raise all such errors (previously it just printed out some errors to the `$stdout`). If you run a Rake task, it will exit with a status code `1` and the actual error message. If you run a task programattically, you'll get an exception. * Dropped support for Ruby 2.5 * Test against Ruby 3