sport_ngin_aws_auditor 4.0.2 → 4.1.0

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: 1f426df86916c5bfc67f5365e79ac2513b4d483b
4
- data.tar.gz: 156e31cd09966a7ba2b0711806590db245720905
3
+ metadata.gz: 5277289fe41b4b8e42e6f5cca63e4d18406cfcb6
4
+ data.tar.gz: ac8c8938e68b0e7b1592cb633b3dc81628345180
5
5
  SHA512:
6
- metadata.gz: cadd9bc310d7059b7d87e32435a0f62ea4ca0e061dd4ad738f3acb92e529f48db26f18ac619524ed31fa8774cd98200c2504e0836318ead5a9c96650d0095cbd
7
- data.tar.gz: a2d1514429102855e104085528102e9c04959292a6e32121539a34336672e9d12bd91070f9c232c9243c7a27ba018656a0e03bbb78d91efec4d01a7a50ffc18c
6
+ metadata.gz: fd4073d93376063c9f21c1d9925cac0f86f01f6111291f2bf74c1d68d010fe97e6d056b4122904e91919f4f60b8a5f89fef8c73ad11c47648fd66754f37a6272
7
+ data.tar.gz: 232c7a07934fe6c05757146fb626c91d15616fe963d4ed00158c2b075e74225027ca377322de0920dccd7b2f3826d0a114a51295cdd7639aa99a7a9160ab33de
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ #### v4.1.0
2
+ * Write a message reporting when the auditor fails for any reason
3
+
4
+ > Emma Sax: Unknown User: https://github.com/sportngin/sport_ngin_aws_auditor/pull/36
5
+
1
6
  #### v4.0.2
2
7
  * Define availability zone as attribute for RDS object to avoid errors
3
8
 
@@ -17,13 +17,23 @@ module SportNginAwsAuditor
17
17
  #################### EXECUTION ####################
18
18
 
19
19
  def self.execute(environment, options, global_options)
20
- aws(environment, global_options)
21
- collect_options(environment, options, global_options)
22
- print_title
23
- @regions.each { |region| audit_region(region) }
24
- reset_credentials
20
+ begin
21
+ aws(environment, global_options)
22
+ collect_options(environment, options, global_options)
23
+ print_title
24
+ @regions.each { |region| audit_region(region) }
25
+ reset_credentials
26
+ rescue StandardError => e
27
+ if options[:slack]
28
+ NotifySlack.new("Sorry, something seems to have gone wrong.", options[:config_json]).perform
29
+ else
30
+ puts "Sorry, something seems to have gone wrong."
31
+ end
32
+ raise e
33
+ end
25
34
  end
26
35
 
36
+ # We do this method for each region we're auditing
27
37
  def self.audit_region(region)
28
38
  @region_previously_printed = false
29
39
  @message = ""
@@ -32,6 +42,7 @@ module SportNginAwsAuditor
32
42
  print_message unless @slack
33
43
  end
34
44
 
45
+ # We do this method for each type of instance in each region we're auditing
35
46
  def self.audit_instance_type(type, region)
36
47
  @class = type.first
37
48
  @audit_results = AuditData.new({:instances => options[:instances], :reserved => options[:reserved],
@@ -1,3 +1,3 @@
1
1
  module SportNginAwsAuditor
2
- VERSION = "4.0.2"
2
+ VERSION = "4.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sport_ngin_aws_auditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Hursh
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-23 00:00:00.000000000 Z
13
+ date: 2017-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk