yatapp 0.3.1 → 0.3.2
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 +4 -4
- data/lib/yatapp/version.rb +1 -1
- data/lib/yatapp/yata_api_caller.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd5846b8147778bfc139114eafa98bd6f45fea95
|
|
4
|
+
data.tar.gz: 6589c21dc79b5a7acd1de926c27dd73aeab256e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ca66b1d0b2581a137d40cd7d464dcdd9ac0d197043a58ecb5b620f764b12da905649a2c632b8ce0c5c2f1d0f388cdea2b31f4d79e7139719b1d32bb2663fd4a
|
|
7
|
+
data.tar.gz: da7220bb085f820927efeef048664ecd0f0c0e800dbe1c9ad65ca1114bd87b4e40de931fd1c87a7797072538c8a17e0181a09b3dc36ffe857a064a69438ef3f8
|
data/lib/yatapp/version.rb
CHANGED
|
@@ -42,11 +42,19 @@ module Yatapp
|
|
|
42
42
|
puts "Getting translation for #{lang}"
|
|
43
43
|
api_url = download_url(lang)
|
|
44
44
|
api_response = connection.get(api_url)
|
|
45
|
+
next if !should_save_the_translation?(api_response)
|
|
45
46
|
save_translation(lang, api_response)
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
private
|
|
51
|
+
def should_save_the_translation?(api_response)
|
|
52
|
+
if api_response.status != 200
|
|
53
|
+
puts "INVALID RESPONSE: #{api_response.body}"
|
|
54
|
+
return false
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
50
58
|
def initialize_configuration
|
|
51
59
|
options = Yatapp.options
|
|
52
60
|
Configuration::CONFIGURATION_OPTIONS.each do |key|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yatapp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- luki3k5
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|