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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0f54870333d8d6697af1b1a50de5164ca90412f
4
- data.tar.gz: 840f8821c87ee3e362a7a91be359131ee96d2a8c
3
+ metadata.gz: fd5846b8147778bfc139114eafa98bd6f45fea95
4
+ data.tar.gz: 6589c21dc79b5a7acd1de926c27dd73aeab256e2
5
5
  SHA512:
6
- metadata.gz: 6e03d11cef537362c0853ba7505727c435af947d729ac831ef6c72062b39e8fbcf49a608d67a13c8f8bbc4ed861a4a010034bc3f29fc575fd3b2ddfc5a69cf0f
7
- data.tar.gz: eaec2b13f468af9f9c95abf0f6231f7637b782b05bf82918c9393841a8455f2cbef3d543777d6745edc7a77b6ca468c9fad4c5c0310ecb413574fec5b9c11ae5
6
+ metadata.gz: 1ca66b1d0b2581a137d40cd7d464dcdd9ac0d197043a58ecb5b620f764b12da905649a2c632b8ce0c5c2f1d0f388cdea2b31f4d79e7139719b1d32bb2663fd4a
7
+ data.tar.gz: da7220bb085f820927efeef048664ecd0f0c0e800dbe1c9ad65ca1114bd87b4e40de931fd1c87a7797072538c8a17e0181a09b3dc36ffe857a064a69438ef3f8
@@ -1,3 +1,3 @@
1
1
  module Yatapp
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -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.1
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-04 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday