firespring_dev_commands 2.2.1.pre.alpha.4 → 2.5.0.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/firespring_dev_commands/audit/report.rb +2 -9
  4. data/lib/firespring_dev_commands/aws/cloudformation.rb +3 -10
  5. data/lib/firespring_dev_commands/common.rb +2 -22
  6. data/lib/firespring_dev_commands/docker/status.rb +0 -20
  7. data/lib/firespring_dev_commands/docker.rb +16 -86
  8. data/lib/firespring_dev_commands/eol/aws.rb +2 -10
  9. data/lib/firespring_dev_commands/eol.rb +2 -22
  10. data/lib/firespring_dev_commands/git.rb +24 -37
  11. data/lib/firespring_dev_commands/jira/issue.rb +1 -3
  12. data/lib/firespring_dev_commands/node.rb +1 -1
  13. data/lib/firespring_dev_commands/php.rb +12 -28
  14. data/lib/firespring_dev_commands/platform.rb +31 -38
  15. data/lib/firespring_dev_commands/ruby.rb +3 -6
  16. data/lib/firespring_dev_commands/target_process/query.rb +4 -30
  17. data/lib/firespring_dev_commands/target_process/release.rb +1 -1
  18. data/lib/firespring_dev_commands/target_process/team_assignment.rb +1 -1
  19. data/lib/firespring_dev_commands/target_process/user.rb +1 -13
  20. data/lib/firespring_dev_commands/target_process/user_story.rb +1 -1
  21. data/lib/firespring_dev_commands/target_process/user_story_history.rb +1 -1
  22. data/lib/firespring_dev_commands/target_process.rb +7 -24
  23. data/lib/firespring_dev_commands/templates/aws.rb +6 -17
  24. data/lib/firespring_dev_commands/templates/base_interface.rb +2 -2
  25. data/lib/firespring_dev_commands/templates/docker/application.rb +2 -2
  26. data/lib/firespring_dev_commands/templates/docker/node/application.rb +5 -55
  27. data/lib/firespring_dev_commands/templates/docker/php/application.rb +16 -58
  28. data/lib/firespring_dev_commands/templates/docker/ruby/application.rb +5 -54
  29. data/lib/firespring_dev_commands/templates/eol.rb +2 -9
  30. data/lib/firespring_dev_commands/templates/git.rb +0 -165
  31. data/lib/firespring_dev_commands/version.rb +1 -1
  32. data/lib/firespring_dev_commands.rb +1 -1
  33. metadata +35 -96
  34. data/lib/firespring_dev_commands/aws/route53.rb +0 -107
  35. data/lib/firespring_dev_commands/bloom_growth/rock.rb +0 -34
  36. data/lib/firespring_dev_commands/bloom_growth/seat.rb +0 -16
  37. data/lib/firespring_dev_commands/bloom_growth/user.rb +0 -43
  38. data/lib/firespring_dev_commands/bloom_growth.rb +0 -132
  39. data/lib/firespring_dev_commands/certificate.rb +0 -59
  40. data/lib/firespring_dev_commands/coverage/base.rb +0 -16
  41. data/lib/firespring_dev_commands/coverage/cobertura.rb +0 -86
  42. data/lib/firespring_dev_commands/coverage/none.rb +0 -21
  43. data/lib/firespring_dev_commands/docker/desktop.rb +0 -59
  44. data/lib/firespring_dev_commands/eol/node.rb +0 -37
  45. data/lib/firespring_dev_commands/eol/php.rb +0 -45
  46. data/lib/firespring_dev_commands/eol/ruby.rb +0 -37
  47. data/lib/firespring_dev_commands/jira/parent.rb +0 -19
  48. data/lib/firespring_dev_commands/os.rb +0 -35
  49. data/lib/firespring_dev_commands/port.rb +0 -24
  50. data/lib/firespring_dev_commands/target_process/time.rb +0 -32
  51. data/lib/firespring_dev_commands/templates/aws/services/route53.rb +0 -106
  52. data/lib/firespring_dev_commands/templates/certificate.rb +0 -41
@@ -7,28 +7,15 @@ module Dev
7
7
  module Ruby
8
8
  # Class for default rake tasks associated with a ruby project
9
9
  class Application < Dev::Template::ApplicationInterface
10
- attr_reader :ruby, :start_container_dependencies_on_test
11
-
12
- # Create the templated rake tasks for the ruby application
13
- #
14
- # @param application [String] The name of the application
15
- # @param container_path [String] The path to the application inside of the container
16
- # @param local_path [String] The path to the application on your local system
17
- # @param start_container_dependencies_on_test [Boolean] Whether or not to start up container dependencies when running tests
18
- def initialize(
19
- application,
20
- container_path: nil,
21
- local_path: nil,
22
- start_container_dependencies_on_test: true,
23
- exclude: []
24
- )
10
+ attr_reader :ruby
11
+
12
+ # Allow for custom container path for the application
13
+ def initialize(application, container_path: nil, local_path: nil, exclude: [])
25
14
  @ruby = Dev::Ruby.new(container_path:, local_path:)
26
- @start_container_dependencies_on_test = start_container_dependencies_on_test
27
15
  super(application, exclude:)
28
16
  end
29
17
 
30
18
  # Create the rake task which runs linting for the application name
31
- # rubocop:disable Metrics/MethodLength
32
19
  def create_lint_task!
33
20
  application = @name
34
21
  ruby = @ruby
@@ -42,13 +29,6 @@ module Dev
42
29
  # This is just a placeholder to execute the dependencies
43
30
  end
44
31
 
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
-
52
32
  namespace :ruby do
53
33
  desc "Run the ruby linting software against the #{application}'s codebase"
54
34
  task lint: %w(init_docker up_no_deps) do
@@ -73,14 +53,12 @@ module Dev
73
53
  end
74
54
  end
75
55
  end
76
- # rubocop:enable Metrics/MethodLength
77
56
 
78
57
  # Create the rake task which runs all tests for the application name
79
58
  def create_test_task!
80
59
  application = @name
81
60
  ruby = @ruby
82
61
  exclude = @exclude
83
- up_cmd = @start_container_dependencies_on_test ? :up : :up_no_deps
84
62
  return if exclude.include?(:test)
85
63
 
86
64
  DEV_COMMANDS_TOP_LEVEL.instance_eval do
@@ -92,7 +70,7 @@ module Dev
92
70
 
93
71
  namespace :ruby do
94
72
  desc "Run all ruby tests against the #{application}'s codebase"
95
- task test: %W(init_docker #{up_cmd}) do
73
+ task test: %w(init_docker up_no_deps) do
96
74
  LOG.debug("Running all ruby tests in the #{application} codebase")
97
75
 
98
76
  options = []
@@ -163,33 +141,6 @@ module Dev
163
141
  end
164
142
  end
165
143
  end
166
-
167
- # Create the rake task for the ruby eol method
168
- def create_eol_task!
169
- # Have to set a local variable to be accessible inside of the instance_eval block
170
- exclude = @exclude
171
- ruby = @ruby
172
-
173
- DEV_COMMANDS_TOP_LEVEL.instance_eval do
174
- return if exclude.include?(:eol)
175
-
176
- task eol: [:'eol:ruby'] do
177
- # This is just a placeholder to execute the dependencies
178
- end
179
-
180
- namespace :eol do
181
- desc 'Compares the current date to the EOL date for supported packages in the ruby package file'
182
- task ruby: %w(init) do
183
- eol = Dev::EndOfLife::Ruby.new(ruby)
184
- ruby_products = eol.default_products
185
-
186
- puts
187
- puts "Ruby product versions (in #{eol.lockfile})".light_yellow
188
- Dev::EndOfLife.new(product_versions: ruby_products).status
189
- end
190
- end
191
- end
192
- end
193
144
  end
194
145
  end
195
146
  end
@@ -12,16 +12,9 @@ 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' \
16
- "\n\toptionally specify CHECK_AWS=<true/false> to toggle whether AWS resources are checked for EOL (defaults to true)"
15
+ desc 'Compares the current date to the EOL date for all configured projects'
17
16
  task eol: %w(init) do
18
- manual_products = Dev::EndOfLife.new.product_versions
19
- next if manual_products.empty?
20
-
21
- puts
22
- puts 'Manual product versions'
23
- Dev::EndOfLife.new(product_versions: manual_products).status
24
- puts
17
+ Dev::EndOfLife.new.check
25
18
  end
26
19
  end
27
20
  end
@@ -4,23 +4,6 @@ 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
-
24
7
  # Create the rake task for the git checkout method
25
8
  def create_checkout_task!
26
9
  # Have to set a local variable to be accessible inside of the instance_eval block
@@ -159,154 +142,6 @@ module Dev
159
142
  end
160
143
  end
161
144
  end
162
-
163
- # Create the rake task for the git commit status pending task.
164
- def create_commit_status_pending_task!
165
- # Have to set a local variable to be accessible inside of the instance_eval block
166
- exclude = @exclude
167
-
168
- DEV_COMMANDS_TOP_LEVEL.instance_eval do
169
- namespace :git do
170
- return if exclude.include?(:commit_status)
171
-
172
- namespace :commit_status do
173
- desc 'Add pending status to commit' \
174
- "\n\tuse GITHUB_TOKEN=abc123 enables write options for the check (required)" \
175
- "\n\tuse REPOSITORY=abc123 to specify the repository (required)" \
176
- "\n\tuse COMMIT_ID=abc123 to specify the commit id of code (required)" \
177
- "\n\tuse CONTEXT=abc123 names the check on the PR (optional)" \
178
- "\n\tuse TARGET_URL={url} adds 'detail' hyperlink to check on the PR (optional)"
179
- task :pending do
180
- status = 'pending'
181
- token = ENV['GITHUB_TOKEN'].to_s.strip
182
- repo_org, repo_name = ENV['REPOSITORY'].to_s.strip.split('/')
183
- commit_id = ENV['COMMIT_ID'].to_s.strip
184
-
185
- raise 'GITHUB_TOKEN is required' unless token
186
- raise 'REPOSITORY is required' unless repo_name
187
- raise 'COMMIT_ID is required' unless commit_id
188
-
189
- options = {}
190
- options[:context] = ENV['CONTEXT'].to_s.strip unless ENV['CONTEXT'].to_s.strip.empty?
191
- options[:target_url] = ENV['TARGET_URL'].to_s.strip unless ENV['TARGET_URL'].to_s.strip.empty?
192
-
193
- Dev::Git.new.commit_status(token:, repo_name:, commit_id:, status:, repo_org:, options:)
194
- end
195
- end
196
- end
197
- end
198
- end
199
-
200
- # Create the rake task for the git commit status success task.
201
- def create_commit_status_success_task!
202
- # Have to set a local variable to be accessible inside of the instance_eval block
203
- exclude = @exclude
204
-
205
- DEV_COMMANDS_TOP_LEVEL.instance_eval do
206
- namespace :git do
207
- return if exclude.include?(:commit_status)
208
-
209
- namespace :commit_status do
210
- desc 'Add success status to commit' \
211
- "\n\tuse GITHUB_TOKEN=abc123 enables write options for the check (required)" \
212
- "\n\tuse REPOSITORY=abc123 to specify the repository (required)" \
213
- "\n\tuse COMMIT_ID=abc123 to specify the commit id of code (required)" \
214
- "\n\tuse CONTEXT=abc123 names the check on the PR (optional)" \
215
- "\n\tuse TARGET_URL={url} adds 'detail' hyperlink to check on the PR (optional)"
216
- task :success do
217
- status = 'success'
218
- token = ENV['GITHUB_TOKEN'].to_s.strip
219
- repo_org, repo_name = ENV['REPOSITORY'].to_s.strip.split('/')
220
- commit_id = ENV['COMMIT_ID'].to_s.strip
221
-
222
- raise 'GITHUB_TOKEN is required' unless token
223
- raise 'REPOSITORY is required' unless repo_name
224
- raise 'COMMIT_ID is required' unless commit_id
225
-
226
- options = {}
227
- options[:context] = ENV['CONTEXT'].to_s.strip unless ENV['CONTEXT'].to_s.strip.empty?
228
- options[:target_url] = ENV['TARGET_URL'].to_s.strip unless ENV['TARGET_URL'].to_s.strip.empty?
229
-
230
- Dev::Git.new.commit_status(token:, repo_name:, commit_id:, status:, repo_org:, options:)
231
- end
232
- end
233
- end
234
- end
235
- end
236
-
237
- # Create the rake task for the git commit status error task.
238
- def create_commit_status_error_task!
239
- # Have to set a local variable to be accessible inside of the instance_eval block
240
- exclude = @exclude
241
-
242
- DEV_COMMANDS_TOP_LEVEL.instance_eval do
243
- namespace :git do
244
- return if exclude.include?(:commit_status)
245
-
246
- namespace :commit_status do
247
- desc 'Add error status to commit' \
248
- "\n\tuse GITHUB_TOKEN=abc123 enables write options for the check (required)" \
249
- "\n\tuse REPOSITORY=abc123 to specify the repository (required)" \
250
- "\n\tuse COMMIT_ID=abc123 to specify the commit id of code (required)" \
251
- "\n\tuse CONTEXT=abc123 names the check on the PR (optional)" \
252
- "\n\tuse TARGET_URL={url} adds 'detail' hyperlink to check on the PR (optional)"
253
- task :error do
254
- status = 'error'
255
- token = ENV['GITHUB_TOKEN'].to_s.strip
256
- repo_org, repo_name = ENV['REPOSITORY'].to_s.strip.split('/')
257
- commit_id = ENV['COMMIT_ID'].to_s.strip
258
-
259
- raise 'GITHUB_TOKEN is required' unless token
260
- raise 'REPOSITORY is required' unless repo_name
261
- raise 'COMMIT_ID is required' unless commit_id
262
-
263
- options = {}
264
- options[:context] = ENV['CONTEXT'].to_s.strip unless ENV['CONTEXT'].to_s.strip.empty?
265
- options[:target_url] = ENV['TARGET_URL'].to_s.strip unless ENV['TARGET_URL'].to_s.strip.empty?
266
-
267
- Dev::Git.new.commit_status(token:, repo_name:, commit_id:, status:, repo_org:, options:)
268
- end
269
- end
270
- end
271
- end
272
- end
273
-
274
- # Create the rake task for the git commit status failure task.
275
- def create_commit_status_failure_task!
276
- # Have to set a local variable to be accessible inside of the instance_eval block
277
- exclude = @exclude
278
-
279
- DEV_COMMANDS_TOP_LEVEL.instance_eval do
280
- namespace :git do
281
- return if exclude.include?(:commit_status)
282
-
283
- namespace :commit_status do
284
- desc 'Add failure status to commit' \
285
- "\n\tuse GITHUB_TOKEN=abc123 enables write options for the check (required)" \
286
- "\n\tuse REPOSITORY=abc123 to specify the repository (required)" \
287
- "\n\tuse COMMIT_ID=abc123 to specify the commit id of code (required)" \
288
- "\n\tuse CONTEXT=abc123 names the check on the PR (optional)" \
289
- "\n\tuse TARGET_URL={url} adds 'detail' hyperlink to check on the PR (optional)"
290
- task :failure do
291
- status = 'failure'
292
- token = ENV['GITHUB_TOKEN'].to_s.strip
293
- repo_org, repo_name = ENV['REPOSITORY'].to_s.strip.split('/')
294
- commit_id = ENV['COMMIT_ID'].to_s.strip
295
-
296
- raise 'GITHUB_TOKEN is required' unless token
297
- raise 'REPOSITORY is required' unless repo_name
298
- raise 'COMMIT_ID is required' unless commit_id
299
-
300
- options = {}
301
- options[:context] = ENV['CONTEXT'].to_s.strip unless ENV['CONTEXT'].to_s.strip.empty?
302
- options[:target_url] = ENV['TARGET_URL'].to_s.strip unless ENV['TARGET_URL'].to_s.strip.empty?
303
-
304
- Dev::Git.new.commit_status(token:, repo_name:, commit_id:, status:, repo_org:, options:)
305
- end
306
- end
307
- end
308
- end
309
- end
310
145
  end
311
146
  end
312
147
  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.2.1.pre.alpha.4'.freeze
9
+ VERSION = '2.5.0.pre.alpha.1'.freeze
10
10
  end
11
11
  end
@@ -11,7 +11,7 @@ DEV_COMMANDS_TOP_LEVEL = self
11
11
 
12
12
  # Load all gems referenced in the Gemfile
13
13
  require 'bundler'
14
- Bundler.require(:default)
14
+ Bundler.require
15
15
 
16
16
  # Add libdir to the default ruby path
17
17
  libdir = File.realpath(File.dirname(__FILE__))