toptranslation_api 2.0.0 → 2.1.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: f4c3de10e646ba06f7bd4c0cfe60d2c789e5996707970fc3915c2bd7b4062c6c
4
- data.tar.gz: ece7d100b8829473e9b4e71d79fc47e3a8823c0599d7ce69207f9dc1fcd8eeb7
3
+ metadata.gz: 596a326bfa119db5cd42800c6d02a06cd73dcc4f023693bf97585bef1d386805
4
+ data.tar.gz: 6e4de89b9edab0df7bcadb3c817440daa8cd2875aa18d65349226f6fc4392111
5
5
  SHA512:
6
- metadata.gz: '0928e7f0eaa21782f56f797ce6363ffd0d4a6c1014d46f50aa663ba79bb26d1cbf6dbbb53d9b98108d5174029b6a4c39cdad35bf752207aa0fca335cc9ae3584'
7
- data.tar.gz: a9c63d299370fc8f1b32c4c8b6bd27f470a4d9e75a3c15aca8f454a723d62ad448688431ae1bca134f091df016943c7152edf3c31bf5f70bbf44e3ef4e087a30
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, options[:filename])
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']
@@ -1,3 +1,3 @@
1
1
  module Toptranslation
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  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.0.0
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-01 00:00:00.000000000 Z
11
+ date: 2018-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json