furikake 0.2.7 → 0.2.8

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
  SHA256:
3
- metadata.gz: a9c49eaa6e9799f94d2d9f1c5d7799c36a10923526432a3d7a8debb8f57bc33f
4
- data.tar.gz: 3bb6b29c3a7d803e060baf25dded41901e6a14a1afba519df1c73999d66134ab
3
+ metadata.gz: 5b648e5931e282bccde549cb3436bb589895ad054629e663b00a42606c3838b1
4
+ data.tar.gz: 764ddf8c9f49c6d0f4a1b804c6ed12654e96272bb8ea62feb720f2c298764dd5
5
5
  SHA512:
6
- metadata.gz: f24cd81f07927351293387d74b286ecf8d0b0f2f645489ab34eebba4ec07500775c7ca3eb4150883ff5ee388329c7831e123df149022ccf03c44a83dd963866a
7
- data.tar.gz: 6b268af1546cd02012a9ed0e7dfb9344a3c48bc324555aa79f1b88431b61b1744e277168524846cd659e5a73c0acbe90c135c2892b1b75411d5175a42e1a16b4
6
+ metadata.gz: 1043f0f46bd7398a92df6344b593cd96259d404e55c207260311d1ac133e25612576747b511a8bff7531a63d7dc42981edc7c54b2fadd253b08f3ddb8049b8c8
7
+ data.tar.gz: 5df2ec1f5f32ed867b5414bfee9dbf8b7f08d3cd8ff364fe0821cfbdc69ecc004d4c80671c934ef54fcd7ff9be061141e99089dfeb056ef20df47192adeacc55
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Furikake [![Build Status](https://travis-ci.org/inokappa/furikake.svg?branch=master)](https://travis-ci.org/inokappa/furikake) [![Gem Version](https://badge.fury.io/rb/furikake.svg)](https://badge.fury.io/rb/furikake)
1
+ # Furikake [![CI](https://github.com/oreno-tools/furikake/actions/workflows/ci.yml/badge.svg)](https://github.com/oreno-tools/furikake/actions) [![Gem Version](https://badge.fury.io/rb/furikake.svg)](https://badge.fury.io/rb/furikake)
2
2
  ![](https://raw.githubusercontent.com/inokappa/furikake/master/docs/images/furikake.png)
3
3
 
4
4
  ## これなに
@@ -4,11 +4,11 @@ module Furikake
4
4
  def report
5
5
  ingresses, egresses = get_resources
6
6
  headers = ['ID', 'Group Name', 'Description',
7
- 'Port', 'Protocol', 'Source' ]
7
+ 'From Port', 'To Port', 'Protocol', 'Source' ]
8
8
  ingress_info = MarkdownTables.make_table(headers, ingresses, is_rows: true, align: 'l')
9
9
 
10
10
  headers = ['ID', 'Group Name', 'Description',
11
- 'Port', 'Protocol', 'Destination' ]
11
+ 'From Port', 'To Port', 'Protocol', 'Source' ]
12
12
  egress_info = MarkdownTables.make_table(headers, egresses, is_rows: true, align: 'l')
13
13
 
14
14
  documents = <<"EOS"
@@ -40,6 +40,7 @@ EOS
40
40
  ingress << encode_value(sg.group_name)
41
41
  ingress << encode_value(sg.description || 'N/A')
42
42
  ingress << (permission.from_port || 'N/A')
43
+ ingress << (permission.to_port || 'N/A')
43
44
  ingress << (permission.ip_protocol == '-1' ? 'ALL' : permission.ip_protocol)
44
45
 
45
46
  ip_ranges = list_ip_ranges(permission.ip_ranges)
@@ -50,7 +51,7 @@ EOS
50
51
  source << ip_ranges unless ip_ranges.empty?
51
52
  source << list_ids unless list_ids.empty?
52
53
  source << group_pairs unless group_pairs.empty?
53
- ingress << source.join(', ')
54
+ ingress << source.join(' <br> ')
54
55
  ingresses << ingress
55
56
  end
56
57
 
@@ -60,6 +61,7 @@ EOS
60
61
  egress << encode_value(sg.group_name)
61
62
  egress << encode_value(sg.description || 'N/A')
62
63
  egress << (permission.from_port || 'N/A')
64
+ egress << (permission.to_port || 'N/A')
63
65
  egress << (permission.ip_protocol == '-1' ? 'ALL' : permission.ip_protocol)
64
66
 
65
67
  ip_ranges = list_ip_ranges(permission.ip_ranges)
@@ -70,7 +72,7 @@ EOS
70
72
  dest << ip_ranges unless ip_ranges.empty?
71
73
  dest << list_ids unless list_ids.empty?
72
74
  dest << group_pairs unless group_pairs.empty?
73
- egress << dest.join(', ')
75
+ egress << dest.join('<br>')
74
76
  egresses << egress
75
77
  end
76
78
  end
@@ -106,9 +108,8 @@ EOS
106
108
  end
107
109
 
108
110
  def encode_value(value)
109
- return ('\\' + value) if value == '-'
110
- return ('\\' + value) if value.index('_') == 0
111
- value
111
+ return value unless value.index('_') == 0
112
+ '\\' + value
112
113
  end
113
114
 
114
115
  module_function :report, :get_resources,
@@ -1,3 +1,3 @@
1
1
  module Furikake
2
- VERSION = '0.2.7'
2
+ VERSION = '0.2.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: furikake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - inokappa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-09 00:00:00.000000000 Z
11
+ date: 2021-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler