diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b4a540..ab0db32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: ruby: - 2.7 - '3.0' + - 3.1 runs-on: ${{ matrix.os }} env: LOKALISE_API_TOKEN: 123abc diff --git a/CHANGELOG.md b/CHANGELOG.md index 15aabb8..0499b0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 4.0.0 (27-Jan-22) + +* File exporting is now multi-threaded as Lokalise API started to support parallel requests since January 2022 +* Test with Ruby 3.1 + ## 3.0.0 (14-Oct-21) This is a major re-write of this gem. The actual import/export functionality was extracted to a separate gem called [lokalise_manager](https://github.com/bodrovis/lokalise_manager) that you can use to run your tasks programmatically from *any* Ruby scripts (powered or not powered by Rails). LokaliseRails now has only the Rails-related logic (even though it should probably work with other frameworks as well). diff --git a/lib/lokalise_rails/version.rb b/lib/lokalise_rails/version.rb index aacc158..7ad1955 100644 --- a/lib/lokalise_rails/version.rb +++ b/lib/lokalise_rails/version.rb @@ -2,6 +2,6 @@ # :nocov: module LokaliseRails - VERSION = '3.0.0' + VERSION = '4.0.0' end # :nocov: diff --git a/lokalise_rails.gemspec b/lokalise_rails.gemspec index 6428826..ea46d66 100644 --- a/lokalise_rails.gemspec +++ b/lokalise_rails.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |spec| spec.extra_rdoc_files = ['README.md'] spec.require_paths = ['lib'] - spec.add_dependency 'lokalise_manager', '~> 1.0' + spec.add_dependency 'lokalise_manager', '~> 2.0' spec.metadata = { 'rubygems_mfa_required' => 'true' diff --git a/spec/fixtures/vcr_cassettes/upload_files.yml b/spec/fixtures/vcr_cassettes/upload_files.yml index de80a73..1f413d3 100644 --- a/spec/fixtures/vcr_cassettes/upload_files.yml +++ b/spec/fixtures/vcr_cassettes/upload_files.yml @@ -10,8 +10,8 @@ http_interactions: Accept: - application/json User-Agent: - - ruby-lokalise-api gem/4.3.1 - X-api-token: + - ruby-lokalise-api gem/4.5.1 + x-api-token: - "" Accept-Encoding: - gzip,deflate @@ -23,7 +23,7 @@ http_interactions: server: - nginx date: - - Thu, 14 Oct 2021 13:12:40 GMT + - Thu, 27 Jan 2022 17:39:17 GMT content-type: - application/json transfer-encoding: @@ -33,7 +33,7 @@ http_interactions: cache-control: - max-age=0, must-revalidate, no-cache, no-store, private location: - - "/api2/projects/672198945b7d72fc048021.15940510/processes/5a21acbc6dd11ccce38f5f9e3f4fd4e9d556a7c2" + - "/api2/projects/672198945b7d72fc048021.15940510/processes/1cab0ef1cd376687fcebd4bc266c44fd49bffe74" pragma: - no-cache x-content-type-options: @@ -46,13 +46,15 @@ http_interactions: - max-age=31536000 referrer-policy: - origin + x-lokalise-process-id: + - c06f5c8e-00d9-4e78-ad03-f602383ea527 expires: - - Thu, 14 Oct 2021 13:12:40 GMT + - Thu, 27 Jan 2022 17:39:17 GMT body: encoding: UTF-8 - string: '{"project_id":"672198945b7d72fc048021.15940510","branch":"master","process":{"process_id":"5a21acbc6dd11ccce38f5f9e3f4fd4e9d556a7c2","type":"file-import","status":"queued","message":"","created_by":20181,"created_by_email":"bodrovis@protonmail.com","created_at":"2021-10-14 - 13:12:39 (Etc\/UTC)","created_at_timestamp":1634217159}}' - recorded_at: Thu, 14 Oct 2021 13:12:40 GMT + string: '{"project_id":"672198945b7d72fc048021.15940510","branch":"master","process":{"process_id":"1cab0ef1cd376687fcebd4bc266c44fd49bffe74","type":"file-import","status":"queued","message":"","created_by":20181,"created_by_email":"bodrovis@protonmail.com","created_at":"2022-01-27 + 17:39:17 (Etc\/UTC)","created_at_timestamp":1643305157}}' + recorded_at: Thu, 27 Jan 2022 17:39:17 GMT - request: method: post uri: https://api.lokalise.com/api2/projects/672198945b7d72fc048021.15940510/files/upload @@ -63,8 +65,8 @@ http_interactions: Accept: - application/json User-Agent: - - ruby-lokalise-api gem/4.3.1 - X-api-token: + - ruby-lokalise-api gem/4.5.1 + x-api-token: - "" Accept-Encoding: - gzip,deflate @@ -76,7 +78,7 @@ http_interactions: server: - nginx date: - - Thu, 14 Oct 2021 13:12:40 GMT + - Thu, 27 Jan 2022 17:39:17 GMT content-type: - application/json transfer-encoding: @@ -86,7 +88,7 @@ http_interactions: cache-control: - max-age=0, must-revalidate, no-cache, no-store, private location: - - "/api2/projects/672198945b7d72fc048021.15940510/processes/cdf7bb1f65c6dc8d48845e71e39042e3870056f9" + - "/api2/projects/672198945b7d72fc048021.15940510/processes/c13c4fa9e9530776eb651e8454e09843dc585966" pragma: - no-cache x-content-type-options: @@ -99,11 +101,13 @@ http_interactions: - max-age=31536000 referrer-policy: - origin + x-lokalise-process-id: + - 9693626d-6b58-4ea0-b14a-782d572e3400 expires: - - Thu, 14 Oct 2021 13:12:40 GMT + - Thu, 27 Jan 2022 17:39:17 GMT body: encoding: UTF-8 - string: '{"project_id":"672198945b7d72fc048021.15940510","branch":"master","process":{"process_id":"cdf7bb1f65c6dc8d48845e71e39042e3870056f9","type":"file-import","status":"queued","message":"","created_by":20181,"created_by_email":"bodrovis@protonmail.com","created_at":"2021-10-14 - 13:12:40 (Etc\/UTC)","created_at_timestamp":1634217160}}' - recorded_at: Thu, 14 Oct 2021 13:12:41 GMT + string: '{"project_id":"672198945b7d72fc048021.15940510","branch":"master","process":{"process_id":"c13c4fa9e9530776eb651e8454e09843dc585966","type":"file-import","status":"queued","message":"","created_by":20181,"created_by_email":"bodrovis@protonmail.com","created_at":"2022-01-27 + 17:39:17 (Etc\/UTC)","created_at_timestamp":1643305157}}' + recorded_at: Thu, 27 Jan 2022 17:39:17 GMT recorded_with: VCR 6.0.0