infopark-aws_utils 0.5.0 → 0.6.0

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
  SHA1:
3
- metadata.gz: 3127256fb77c8ea8965a58acd4a1913e257046a3
4
- data.tar.gz: 07b73f8cb44c245506b312b00586c0f045f54a8d
3
+ metadata.gz: 5e4eda7134849d7d411e0fd9163df8c56ac911c6
4
+ data.tar.gz: c512370d7a63a4ba0cf01657efc72dfccf684030
5
5
  SHA512:
6
- metadata.gz: 51589ba5d0f959e2c021b97deb6134332625ebccf115e26b2eeabf0653480c4e6858eb8be64928b1b562ede711125c1df7de1e4ac91bf34d6718d12519593734
7
- data.tar.gz: b7730823788aac144a667ef7005304072c3c8fe7239495648be8a9f44e15eeab3a1d4f8ec34b7b9d1210d17f258703f269710865fc88a8577ee03d499cb3a164
6
+ metadata.gz: 75352c70287394b1f55fa1bb54f6c662d6d5bab945630fc6ef44650062d2f6c52952497a4ec4898b83c126c5104f094a83ce2221436983a2abd934802d9dd483
7
+ data.tar.gz: 629523227982d924ab0afce3b9495bbcbf5fe3fb95944a7dbe69ab7905649a19f6900ae5af2c4a18b208026d034955d5f1f41db8894fed4b1c6022798ea4ba21
@@ -86,7 +86,7 @@ class Env
86
86
  account?(PROD_ACCOUNT_ID)
87
87
  end
88
88
 
89
- def latest_base_image(root_device_type: :instance)
89
+ def latest_base_image(root_device_type: :instance, reject_image_name_patterns: nil)
90
90
  root_device_filter_value =
91
91
  case root_device_type
92
92
  when :instance
@@ -108,6 +108,9 @@ class Env
108
108
  .reject {|image| image.name.include?("-minimal-") }
109
109
  .reject {|image| image.name.include?("-test") }
110
110
  .reject {|image| image.name.include?("amzn-ami-vpc-nat-") }
111
+ (reject_image_name_patterns || []) do |pattern|
112
+ available_images.reject! {|image| image.name =~ pattern }
113
+ end
111
114
  available_images.sort_by(&:creation_date).last
112
115
  end
113
116
 
@@ -1,5 +1,5 @@
1
1
  module Infopark
2
2
  module AwsUtils
3
- VERSION = "0.5.0"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark-aws_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Prütz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-15 00:00:00.000000000 Z
11
+ date: 2018-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-applicationautoscaling