cfn-nag 0.4.46 → 0.4.47
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68286cdf5f83a567d29d8ffe133ea4c7504ea26abd8afdcdab61143d4cda64ac
|
|
4
|
+
data.tar.gz: 5f1072360dbb4e49f100ba96238dcc227d7d2a6d5a0788c1157b9baa96ef2b4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce9407702965aeb519915b80eb9437e890909adfb7667886d8f9415c38f9600ce4672f696bd0edf71118b0824e30356dd6a3749d6ef91207d5019b01d35b1187
|
|
7
|
+
data.tar.gz: 8d2614530978baa25661959b014ad797a8119bf955026462f186f14753bfc5194869052ef7b838f8987c2501bef192f331e2596f65b1ebf68cd479b280137b2c
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'cfn-nag/violation'
|
|
4
|
-
require 'colorize'
|
|
5
4
|
|
|
6
5
|
# Print results to STDOUT with ANSI color codes
|
|
7
6
|
class ColoredStdoutResults < StdoutResults
|
|
@@ -18,12 +17,27 @@ class ColoredStdoutResults < StdoutResults
|
|
|
18
17
|
|
|
19
18
|
60.times { print '-' }
|
|
20
19
|
puts
|
|
21
|
-
puts "| #{message_type.upcase}"
|
|
22
|
-
puts '|'
|
|
23
|
-
puts "| Resources: #{logical_resource_ids}"
|
|
24
|
-
puts "| Line Numbers: #{line_numbers}"
|
|
25
|
-
puts '|'
|
|
26
|
-
puts "| #{message}"
|
|
20
|
+
puts colorize(color, "| #{message_type.upcase}")
|
|
21
|
+
puts colorize(color, '|')
|
|
22
|
+
puts colorize(color, "| Resources: #{logical_resource_ids}") unless logical_resource_ids.nil?
|
|
23
|
+
puts colorize(color, "| Line Numbers: #{line_numbers}") unless line_numbers.empty?
|
|
24
|
+
puts colorize(color, '|') unless line_numbers.empty? && logical_resource_ids.nil?
|
|
25
|
+
puts colorize(color, "| #{message}")
|
|
27
26
|
end
|
|
28
27
|
# rubocop:enable Metrics/AbcSize
|
|
28
|
+
|
|
29
|
+
def color_code(color_symbol)
|
|
30
|
+
case color_symbol
|
|
31
|
+
when :red
|
|
32
|
+
31
|
|
33
|
+
when :yellow
|
|
34
|
+
33
|
|
35
|
+
else
|
|
36
|
+
0
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def colorize(color_symbol, str)
|
|
41
|
+
"\e[#{color_code(color_symbol)}m#{str}\e[0m"
|
|
42
|
+
end
|
|
29
43
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cfn-nag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.47
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Kascic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-11-
|
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -80,20 +80,6 @@ dependencies:
|
|
|
80
80
|
- - '='
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 0.4.5
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: colorize
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - '='
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.8.1
|
|
90
|
-
type: :runtime
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - '='
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.8.1
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
name: jmespath
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|