aemcrxpkgmgr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/changelog.md +4 -0
- data/lib/aemcrxpkgmgr.rb +12 -0
- data/lib/aemcrxpkgmgr/version.rb +1 -1
- 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: 6df29d5e01ce84d293a554ab1de18069c2aa454f
|
4
|
+
data.tar.gz: a2051abe1ddc48dfe154a2fd140b607e0f79dd83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 854c1522b431d8aed94745bb6c49b0cfd0be41c779ba85927a02348812f1c7c956b17f32cfdd5a91e51b33bd79fe01e87a69e0703756d46c2425ea6002647be5
|
7
|
+
data.tar.gz: f6b710fd04ed7f218a16d63045c2939818af943ab4dd1a26b114361765e9a5990e84dd63dab6f462b49d88eecd984954685e80610f4a943d3fcc6bb002138133
|
data/Gemfile.lock
CHANGED
data/changelog.md
CHANGED
data/lib/aemcrxpkgmgr.rb
CHANGED
@@ -20,13 +20,25 @@ class AemCrxPkgMgr
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def get(uri)
|
23
|
+
retries ||= 100
|
24
|
+
retry_timeout = 3
|
25
|
+
|
23
26
|
request = Net::HTTP::Get.new(uri)
|
24
27
|
request.basic_auth(@user, @pass)
|
25
28
|
|
26
29
|
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
27
30
|
http.request(request)
|
28
31
|
end
|
32
|
+
raise "AemCrxPkgMgr.get Response '#{response.code}' is not a Net::HTTPSuccess" unless response.is_a?(Net::HTTPSuccess)
|
29
33
|
response
|
34
|
+
rescue Errno::EADDRNOTAVAIL, RuntimeError => e
|
35
|
+
puts "AemCrxPkgMgr.get : #{e.class} : #{e.message}"
|
36
|
+
will_retry = (retries -= 1) >= 0
|
37
|
+
if will_retry
|
38
|
+
sleep retry_timeout
|
39
|
+
retry
|
40
|
+
end
|
41
|
+
raise
|
30
42
|
end
|
31
43
|
|
32
44
|
def pkg_query_uri(query)
|
data/lib/aemcrxpkgmgr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aemcrxpkgmgr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan - Zipkid - Goethals
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|