toptranslation_api 2.4.0 → 2.5.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4392df749838b50cb325f57e8287579d2217dcf9902dd67f672bdbd184837988
|
|
4
|
+
data.tar.gz: e5a694a107d0095a266579a27a9d3c42675996580ad05e4839234ea861482ea0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3fd2c4cf9c6146dcbdc0dd80be714c816863834556395dacf0fb79f945d8659fd1c864c08eb08e5a1b07cc67f284fb0a57141719c0f9a2074eace0bad0bad79
|
|
7
|
+
data.tar.gz: 7dbee32637c576bc6bbd9cf26adc64cce95cc1bde7013f7abd5770e13eb6d272633ef59d27148c26534fcd07b32e6c80ee44cb172a678dde8b1d4486c1fdc3e0
|
|
@@ -36,6 +36,7 @@ module Toptranslation
|
|
|
36
36
|
|
|
37
37
|
def sign_in!(options)
|
|
38
38
|
return if @access_token
|
|
39
|
+
|
|
39
40
|
sign_in_options = {
|
|
40
41
|
email: options[:email],
|
|
41
42
|
password: options[:password],
|
|
@@ -89,7 +90,7 @@ module Toptranslation
|
|
|
89
90
|
def prepare_request_options(options, method)
|
|
90
91
|
request_options = options.dup
|
|
91
92
|
request_options.delete(:version)
|
|
92
|
-
if
|
|
93
|
+
if [:post, :patch].include? method
|
|
93
94
|
request_options.merge(auth_params)
|
|
94
95
|
else
|
|
95
96
|
params = options[:params] || {}
|
|
@@ -14,7 +14,8 @@ module Toptranslation::Resource
|
|
|
14
14
|
response = @connection.post("/documents/#{@identifier}/translations", options.merge(
|
|
15
15
|
document_store_id: upload.document_store_id,
|
|
16
16
|
document_token: upload.document_token,
|
|
17
|
-
locale_code: locale_code
|
|
17
|
+
locale_code: locale_code,
|
|
18
|
+
sha1: upload.sha1
|
|
18
19
|
))
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -16,7 +16,8 @@ module Toptranslation::Resource
|
|
|
16
16
|
attr_hash = {
|
|
17
17
|
document_store_id: upload.document_store_id,
|
|
18
18
|
document_token: upload.document_token,
|
|
19
|
-
locale_code: locale_code
|
|
19
|
+
locale_code: locale_code,
|
|
20
|
+
sha1: upload.sha1
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
attr_hash[:path] = options[:path] if options[:path]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module Toptranslation::Resource
|
|
2
2
|
class Upload
|
|
3
|
-
attr_reader :document_store_id, :document_token
|
|
3
|
+
attr_reader :document_store_id, :document_token, :sha1
|
|
4
4
|
|
|
5
5
|
def initialize(connection, options = {})
|
|
6
6
|
@connection = connection
|
|
@@ -13,6 +13,7 @@ module Toptranslation::Resource
|
|
|
13
13
|
|
|
14
14
|
@document_store_id = response['identifier']
|
|
15
15
|
@document_token = response['document_token']
|
|
16
|
+
@sha1 = response['sha1']
|
|
16
17
|
|
|
17
18
|
self
|
|
18
19
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toptranslation_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Toptranslation GmbH
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -100,28 +100,28 @@ dependencies:
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.
|
|
103
|
+
version: 0.74.0
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 0.
|
|
110
|
+
version: 0.74.0
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rubocop-rspec
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 1.
|
|
117
|
+
version: 1.35.0
|
|
118
118
|
type: :development
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 1.
|
|
124
|
+
version: 1.35.0
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: vcr
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -197,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
197
197
|
- !ruby/object:Gem::Version
|
|
198
198
|
version: '0'
|
|
199
199
|
requirements: []
|
|
200
|
-
|
|
201
|
-
rubygems_version: 2.7.6
|
|
200
|
+
rubygems_version: 3.0.3
|
|
202
201
|
signing_key:
|
|
203
202
|
specification_version: 4
|
|
204
203
|
summary: A ruby client for the Toptranslation API
|