sport_ngin_aws_auditor 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +5 -0
- data/lib/sport_ngin_aws_auditor/scripts/audit.rb +12 -4
- data/lib/sport_ngin_aws_auditor/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: de82e361c575984d1e01122170cd265345d56f0c
|
4
|
+
data.tar.gz: a88b8df2c897593871c79f6cb637b81b8d928716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 768a03ae321131c4fa4dda61a9e7311a41df2c43cb82f98652a1f8ceb9eb46d8cb559be08b592da2bea2fa2cc9466f9f7936f3bcbd557c20b3fedd0c38ad8acc
|
7
|
+
data.tar.gz: 95d1340b3e0a48d080d0b8a36d17cd6cfb7d725e35a31511b8c15f80f1674f22540f34ee5e0be2cc7f118dee8df86b506f62011fc65c71a59e496ba123dcda85
|
data/CHANGELOG.markdown
CHANGED
@@ -69,9 +69,8 @@ module SportNginAwsAuditor
|
|
69
69
|
|
70
70
|
def self.colorize(key, value)
|
71
71
|
if key.include?(" with tag")
|
72
|
-
|
73
|
-
|
74
|
-
say "<%= color('#{k}: #{"*" << value.to_s}', :blue) %>"
|
72
|
+
key, value = modify_tag_prints(key, value)
|
73
|
+
say "<%= color('#{key}: #{value}', :blue) %>"
|
75
74
|
elsif value < 0
|
76
75
|
say "<%= color('#{key}: #{value}', :yellow) %>"
|
77
76
|
elsif value == 0
|
@@ -84,7 +83,7 @@ module SportNginAwsAuditor
|
|
84
83
|
def self.print_to_slack(instances_hash, class_type, environment)
|
85
84
|
discrepancy_hash = Hash.new
|
86
85
|
instances_hash.each do |key, value|
|
87
|
-
if
|
86
|
+
if value != 0
|
88
87
|
discrepancy_hash[key] = value
|
89
88
|
end
|
90
89
|
end
|
@@ -102,6 +101,9 @@ module SportNginAwsAuditor
|
|
102
101
|
to_print << "#{header(class_type)}\n"
|
103
102
|
|
104
103
|
discrepancy_hash.each do |key, value|
|
104
|
+
if key.include?(" with tag")
|
105
|
+
key, value = modify_tag_prints(key, value)
|
106
|
+
end
|
105
107
|
to_print << "#{key}: #{value}\n"
|
106
108
|
end
|
107
109
|
|
@@ -109,6 +111,12 @@ module SportNginAwsAuditor
|
|
109
111
|
slack_job.perform
|
110
112
|
end
|
111
113
|
|
114
|
+
def self.modify_tag_prints(key, value)
|
115
|
+
key = key.dup # because key is a frozen string right now
|
116
|
+
key.slice!(" with tag")
|
117
|
+
return key, "*" << value.to_s
|
118
|
+
end
|
119
|
+
|
112
120
|
def self.header(type, length = 50)
|
113
121
|
type.upcase!.slice! "INSTANCE"
|
114
122
|
half_length = (length - type.length)/2.0 - 1
|
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: 3.
|
4
|
+
version: 3.3.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: 2016-07-
|
13
|
+
date: 2016-07-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|