firespring_dev_commands 2.1.26.pre.alpha.2 → 2.1.26.pre.alpha.3

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: b68163bb71bf29450c83939ecdc3181f8003ac39731839c0c67dd5808c2f9331
4
- data.tar.gz: c956a7f6c49ce1d0478df460e54d24a5c12598b4c24b905f959e489c289515f3
3
+ metadata.gz: e85fa03c8d3741894c226c3ea8b84616eebb28287ba855d4da44a242370200de
4
+ data.tar.gz: 8468adbf7fa2821686d14cce1efd1c083e1a732471ae90330c49f9e566af7c43
5
5
  SHA512:
6
- metadata.gz: 7f62bd98a204af676eb9bec3cf64c4783c20ad265115df7fbf4e13964a5f5bd9ce3ceb89f3ecb505c478f06fcab1b7635814ebeb999e62e133c63728bf6d7f7e
7
- data.tar.gz: 92b52d27ab0b6a15ebdb16098296259010284326d20719d45d10b41d4f0e73801ec00b1a48ad7f7a0cd941db47b4541bbdad7024cf593aff403324791908a8bb
6
+ metadata.gz: 3abd512246b31b86a045d84b19cddc4f0a193e0c76701dc26b19fa44b10b19a97aa054f2b29ee47d4d692c71e67e25c621a432825d8d1d14581ad14c237a7d83
7
+ data.tar.gz: 3cb0d1738d5ff0ad5a5e45e2af5371ca45c8ceeb2e55d9fdcbba7f29b4e91fa5cbfaa4989f20a966a2674f4d5fa920c2d1b0f2f387707bc3c2499ebbd61c8e2a
@@ -187,5 +187,13 @@ module Dev
187
187
  return false
188
188
  end
189
189
  end
190
+
191
+ # Center the string and pad on either side with the given padding character
192
+ def center_pad(string = '', pad: '-', len: 80)
193
+ center_dash = len / 2
194
+ string = string.to_s
195
+ center_str = string.length / 2
196
+ string.rjust(center_dash + center_str - 1, pad).ljust(len - 1, pad)
197
+ end
190
198
  end
191
199
  end
@@ -114,9 +114,9 @@ module Dev
114
114
 
115
115
  repo_basename = File.basename(File.realpath(project_dir))
116
116
  header = " #{repo_basename} (#{original_branches[project_dir]}) "
117
- puts center_pad(header).light_green
117
+ puts Dev::Common.new.center_pad(header).light_green
118
118
  @success &= status(dir: project_dir)
119
- puts center_pad.light_green
119
+ puts Dev::Common.new.center_pad.light_green
120
120
  end
121
121
  puts
122
122
 
@@ -166,9 +166,9 @@ module Dev
166
166
 
167
167
  repo_basename = File.basename(File.realpath(project_dir))
168
168
  header = " #{repo_basename} (#{original_branches[project_dir]}) "
169
- puts center_pad(header).light_green
169
+ puts Dev::Common.new.center_pad(header).light_green
170
170
  reset(dir: project_dir)
171
- puts center_pad.light_green
171
+ puts Dev::Common.new.center_pad.light_green
172
172
  end
173
173
  puts
174
174
  end
@@ -192,9 +192,9 @@ module Dev
192
192
 
193
193
  repo_basename = File.basename(File.realpath(project_dir))
194
194
  header = " #{repo_basename} "
195
- puts center_pad(header).light_green
195
+ puts Dev::Common.new.center_pad(header).light_green
196
196
  @success &= checkout(branch, dir: project_dir)
197
- puts center_pad.light_green
197
+ puts Dev::Common.new.center_pad.light_green
198
198
  end
199
199
  puts
200
200
 
@@ -286,9 +286,9 @@ module Dev
286
286
 
287
287
  repo_basename = File.basename(File.realpath(project_dir))
288
288
  header = " #{repo_basename} "
289
- puts center_pad(header).light_green
289
+ puts Dev::Common.new.center_pad(header).light_green
290
290
  @success &= merge(branch, dir: project_dir)
291
- puts center_pad.light_green
291
+ puts Dev::Common.new.center_pad.light_green
292
292
  end
293
293
  puts
294
294
 
@@ -335,9 +335,9 @@ module Dev
335
335
 
336
336
  repo_basename = File.basename(File.realpath(project_dir))
337
337
  header = " #{repo_basename} "
338
- puts center_pad(header).light_green
338
+ puts Dev::Common.new.center_pad(header).light_green
339
339
  @success &= pull(dir: project_dir)
340
- puts center_pad.light_green
340
+ puts Dev::Common.new.center_pad.light_green
341
341
  end
342
342
  puts
343
343
 
@@ -374,9 +374,9 @@ module Dev
374
374
 
375
375
  repo_basename = File.basename(File.realpath(project_dir))
376
376
  header = " #{repo_basename} "
377
- puts center_pad(header).light_green
377
+ puts Dev::Common.new.center_pad(header).light_green
378
378
  @success &= push(dir: project_dir)
379
- puts center_pad.light_green
379
+ puts Dev::Common.new.center_pad.light_green
380
380
  end
381
381
  puts
382
382
 
@@ -438,14 +438,6 @@ module Dev
438
438
  string.to_s.split("\n").each { |line| puts "#{padding}#{line}" }
439
439
  end
440
440
 
441
- # Center the string and pad on either side with the given padding character
442
- def center_pad(string = '', pad: '-', len: 80)
443
- center_dash = len / 2
444
- string = string.to_s
445
- center_str = string.length / 2
446
- string.rjust(center_dash + center_str - 1, pad).ljust(len - 1, pad)
447
- end
448
-
449
441
  # Exclude the command from the message and print all error lines
450
442
  private def print_errors(message)
451
443
  indent message.split('error:')[1..].join
@@ -90,14 +90,16 @@ module Dev
90
90
 
91
91
  # Build the bundle lint command
92
92
  def lint_command
93
- lint = ['rubocop']
93
+ lint = base_command
94
+ lint << 'exec' << 'rubocop'
94
95
  lint.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
95
96
  lint
96
97
  end
97
98
 
98
99
  # Build the bundle lint fix command
99
100
  def lint_fix_command
100
- lint_fix = ['rubocop']
101
+ lint_fix = base_command
102
+ lint_fix << 'exec' << 'rubocop'
101
103
  lint_fix << '-A'
102
104
  lint_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
103
105
  lint_fix
@@ -105,7 +107,8 @@ module Dev
105
107
 
106
108
  # Build the bundle test command
107
109
  def test_command
108
- test = ['rspec']
110
+ test = base_command
111
+ test << 'exec' << 'rspec'
109
112
  test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
110
113
  test
111
114
  end
@@ -98,7 +98,18 @@ module Dev
98
98
  def create_eol_task!
99
99
  return if exclude.include?(:eol)
100
100
 
101
- Dev::EndOfLife.config { |c| c.check_aws_resources = true }
101
+ Dev::EndOfLife.config do |c|
102
+ env_check = ENV.fetch('CHECK_AWS', nil).to_s.strip
103
+ if env_check == 'false'
104
+ c.check_aws_resources = false
105
+ else
106
+ c.check_aws_resources = true
107
+
108
+ task eol: %w(ensure_aws_credentials) do
109
+ # Require the user is logged in to aws since those resources will be checked
110
+ end
111
+ end
112
+ end
102
113
  end
103
114
  end
104
115
  end
@@ -29,6 +29,7 @@ module Dev
29
29
  end
30
30
 
31
31
  # Create the rake task which runs linting for the application name
32
+ # rubocop:disable Metrics/MethodLength
32
33
  def create_lint_task!
33
34
  application = @name
34
35
  node = @node
@@ -42,6 +43,13 @@ module Dev
42
43
  # This is just a placeholder to execute the dependencies
43
44
  end
44
45
 
46
+ namespace :lint do
47
+ desc 'Run all linting software and apply all available fixes'
48
+ task fix: %w(node:lint:fix) do
49
+ # This is just a placeholder to execute the dependencies
50
+ end
51
+ end
52
+
45
53
  namespace :node do
46
54
  desc "Run the node linting software against the #{application}'s codebase"
47
55
  task lint: %w(init_docker up_no_deps) do
@@ -66,6 +74,7 @@ module Dev
66
74
  end
67
75
  end
68
76
  end
77
+ # rubocop:enable Metrics/MethodLength
69
78
 
70
79
  # Create the rake task which runs all tests for the application name
71
80
  def create_test_task!
@@ -74,6 +74,7 @@ module Dev
74
74
  end
75
75
 
76
76
  # Create the rake task which runs linting for the application name
77
+ # rubocop:disable Metrics/MethodLength
77
78
  def create_lint_task!
78
79
  application = @name
79
80
  php = @php
@@ -87,6 +88,13 @@ module Dev
87
88
  # This is just a placeholder to execute the dependencies
88
89
  end
89
90
 
91
+ namespace :lint do
92
+ desc 'Run all linting software and apply all available fixes'
93
+ task fix: %w(php:lint:fix) do
94
+ # This is just a placeholder to execute the dependencies
95
+ end
96
+ end
97
+
90
98
  namespace :php do
91
99
  desc "Run the php linting software against the #{application}'s codebase"
92
100
  task lint: %w(init_docker up_no_deps) do
@@ -111,6 +119,7 @@ module Dev
111
119
  end
112
120
  end
113
121
  end
122
+ # rubocop:enable Metrics/MethodLength
114
123
 
115
124
  # Create the rake task which runs all tests for the application name
116
125
  def create_test_task!
@@ -28,6 +28,7 @@ module Dev
28
28
  end
29
29
 
30
30
  # Create the rake task which runs linting for the application name
31
+ # rubocop:disable Metrics/MethodLength
31
32
  def create_lint_task!
32
33
  application = @name
33
34
  ruby = @ruby
@@ -41,6 +42,13 @@ module Dev
41
42
  # This is just a placeholder to execute the dependencies
42
43
  end
43
44
 
45
+ namespace :lint do
46
+ desc 'Run all linting software and apply all available fixes'
47
+ task fix: %w(ruby:lint:fix) do
48
+ # This is just a placeholder to execute the dependencies
49
+ end
50
+ end
51
+
44
52
  namespace :ruby do
45
53
  desc "Run the ruby linting software against the #{application}'s codebase"
46
54
  task lint: %w(init_docker up_no_deps) do
@@ -65,6 +73,7 @@ module Dev
65
73
  end
66
74
  end
67
75
  end
76
+ # rubocop:enable Metrics/MethodLength
68
77
 
69
78
  # Create the rake task which runs all tests for the application name
70
79
  def create_test_task!
@@ -12,7 +12,8 @@ module Dev
12
12
  DEV_COMMANDS_TOP_LEVEL.instance_eval do
13
13
  return if exclude.include?(:eol)
14
14
 
15
- desc 'Compares the current date to the EOL date for all configured projects'
15
+ desc 'Compares the current date to the EOL date for all configured projects' \
16
+ "\n\toptionally specify CHECK_AWS=<true/false> to toggle whether AWS resources are checked for EOL (defaults to true)"
16
17
  task eol: %w(init) do
17
18
  Dev::EndOfLife.new.check
18
19
  end
@@ -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.26.pre.alpha.2'.freeze
9
+ VERSION = '2.1.26.pre.alpha.3'.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.26.pre.alpha.2
4
+ version: 2.1.26.pre.alpha.3
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-16 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport