ruby-lokalise-api 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b871674214b37d9a6b0621c0e237d393755ecb14dbdf190fb6689decb0798b6f
4
- data.tar.gz: 2422640be2390f293d46b642097c4f9e5b0848f7720504acb6e0618910fd5188
3
+ metadata.gz: 61d306f7be49970786734ed94a006a6fd37d54e6919c19eb61390f78ad5acff8
4
+ data.tar.gz: ea3a5594f544a876386ffa1d50c1a7ff2a842966ca00811df33f54d9e304106e
5
5
  SHA512:
6
- metadata.gz: 2850e23fb85b2512095416d5decdb7fb6462ca6837d7b3827ae2e4d0c91aef2632f720c23ca7b11af4d66676597e7290af3cf4a2a65055ac2ac2cf61ca453827
7
- data.tar.gz: 03c7adf6eddd058429c3ebffadc455d8748610d7a5afa7d3c5c54b6d249696b2ad2c040b14f464bfeb89823d75b64a375e26f821ac0451649c17bd47cf4ccd4c
6
+ metadata.gz: 356f32428e0732321e27bc47f2c63022bea36990fb69886fa2daff9d2016bee3f9b80795c326ef4c090f280e58de51d65e8b5e9c6711b3de2be6bb37ae2b2c01
7
+ data.tar.gz: 4d5eb8f4fac05abf181fe793d94b2ec5ca759c004d865bbbd085252e4ac49d5abded9056fe0535bb428e1a1308c858a760d4fedd3a05afa7aebb2c8ec1e8ff3f
@@ -56,7 +56,7 @@ module Lokalise
56
56
  return params unless object_key
57
57
 
58
58
  params = [params] unless params.is_a?(Array)
59
- Hash[object_key, params]
59
+ {object_key => params}
60
60
  end
61
61
 
62
62
  alias c_r construct_request
@@ -86,7 +86,9 @@
86
86
  "translation_tier",
87
87
  "translation_tier_name",
88
88
  "briefing",
89
- "total"
89
+ "total",
90
+ "payment_method",
91
+ "dry_run"
90
92
  ],
91
93
  "payment_card": [
92
94
  "card_id",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lokalise
4
- VERSION = '4.0.0'
4
+ VERSION = '4.1.0'
5
5
  end
@@ -37,8 +37,8 @@ RSpec.describe Lokalise::Client do
37
37
 
38
38
  expect(order.order_id).to eq(order_id)
39
39
  expect(order.project_id).to eq(project_id)
40
- expect(order.card_id).to eq(card_id.to_s)
41
- expect(order.status).to eq('in progress')
40
+ expect(order.card_id).to eq(card_id)
41
+ expect(order.status).to eq('completed')
42
42
  expect(order.created_at).to eq('2019-03-19 18:18:21 (Etc/UTC)')
43
43
  expect(order.created_by).to eq(20_181)
44
44
  expect(order.created_by_email).to eq('bodrovis@protonmail.com')
@@ -52,6 +52,7 @@ RSpec.describe Lokalise::Client do
52
52
  expect(order.translation_tier_name).to eq('Professional translator')
53
53
  expect(order.briefing).to eq('Some briefing')
54
54
  expect(order.total).to eq(0.07)
55
+ expect(order.payment_method).to be_nil
55
56
  end
56
57
 
57
58
  specify '#reload_data' do
@@ -86,4 +87,27 @@ RSpec.describe Lokalise::Client do
86
87
  expect(order.order_id).to eq(order_id)
87
88
  expect(order.status).to eq('in progress')
88
89
  end
90
+
91
+ it 'creates an order with dry run' do
92
+ order = VCR.use_cassette('create_order_dry_run') do
93
+ test_client.create_order team_id,
94
+ project_id: project_id,
95
+ card_id: card_id,
96
+ briefing: 'Some briefing',
97
+ source_language_iso: 'en',
98
+ target_language_isos: [
99
+ 'ru'
100
+ ],
101
+ keys: [
102
+ 74_189_435
103
+ ],
104
+ provider_slug: 'gengo',
105
+ translation_tier: '1',
106
+ dry_run: true
107
+ end
108
+
109
+ expect(order.order_id).to be_nil
110
+ expect(order.status).to eq('draft')
111
+ expect(order.dry_run).to be true
112
+ end
89
113
  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: 4.0.0
4
+ version: 4.1.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-02-02 00:00:00.000000000 Z
11
+ date: 2021-03-01 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.7
337
+ rubygems_version: 3.2.11
338
338
  signing_key:
339
339
  specification_version: 4
340
340
  summary: Ruby interface to the Lokalise API