cheftacular 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cheftacular/auditor.rb +20 -4
- data/lib/cheftacular/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: ae0db74e13fa0ee3670b8c81eb6058041e6d3f94
|
4
|
+
data.tar.gz: 7ceea94eea62ef4763f6e4879713e53c4e86a3f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6865a593f1446c1af501ac563dd4d6f4bd180d577e682003ef5b0bac448e4e987c952480f6d832ae485a875d82f992abbd08465f73df5220ec35fd3913110efe
|
7
|
+
data.tar.gz: 53999bf44b07c5d621998fb53732e76b5c17700a33368d2fff2a4655c68eeb973f2597f95826d092d14dda7b3dccac1a302b2047d81a15b7314ad8bfae81a0e9
|
data/lib/cheftacular/auditor.rb
CHANGED
@@ -30,9 +30,25 @@ class Cheftacular
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def fetch_audit_data_hash ret_hash={}, ip=""
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
begin
|
34
|
+
Timeout::timeout(10) do
|
35
|
+
response = Net::HTTP.get URI.parse('http://checkip.dyndns.org')
|
36
|
+
ip = response.match( /(?:Address: )([\d\.]+)/ )[1]
|
37
|
+
end
|
38
|
+
rescue StandardError => e
|
39
|
+
tries ||= 4
|
40
|
+
|
41
|
+
puts "Unable to fetch remote IP address for auditing hash. Trying #{tries} more times."
|
42
|
+
|
43
|
+
tries -= 1
|
44
|
+
|
45
|
+
if tries > 0
|
46
|
+
sleep(15)
|
47
|
+
|
48
|
+
retry
|
49
|
+
else
|
50
|
+
ip = "Unable to fetch"
|
51
|
+
end
|
36
52
|
end
|
37
53
|
|
38
54
|
ret_hash['hostname'] = Socket.gethostname
|
@@ -41,7 +57,7 @@ class Cheftacular
|
|
41
57
|
ret_hash
|
42
58
|
rescue StandardError => exception
|
43
59
|
@config['helper'].cleanup_file_caches('current-audit-only')
|
44
|
-
|
60
|
+
|
45
61
|
@config['helper'].exception_output "Unable to finish parsing auditing hash", exception
|
46
62
|
end
|
47
63
|
end
|
data/lib/cheftacular/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheftacular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis Alridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|