toptranslation_api 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toptranslation/resource/document.rb +3 -2
- data/lib/toptranslation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 596a326bfa119db5cd42800c6d02a06cd73dcc4f023693bf97585bef1d386805
|
4
|
+
data.tar.gz: 6e4de89b9edab0df7bcadb3c817440daa8cd2875aa18d65349226f6fc4392111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c2cc9f18fa0aaebd74eddc3808657b72adbd5076ac75876a608a318ca69a2209b90de14044f820738fbf31cf08a84760810d77f53f8b132608a791d027bbf3f
|
7
|
+
data.tar.gz: fe7d0266c0021831a89cecc8ee140ed48ce46dceb5f3552c1fc610ff850033d18e8fea3cf11bb8a495f1fb7e3e0f09bf289c649e328d65f0ab65812647e5ae80
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Toptranslation::Resource
|
2
2
|
class Document
|
3
|
-
attr_reader :identifier, :string_count, :has_missing_strings, :translations, :updated_at, :created_at
|
3
|
+
attr_reader :identifier, :string_count, :has_missing_strings, :translations, :updated_at, :created_at, :sha1
|
4
4
|
attr_accessor :name, :path
|
5
5
|
|
6
6
|
def initialize(connection, options = {})
|
@@ -23,7 +23,7 @@ module Toptranslation::Resource
|
|
23
23
|
def download(locale_code, options = {})
|
24
24
|
params = { file_format: options[:file_format], locale_code: locale_code }.compact
|
25
25
|
download_url = @connection.get("/documents/#{@identifier}/download", params: params)['download_url']
|
26
|
-
@connection.download(download_url
|
26
|
+
@connection.download(download_url)
|
27
27
|
end
|
28
28
|
|
29
29
|
def save
|
@@ -58,6 +58,7 @@ module Toptranslation::Resource
|
|
58
58
|
@path = response['path'] if response['path']
|
59
59
|
@string_count = response['string_count'] if response['string_count']
|
60
60
|
@has_missing_strings = response['has_missing_strings'] if response['has_missing_strings']
|
61
|
+
@sha1 = response['sha1'] if response['sha1']
|
61
62
|
@updated_at = DateTime.parse(response['updated_at']) if response['updated_at']
|
62
63
|
@created_at = DateTime.parse(response['created_at']) if response['created_at']
|
63
64
|
if response['translations']
|
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.1.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: 2018-06-
|
11
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|