MovableInkAWS 2.7.3 → 2.7.5
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/movable_ink/aws/ec2.rb +6 -6
- data/lib/movable_ink/aws.rb +1 -0
- data/lib/movable_ink/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96e412e659e0f48c3a469c1151da0e2e610aaafe2b0817ad22e7dae4eae39765
|
4
|
+
data.tar.gz: 5ae7c22cfedb9ddbd89c902f9531e01f88293e6843e1d057b9c6ca1f818b49b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a877074eb719b30bdba76b22176e3cfc7965760a93de3d98cb9197a1e362c190d8a559f7cebdc5ebb0ad46138fdb8992622fd40c753cf593ced446aa5c68ed8f
|
7
|
+
data.tar.gz: 399aae9bbe6a4f14fa2fae2cb44c9bc2b378b898af8961bf2a8f01f3555f7db613c350cfedced06ffc357e863f7415a8e4a57f95c6eaabd76655ded6e080e2c9
|
data/Gemfile.lock
CHANGED
data/lib/movable_ink/aws/ec2.rb
CHANGED
@@ -4,9 +4,9 @@ require 'diplomat'
|
|
4
4
|
module MovableInk
|
5
5
|
class AWS
|
6
6
|
module EC2
|
7
|
-
def ec2(region: my_region)
|
7
|
+
def ec2(region: my_region, client: nil)
|
8
8
|
@ec2_client ||= {}
|
9
|
-
@ec2_client[region] ||= Aws::EC2::Client.new(region: region)
|
9
|
+
@ec2_client[region] ||= (client) ? client : Aws::EC2::Client.new(region: region)
|
10
10
|
end
|
11
11
|
|
12
12
|
def mi_env_cache_file_path
|
@@ -38,9 +38,9 @@ module MovableInk
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def all_instances(region: my_region, no_filter: false)
|
41
|
+
def all_instances(region: my_region, no_filter: false, client: nil)
|
42
42
|
@all_instances ||= {}
|
43
|
-
@all_instances[region] ||= load_all_instances(region, no_filter: no_filter)
|
43
|
+
@all_instances[region] ||= load_all_instances(region, no_filter: no_filter, client: client)
|
44
44
|
end
|
45
45
|
|
46
46
|
def default_filter
|
@@ -54,11 +54,11 @@ module MovableInk
|
|
54
54
|
}]
|
55
55
|
end
|
56
56
|
|
57
|
-
def load_all_instances(region, no_filter: false, filter: nil)
|
57
|
+
def load_all_instances(region, no_filter: false, filter: nil, client: nil)
|
58
58
|
filters = no_filter ? nil : (filter || default_filter)
|
59
59
|
|
60
60
|
run_with_backoff do
|
61
|
-
ec2(region: region).describe_instances(filters: filters).flat_map do |resp|
|
61
|
+
ec2(region: region, client: client).describe_instances(filters: filters).flat_map do |resp|
|
62
62
|
resp.reservations.flat_map(&:instances)
|
63
63
|
end
|
64
64
|
end
|
data/lib/movable_ink/aws.rb
CHANGED
@@ -76,6 +76,7 @@ module MovableInk
|
|
76
76
|
Aws::SNS::Errors::Throttling,
|
77
77
|
Aws::AutoScaling::Errors::Throttling,
|
78
78
|
Aws::AutoScaling::Errors::ThrottledException,
|
79
|
+
Aws::AutoScaling::Errors::InternalFailure,
|
79
80
|
Aws::S3::Errors::SlowDown,
|
80
81
|
Aws::Route53::Errors::Throttling,
|
81
82
|
Aws::Route53::Errors::ThrottlingException,
|
data/lib/movable_ink/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MovableInkAWS
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MI SRE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|