cheftacular 2.1.0 → 2.1.1

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: 928f8a004cb74ca10ecca90795caecf6c8bd8af4
4
- data.tar.gz: e0bcd6f10d0f059c3f852878a3015026bc694152
3
+ metadata.gz: ae0db74e13fa0ee3670b8c81eb6058041e6d3f94
4
+ data.tar.gz: 7ceea94eea62ef4763f6e4879713e53c4e86a3f8
5
5
  SHA512:
6
- metadata.gz: 6cdf8e3448ba4eb57f483f68edf18c20567607402ba3c88f47df410745d836e778b5555a441b5e187dd002572e89a37ff68a72023b35d4d68478d4c377702b7a
7
- data.tar.gz: 87eefe7516479d2535131ac24e0c5efac2147cab265440c105b2b38ffecb1221064721776f89980f5eb95f99ac291cbeb3ef53ab1d9d277075011b9cd0fff6ac
6
+ metadata.gz: 6865a593f1446c1af501ac563dd4d6f4bd180d577e682003ef5b0bac448e4e987c952480f6d832ae485a875d82f992abbd08465f73df5220ec35fd3913110efe
7
+ data.tar.gz: 53999bf44b07c5d621998fb53732e76b5c17700a33368d2fff2a4655c68eeb973f2597f95826d092d14dda7b3dccac1a302b2047d81a15b7314ad8bfae81a0e9
@@ -30,9 +30,25 @@ class Cheftacular
30
30
  end
31
31
 
32
32
  def fetch_audit_data_hash ret_hash={}, ip=""
33
- Timeout::timeout(10) do
34
- response = Net::HTTP.get URI.parse('http://checkip.dyndns.org')
35
- ip = response.match( /(?:Address: )([\d\.]+)/ )[1]
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
@@ -1,5 +1,5 @@
1
1
  class Cheftacular
2
2
  #major_version.minor_version.bugfixes
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  RUBY_VERSION = "2.2.2"
5
5
  end
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.0
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-26 00:00:00.000000000 Z
11
+ date: 2015-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie