aly 0.1.1 → 0.1.2

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: 34fd1e28efaddb6086f9733f1d9ba642899d7b8401b75b91c3a3ec8328e6d4d7
4
- data.tar.gz: 43c4a862eb3068239a508dc08ad79e6842c315cbe6ea104a958cc7063fed7964
3
+ metadata.gz: add2aa880577ff73d3a010623270ad00ebd51f3997378d040725eb239dd0b043
4
+ data.tar.gz: 8af5de2402336f2655b33ddaaa0bea2a9e0144176e8da9d230237b090fbf9d31
5
5
  SHA512:
6
- metadata.gz: 8217b6478e6291f5608be558d9356dad8baa71faea68b75f670c0e2b6e3f2a4cac5a378d81ea79b12259c6e46deceffdf16c11ffa053f4dc3f72013b5a5a60f3
7
- data.tar.gz: e3a63a7c64d1a923e74e26f188a2b7f5729472125c6a9f3d1d5378ce9179429a0bd3406187c339e3b8c55dcfac4f3c0691dd2d6bc50c96ef14bde70e01b2a873
6
+ metadata.gz: 9808a86bbaffb9470c73b74a1789ca05bd205886a919b0d2c11fe91ced18f55c3550ca8855e8c69f7d73fdfcc2fe87c75796cfd1677cf7afd0daef5d9200ab64
7
+ data.tar.gz: 04ab0a3be23ac8b4caa7a5d537bdb26270e04b731224a059c283354806801f6369175f18ce4ea96ad9afee8f9493a8c112685855f1f458528155fbba696aaaa4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aly (0.1.0)
4
+ aly (0.1.1)
5
5
  terminal-table (~> 1.8.0)
6
6
  thor (~> 0.20.0)
7
7
 
data/lib/aly/app.rb CHANGED
@@ -27,9 +27,9 @@ module Aly
27
27
  item['PublicIP'] = item['PublicIpAddress']['IpAddress'].join(', ') if item['PublicIP'] == ''
28
28
  end
29
29
 
30
- if query = args.first
30
+ if query = args.first&.split(',')
31
31
  selected = selected.select do |item|
32
- item.values_at('InstanceId', 'InstanceName', 'PrivateIP', 'PublicIP').compact.any? { |e| e.include?(query) }
32
+ item.values_at('InstanceId', 'InstanceName', 'PrivateIP', 'PublicIP').compact.any? { |e| query.any? { |q| e.include?(q) } }
33
33
  end
34
34
  end
35
35
 
@@ -52,9 +52,9 @@ module Aly
52
52
  raw_out = exec('vpc', 'DescribeEipAddresses', '--PageSize=100')
53
53
  selected = raw_out['EipAddresses']['EipAddress']
54
54
 
55
- if query = args.first
55
+ if query = args.first&.split(',')
56
56
  selected = selected.select do |item|
57
- item.values_at('AllocationId', 'InstanceId', 'InstanceType', 'IpAddress').compact.any? { |e| e.include?(query) }
57
+ item.values_at('AllocationId', 'InstanceId', 'InstanceType', 'IpAddress').compact.any? { |e| query.any? { |q| e.include?(q) } }
58
58
  end
59
59
  end
60
60
 
@@ -99,9 +99,9 @@ module Aly
99
99
  lb['Listeners'] = listeners[lb['LoadBalancerId']] || []
100
100
  end
101
101
 
102
- if query = args.first
102
+ if query = args.first&.split(',')
103
103
  selected = selected.select do |lb|
104
- lb.values_at('LoadBalancerId', 'LoadBalancerName', 'Address').compact.any? { |e| e.include?(query) }
104
+ lb.values_at('LoadBalancerId', 'LoadBalancerName', 'Address').compact.any? { |e| query.any? { |q| e.include?(q) } }
105
105
  end
106
106
  end
107
107
 
data/lib/aly/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aly
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Xiang