ruby-lokalise-api 4.1.0 → 4.2.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/lib/ruby-lokalise-api/data/attributes.json +2 -1
- data/lib/ruby-lokalise-api/rest/files.rb +2 -1
- data/lib/ruby-lokalise-api/utils/attribute_helpers.rb +1 -3
- data/lib/ruby-lokalise-api/utils/string_utils.rb +1 -1
- data/lib/ruby-lokalise-api/version.rb +1 -1
- data/spec/lib/ruby-lokalise-api/rest/translations_spec.rb +10 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0736dd816b0cc92d92a04277d86aaec283aa9d7f7be024c736e1a6b4c91531c
|
4
|
+
data.tar.gz: 725e7262b0a226db6ae1d20d856eaac895ee11f5b39df15b3167a6b0db1984ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94f10e17e3290f76b95fef30acddc5ab448dd27c064ea6e306fe69af621e2e25e63ed51fa2f919c6421df1eeea6a230b414054c9ceb23fb120aaa7d587b1c192
|
7
|
+
data.tar.gz: 31d41d8735f06151825eed3db874156ef78bec552e44cb8de8dcdd761878373ed5b6a3c745b918d6474262e681f9166c0e0d551d416254436464248e92821d8e
|
@@ -22,7 +22,8 @@ module Lokalise
|
|
22
22
|
c_r Lokalise::Resources::File, :download, [project_id, 'download'], params
|
23
23
|
end
|
24
24
|
|
25
|
-
# Imports translation file to the given project. File data must base64-encoded
|
25
|
+
# Imports translation file to the given project. File data must base64-encoded.
|
26
|
+
# To encode your data in Base64, use `Base64.strict_encode64()` method.
|
26
27
|
#
|
27
28
|
# @see https://app.lokalise.com/api2docs/curl/#transition-upload-a-file-post
|
28
29
|
# @return [Hash]
|
@@ -47,9 +47,7 @@ module Lokalise
|
|
47
47
|
#
|
48
48
|
# @return [Array<String>]
|
49
49
|
def attributes_for(klass)
|
50
|
-
@attributes ||=
|
51
|
-
YAML.load_file(File.expand_path('../data/attributes.json', __dir__)).freeze
|
52
|
-
end
|
50
|
+
@attributes ||= YAML.load_file(File.expand_path('../data/attributes.json', __dir__)).freeze
|
53
51
|
|
54
52
|
name = unify klass.name.snakecase
|
55
53
|
@attributes[name]
|
@@ -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
|
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: 4.
|
4
|
+
version: 4.2.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: 2021-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.2.
|
337
|
+
rubygems_version: 3.2.15
|
338
338
|
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Ruby interface to the Lokalise API
|