lokalise_rails 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +11 -0
- data/README.md +3 -1
- data/lib/lokalise_rails/version.rb +3 -1
- data/lokalise_rails.gemspec +4 -15
- data/spec/lib/{lokalise_rails_spec.rb → lokalise_rails/version_spec.rb} +0 -0
- data/spec/lib/tasks/import_task_spec.rb +0 -2
- metadata +9 -160
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -9
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -8
- data/spec/dummy/config/initializers/content_security_policy.rb +0 -29
- data/spec/dummy/config/initializers/inflections.rb +0 -17
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eac9b215d2e4002517b8dc09f29841e78cf349178639069e963bd4b0555cce93
|
4
|
+
data.tar.gz: 00aacebe6b1f54d80b4d3832c16a38e6863c469ba09cee44fffae9e8373772a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8647b6b7b1b691a03146fc69934f54fe550a76c547d4add769900095fa409949e982777b210cf977ee8523087f2f2864d5c4d141953d0513c5465b5ec21254b
|
7
|
+
data.tar.gz: 5e807d85f5cdf3c693d90ae0bbff1c2e0fcedc2ac5cf76d90ae65bb9e9992583cb72c13db29f05b028f9015668b4ace1e20936e3d67b4003337931b03233d2b3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.0.0 (27-Jan-22)
|
4
|
+
|
5
|
+
* File exporting is now multi-threaded as Lokalise API started to support parallel requests since January 2022
|
6
|
+
* Test with Ruby 3.1
|
7
|
+
|
3
8
|
## 3.0.0 (14-Oct-21)
|
4
9
|
|
5
10
|
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).
|
data/Gemfile
CHANGED
@@ -5,5 +5,16 @@ source 'http://rubygems.org'
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
group :test do
|
8
|
+
gem 'codecov', '~> 0.2'
|
9
|
+
gem 'dotenv', '~> 2.5'
|
10
|
+
gem 'rails', '~> 7.0.0'
|
11
|
+
gem 'rake', '~> 13.0'
|
12
|
+
gem 'rspec', '~> 3.6'
|
13
|
+
gem 'rubocop', '~> 1.0'
|
14
|
+
gem 'rubocop-performance', '~> 1.5'
|
15
|
+
gem 'rubocop-rspec', '~> 2.6'
|
16
|
+
gem 'simplecov', '~> 0.16'
|
17
|
+
gem 'sprockets-rails', '~> 3'
|
8
18
|
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
|
19
|
+
gem 'vcr', '~> 6.0'
|
9
20
|
end
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# LokaliseRails
|
2
2
|
|
3
3
|

|
4
|
-
|
4
|
+

|
5
5
|
[](https://codecov.io/gh/bodrovis/lokalise_rails)
|
6
6
|

|
7
7
|
|
@@ -15,6 +15,8 @@ This gem provides [Lokalise](http://lokalise.com) integration for Ruby on Rails
|
|
15
15
|
|
16
16
|
This gem requires Ruby 2.5+ and Rails 5.1+. It might work with older versions of Rails though. You will also need to [setup a Lokalise account](https://app.lokalise.com/signup) and create a [translation project](https://docs.lokalise.com/en/articles/1400460-projects). Finally, you will need to generate a [read/write API token](https://docs.lokalise.com/en/articles/1929556-api-tokens) at your Lokalise profile.
|
17
17
|
|
18
|
+
Alternatively, you can utilize a token obtained via OAuth 2 flow. When using such a token, you'll have to set `:use_oauth2_token` option to `true` (please check [options docs](https://github.com/bodrovis/lokalise_manager#common-config) to learn more).
|
19
|
+
|
18
20
|
### Installation
|
19
21
|
|
20
22
|
Add the gem to your `Gemfile`:
|
data/lokalise_rails.gemspec
CHANGED
@@ -23,20 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.extra_rdoc_files = ['README.md']
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_dependency 'lokalise_manager', '~>
|
26
|
+
spec.add_dependency 'lokalise_manager', '~> 2.0'
|
27
27
|
|
28
|
-
spec.
|
29
|
-
|
30
|
-
|
31
|
-
spec.add_development_dependency 'rails', '~> 6.1.4'
|
32
|
-
else
|
33
|
-
spec.add_development_dependency 'rails', ENV['TEST_RAILS_VERSION'].to_s
|
34
|
-
end
|
35
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
36
|
-
spec.add_development_dependency 'rspec', '~> 3.6'
|
37
|
-
spec.add_development_dependency 'rubocop', '~> 1.0'
|
38
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.5'
|
39
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.5.0'
|
40
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
41
|
-
spec.add_development_dependency 'vcr', '~> 6.0'
|
28
|
+
spec.metadata = {
|
29
|
+
'rubygems_mfa_required' => 'true'
|
30
|
+
}
|
42
31
|
end
|
File without changes
|
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Bodrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lokalise_manager
|
@@ -16,154 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.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: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: codecov
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.2'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.2'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: dotenv
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.5'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2.5'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 6.1.4
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 6.1.4
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '13.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '13.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.6'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.6'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-performance
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.5'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.5'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-rspec
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 2.5.0
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 2.5.0
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0.16'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0.16'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: vcr
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '6.0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '6.0'
|
26
|
+
version: '2.0'
|
167
27
|
description: This gem allows to exchange translation files between your Rails app
|
168
28
|
and Lokalise TMS.
|
169
29
|
email:
|
@@ -199,22 +59,16 @@ files:
|
|
199
59
|
- spec/dummy/config/environments/development.rb
|
200
60
|
- spec/dummy/config/environments/production.rb
|
201
61
|
- spec/dummy/config/environments/test.rb
|
202
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
203
62
|
- spec/dummy/config/initializers/assets.rb
|
204
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
205
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
206
63
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
207
64
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
208
|
-
- spec/dummy/config/initializers/inflections.rb
|
209
|
-
- spec/dummy/config/initializers/mime_types.rb
|
210
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
211
65
|
- spec/dummy/config/lokalise_rails.rb
|
212
66
|
- spec/dummy/config/puma.rb
|
213
67
|
- spec/dummy/config/routes.rb
|
214
68
|
- spec/dummy/db/seeds.rb
|
215
69
|
- spec/lib/generators/lokalise_rails/install_generator_spec.rb
|
216
70
|
- spec/lib/lokalise_rails/global_config_spec.rb
|
217
|
-
- spec/lib/
|
71
|
+
- spec/lib/lokalise_rails/version_spec.rb
|
218
72
|
- spec/lib/tasks/export_task_spec.rb
|
219
73
|
- spec/lib/tasks/import_task_spec.rb
|
220
74
|
- spec/lib/utils_spec.rb
|
@@ -226,7 +80,8 @@ files:
|
|
226
80
|
homepage: https://github.com/bodrovis/lokalise_rails
|
227
81
|
licenses:
|
228
82
|
- MIT
|
229
|
-
metadata:
|
83
|
+
metadata:
|
84
|
+
rubygems_mfa_required: 'true'
|
230
85
|
post_install_message:
|
231
86
|
rdoc_options: []
|
232
87
|
require_paths:
|
@@ -242,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
97
|
- !ruby/object:Gem::Version
|
243
98
|
version: '0'
|
244
99
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
100
|
+
rubygems_version: 3.3.5
|
246
101
|
signing_key:
|
247
102
|
specification_version: 4
|
248
103
|
summary: Lokalise integration for Ruby on Rails
|
@@ -256,22 +111,16 @@ test_files:
|
|
256
111
|
- spec/dummy/config/environments/development.rb
|
257
112
|
- spec/dummy/config/environments/production.rb
|
258
113
|
- spec/dummy/config/environments/test.rb
|
259
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
260
114
|
- spec/dummy/config/initializers/assets.rb
|
261
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
262
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
263
115
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
264
116
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
265
|
-
- spec/dummy/config/initializers/inflections.rb
|
266
|
-
- spec/dummy/config/initializers/mime_types.rb
|
267
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
268
117
|
- spec/dummy/config/lokalise_rails.rb
|
269
118
|
- spec/dummy/config/puma.rb
|
270
119
|
- spec/dummy/config/routes.rb
|
271
120
|
- spec/dummy/db/seeds.rb
|
272
121
|
- spec/lib/generators/lokalise_rails/install_generator_spec.rb
|
273
122
|
- spec/lib/lokalise_rails/global_config_spec.rb
|
274
|
-
- spec/lib/
|
123
|
+
- spec/lib/lokalise_rails/version_spec.rb
|
275
124
|
- spec/lib/tasks/export_task_spec.rb
|
276
125
|
- spec/lib/tasks/import_task_spec.rb
|
277
126
|
- spec/lib/utils_spec.rb
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Be sure to restart your server when you modify this file.
|
3
|
-
|
4
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
5
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
6
|
-
|
7
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
8
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Be sure to restart your server when you modify this file.
|
3
|
-
|
4
|
-
# Define an application-wide content security policy
|
5
|
-
# For further information see the following documentation
|
6
|
-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
7
|
-
|
8
|
-
# Rails.application.config.content_security_policy do |policy|
|
9
|
-
# policy.default_src :self, :https
|
10
|
-
# policy.font_src :self, :https, :data
|
11
|
-
# policy.img_src :self, :https, :data
|
12
|
-
# policy.object_src :none
|
13
|
-
# policy.script_src :self, :https
|
14
|
-
# policy.style_src :self, :https
|
15
|
-
|
16
|
-
# # Specify URI for violation reports
|
17
|
-
# # policy.report_uri "/csp-violation-report-endpoint"
|
18
|
-
# end
|
19
|
-
|
20
|
-
# If you are using UJS then enable automatic nonce generation
|
21
|
-
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
22
|
-
|
23
|
-
# Set the nonce only to specific directives
|
24
|
-
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
25
|
-
|
26
|
-
# Report CSP violations to a specified URI
|
27
|
-
# For further information see the following documentation:
|
28
|
-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
29
|
-
# Rails.application.config.content_security_policy_report_only = true
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Be sure to restart your server when you modify this file.
|
3
|
-
|
4
|
-
# Add new inflection rules using the following format. Inflections
|
5
|
-
# are locale specific, and you may define rules for as many different
|
6
|
-
# locales as you wish. All of these examples are active by default:
|
7
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
8
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
9
|
-
# inflect.singular /^(ox)en/i, '\1'
|
10
|
-
# inflect.irregular 'person', 'people'
|
11
|
-
# inflect.uncountable %w( fish sheep )
|
12
|
-
# end
|
13
|
-
|
14
|
-
# These inflection rules are supported but not enabled by default:
|
15
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
16
|
-
# inflect.acronym 'RESTful'
|
17
|
-
# end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Be sure to restart your server when you modify this file.
|
4
|
-
|
5
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
6
|
-
# is enabled by default.
|
7
|
-
|
8
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
9
|
-
ActiveSupport.on_load(:action_controller) do
|
10
|
-
wrap_parameters format: [:json]
|
11
|
-
end
|
12
|
-
|
13
|
-
# To enable root element in JSON for ActiveRecord objects.
|
14
|
-
# ActiveSupport.on_load(:active_record) do
|
15
|
-
# self.include_root_in_json = true
|
16
|
-
# end
|