zeta 0.12.1 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f992aecaea0e7d5cb4b7064b0fab8aaefcb7735
4
- data.tar.gz: 263827e5179b4bddd929808d6499d1c318493c4d
3
+ metadata.gz: 3b10db3801785bc09864d308162f261326ca085a
4
+ data.tar.gz: f8334a996b45382413cf12a9c1ad7f062aa0c58f
5
5
  SHA512:
6
- metadata.gz: d7f9e027b8757a17ab5e8e2a3f859781cfd319259265d8d035c0b48c2f71c364f55ab8e27e8c3f14420d20b979763a2b9e068ebefeb00d614c4dc86ec2e3c984
7
- data.tar.gz: 9db5e90e8fe36e98a6a3c0adcd4883113693eea46b31d6da73ac385d8d3ab2dd4eda022435665257a217825a3b692b588ee9ed257e7761d5aaa4e30487e3c659
6
+ metadata.gz: 7aafe2089d71cfbfbd1a33359d400f3f9f809f821aa03c9ddfdabd763f5e6b468f83743351bf7caa08c4beea0d3aa09071adb2542d4ad15c07726138a6033add
7
+ data.tar.gz: a4929381cbd747e58b3dcc182440a83fe46cfa769d1d3595bf5654a4077ad02dce7dcd9846d3f66797c4479d38b88468fc6a3eee5d9805bbc6caf8844dc16d9c
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.12.1
2
+ - Retry failed downloads up to 3 times
3
+
1
4
  # 0.12.0
2
5
  - Update Lacerda (fixes required arrays being marked as invalid
3
6
  when they're empty)
@@ -28,15 +28,18 @@ class Zeta::LocalOrRemoteFile
28
28
  end
29
29
 
30
30
  def self.http_get(url, verbose)
31
+ retries ||= 3
31
32
  masked_url = ENV['ZETA_HTTP_PASSWORD'].blank? ? url : url.sub(ENV['ZETA_HTTP_PASSWORD'], '***')
32
33
  print "GET #{masked_url}... " if verbose
33
34
  result = HTTParty.get url
34
- raise "Error #{result.code}" unless result.code == 200
35
+ raise "Error #{result.code}: #{result}" unless result.code == 200
35
36
  print "OK\n".green if verbose
36
37
  result.to_s
37
38
  rescue
38
39
  print "ERROR\n".blue if verbose
39
- raise
40
+ raise if (retries -= 1).zero?
41
+ sleep 1
42
+ retry
40
43
  end
41
44
 
42
45
  def verbose?
@@ -52,7 +55,7 @@ class Zeta::LocalOrRemoteFile
52
55
  file = @options[:file]
53
56
 
54
57
  uri = [branch, path, file].compact.join('/')
55
- u = ENV['ZETA_HTTP_USER']
58
+ u = ENV['ZETA_HTTP_USER']
56
59
  p = ENV['ZETA_HTTP_PASSWORD']
57
60
  if p
58
61
  "https://#{u}:#{p}@raw.githubusercontent.com/#{repo}/#{uri}"
data/lib/zeta/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Zeta
2
- VERSION = "0.12.1"
2
+ VERSION = "0.12.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake