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

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.
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 +4 -24
  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 +23 -19
  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 -17
  31. data/lib/firespring_dev_commands/version.rb +1 -1
  32. data/lib/firespring_dev_commands.rb +1 -1
  33. metadata +35 -68
  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
@@ -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.1'.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__))
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.2.1.pre.alpha.1
4
+ version: 2.5.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-10 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,168 +16,154 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 7.1.2
19
+ version: 7.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 7.1.2
26
+ version: 7.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk-cloudformation
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.97.0
33
+ version: 1.83.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.97.0
40
+ version: 1.83.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: aws-sdk-codepipeline
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.67.0
47
+ version: 1.59.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.67.0
54
+ version: 1.59.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aws-sdk-ecr
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.68.0
61
+ version: 1.61.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.68.0
68
+ version: 1.61.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: aws-sdk-elasticache
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.95.0
75
+ version: 1.88.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.95.0
82
+ version: 1.88.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: aws-sdk-lambda
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.113.0
89
+ version: 1.101.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.113.0
96
+ version: 1.101.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: aws-sdk-opensearchservice
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.33.0
103
+ version: 1.24.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.33.0
110
+ version: 1.24.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: aws-sdk-rds
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.208.0
117
+ version: 1.183.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.208.0
125
- - !ruby/object:Gem::Dependency
126
- name: aws-sdk-route53
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 1.87.0
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 1.87.0
124
+ version: 1.183.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: aws-sdk-s3
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 1.141.0
131
+ version: 1.127.0
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 1.141.0
138
+ version: 1.127.0
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: aws-sdk-ssm
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
143
  - - "~>"
158
144
  - !ruby/object:Gem::Version
159
- version: 1.162.0
145
+ version: 1.154.0
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
150
  - - "~>"
165
151
  - !ruby/object:Gem::Version
166
- version: 1.162.0
152
+ version: 1.154.0
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: aws-sdk-sts
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: 1.11.0
159
+ version: 1.10.0
174
160
  type: :runtime
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: 1.11.0
166
+ version: 1.10.0
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: colorize
183
169
  requirement: !ruby/object:Gem::Requirement
@@ -263,61 +249,61 @@ dependencies:
263
249
  - !ruby/object:Gem::Version
264
250
  version: 2.3.0
265
251
  - !ruby/object:Gem::Dependency
266
- name: ox
252
+ name: libxml-ruby
267
253
  requirement: !ruby/object:Gem::Requirement
268
254
  requirements:
269
- - - "~>"
255
+ - - '='
270
256
  - !ruby/object:Gem::Version
271
- version: 2.14.17
257
+ version: 4.1.1
272
258
  type: :runtime
273
259
  prerelease: false
274
260
  version_requirements: !ruby/object:Gem::Requirement
275
261
  requirements:
276
- - - "~>"
262
+ - - '='
277
263
  - !ruby/object:Gem::Version
278
- version: 2.14.17
264
+ version: 4.1.1
279
265
  - !ruby/object:Gem::Dependency
280
266
  name: public_suffix
281
267
  requirement: !ruby/object:Gem::Requirement
282
268
  requirements:
283
269
  - - '='
284
270
  - !ruby/object:Gem::Version
285
- version: 5.0.4
271
+ version: 5.0.1
286
272
  type: :runtime
287
273
  prerelease: false
288
274
  version_requirements: !ruby/object:Gem::Requirement
289
275
  requirements:
290
276
  - - '='
291
277
  - !ruby/object:Gem::Version
292
- version: 5.0.4
278
+ version: 5.0.1
293
279
  - !ruby/object:Gem::Dependency
294
280
  name: rake
295
281
  requirement: !ruby/object:Gem::Requirement
296
282
  requirements:
297
283
  - - "~>"
298
284
  - !ruby/object:Gem::Version
299
- version: 13.1.0
285
+ version: 13.0.6
300
286
  type: :runtime
301
287
  prerelease: false
302
288
  version_requirements: !ruby/object:Gem::Requirement
303
289
  requirements:
304
290
  - - "~>"
305
291
  - !ruby/object:Gem::Version
306
- version: 13.1.0
292
+ version: 13.0.6
307
293
  - !ruby/object:Gem::Dependency
308
294
  name: slack-ruby-client
309
295
  requirement: !ruby/object:Gem::Requirement
310
296
  requirements:
311
297
  - - "~>"
312
298
  - !ruby/object:Gem::Version
313
- version: 2.2.0
299
+ version: 2.1.0
314
300
  type: :runtime
315
301
  prerelease: false
316
302
  version_requirements: !ruby/object:Gem::Requirement
317
303
  requirements:
318
304
  - - "~>"
319
305
  - !ruby/object:Gem::Version
320
- version: 2.2.0
306
+ version: 2.1.0
321
307
  description: Ruby library for creating/maintaining your development environment
322
308
  email: opensource@firespring.com
323
309
  executables: []
@@ -340,49 +326,33 @@ files:
340
326
  - lib/firespring_dev_commands/aws/login.rb
341
327
  - lib/firespring_dev_commands/aws/parameter.rb
342
328
  - lib/firespring_dev_commands/aws/profile.rb
343
- - lib/firespring_dev_commands/aws/route53.rb
344
329
  - lib/firespring_dev_commands/aws/s3.rb
345
- - lib/firespring_dev_commands/bloom_growth.rb
346
- - lib/firespring_dev_commands/bloom_growth/rock.rb
347
- - lib/firespring_dev_commands/bloom_growth/seat.rb
348
- - lib/firespring_dev_commands/bloom_growth/user.rb
349
330
  - lib/firespring_dev_commands/boolean.rb
350
- - lib/firespring_dev_commands/certificate.rb
351
331
  - lib/firespring_dev_commands/common.rb
352
- - lib/firespring_dev_commands/coverage/base.rb
353
- - lib/firespring_dev_commands/coverage/cobertura.rb
354
- - lib/firespring_dev_commands/coverage/none.rb
355
332
  - lib/firespring_dev_commands/daterange.rb
356
333
  - lib/firespring_dev_commands/docker.rb
357
334
  - lib/firespring_dev_commands/docker/compose.rb
358
- - lib/firespring_dev_commands/docker/desktop.rb
359
335
  - lib/firespring_dev_commands/docker/status.rb
360
336
  - lib/firespring_dev_commands/dotenv.rb
361
337
  - lib/firespring_dev_commands/env.rb
362
338
  - lib/firespring_dev_commands/eol.rb
363
339
  - lib/firespring_dev_commands/eol/aws.rb
364
- - lib/firespring_dev_commands/eol/node.rb
365
- - lib/firespring_dev_commands/eol/php.rb
366
340
  - lib/firespring_dev_commands/eol/product_version.rb
367
- - lib/firespring_dev_commands/eol/ruby.rb
368
341
  - lib/firespring_dev_commands/git.rb
369
342
  - lib/firespring_dev_commands/git/info.rb
370
343
  - lib/firespring_dev_commands/jira.rb
371
344
  - lib/firespring_dev_commands/jira/histories.rb
372
345
  - lib/firespring_dev_commands/jira/history.rb
373
346
  - lib/firespring_dev_commands/jira/issue.rb
374
- - lib/firespring_dev_commands/jira/parent.rb
375
347
  - lib/firespring_dev_commands/jira/project.rb
376
348
  - lib/firespring_dev_commands/jira/user.rb
377
349
  - lib/firespring_dev_commands/jira/user/type.rb
378
350
  - lib/firespring_dev_commands/logger.rb
379
351
  - lib/firespring_dev_commands/node.rb
380
352
  - lib/firespring_dev_commands/node/audit.rb
381
- - lib/firespring_dev_commands/os.rb
382
353
  - lib/firespring_dev_commands/php.rb
383
354
  - lib/firespring_dev_commands/php/audit.rb
384
355
  - lib/firespring_dev_commands/platform.rb
385
- - lib/firespring_dev_commands/port.rb
386
356
  - lib/firespring_dev_commands/rake.rb
387
357
  - lib/firespring_dev_commands/ruby.rb
388
358
  - lib/firespring_dev_commands/ruby/audit.rb
@@ -398,14 +368,11 @@ files:
398
368
  - lib/firespring_dev_commands/target_process/release.rb
399
369
  - lib/firespring_dev_commands/target_process/team.rb
400
370
  - lib/firespring_dev_commands/target_process/team_assignment.rb
401
- - lib/firespring_dev_commands/target_process/time.rb
402
371
  - lib/firespring_dev_commands/target_process/user.rb
403
372
  - lib/firespring_dev_commands/target_process/user_story.rb
404
373
  - lib/firespring_dev_commands/target_process/user_story_history.rb
405
374
  - lib/firespring_dev_commands/templates/aws.rb
406
- - lib/firespring_dev_commands/templates/aws/services/route53.rb
407
375
  - lib/firespring_dev_commands/templates/base_interface.rb
408
- - lib/firespring_dev_commands/templates/certificate.rb
409
376
  - lib/firespring_dev_commands/templates/ci.rb
410
377
  - lib/firespring_dev_commands/templates/config.rb
411
378
  - lib/firespring_dev_commands/templates/docker/application.rb
@@ -1,107 +0,0 @@
1
- module Dev
2
- class Aws
3
- # Class for performing Route53 functions
4
- class Route53
5
- attr_reader :client
6
-
7
- def initialize(domains)
8
- @client = ::Aws::Route53::Client.new
9
- @domains = domains
10
- end
11
-
12
- private def zones
13
- if @domains.empty?
14
- all_zones
15
- else
16
- zones_by_domain_names(@domains)
17
- end
18
- end
19
-
20
- private def all_zones
21
- [].tap do |ary|
22
- Dev::Aws.each_page(client, :list_hosted_zones) do |response|
23
- response.hosted_zones&.each do |hosted_zone|
24
- ary << hosted_zone unless hosted_zone.config.private_zone
25
- end
26
- end
27
- end
28
- end
29
-
30
- private def zones_by_domain_names(domains)
31
- [].tap do |ary|
32
- domains.each do |domain_name|
33
- response = client.list_hosted_zones_by_name({dns_name: domain_name})
34
- target = response.hosted_zones.find { |it| it.name.chomp('.') == domain_name }
35
- raise "The #{domain_name} hosted zone not found." unless target
36
-
37
- ary << target
38
- end
39
- end
40
- end
41
-
42
- private def target_config_id(zone_id)
43
- client.list_query_logging_configs(
44
- hosted_zone_id: zone_id,
45
- max_results: '1'
46
- ).query_logging_configs&.first&.id
47
- end
48
-
49
- private def pretty_puts(output)
50
- # Find the maximum length of the keys
51
- max_key_length = output.keys.map(&:to_s).max_by(&:length).length
52
-
53
- output.each do |key, value|
54
- puts "#{key.to_s.ljust(max_key_length)}\t=>\t#{value}"
55
- end
56
- end
57
-
58
- def list_query_configs
59
- output = {}
60
- zones.each do |zone|
61
- target_config_id = target_config_id(zone.id)
62
-
63
- output[zone.name] = if target_config_id
64
- "Config\t=>\t#{target_config_id}".colorize(:green)
65
- else
66
- 'No query logging config assigned.'.colorize(:red)
67
- end
68
- end
69
-
70
- pretty_puts(output)
71
- end
72
-
73
- def activate_query_logging(log_group)
74
- output = {}
75
-
76
- zones.each do |zone|
77
- response = client.create_query_logging_config(
78
- hosted_zone_id: zone.id,
79
- cloud_watch_logs_log_group_arn: log_group
80
- )
81
- output[zone.id] = response.location
82
- rescue ::Aws::Route53::Errors::ServiceError => e
83
- raise "Error: #{e.message}" unless e.instance_of?(::Aws::Route53::Errors::QueryLoggingConfigAlreadyExists)
84
-
85
- output[zone.id] = e.message
86
- end
87
- pretty_puts(output)
88
- end
89
-
90
- def deactivate_query_logging
91
- output = {}
92
- zones.each do |zone|
93
- target_config_id = target_config_id(zone.id)
94
- if target_config_id
95
- client.delete_query_logging_config(
96
- id: target_config_id
97
- )
98
- output[zone.id] = 'Query logging config removed.'.colorize(:green)
99
- else
100
- output[zone.id] = 'No query logging config assigned.'.colorize(:red)
101
- end
102
- end
103
- pretty_puts(output)
104
- end
105
- end
106
- end
107
- end
@@ -1,34 +0,0 @@
1
- module Dev
2
- class BloomGrowth
3
- # Class containing rock information
4
- class Rock
5
- attr_accessor :data, :id, :type, :name, :owner, :complete, :completion_id, :created, :due
6
- attr_reader :state
7
-
8
- def initialize(data)
9
- @data = data
10
- @id = data['Id']
11
- @type = data['Type']
12
- @name = data['Name'].to_s.strip
13
- @owner = User.new(data['Owner']) if data['Owner']
14
- @complete = data['Complete']
15
- @completion_id = data['Completion']
16
- @created = Time.parse(data['CreateTime']) if data['CreateTime']
17
- @due = Time.parse(data['DueDate']) if data['DueDate']
18
- @archived = data['Archived']
19
- end
20
-
21
- # Convert the completion_id bloom growth gives us into a text version
22
- def state
23
- case completion_id
24
- when 0
25
- 'Off Track'
26
- when 1
27
- 'On Track'
28
- when 2
29
- 'Complete'
30
- end
31
- end
32
- end
33
- end
34
- end
@@ -1,16 +0,0 @@
1
- module Dev
2
- class BloomGrowth
3
- # Class containing seat information
4
- class Seat
5
- attr_accessor :data, :id, :type, :name
6
-
7
- def initialize(data)
8
- @data = data
9
- position = data.dig('Group', 'Position')
10
- @id = position&.fetch('Id')
11
- @type = position&.fetch('Type')
12
- @name = position&.fetch('Name').to_s.strip
13
- end
14
- end
15
- end
16
- end