firespring_dev_commands 2.1.25 → 2.1.26.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: b68163bb71bf29450c83939ecdc3181f8003ac39731839c0c67dd5808c2f9331
|
4
|
+
data.tar.gz: c956a7f6c49ce1d0478df460e54d24a5c12598b4c24b905f959e489c289515f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f62bd98a204af676eb9bec3cf64c4783c20ad265115df7fbf4e13964a5f5bd9ce3ceb89f3ecb505c478f06fcab1b7635814ebeb999e62e133c63728bf6d7f7e
|
7
|
+
data.tar.gz: 92b52d27ab0b6a15ebdb16098296259010284326d20719d45d10b41d4f0e73801ec00b1a48ad7f7a0cd941db47b4541bbdad7024cf593aff403324791908a8bb
|
@@ -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})\n".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
|
@@ -4,6 +4,23 @@ module Dev
|
|
4
4
|
module Template
|
5
5
|
# Class contains rake templates for managing your git project
|
6
6
|
class Git < Dev::Template::BaseInterface
|
7
|
+
# Create the rake task for cloning all defined repos
|
8
|
+
def create_clone_task!
|
9
|
+
# Have to set a local variable to be accessible inside of the instance_eval block
|
10
|
+
exclude = @exclude
|
11
|
+
|
12
|
+
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
13
|
+
namespace :git do
|
14
|
+
return if exclude.include?(:clone)
|
15
|
+
|
16
|
+
desc 'Make sure all repos are cloned'
|
17
|
+
task :clone do
|
18
|
+
Dev::Git.new.clone_repos
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
7
24
|
# Create the rake task for the git checkout method
|
8
25
|
def create_checkout_task!
|
9
26
|
# Have to set a local variable to be accessible inside of the instance_eval block
|
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.
|
4
|
+
version: 2.1.26.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-02-
|
11
|
+
date: 2024-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -409,9 +409,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
409
409
|
version: '3.1'
|
410
410
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
411
411
|
requirements:
|
412
|
-
- - "
|
412
|
+
- - ">"
|
413
413
|
- !ruby/object:Gem::Version
|
414
|
-
version:
|
414
|
+
version: 1.3.1
|
415
415
|
requirements: []
|
416
416
|
rubygems_version: 3.4.10
|
417
417
|
signing_key:
|