image-dumper 0.6.1 → 0.6.3

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: b87f39b372cb14a7ef17e6e5da413b6337e7c5b0
4
- data.tar.gz: 29f982e0c28c2dd7448c17eff1a92d8f8190df1d
3
+ metadata.gz: 3c4a215cb421e1431d04d5f6c326a9f5b83f6877
4
+ data.tar.gz: 348906e916a00fce766129e6f045bf146dc3f2cf
5
5
  SHA512:
6
- metadata.gz: 0d65683e728928a776b7333067a39ed1d8eb8da9b78ac956ee9874d68c68f4e5d7423e5f3f3fa55248b128fa81124bcb35d8231082774e3b26988db998143526
7
- data.tar.gz: fb762aa7438ac757a50faaae629ec068dbbf6a1f5bc812d6ab78bf69eb6425194360fc464c2cd4d3d49e26df31c9706067408b8804304fb9e9e12ee09da81e30
6
+ metadata.gz: 7cb20d9ea19acfd8cf88a6b35777f1d58acd0175a8937ecc0b59de04889f6ba7a05a8020611905ce0832390e85724e5c4dcc5ba568d42c2f6c874eb392505d3a
7
+ data.tar.gz: d136a79f06cda4983f79488a35c060dfd55ffeb529942bdd4e090a9ef1e5734a3159640e9ef3be6f3d7d4638e9598153a0cf03e6aff818ba7bf2857a8d758aa4
data/lib/dumper/dumper.rb CHANGED
@@ -75,7 +75,8 @@ module Dumper
75
75
  end
76
76
 
77
77
  def get(path, url, options = {})
78
- url = url.to_s
78
+ url = url.to_s
79
+ errors = 0
79
80
 
80
81
  begin
81
82
  if url.start_with? 'data:image/'
@@ -111,9 +112,15 @@ module Dumper
111
112
  end
112
113
  end
113
114
  rescue Exception => e
114
- p e
115
- puts "Error downloading #{url}."
116
- return false
115
+ if errors <= 3
116
+ errors += 1
117
+ sleep 3
118
+ retry
119
+ else
120
+ p e
121
+ puts "Error downloading #{url}."
122
+ return false
123
+ end
117
124
  end
118
125
 
119
126
  true
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.6.1'
22
+ '0.6.3'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image-dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano