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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61d306f7be49970786734ed94a006a6fd37d54e6919c19eb61390f78ad5acff8
4
- data.tar.gz: ea3a5594f544a876386ffa1d50c1a7ff2a842966ca00811df33f54d9e304106e
3
+ metadata.gz: c0736dd816b0cc92d92a04277d86aaec283aa9d7f7be024c736e1a6b4c91531c
4
+ data.tar.gz: 725e7262b0a226db6ae1d20d856eaac895ee11f5b39df15b3167a6b0db1984ec
5
5
  SHA512:
6
- metadata.gz: 356f32428e0732321e27bc47f2c63022bea36990fb69886fa2daff9d2016bee3f9b80795c326ef4c090f280e58de51d65e8b5e9c6711b3de2be6bb37ae2b2c01
7
- data.tar.gz: 4d5eb8f4fac05abf181fe793d94b2ec5ca759c004d865bbbd085252e4ac49d5abded9056fe0535bb428e1a1308c858a760d4fedd3a05afa7aebb2c8ec1e8ff3f
6
+ metadata.gz: 94f10e17e3290f76b95fef30acddc5ab448dd27c064ea6e306fe69af621e2e25e63ed51fa2f919c6421df1eeea6a230b414054c9ceb23fb120aaa7d587b1c192
7
+ data.tar.gz: 31d41d8735f06151825eed3db874156ef78bec552e44cb8de8dcdd761878373ed5b6a3c745b918d6474262e681f9166c0e0d551d416254436464248e92821d8e
@@ -210,7 +210,8 @@
210
210
  "is_fuzzy",
211
211
  "is_reviewed",
212
212
  "words",
213
- "custom_translation_statuses"
213
+ "custom_translation_statuses",
214
+ "task_id"
214
215
  ],
215
216
  "translation_provider": [
216
217
  "provider_id",
@@ -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 ||= begin
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]
@@ -22,6 +22,6 @@ class String
22
22
  end
23
23
 
24
24
  def remove_trailing_slash
25
- gsub %r{/\z}, ''
25
+ delete_suffix '/'
26
26
  end
27
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lokalise
4
- VERSION = '4.1.0'
4
+ VERSION = '4.2.0'
5
5
  end
@@ -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, translation_id
62
+ test_client.translation project_id, 304_581_218
63
63
  end
64
64
 
65
- expect(translation.translation_id).to eq(translation_id)
66
- expect(translation.key_id).to eq(15_571_975)
67
- expect(translation.language_iso).to eq('en')
68
- expect(translation.modified_at).to eq('2019-03-26 16:41:31 (Etc/UTC)')
69
- expect(translation.modified_at_timestamp).to eq(1_553_618_491)
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('RSpec is a testing suite')
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(5)
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, translation_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.1.0
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-03-01 00:00:00.000000000 Z
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.11
337
+ rubygems_version: 3.2.15
338
338
  signing_key:
339
339
  specification_version: 4
340
340
  summary: Ruby interface to the Lokalise API