lokalise_rails 3.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile +12 -1
- data/README.md +3 -1
- data/lib/generators/lokalise_rails/install_generator.rb +2 -0
- data/lib/lokalise_rails/global_config.rb +1 -0
- data/lib/lokalise_rails/railtie.rb +1 -0
- data/lib/lokalise_rails/utils.rb +3 -0
- data/lib/lokalise_rails/version.rb +3 -1
- data/lib/lokalise_rails.rb +8 -3
- data/lokalise_rails.gemspec +7 -17
- data/spec/lib/generators/lokalise_rails/install_generator_spec.rb +2 -2
- data/spec/lib/{lokalise_rails_spec.rb → lokalise_rails/version_spec.rb} +0 -0
- data/spec/lib/tasks/export_task_spec.rb +6 -6
- data/spec/lib/tasks/import_task_spec.rb +7 -7
- data/spec/spec_helper.rb +0 -1
- data/spec/support/file_manager.rb +3 -1
- metadata +15 -154
- 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
- data/spec/support/rake_utils.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36347818f1140ecf87cccbeeee7ea559288c6f9d4f5c7229ac02501d9403ce72
|
4
|
+
data.tar.gz: d51719d9af7a72761013bb0a0a1939b551ac7187b3e3f5578f52c85dcbb65004
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93a17535eec749f38201a8bc0a713cc9affd6c5882297890f1152634c29d58aba8142388eb6c1e4927598ec19ebb666d067d839aca565bc7c6115d0a3a6bde84
|
7
|
+
data.tar.gz: a7a40cf28e8c0a4e028a0722a1a50ff65a7899bfc48deb068b6728f96963f7420ea86c13466c902240ed9de0fe40ca90fe9f805786880014774a60f15e00ed5a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.0.1 (15-Mar-2022)
|
4
|
+
|
5
|
+
* Fix issue with Zeitwerk and files loading
|
6
|
+
|
7
|
+
## 5.0.0 (11-Mar-2022)
|
8
|
+
|
9
|
+
* **Breaking change**: require Ruby 2.7+
|
10
|
+
* Use Zeitwerk loader
|
11
|
+
* Use newer LokaliseManager (v3) and RubyLokaliseApi (v6)
|
12
|
+
* Prettify code
|
13
|
+
|
14
|
+
## 4.0.0 (27-Jan-22)
|
15
|
+
|
16
|
+
* File exporting is now multi-threaded as Lokalise API started to support parallel requests since January 2022
|
17
|
+
* Test with Ruby 3.1
|
18
|
+
|
3
19
|
## 3.0.0 (14-Oct-21)
|
4
20
|
|
5
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).
|
data/Gemfile
CHANGED
@@ -5,5 +5,16 @@ source 'http://rubygems.org'
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
group :test do
|
8
|
-
gem '
|
8
|
+
gem 'codecov', '~> 0.2'
|
9
|
+
gem 'dotenv', '~> 2.5'
|
10
|
+
gem 'rails', '~> 7.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'
|
18
|
+
gem 'tzinfo-data' # , platforms: %i[mingw mswin x64_mingw jruby]
|
19
|
+
gem 'vcr', '~> 6.1'
|
9
20
|
end
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# LokaliseRails
|
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
5
|
[![Test Coverage](https://codecov.io/gh/bodrovis/lokalise_rails/graph/badge.svg)](https://codecov.io/gh/bodrovis/lokalise_rails)
|
6
6
|
![Downloads total](https://img.shields.io/gem/dt/lokalise_rails)
|
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/lib/lokalise_rails/utils.rb
CHANGED
@@ -3,12 +3,15 @@
|
|
3
3
|
require 'pathname'
|
4
4
|
|
5
5
|
module LokaliseRails
|
6
|
+
# Util methods
|
6
7
|
module Utils
|
7
8
|
class << self
|
9
|
+
# Current project root
|
8
10
|
def root
|
9
11
|
Pathname.new(rails_root || Dir.getwd)
|
10
12
|
end
|
11
13
|
|
14
|
+
# Tries to get Rails root if Rails is defined
|
12
15
|
def rails_root
|
13
16
|
return ::Rails.root.to_s if defined?(::Rails.root) && ::Rails.root
|
14
17
|
return RAILS_ROOT.to_s if defined?(RAILS_ROOT)
|
data/lib/lokalise_rails.rb
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'zeitwerk'
|
3
4
|
require 'lokalise_manager'
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
loader = Zeitwerk::Loader.for_gem
|
7
|
+
loader.ignore "#{__dir__}/lokalise_rails/railtie.rb"
|
8
|
+
loader.ignore "#{__dir__}/generators/templates/lokalise_rails_config.rb"
|
9
|
+
loader.ignore "#{__dir__}/generators/lokalise_rails/install_generator.rb"
|
10
|
+
loader.setup
|
7
11
|
|
12
|
+
# Main LokaliseRails module
|
8
13
|
module LokaliseRails
|
9
14
|
end
|
10
15
|
|
11
|
-
|
16
|
+
require_relative 'lokalise_rails/railtie' if defined?(Rails)
|
data/lokalise_rails.gemspec
CHANGED
@@ -5,14 +5,14 @@ require File.expand_path('lib/lokalise_rails/version', __dir__)
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'lokalise_rails'
|
7
7
|
spec.version = LokaliseRails::VERSION
|
8
|
-
spec.authors = ['Ilya Bodrov']
|
8
|
+
spec.authors = ['Ilya Bodrov-Krukowski']
|
9
9
|
spec.email = ['golosizpru@gmail.com']
|
10
10
|
spec.summary = 'Lokalise integration for Ruby on Rails'
|
11
11
|
spec.description = 'This gem allows to exchange translation files between your Rails app and Lokalise TMS.'
|
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.
|
15
|
+
spec.required_ruby_version = '>= 2.7.0'
|
16
16
|
|
17
17
|
spec.files = Dir['README.md', 'LICENSE',
|
18
18
|
'CHANGELOG.md', 'lib/**/*.rb',
|
@@ -23,20 +23,10 @@ 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', '~> 3.0'
|
27
|
+
spec.add_dependency 'zeitwerk', '~> 2.4'
|
27
28
|
|
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'
|
29
|
+
spec.metadata = {
|
30
|
+
'rubygems_mfa_required' => 'true'
|
31
|
+
}
|
42
32
|
end
|
File without changes
|
@@ -6,14 +6,14 @@ RSpec.describe 'Export Rake task' do
|
|
6
6
|
it 'halts when the API key is not set' do
|
7
7
|
allow(global_config).to receive(:api_token).and_return(nil)
|
8
8
|
|
9
|
-
expect
|
9
|
+
expect { Rake::Task['lokalise_rails:export'].execute }.to raise_error(SystemExit, /API token is not set/i)
|
10
10
|
expect(global_config).to have_received(:api_token)
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'halts when the project ID is not set' do
|
14
14
|
allow(global_config).to receive(:project_id).and_return(nil)
|
15
15
|
|
16
|
-
expect
|
16
|
+
expect { Rake::Task['lokalise_rails:export'].execute }.to raise_error(SystemExit, /ID is not set/i)
|
17
17
|
|
18
18
|
expect(global_config).to have_received(:project_id)
|
19
19
|
end
|
@@ -22,11 +22,11 @@ RSpec.describe 'Export Rake task' do
|
|
22
22
|
let(:filename_ru) { 'ru.yml' }
|
23
23
|
let(:path_ru) { "#{Rails.root}/config/locales/#{filename_ru}" }
|
24
24
|
|
25
|
-
before
|
25
|
+
before do
|
26
26
|
add_translation_files! with_ru: true
|
27
27
|
end
|
28
28
|
|
29
|
-
after
|
29
|
+
after do
|
30
30
|
rm_translation_files
|
31
31
|
end
|
32
32
|
|
@@ -34,7 +34,7 @@ RSpec.describe 'Export Rake task' do
|
|
34
34
|
it 'is callable' do
|
35
35
|
allow_project_id global_config, ENV['LOKALISE_PROJECT_ID'] do
|
36
36
|
VCR.use_cassette('upload_files') do
|
37
|
-
expect
|
37
|
+
expect { Rake::Task['lokalise_rails:export'].execute }.to output(/complete!/).to_stdout
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -42,7 +42,7 @@ RSpec.describe 'Export Rake task' do
|
|
42
42
|
it 're-raises export errors' do
|
43
43
|
allow_project_id global_config, '542886116159f798720dc4.94769464' do
|
44
44
|
VCR.use_cassette('upload_files_error') do
|
45
|
-
expect
|
45
|
+
expect { Rake::Task['lokalise_rails:export'].execute }.to raise_error(SystemExit, /Unknown `lang_iso`/)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'fileutils'
|
4
|
-
|
5
3
|
RSpec.describe 'Import Rake task' do
|
6
4
|
let(:global_config) { LokaliseRails::GlobalConfig }
|
7
5
|
let(:loc_path) { global_config.locales_path }
|
@@ -9,14 +7,14 @@ RSpec.describe 'Import Rake task' do
|
|
9
7
|
it 'halts when the API key is not set' do
|
10
8
|
allow(global_config).to receive(:api_token).and_return(nil)
|
11
9
|
|
12
|
-
expect
|
10
|
+
expect { Rake::Task['lokalise_rails:import'].execute }.to raise_error(SystemExit, /API token is not set/i)
|
13
11
|
expect(global_config).to have_received(:api_token)
|
14
12
|
end
|
15
13
|
|
16
14
|
it 'halts when the project ID is not set' do
|
17
15
|
allow(global_config).to receive(:project_id).and_return(nil)
|
18
16
|
|
19
|
-
expect
|
17
|
+
expect { Rake::Task['lokalise_rails:import'].execute }.to raise_error(SystemExit, /ID is not set/i)
|
20
18
|
|
21
19
|
expect(global_config).to have_received(:project_id)
|
22
20
|
end
|
@@ -27,7 +25,7 @@ RSpec.describe 'Import Rake task' do
|
|
27
25
|
rm_translation_files
|
28
26
|
end
|
29
27
|
|
30
|
-
after
|
28
|
+
after do
|
31
29
|
rm_translation_files
|
32
30
|
end
|
33
31
|
|
@@ -35,7 +33,7 @@ RSpec.describe 'Import Rake task' do
|
|
35
33
|
it 'is callable' do
|
36
34
|
allow_project_id global_config, ENV['LOKALISE_PROJECT_ID'] do
|
37
35
|
VCR.use_cassette('download_files') do
|
38
|
-
expect
|
36
|
+
expect { Rake::Task['lokalise_rails:import'].execute }.to output(/complete!/).to_stdout
|
39
37
|
end
|
40
38
|
|
41
39
|
expect(count_translations).to eq(4)
|
@@ -49,7 +47,9 @@ RSpec.describe 'Import Rake task' do
|
|
49
47
|
it 're-raises export errors' do
|
50
48
|
allow_project_id global_config, 'fake' do
|
51
49
|
VCR.use_cassette('download_files_error') do
|
52
|
-
expect
|
50
|
+
expect do
|
51
|
+
Rake::Task['lokalise_rails:import'].execute
|
52
|
+
end.to raise_error(SystemExit, /Invalid `project_id` parameter/)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,9 @@ require 'fileutils'
|
|
4
4
|
|
5
5
|
module FileManager
|
6
6
|
def mkdir_locales
|
7
|
-
|
7
|
+
return if File.directory?(LokaliseRails::GlobalConfig.locales_path)
|
8
|
+
|
9
|
+
FileUtils.mkdir_p(LokaliseRails::GlobalConfig.locales_path)
|
8
10
|
end
|
9
11
|
|
10
12
|
def rm_translation_files
|
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: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ilya Bodrov
|
7
|
+
- Ilya Bodrov-Krukowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lokalise_manager
|
@@ -16,154 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.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: '
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: zeitwerk
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
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
|
33
|
+
version: '2.4'
|
34
|
+
type: :runtime
|
161
35
|
prerelease: false
|
162
36
|
version_requirements: !ruby/object:Gem::Requirement
|
163
37
|
requirements:
|
164
38
|
- - "~>"
|
165
39
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
40
|
+
version: '2.4'
|
167
41
|
description: This gem allows to exchange translation files between your Rails app
|
168
42
|
and Lokalise TMS.
|
169
43
|
email:
|
@@ -199,34 +73,28 @@ files:
|
|
199
73
|
- spec/dummy/config/environments/development.rb
|
200
74
|
- spec/dummy/config/environments/production.rb
|
201
75
|
- spec/dummy/config/environments/test.rb
|
202
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
203
76
|
- spec/dummy/config/initializers/assets.rb
|
204
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
205
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
206
77
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
207
78
|
- 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
79
|
- spec/dummy/config/lokalise_rails.rb
|
212
80
|
- spec/dummy/config/puma.rb
|
213
81
|
- spec/dummy/config/routes.rb
|
214
82
|
- spec/dummy/db/seeds.rb
|
215
83
|
- spec/lib/generators/lokalise_rails/install_generator_spec.rb
|
216
84
|
- spec/lib/lokalise_rails/global_config_spec.rb
|
217
|
-
- spec/lib/
|
85
|
+
- spec/lib/lokalise_rails/version_spec.rb
|
218
86
|
- spec/lib/tasks/export_task_spec.rb
|
219
87
|
- spec/lib/tasks/import_task_spec.rb
|
220
88
|
- spec/lib/utils_spec.rb
|
221
89
|
- spec/spec_helper.rb
|
222
90
|
- spec/support/file_manager.rb
|
223
|
-
- spec/support/rake_utils.rb
|
224
91
|
- spec/support/spec_addons.rb
|
225
92
|
- spec/support/vcr.rb
|
226
93
|
homepage: https://github.com/bodrovis/lokalise_rails
|
227
94
|
licenses:
|
228
95
|
- MIT
|
229
|
-
metadata:
|
96
|
+
metadata:
|
97
|
+
rubygems_mfa_required: 'true'
|
230
98
|
post_install_message:
|
231
99
|
rdoc_options: []
|
232
100
|
require_paths:
|
@@ -235,14 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
103
|
requirements:
|
236
104
|
- - ">="
|
237
105
|
- !ruby/object:Gem::Version
|
238
|
-
version: 2.
|
106
|
+
version: 2.7.0
|
239
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
108
|
requirements:
|
241
109
|
- - ">="
|
242
110
|
- !ruby/object:Gem::Version
|
243
111
|
version: '0'
|
244
112
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.3.9
|
246
114
|
signing_key:
|
247
115
|
specification_version: 4
|
248
116
|
summary: Lokalise integration for Ruby on Rails
|
@@ -256,27 +124,20 @@ test_files:
|
|
256
124
|
- spec/dummy/config/environments/development.rb
|
257
125
|
- spec/dummy/config/environments/production.rb
|
258
126
|
- spec/dummy/config/environments/test.rb
|
259
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
260
127
|
- spec/dummy/config/initializers/assets.rb
|
261
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
262
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
263
128
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
264
129
|
- 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
130
|
- spec/dummy/config/lokalise_rails.rb
|
269
131
|
- spec/dummy/config/puma.rb
|
270
132
|
- spec/dummy/config/routes.rb
|
271
133
|
- spec/dummy/db/seeds.rb
|
272
134
|
- spec/lib/generators/lokalise_rails/install_generator_spec.rb
|
273
135
|
- spec/lib/lokalise_rails/global_config_spec.rb
|
274
|
-
- spec/lib/
|
136
|
+
- spec/lib/lokalise_rails/version_spec.rb
|
275
137
|
- spec/lib/tasks/export_task_spec.rb
|
276
138
|
- spec/lib/tasks/import_task_spec.rb
|
277
139
|
- spec/lib/utils_spec.rb
|
278
140
|
- spec/spec_helper.rb
|
279
141
|
- spec/support/file_manager.rb
|
280
|
-
- spec/support/rake_utils.rb
|
281
142
|
- spec/support/spec_addons.rb
|
282
143
|
- spec/support/vcr.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
|
data/spec/support/rake_utils.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RakeUtils
|
4
|
-
def import_executor
|
5
|
-
-> { Rake::Task['lokalise_rails:import'].execute }
|
6
|
-
end
|
7
|
-
|
8
|
-
def export_executor
|
9
|
-
-> { Rake::Task['lokalise_rails:export'].execute }
|
10
|
-
end
|
11
|
-
|
12
|
-
def install_invoker
|
13
|
-
Rails::Generators.invoke 'lokalise_rails:install'
|
14
|
-
end
|
15
|
-
end
|