Skip to content

Commit

Permalink
v8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Nov 29, 2024
1 parent 8896540 commit 2d79a09
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 8.0.0 (29-Nov-2024)

* **Breaking change**: rename the `timeouts` config option to `additional_client_opts`. It has the same usage but now enables you to set both client timeouts and override the API host to send requests to.

```ruby
additional_client_opts: {
open_timeout: 100,
timeout: 500,
api_host: 'http://example.com/api'
}
```

## 7.1.0 (12-Nov-2024)

* Test with Rails 8
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ exporter.export!

### Example: Multiple translation paths

Creating custom import/export script can come in really handy if you have a non-standard setup, for instance, your translation files are stored in multiple directories (not only in the default `./config/locales`. To overcome this problem, create a custom Rake task and provide as many importers/exporters as needed:
Creating custom import/export script can come in really handy if you have a non-standard setup, for instance, your translation files are stored in multiple directories (not only in the default `./config/locales`). To overcome this problem, create a custom Rake task and provide as many importers/exporters as needed:

```ruby
require 'rake'
Expand Down Expand Up @@ -146,7 +146,7 @@ LokaliseRails::GlobalConfig.config do |c|
c.branch = 'develop'

# Provide request timeouts for the Lokalise API client:
c.timeouts = {open_timeout: 5, timeout: 5}
c.additional_client_opts = {open_timeout: 5, timeout: 5}

# Provide maximum number of retries for file exporting:
c.max_retries_export = 5
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/templates/lokalise_rails_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# c.branch = ''

# Provide request timeouts for the Lokalise API client:
# c.timeouts = {open_timeout: nil, timeout: nil}
# c.additional_client_opts = {open_timeout: nil, timeout: nil}

# Provide maximum number of retries for file exporting:
# c.max_retries_export = 5
Expand Down
2 changes: 1 addition & 1 deletion lib/lokalise_rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module LokaliseRails
VERSION = '7.1.0'
VERSION = '8.0.0'
end
2 changes: 1 addition & 1 deletion lokalise_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.extra_rdoc_files = ['README.md']
spec.require_paths = ['lib']

spec.add_dependency 'lokalise_manager', '~> 5.0'
spec.add_dependency 'lokalise_manager', '~> 6.0'
spec.add_dependency 'zeitwerk', '~> 2.4'

spec.metadata = {
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/lokalise_rails/global_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
end

it 'is possible to set timeouts' do
allow(fake_class).to receive(:timeouts=).with(duck_type(:each))
fake_class.timeouts = {
allow(fake_class).to receive(:additional_client_opts=).with(duck_type(:each))
fake_class.additional_client_opts = {
open_timeout: 100,
timeout: 500
}
expect(fake_class).to have_received(:timeouts=)
expect(fake_class).to have_received(:additional_client_opts=)
end

it 'is possible to set import_safe_mode' do
Expand Down

0 comments on commit 2d79a09

Please sign in to comment.