ruby-lokalise-api 3.1.0 → 4.3.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/.github/CONTRIBUTING.md +7 -0
- data/CHANGELOG.md +1 -116
- data/LICENSE +9 -18
- data/README.md +17 -1847
- data/lib/ruby-lokalise-api.rb +1 -0
- data/lib/ruby-lokalise-api/client.rb +3 -2
- data/lib/ruby-lokalise-api/collections/base.rb +1 -1
- data/lib/ruby-lokalise-api/connection.rb +10 -4
- data/lib/ruby-lokalise-api/data/attributes.json +6 -2
- data/lib/ruby-lokalise-api/resources/base.rb +4 -4
- data/lib/ruby-lokalise-api/resources/project.rb +1 -1
- data/lib/ruby-lokalise-api/resources/webhook.rb +1 -1
- data/lib/ruby-lokalise-api/rest/files.rb +2 -1
- data/lib/ruby-lokalise-api/utils/attribute_helpers.rb +12 -9
- data/lib/ruby-lokalise-api/utils/string_utils.rb +1 -1
- data/lib/ruby-lokalise-api/version.rb +1 -1
- data/ruby-lokalise-api.gemspec +5 -3
- data/spec/lib/ruby-lokalise-api/connection_spec.rb +39 -1
- data/spec/lib/ruby-lokalise-api/custom_json_parser_spec.rb +4 -4
- data/spec/lib/ruby-lokalise-api/rest/orders_spec.rb +26 -2
- data/spec/lib/ruby-lokalise-api/rest/payment_cards_spec.rb +3 -3
- data/spec/lib/ruby-lokalise-api/rest/tasks_spec.rb +8 -7
- data/spec/lib/ruby-lokalise-api/rest/translations_spec.rb +10 -9
- data/spec/lib/ruby-lokalise-api_spec.rb +6 -0
- metadata +26 -12
@@ -59,26 +59,27 @@ RSpec.describe Lokalise::Client do
|
|
59
59
|
|
60
60
|
specify '#translation' do
|
61
61
|
translation = VCR.use_cassette('translation') do
|
62
|
-
test_client.translation project_id,
|
62
|
+
test_client.translation project_id, 304_581_218
|
63
63
|
end
|
64
64
|
|
65
|
-
expect(translation.translation_id).to eq(
|
66
|
-
expect(translation.key_id).to eq(
|
67
|
-
expect(translation.language_iso).to eq('
|
68
|
-
expect(translation.modified_at).to eq('
|
69
|
-
expect(translation.modified_at_timestamp).to eq(
|
65
|
+
expect(translation.translation_id).to eq(304_581_218)
|
66
|
+
expect(translation.key_id).to eq(44_596_059)
|
67
|
+
expect(translation.language_iso).to eq('ru')
|
68
|
+
expect(translation.modified_at).to eq('2020-05-15 10:44:42 (Etc/UTC)')
|
69
|
+
expect(translation.modified_at_timestamp).to eq(1_589_539_482)
|
70
70
|
expect(translation.modified_by).to eq(20_181)
|
71
71
|
expect(translation.modified_by_email).to eq('bodrovis@protonmail.com')
|
72
|
-
expect(translation.translation).to eq('
|
72
|
+
expect(translation.translation).to eq('Сообщение')
|
73
73
|
expect(translation.is_fuzzy).to eq(false)
|
74
74
|
expect(translation.is_reviewed).to eq(false)
|
75
|
-
expect(translation.words).to eq(
|
75
|
+
expect(translation.words).to eq(1)
|
76
76
|
expect(translation.custom_translation_statuses).to eq([])
|
77
|
+
expect(translation.task_id).to be_nil
|
77
78
|
end
|
78
79
|
|
79
80
|
specify '#reload_data' do
|
80
81
|
translation = VCR.use_cassette('translation') do
|
81
|
-
test_client.translation project_id,
|
82
|
+
test_client.translation project_id, 304_581_218
|
82
83
|
end
|
83
84
|
|
84
85
|
reloaded_translation = VCR.use_cassette('translation') do
|
@@ -6,6 +6,7 @@ RSpec.describe Lokalise do
|
|
6
6
|
expect(test_client.token).to eq(ENV['LOKALISE_API_TOKEN'])
|
7
7
|
expect(test_client.timeout).to be_nil
|
8
8
|
expect(test_client.open_timeout).to be_nil
|
9
|
+
expect(test_client.enable_compression).to be false
|
9
10
|
end
|
10
11
|
|
11
12
|
specify '.reset_client!' do
|
@@ -29,5 +30,10 @@ RSpec.describe Lokalise do
|
|
29
30
|
custom_client = described_class.client(ENV['LOKALISE_API_TOKEN'], open_timeout: 100)
|
30
31
|
expect(custom_client.open_timeout).to eq(100)
|
31
32
|
end
|
33
|
+
|
34
|
+
it 'is possible to customize compression' do
|
35
|
+
custom_client = described_class.client(ENV['LOKALISE_API_TOKEN'], enable_compression: true)
|
36
|
+
expect(custom_client.enable_compression).to be true
|
37
|
+
end
|
32
38
|
end
|
33
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lokalise-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Bodrov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday_middleware
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: json
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +142,14 @@ dependencies:
|
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
145
|
+
version: '1.6'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
152
|
+
version: '1.6'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rubocop-performance
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +170,14 @@ dependencies:
|
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
173
|
+
version: '2.0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
180
|
+
version: '2.0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: simplecov
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -317,9 +331,9 @@ files:
|
|
317
331
|
- spec/support/vcr.rb
|
318
332
|
homepage: https://github.com/lokalise/ruby-lokalise-api
|
319
333
|
licenses:
|
320
|
-
-
|
334
|
+
- BSD-3-Clause
|
321
335
|
metadata: {}
|
322
|
-
post_install_message:
|
336
|
+
post_install_message:
|
323
337
|
rdoc_options: []
|
324
338
|
require_paths:
|
325
339
|
- lib
|
@@ -327,15 +341,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
327
341
|
requirements:
|
328
342
|
- - ">="
|
329
343
|
- !ruby/object:Gem::Version
|
330
|
-
version:
|
344
|
+
version: 2.5.0
|
331
345
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
332
346
|
requirements:
|
333
347
|
- - ">="
|
334
348
|
- !ruby/object:Gem::Version
|
335
349
|
version: '0'
|
336
350
|
requirements: []
|
337
|
-
rubygems_version: 3.
|
338
|
-
signing_key:
|
351
|
+
rubygems_version: 3.2.23
|
352
|
+
signing_key:
|
339
353
|
specification_version: 4
|
340
354
|
summary: Ruby interface to the Lokalise API
|
341
355
|
test_files:
|