firespring_dev_commands 2.1.23 → 2.1.24.pre.alpha.2

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
  SHA256:
3
- metadata.gz: e63ba948a4c8c755d644d4e651f14cd354b0b8086447134da735c9dfb1425b3d
4
- data.tar.gz: 4ffa7a76482a10e277f0c2be17f28dcbabe4eb9f9dbf21f49420d11329444beb
3
+ metadata.gz: eb2cf1870dd2e6e30d0dbd360bee8827c3bf8f748051a1692411e1a3d3324e71
4
+ data.tar.gz: d71152d34719d590445f2265d955faecfc502cb4864411a54fa4c26d2038b666
5
5
  SHA512:
6
- metadata.gz: 842d17d7290d5a1537766d76bb3c6935b57b19826fa70387af69730af796f684c50a05a85faebc04522da83a7368b128bf433ea6bd3d51c043da8472143f4233
7
- data.tar.gz: ffb4634e2a02c33ea2e16fb53785d0c72eec929ce439c86bea9b9ea98adb8e75689e25c614d495e5857b6e6fa8f7725621ac9bf9f430c38a5094653de8aaff64
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.sort_by(&:name).each(&:print_status)
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
- # Create the rake task for the eol method
97
+ # Set the EOL library to also check AWS resources
98
98
  def create_eol_task!
99
- # Have to set a local variable to be accessible inside of the instance_eval block
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
- desc 'Compares the current date to the EOL date for supported resources'
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
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '2.1.23'.freeze
9
+ VERSION = '2.1.24.pre.alpha.2'.freeze
10
10
  end
11
11
  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.23
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-10 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -406,9 +406,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
406
406
  version: '3.1'
407
407
  required_rubygems_version: !ruby/object:Gem::Requirement
408
408
  requirements:
409
- - - ">="
409
+ - - ">"
410
410
  - !ruby/object:Gem::Version
411
- version: '0'
411
+ version: 1.3.1
412
412
  requirements: []
413
413
  rubygems_version: 3.4.10
414
414
  signing_key: