firespring_dev_commands 2.1.24.pre.alpha.1 → 2.1.24.pre.alpha.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb2cf1870dd2e6e30d0dbd360bee8827c3bf8f748051a1692411e1a3d3324e71
|
4
|
+
data.tar.gz: d71152d34719d590445f2265d955faecfc502cb4864411a54fa4c26d2038b666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5040fae63fb2071356d149f22128aedd0fc4bed611431e1254d0eeff1f3b59b4d7656a1be78d502c5bd0a329c095cff050878f42722aac15d1d376b005313096
|
7
|
+
data.tar.gz: ed7695707e6d7fd6dfb7e8962a7001500fd2e62dc8844761ec2cc267e5fedcc023a20d61805fbf650dbd9bdeaed10578d5eb8b43f7a7c04d46c0086430d31b9d
|
@@ -5,8 +5,9 @@ module Dev
|
|
5
5
|
END_OF_LIFE_API_URL = 'https://endoflife.date/api'.freeze
|
6
6
|
|
7
7
|
# Config object for setting top level git config options
|
8
|
-
Config = Struct.new(:product_versions, :manual_dates) do
|
8
|
+
Config = Struct.new(:check_aws_resources, :product_versions, :manual_dates) do
|
9
9
|
def initialize
|
10
|
+
self.check_aws_resources = false
|
10
11
|
self.product_versions = []
|
11
12
|
self.manual_dates = {}
|
12
13
|
end
|
@@ -26,9 +27,10 @@ module Dev
|
|
26
27
|
alias_method :configure, :config
|
27
28
|
end
|
28
29
|
|
29
|
-
attr_accessor :url, :products, :product_versions
|
30
|
+
attr_accessor :url, :products, :check_aws_resources, :product_versions
|
30
31
|
|
31
|
-
def initialize(product_versions: self.class.config.product_versions)
|
32
|
+
def initialize(check_aws_resources: self.class.config.check_aws_resources, product_versions: self.class.config.product_versions)
|
33
|
+
@check_aws_resources = check_aws_resources
|
32
34
|
@product_versions = Array(product_versions)
|
33
35
|
raise 'product version must be of type Dev::EndOfLife::ProductVersions' unless @product_versions.all?(Dev::EndOfLife::ProductVersion)
|
34
36
|
end
|
@@ -50,7 +52,14 @@ module Dev
|
|
50
52
|
# Raises an error if any products are EOL
|
51
53
|
def check
|
52
54
|
puts
|
53
|
-
product_versions.
|
55
|
+
checks_to_perform = product_versions.clone
|
56
|
+
if check_aws_resources
|
57
|
+
account_id = Dev::Aws::Profile.new.current
|
58
|
+
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
59
|
+
LOG.info " Current AWS Account is #{account_name} (#{account_id})".light_yellow
|
60
|
+
checks_to_perform.concat(Dev::EndOfLife::Aws.new.default_products)
|
61
|
+
end
|
62
|
+
checks_to_perform.sort_by(&:name).each(&:print_status)
|
54
63
|
puts
|
55
64
|
raise 'found EOL versions' if product_versions.any?(&:eol)
|
56
65
|
end
|
@@ -94,23 +94,11 @@ module Dev
|
|
94
94
|
end
|
95
95
|
# rubocop:enable Metrics/MethodLength
|
96
96
|
|
97
|
-
#
|
97
|
+
# Set the EOL library to also check AWS resources
|
98
98
|
def create_eol_task!
|
99
|
-
|
100
|
-
exclude = @exclude
|
101
|
-
|
102
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
103
|
-
return if exclude.include?(:eol)
|
99
|
+
return if exclude.include?(:eol)
|
104
100
|
|
105
|
-
|
106
|
-
task eol: %w(init ensure_aws_credentials) do
|
107
|
-
account_id = Dev::Aws::Profile.new.current
|
108
|
-
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
109
|
-
LOG.info " Current AWS Account is #{account_name} (#{account_id})".light_yellow
|
110
|
-
|
111
|
-
Dev::EndOfLife.new(product_versions: Dev::EndOfLife::Aws.new.default_products).check
|
112
|
-
end
|
113
|
-
end
|
101
|
+
Dev::EndOfLife.config { |c| c.check_aws_resources = true }
|
114
102
|
end
|
115
103
|
end
|
116
104
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.24.pre.alpha.
|
4
|
+
version: 2.1.24.pre.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|