firespring_dev_commands 2.5.0.pre.alpha.2 → 3.0.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.
- checksums.yaml +4 -4
- data/lib/firespring_dev_commands/audit/report.rb +9 -2
- data/lib/firespring_dev_commands/aws/account.rb +3 -7
- data/lib/firespring_dev_commands/aws/login.rb +0 -20
- data/lib/firespring_dev_commands/bloom_growth/rock.rb +34 -0
- data/lib/firespring_dev_commands/bloom_growth/seat.rb +16 -0
- data/lib/firespring_dev_commands/bloom_growth/user.rb +43 -0
- data/lib/firespring_dev_commands/bloom_growth.rb +132 -0
- data/lib/firespring_dev_commands/common.rb +11 -22
- data/lib/firespring_dev_commands/coverage/base.rb +21 -0
- data/lib/firespring_dev_commands/coverage/cobertura.rb +86 -0
- data/lib/firespring_dev_commands/coverage/none.rb +25 -0
- data/lib/firespring_dev_commands/docker.rb +23 -25
- data/lib/firespring_dev_commands/node.rb +13 -12
- data/lib/firespring_dev_commands/php.rb +14 -10
- data/lib/firespring_dev_commands/platform.rb +1 -1
- data/lib/firespring_dev_commands/ruby.rb +19 -7
- data/lib/firespring_dev_commands/target_process/query.rb +30 -4
- data/lib/firespring_dev_commands/target_process.rb +3 -1
- data/lib/firespring_dev_commands/templates/aws.rb +0 -2
- data/lib/firespring_dev_commands/templates/base_interface.rb +2 -2
- data/lib/firespring_dev_commands/templates/docker/application.rb +2 -2
- data/lib/firespring_dev_commands/templates/docker/node/application.rb +47 -10
- data/lib/firespring_dev_commands/templates/docker/php/application.rb +45 -19
- data/lib/firespring_dev_commands/templates/docker/ruby/application.rb +44 -8
- data/lib/firespring_dev_commands/version.rb +1 -1
- data/lib/firespring_dev_commands.rb +1 -1
- metadata +42 -35
@@ -7,11 +7,29 @@ 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
|
10
|
+
attr_reader :ruby, :start_container_dependencies_on_test, :test_isolation
|
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
|
+
# @param test_isolation [Boolean] Whether or not to start tests in an isolated project and clean up after tests are run
|
19
|
+
# @param coverage [Dev::Coverage::Base] The coverage class which is an instance of Base to be used to evaluate coverage
|
20
|
+
def initialize(
|
21
|
+
application,
|
22
|
+
container_path: nil,
|
23
|
+
local_path: nil,
|
24
|
+
start_container_dependencies_on_test: false,
|
25
|
+
test_isolation: false,
|
26
|
+
coverage: nil,
|
27
|
+
exclude: []
|
28
|
+
)
|
29
|
+
@ruby = Dev::Ruby.new(container_path:, local_path:, coverage:)
|
30
|
+
@start_container_dependencies_on_test = start_container_dependencies_on_test
|
31
|
+
@test_isolation = test_isolation
|
11
32
|
|
12
|
-
# Allow for custom container path for the application
|
13
|
-
def initialize(application, container_path: nil, local_path: nil, exclude: [])
|
14
|
-
@ruby = Dev::Ruby.new(container_path:, local_path:)
|
15
33
|
super(application, exclude:)
|
16
34
|
end
|
17
35
|
|
@@ -30,7 +48,8 @@ module Dev
|
|
30
48
|
end
|
31
49
|
|
32
50
|
namespace :ruby do
|
33
|
-
desc "Run the ruby linting software against the #{application}'s codebase"
|
51
|
+
desc "Run the ruby linting software against the #{application}'s codebase" \
|
52
|
+
"\n\t(optional) use OPTS=... to pass additional options to the command"
|
34
53
|
task lint: %w(init_docker up_no_deps) do
|
35
54
|
LOG.debug("Check for ruby linting errors in the #{application} codebase")
|
36
55
|
|
@@ -59,6 +78,8 @@ module Dev
|
|
59
78
|
application = @name
|
60
79
|
ruby = @ruby
|
61
80
|
exclude = @exclude
|
81
|
+
test_isolation = @test_isolation
|
82
|
+
up_cmd = @start_container_dependencies_on_test ? :up : :up_no_deps
|
62
83
|
return if exclude.include?(:test)
|
63
84
|
|
64
85
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
@@ -68,14 +89,28 @@ module Dev
|
|
68
89
|
# This is just a placeholder to execute the dependencies
|
69
90
|
end
|
70
91
|
|
92
|
+
task test_init_docker: %w(init_docker) do
|
93
|
+
Dev::Docker::Compose.configure do |c|
|
94
|
+
c.project_name = SecureRandom.hex if test_isolation
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
71
98
|
namespace :ruby do
|
72
|
-
desc "Run all ruby tests against the #{application}'s codebase"
|
73
|
-
|
99
|
+
desc "Run all ruby tests against the #{application}'s codebase" \
|
100
|
+
"\n\t(optional) use OPTS=... to pass additional options to the command"
|
101
|
+
task test: %W(test_init_docker #{up_cmd}) do
|
74
102
|
LOG.debug("Running all ruby tests in the #{application} codebase")
|
75
103
|
|
76
104
|
options = []
|
77
105
|
options << '-T' if Dev::Common.new.running_codebuild?
|
78
106
|
Dev::Docker::Compose.new(services: application, options:).exec(*ruby.test_command)
|
107
|
+
ruby.check_test_coverage(application:)
|
108
|
+
|
109
|
+
# Clean up resources if we are on an isolated project name
|
110
|
+
if test_isolation
|
111
|
+
Dev::Docker::Compose.new.down
|
112
|
+
Dev::Docker.new.prune_project_volumes(project_name: Dev::Docker::Compose.config.project_name)
|
113
|
+
end
|
79
114
|
end
|
80
115
|
end
|
81
116
|
end
|
@@ -120,7 +155,8 @@ module Dev
|
|
120
155
|
namespace :ruby do
|
121
156
|
desc 'Run Bundle Audit on the target application' \
|
122
157
|
"\n\tuse MIN_SEVERITY=(info low moderate high critical) to fetch only severity type selected and above (default=high)." \
|
123
|
-
"\n\tuse IGNORELIST=(comma delimited list of ids) removes the entry from the list."
|
158
|
+
"\n\tuse IGNORELIST=(comma delimited list of ids) removes the entry from the list." \
|
159
|
+
"\n\t(optional) use OPTS=... to pass additional options to the command"
|
124
160
|
task audit: %w(init_docker up_no_deps) do
|
125
161
|
opts = []
|
126
162
|
opts << '-T' if Dev::Common.new.running_codebuild?
|
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:
|
4
|
+
version: 3.0.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:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,154 +16,154 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.1.
|
19
|
+
version: 7.1.2
|
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.
|
26
|
+
version: 7.1.2
|
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.
|
33
|
+
version: 1.97.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.
|
40
|
+
version: 1.97.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.
|
47
|
+
version: 1.67.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.
|
54
|
+
version: 1.67.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.
|
61
|
+
version: 1.68.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
|
+
version: 1.68.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.
|
75
|
+
version: 1.95.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.
|
82
|
+
version: 1.95.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.
|
89
|
+
version: 1.113.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.
|
96
|
+
version: 1.113.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.
|
103
|
+
version: 1.33.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.
|
110
|
+
version: 1.33.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.
|
117
|
+
version: 1.208.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.
|
124
|
+
version: 1.208.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: aws-sdk-s3
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.141.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: 1.141.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: aws-sdk-ssm
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.162.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.162.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: aws-sdk-sts
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.11.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.11.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: colorize
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,61 +249,61 @@ dependencies:
|
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: 2.3.0
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: ox
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- -
|
255
|
+
- - "~>"
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
257
|
+
version: 2.14.17
|
258
258
|
type: :runtime
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- -
|
262
|
+
- - "~>"
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
264
|
+
version: 2.14.17
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: public_suffix
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
269
|
- - '='
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version: 5.0.
|
271
|
+
version: 5.0.4
|
272
272
|
type: :runtime
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
276
|
- - '='
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version: 5.0.
|
278
|
+
version: 5.0.4
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
280
|
name: rake
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version: 13.0
|
285
|
+
version: 13.1.0
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: 13.0
|
292
|
+
version: 13.1.0
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: slack-ruby-client
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
297
|
- - "~>"
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version: 2.
|
299
|
+
version: 2.2.0
|
300
300
|
type: :runtime
|
301
301
|
prerelease: false
|
302
302
|
version_requirements: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
304
|
- - "~>"
|
305
305
|
- !ruby/object:Gem::Version
|
306
|
-
version: 2.
|
306
|
+
version: 2.2.0
|
307
307
|
description: Ruby library for creating/maintaining your development environment
|
308
308
|
email: opensource@firespring.com
|
309
309
|
executables: []
|
@@ -327,8 +327,15 @@ files:
|
|
327
327
|
- lib/firespring_dev_commands/aws/parameter.rb
|
328
328
|
- lib/firespring_dev_commands/aws/profile.rb
|
329
329
|
- lib/firespring_dev_commands/aws/s3.rb
|
330
|
+
- lib/firespring_dev_commands/bloom_growth.rb
|
331
|
+
- lib/firespring_dev_commands/bloom_growth/rock.rb
|
332
|
+
- lib/firespring_dev_commands/bloom_growth/seat.rb
|
333
|
+
- lib/firespring_dev_commands/bloom_growth/user.rb
|
330
334
|
- lib/firespring_dev_commands/boolean.rb
|
331
335
|
- lib/firespring_dev_commands/common.rb
|
336
|
+
- lib/firespring_dev_commands/coverage/base.rb
|
337
|
+
- lib/firespring_dev_commands/coverage/cobertura.rb
|
338
|
+
- lib/firespring_dev_commands/coverage/none.rb
|
332
339
|
- lib/firespring_dev_commands/daterange.rb
|
333
340
|
- lib/firespring_dev_commands/docker.rb
|
334
341
|
- lib/firespring_dev_commands/docker/compose.rb
|