MovableInkAWS 2.11.6 → 2.11.7

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: e435c7e7f7f63344b18f29da2e373d44bac9f990dc7514bc868deb1e18d0a01b
4
- data.tar.gz: 7da29c9c9daf0ca24c0395422365f87c0ac596274620e98992fd5645ca053984
3
+ metadata.gz: 6b00042330c59a011318a6718225fcfbaea513c07c4c92c10edc6469281b4b73
4
+ data.tar.gz: 4fb15e463994046e52e35f0d8094b2f91e9a501636a4b107eb9b75f3bcc759a6
5
5
  SHA512:
6
- metadata.gz: 3ee0936e7d71cfffe8bcbaaf861c0c2bfaf3e6d24e7288f485cd4f922abb430bf4a9c0ae8b400674ffaba46e4084c46493c26865340af1779cf2f901cdad8d3a
7
- data.tar.gz: da6308796716af6dd1138dbb5c582da293f890247d1fe0de1f502ab668596be62485860795bc2c6d6046030261f718b86ec82aa186dae3790de285f7b97ce4f3
6
+ metadata.gz: dbbbb81690b663d8388ed2dd850f9c12f81602aecfc79d9a20a62e8d7d0558088c854ede1b42a1c444721993cc1c84bdafa329d4c7176ca95c25db9032236c75
7
+ data.tar.gz: 7d43ffce9e0fdff9ea3bbb0925b5c07dcfd172363e8646dce8a54d54388a8478dd5628db20c1373a3c9e25dfa96682c028f0c391f3b19707b01e829c65b685bc
@@ -13,13 +13,13 @@ jobs:
13
13
 
14
14
  strategy:
15
15
  matrix:
16
- ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
16
+ ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v6
20
20
 
21
21
  - name: Install ruby
22
- uses: ruby/setup-ruby@v1
22
+ uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby-version }}
25
25
 
@@ -35,10 +35,10 @@ jobs:
35
35
  if: startsWith(github.ref, 'refs/tags/')
36
36
 
37
37
  steps:
38
- - uses: actions/checkout@v4
38
+ - uses: actions/checkout@v6
39
39
 
40
40
  - name: Install ruby
41
- uses: ruby/setup-ruby@v1
41
+ uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
42
42
  with:
43
43
  ruby-version: 3.1
44
44
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- MovableInkAWS (2.11.6)
4
+ MovableInkAWS (2.11.7)
5
5
  aws-sdk-athena (~> 1)
6
6
  aws-sdk-autoscaling (~> 1)
7
7
  aws-sdk-cloudwatch (~> 1)
@@ -20,6 +20,7 @@ PATH
20
20
  diplomat (= 2.6.4)
21
21
  faraday (~> 2)
22
22
  httparty (= 0.23.1)
23
+ ostruct
23
24
 
24
25
  GEM
25
26
  remote: https://rubygems.org/
@@ -105,6 +106,7 @@ GEM
105
106
  logger (1.7.0)
106
107
  mini_mime (1.1.5)
107
108
  multi_xml (0.6.0)
109
+ ostruct (0.5.2)
108
110
  public_suffix (5.1.1)
109
111
  rexml (3.4.1)
110
112
  rspec (3.13.1)
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.add_runtime_dependency 'aws-sdk-sns', '~> 1'
27
27
  s.add_runtime_dependency 'aws-sdk-ssm', '~> 1'
28
28
  s.add_runtime_dependency 'aws-sigv4', '~> 1'
29
+ s.add_runtime_dependency 'ostruct'
29
30
  s.add_runtime_dependency 'httparty', '0.23.1'
30
31
  s.add_runtime_dependency 'diplomat', '2.6.4'
31
32
 
@@ -309,27 +309,31 @@ module MovableInk
309
309
  @unassigned_elastic_ips ||= elastic_ips.select { |address| address.association_id.nil? }
310
310
  end
311
311
 
312
- def available_elastic_ips(role:)
313
- unassigned_elastic_ips.select { |address| address.tags.detect { |t| t.key == 'mi:roles' && t.value == role } }
312
+ def available_elastic_ips(role:, eip_pool: nil)
313
+ if eip_pool
314
+ unassigned_elastic_ips.select { |address| address.tags.detect { |t| t.key == 'mi:eip-pool' && t.value == eip_pool } }
315
+ else
316
+ unassigned_elastic_ips.select { |address| address.tags.detect { |t| t.key == 'mi:roles' && t.value == role } }
317
+ end
314
318
  end
315
319
 
316
- def assign_ip_address_with_retries(role:, allow_reassociation: false)
320
+ def assign_ip_address_with_retries(role:, eip_pool: nil, allow_reassociation: false)
317
321
  response = nil
318
322
  run_with_backoff do
319
323
  response = ec2_with_retries.associate_address({
320
324
  instance_id: instance_id,
321
- allocation_id: available_elastic_ips(role: role).sample.allocation_id,
325
+ allocation_id: available_elastic_ips(role: role, eip_pool: eip_pool).sample.allocation_id,
322
326
  allow_reassociation: allow_reassociation
323
327
  })
324
328
  end
325
329
  response
326
330
  end
327
331
 
328
- def assign_ip_address(role:, allow_reassociation: false)
332
+ def assign_ip_address(role:, eip_pool: nil, allow_reassociation: false)
329
333
  run_with_backoff do
330
334
  ec2.associate_address({
331
335
  instance_id: instance_id,
332
- allocation_id: available_elastic_ips(role: role).sample.allocation_id,
336
+ allocation_id: available_elastic_ips(role: role, eip_pool: eip_pool).sample.allocation_id,
333
337
  allow_reassociation: allow_reassociation
334
338
  })
335
339
  end
@@ -1,5 +1,5 @@
1
1
  module MovableInk
2
2
  class AWS
3
- VERSION = '2.11.6'
3
+ VERSION = '2.11.7'
4
4
  end
5
5
  end
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.11.6
4
+ version: 2.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MI SRE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-23 00:00:00.000000000 Z
11
+ date: 2026-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -220,6 +220,20 @@ dependencies:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '1'
223
+ - !ruby/object:Gem::Dependency
224
+ name: ostruct
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: httparty
225
239
  requirement: !ruby/object:Gem::Requirement