lokalise_rails 6.0.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14b031485e357b3c1b4d4aa5640f214ddcdb382fe53266de02d70b118867515d
4
- data.tar.gz: e0b8070461e74fcdf9dd465335b60486d98dd80456b46934029ef5da23e60525
3
+ metadata.gz: 055e2da3772d39a53014aae0b3d1443022a8351745ce7480b68fc368823e5f1a
4
+ data.tar.gz: 9d114b3d375e979bb6d181a553e4c8632fb0d6cd21886793bfe96160ed37f013
5
5
  SHA512:
6
- metadata.gz: 9aab358a2d9cb224c199a0b052d5749ffad9dc4c3a1e739ab6a1532a7303dd45d88ba1e9b242e3a1ce8b8c0ecef98288abf7049124d2ae56170ebf417573eb20
7
- data.tar.gz: fa9ed8e36017819eeb00f712910d582fb13d2ca63a07fb62b85c561fd3edb8e93fe1275a4fcca5be80093a97c4f5dc2260305daf94afa96146a22dd001831a27
6
+ metadata.gz: 9768e69e5b230f61e78279f44c8a78b085d269c776ae8562287f2eeca323b87a2fbfae8edb985a4c0cfec02929fde789bac83ade2babad08969e69dab962fbcd
7
+ data.tar.gz: 7c899b9c9e13d839e2e9ff580e44efa8394f6cffbd74d9e425ec87338fb5e276ed4e44dd353e6320fcb01a0ea9596e22f5c590357ab02be2e0f523d731f2a1e6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.0 (09-Nov-2023)
4
+
5
+ * **Breaking change**: require Ruby 3+. Version 2.7 has reached end-of-life and thus we are not planning to support it anymore. If you need support for Ruby 2.7, please stay on 6.0.0.
6
+ * **Potential breaking change**: lambda returned by the `lang_iso_inferer` method has been slightly enhanced. It now accepts not only the file data but also the full path to the file. Therefore, if you redefine the `lang_iso_inferer` option please make sure that the returned lambda accepts two params, not one. This way, you can be more flexible when inferring the locale. For example:
7
+
8
+ ```ruby
9
+ lang_iso_inferer: ->(_data, path) { path.basename('.yml').to_s }
10
+ ```
11
+
12
+ * Use newer lokalise_manager and ruby-lokalise-api.
13
+ * Test with Ruby 3.3, do not test with Rails 6.0 (EOL)
14
+
3
15
  ## 6.0.0 (27-Jul-2023)
4
16
 
5
17
  * Use lokalise-manager v4 and ruby-lokalise-api v8. The latter is a major rewrite of the original SDK and has some breaking changes (however 95% of the methods have similar signatures). Therefore please make sure that your tests pass.
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec
6
6
 
7
7
  group :test do
8
8
  gem 'dotenv', '~> 2.5'
9
- gem 'rails', '~> 7.0.4'
9
+ gem 'rails', '~> 7.1'
10
10
  gem 'rake', '~> 13.0'
11
11
  gem 'rspec', '~> 3.6'
12
12
  gem 'rubocop', '~> 1.0'
@@ -14,6 +14,7 @@ group :test do
14
14
  gem 'rubocop-rake', '~> 0.6'
15
15
  gem 'rubocop-rspec', '~> 2.6'
16
16
  gem 'simplecov', '~> 0.22'
17
+ gem 'simplecov-lcov', '~> 0.8'
17
18
  gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
18
19
  gem 'webmock', '~> 3.14'
19
20
  end
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ![Gem](https://img.shields.io/gem/v/lokalise_rails)
4
4
  ![CI](https://github.com/bodrovis/lokalise_rails/actions/workflows/ci.yml/badge.svg)
5
+ [![Coverage Status](https://coveralls.io/repos/github/bodrovis/lokalise_rails/badge.svg?branch=master)](https://coveralls.io/github/bodrovis/lokalise_rails?branch=master)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/6e5c98f76227de00b0f2/maintainability)](https://codeclimate.com/github/bodrovis/lokalise_rails/maintainability)
5
7
  ![Downloads total](https://img.shields.io/gem/dt/lokalise_rails)
6
8
 
7
9
  This gem provides [Lokalise](http://lokalise.com) integration for Ruby on Rails and allows to exchange translation files easily. It relies on [lokalise_manager](https://github.com/bodrovis/lokalise_manager) which perform the actual import/export and can be used to run this task in any Ruby script.
@@ -182,7 +184,7 @@ LokaliseRails::GlobalConfig.config do |c|
182
184
  ## c.translations_converter = ->(raw_data) { YAML.dump(raw_data).gsub(/\\\\n/, '\n') }
183
185
 
184
186
  ## Infer language ISO code for the translation file:
185
- ## c.lang_iso_inferer = ->(data) { YAML.safe_load(data)&.keys&.first }
187
+ ## c.lang_iso_inferer = ->(data, _path) { YAML.safe_load(data)&.keys&.first }
186
188
  end
187
189
  ```
188
190
 
@@ -51,6 +51,6 @@ if defined?(LokaliseRails) && defined?(LokaliseRails::GlobalConfig)
51
51
  ## c.translations_converter = ->(raw_data) { YAML.dump(raw_data).gsub(/\\\\n/, '\n') }
52
52
 
53
53
  ## Infer language ISO code for the translation file:
54
- ## c.lang_iso_inferer = ->(data) { YAML.safe_load(data)&.keys&.first }
54
+ ## c.lang_iso_inferer = ->(data, _path) { YAML.safe_load(data)&.keys&.first }
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LokaliseRails
4
- VERSION = '6.0.0'
4
+ VERSION = '7.0.0'
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = 'https://github.com/bodrovis/lokalise_rails'
13
13
  spec.license = 'MIT'
14
14
  spec.platform = Gem::Platform::RUBY
15
- spec.required_ruby_version = '>= 2.7.0'
15
+ spec.required_ruby_version = '>= 3.0'
16
16
 
17
17
  spec.files = Dir['README.md', 'LICENSE',
18
18
  'CHANGELOG.md', 'lib/**/*.rb',
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.extra_rdoc_files = ['README.md']
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_dependency 'lokalise_manager', '~> 4.0'
25
+ spec.add_dependency 'lokalise_manager', '~> 5.0'
26
26
  spec.add_dependency 'zeitwerk', '~> 2.4'
27
27
 
28
28
  spec.metadata = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lokalise_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Krukowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-21 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lokalise_manager
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -77,14 +77,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 2.7.0
80
+ version: '3.0'
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.4.17
87
+ rubygems_version: 3.4.21
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Lokalise integration for Ruby on Rails