firespring_dev_commands 1.5.3 → 2.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/firespring_dev_commands/audit/report.rb +1 -1
- data/lib/firespring_dev_commands/aws/cloudformation.rb +7 -7
- data/lib/firespring_dev_commands/aws/codepipeline.rb +1 -1
- data/lib/firespring_dev_commands/aws/credentials.rb +2 -2
- data/lib/firespring_dev_commands/aws/login.rb +7 -7
- data/lib/firespring_dev_commands/aws/parameter.rb +2 -2
- data/lib/firespring_dev_commands/aws/s3.rb +1 -1
- data/lib/firespring_dev_commands/docker/compose.rb +16 -7
- data/lib/firespring_dev_commands/docker.rb +3 -8
- data/lib/firespring_dev_commands/git.rb +3 -3
- data/lib/firespring_dev_commands/jira/user.rb +1 -1
- data/lib/firespring_dev_commands/jira.rb +5 -5
- data/lib/firespring_dev_commands/node/audit.rb +1 -1
- data/lib/firespring_dev_commands/templates/aws.rb +1 -1
- data/lib/firespring_dev_commands/templates/base_interface.rb +1 -1
- data/lib/firespring_dev_commands/templates/ci.rb +2 -2
- data/lib/firespring_dev_commands/templates/docker/node/application.rb +5 -5
- data/lib/firespring_dev_commands/templates/docker/php/application.rb +5 -5
- data/lib/firespring_dev_commands/templates/docker/ruby/application.rb +5 -5
- data/lib/firespring_dev_commands/templates/eol.rb +1 -1
- data/lib/firespring_dev_commands/templates/git.rb +1 -1
- data/lib/firespring_dev_commands/version.rb +1 -1
- data/lib/firespring_dev_commands.rb +2 -0
- metadata +31 -171
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0b0b93719ba8c6b8ddb34f39777bf1f2e4ee5eb95e85c1a1eb0f45e78a9441
|
4
|
+
data.tar.gz: '08d558e6e2b846d266b158ebf8b6b8eba3e620e3e2002ab77a7876dec65189ec'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5065bf94f9f4f0492794b4b944a01c017f31eab27d659827fa82c1512bec2c91b9da331e3fa114a49ba9afab75bcce94375955a55d4f00d0066a6149b960beb5
|
7
|
+
data.tar.gz: 3accee26e593d454a1c87f2cdcb865a723ab5cd12be8b3da1960b86fc5aa12eff6303f2fcc1f8f69e280e14487be132f2b2b27c879d33699ed92e193900a38e9
|
@@ -49,9 +49,9 @@ module Dev
|
|
49
49
|
# Create the cloudformation stack
|
50
50
|
client.create_stack(
|
51
51
|
stack_name: name,
|
52
|
-
template_url
|
52
|
+
template_url:,
|
53
53
|
parameters: parameters.default,
|
54
|
-
capabilities
|
54
|
+
capabilities:,
|
55
55
|
on_failure: failure_behavior
|
56
56
|
)
|
57
57
|
@state = STARTED
|
@@ -77,9 +77,9 @@ module Dev
|
|
77
77
|
# Update the cloudformation stack
|
78
78
|
client.update_stack(
|
79
79
|
stack_name: name,
|
80
|
-
template_url
|
80
|
+
template_url:,
|
81
81
|
parameters: parameters.preserve,
|
82
|
-
capabilities:
|
82
|
+
capabilities:
|
83
83
|
)
|
84
84
|
@state = STARTED
|
85
85
|
LOG.info "#{name} stack update started at #{Time.now.to_s.light_yellow}"
|
@@ -144,8 +144,8 @@ module Dev
|
|
144
144
|
|
145
145
|
client.wait_until(
|
146
146
|
:"stack_#{type}",
|
147
|
-
{stack_name:
|
148
|
-
{max_attempts
|
147
|
+
{stack_name:},
|
148
|
+
{max_attempts:, delay:}
|
149
149
|
)
|
150
150
|
rescue ::Aws::Waiters::Errors::WaiterFailed => e
|
151
151
|
raise "Action failed to complete: #{e.message}"
|
@@ -181,7 +181,7 @@ module Dev
|
|
181
181
|
s3 = Dev::Aws::S3.new
|
182
182
|
template_bucket = s3.cf_bucket.name
|
183
183
|
key = "#{File.basename(filename)}/#{SecureRandom.uuid}"
|
184
|
-
s3.put(bucket: template_bucket, key
|
184
|
+
s3.put(bucket: template_bucket, key:, filename:)
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
@@ -39,7 +39,7 @@ module Dev
|
|
39
39
|
|
40
40
|
# Find all pipelines matching the regex_match and find the status for each of them
|
41
41
|
def status(name)
|
42
|
-
pipeline = client.get_pipeline_state(name:
|
42
|
+
pipeline = client.get_pipeline_state(name:)
|
43
43
|
print_pipeline_information(pipeline)
|
44
44
|
rescue ::Aws::CodePipeline::Errors::PipelineNotFoundException
|
45
45
|
LOG.error "No pipeline found with name #{name}".light_yellow
|
@@ -45,7 +45,7 @@ module Dev
|
|
45
45
|
|
46
46
|
# Check for expired credentials
|
47
47
|
begin
|
48
|
-
::Aws::STS::Client.new(profile:
|
48
|
+
::Aws::STS::Client.new(profile:).get_caller_identity
|
49
49
|
rescue
|
50
50
|
return false
|
51
51
|
end
|
@@ -53,7 +53,7 @@ module Dev
|
|
53
53
|
# Check for invalid credentials
|
54
54
|
begin
|
55
55
|
# TODO: Is there a better check we can do here?
|
56
|
-
::Aws::SSM::Client.new(profile:
|
56
|
+
::Aws::SSM::Client.new(profile:).describe_parameters(max_results: 1)
|
57
57
|
rescue
|
58
58
|
return false
|
59
59
|
end
|
@@ -56,7 +56,7 @@ module Dev
|
|
56
56
|
code = ENV['AWS_TOKEN_CODE'] || Dev::Common.new.ask("Enter the MFA code for the #{ENV.fetch('USERNAME', '')} user serial #{serial}")
|
57
57
|
raise 'MFA is required' unless code.to_s.strip
|
58
58
|
|
59
|
-
sts = ::Aws::STS::Client.new(profile: 'default', region:
|
59
|
+
sts = ::Aws::STS::Client.new(profile: 'default', region:)
|
60
60
|
creds = sts.assume_role(
|
61
61
|
serial_number: serial,
|
62
62
|
role_arn: role,
|
@@ -88,7 +88,7 @@ module Dev
|
|
88
88
|
return if registry_ids.empty?
|
89
89
|
|
90
90
|
puts
|
91
|
-
registry_ids.each { |id| registry_login!(registry_id: id, region:
|
91
|
+
registry_ids.each { |id| registry_login!(registry_id: id, region:) }
|
92
92
|
puts
|
93
93
|
end
|
94
94
|
|
@@ -101,8 +101,8 @@ module Dev
|
|
101
101
|
raise 'region is required' if region.to_s.strip.empty?
|
102
102
|
|
103
103
|
registry = "#{registry_id}.dkr.ecr.#{region}.amazonaws.com"
|
104
|
-
docker_cli_login!(registry
|
105
|
-
docker_lib_login!(registry_id
|
104
|
+
docker_cli_login!(registry:, region:)
|
105
|
+
docker_lib_login!(registry_id:, region:)
|
106
106
|
|
107
107
|
ENV['ECR_REGISTRY_ID'] ||= registry_id
|
108
108
|
ENV['ECR_REGISTRY'] ||= registry
|
@@ -115,7 +115,7 @@ module Dev
|
|
115
115
|
registry_id ||= Dev::Aws::Account.new.ecr_registry_ids.first
|
116
116
|
region ||= Dev::Aws::Credentials.new.logged_in_region || Dev::Aws::DEFAULT_REGION
|
117
117
|
warn '[DEPRECATION] `Dev::Aws::Login#docker_login!` is deprecated. Please use `Dev::Aws::Login#registry_login!` instead.'
|
118
|
-
docker_cli_login!(registry: "#{registry_id}.dkr.ecr.#{region}.amazonaws.com", region:
|
118
|
+
docker_cli_login!(registry: "#{registry_id}.dkr.ecr.#{region}.amazonaws.com", region:)
|
119
119
|
puts
|
120
120
|
end
|
121
121
|
|
@@ -135,13 +135,13 @@ module Dev
|
|
135
135
|
registry_id ||= Dev::Aws::Account.new.ecr_registry_ids.first
|
136
136
|
region ||= Dev::Aws::Credentials.new.logged_in_region || Dev::Aws::DEFAULT_REGION
|
137
137
|
warn '[DEPRECATION] `Dev::Aws::Login#ecr_login!` is deprecated. Please use `Dev::Aws::Login#registry_login!` instead.'
|
138
|
-
docker_lib_login!(registry_id
|
138
|
+
docker_lib_login!(registry_id:, region:)
|
139
139
|
end
|
140
140
|
|
141
141
|
# Authroizes the docker ruby library to pull/push images from the Aws container registry
|
142
142
|
private def docker_lib_login!(registry_id:, region:)
|
143
143
|
# Grab your authentication token from AWS ECR
|
144
|
-
ecr_client = ::Aws::ECR::Client.new(region:
|
144
|
+
ecr_client = ::Aws::ECR::Client.new(region:)
|
145
145
|
tokens = ecr_client.get_authorization_token(registry_ids: Array(registry_id)).authorization_data
|
146
146
|
tokens.each do |token|
|
147
147
|
# Remove the https:// to authenticate
|
@@ -18,12 +18,12 @@ module Dev
|
|
18
18
|
|
19
19
|
# Get the value of the given parameter name
|
20
20
|
def get_value(name, with_decryption: true)
|
21
|
-
get(name, with_decryption:
|
21
|
+
get(name, with_decryption:)&.value
|
22
22
|
end
|
23
23
|
|
24
24
|
# Retrieve the ssm parameter object with the given name
|
25
25
|
def get(name, with_decryption: true)
|
26
|
-
client.get_parameter(name
|
26
|
+
client.get_parameter(name:, with_decryption:)&.parameter
|
27
27
|
rescue ::Aws::SSM::Errors::ParameterNotFound
|
28
28
|
raise "parameter #{name} does not exist in #{Dev::Aws::Profile.new.current}"
|
29
29
|
end
|
@@ -22,7 +22,7 @@ module Dev
|
|
22
22
|
def put(bucket:, key:, filename:, acl: 'private')
|
23
23
|
begin
|
24
24
|
File.open(filename, 'rb') do |file|
|
25
|
-
client.put_object(bucket
|
25
|
+
client.put_object(bucket:, key:, body: file, acl:)
|
26
26
|
end
|
27
27
|
rescue => e
|
28
28
|
raise "s3 file upload failed: #{e.message}"
|
@@ -8,8 +8,9 @@ module Dev
|
|
8
8
|
# Class containing methods for interfacing with the docker compose cli
|
9
9
|
class Compose
|
10
10
|
# Config object for setting top level docker compose config options
|
11
|
-
Config = Struct.new(:project_dir, :project_name, :compose_files, :min_version, :max_version) do
|
11
|
+
Config = Struct.new(:executable_name, :project_dir, :project_name, :compose_files, :min_version, :max_version) do
|
12
12
|
def initialize
|
13
|
+
self.executable_name = EXECUTABLE_NAME
|
13
14
|
self.project_dir = DEV_COMMANDS_ROOT_DIR
|
14
15
|
self.project_name = DEV_COMMANDS_PROJECT_NAME
|
15
16
|
self.compose_files = ["#{DEV_COMMANDS_ROOT_DIR}/docker-compose.yml"]
|
@@ -69,12 +70,12 @@ module Dev
|
|
69
70
|
# Checks the min and max version against the current docker version if they have been configured
|
70
71
|
def check_version
|
71
72
|
min_version = self.class.config.min_version
|
72
|
-
|
73
|
-
|
73
|
+
version_too_low = min_version && !Dev::Common.new.version_greater_than(min_version, self.class.version)
|
74
|
+
raise "requires #{self.class.config.executable_name} version >= #{min_version} (found #{self.class.version})" if version_too_low
|
74
75
|
|
75
76
|
max_version = self.class.config.max_version
|
76
|
-
|
77
|
-
|
77
|
+
version_too_high = max_version && Dev::Common.new.version_greater_than(max_version, self.class.version)
|
78
|
+
raise "requires #{self.class.config.executable_name} version < #{max_version} (found #{self.class.version})" if version_too_high
|
78
79
|
end
|
79
80
|
|
80
81
|
# Pull in supported env settings and call build
|
@@ -83,6 +84,7 @@ module Dev
|
|
83
84
|
def build
|
84
85
|
merge_options('--parallel')
|
85
86
|
merge_env_pull_option
|
87
|
+
merge_env_push_option
|
86
88
|
merge_env_cache_option
|
87
89
|
execute_command(build_command('build'))
|
88
90
|
end
|
@@ -181,6 +183,13 @@ module Dev
|
|
181
183
|
merge_options('--pull') if ENV['PULL'].to_s.strip == 'true'
|
182
184
|
end
|
183
185
|
|
186
|
+
# Merge --push option if PUSH is set to true and no existing push options are present
|
187
|
+
private def merge_env_push_option
|
188
|
+
return if @options.any? { |it| it.include?('push') }
|
189
|
+
|
190
|
+
merge_options('--push') if ENV['PUSH'].to_s.strip == 'true'
|
191
|
+
end
|
192
|
+
|
184
193
|
# Merge --no-build option unless BUILD is set to true and no existing build options are present
|
185
194
|
private def merge_env_build_option
|
186
195
|
return if @options.any? { |it| it.include?('build') }
|
@@ -230,7 +239,7 @@ module Dev
|
|
230
239
|
|
231
240
|
# Build the compose command with the given inputs
|
232
241
|
private def build_command(action, *cmd)
|
233
|
-
command =
|
242
|
+
command = self.class.config.executable_name.split(/\s+/)
|
234
243
|
command << '--project-directory' << project_dir
|
235
244
|
command << '-p' << project_name if project_name
|
236
245
|
Array(compose_files).compact.each { |file| command << '-f' << file }
|
@@ -264,7 +273,7 @@ module Dev
|
|
264
273
|
# Print the compose command that will be executed and then execute it
|
265
274
|
private def execute_command(command)
|
266
275
|
LOG.debug " > #{command.join(' ')}"
|
267
|
-
::Dev::Common.new.run_command(command, capture:
|
276
|
+
::Dev::Common.new.run_command(command, capture:)
|
268
277
|
end
|
269
278
|
end
|
270
279
|
end
|
@@ -74,7 +74,7 @@ module Dev
|
|
74
74
|
def prune_volumes
|
75
75
|
opts = {}
|
76
76
|
opts[:filters] = {all: ['true']}.to_json if Dev::Common.new.version_greater_than('22.9999.0', self.class.version) && ENV['ALL_VOLUMES'].to_s.strip != 'false'
|
77
|
-
_prune('volumes', opts:
|
77
|
+
_prune('volumes', opts:)
|
78
78
|
end
|
79
79
|
|
80
80
|
# Prunes/removes all unused images
|
@@ -88,7 +88,7 @@ module Dev
|
|
88
88
|
format_prune(type, response)
|
89
89
|
rescue ::Docker::Error::ServerError => e
|
90
90
|
# Specifically check for 'prune already running' error and retry if found
|
91
|
-
if
|
91
|
+
if e.to_s.include?('already running')
|
92
92
|
sleep 2
|
93
93
|
retry
|
94
94
|
end
|
@@ -201,8 +201,6 @@ module Dev
|
|
201
201
|
private def image_info(image)
|
202
202
|
[].tap do |ary|
|
203
203
|
arch = image.json&.dig('Architecture')
|
204
|
-
variant = image.json&.dig('Variant')
|
205
|
-
arch = "#{arch}/#{variant}" if variant
|
206
204
|
id = image.info&.dig('id')&.split(':')&.last&.slice(0..11)
|
207
205
|
created = timesince(Time.at(image.info&.dig('Created')))
|
208
206
|
size = filesize(image.info&.dig('Size'))
|
@@ -255,10 +253,7 @@ module Dev
|
|
255
253
|
private def container_info(container)
|
256
254
|
id = container.id&.slice(0..11)
|
257
255
|
image = container.info&.dig('Image')
|
258
|
-
|
259
|
-
arch = image_json&.dig('Architecture')
|
260
|
-
variant = image_json&.dig('Variant')
|
261
|
-
arch = "#{arch}/#{variant}" if variant
|
256
|
+
arch = ::Docker::Image.get(image).json&.dig('Architecture')
|
262
257
|
command = container.info&.dig('Command')
|
263
258
|
created = timesince(Time.at(container.info&.dig('Created')))
|
264
259
|
status = container.info&.dig('Status')
|
@@ -289,7 +289,7 @@ module Dev
|
|
289
289
|
raise 'branch does not exist' unless branch_exists?(dir, branch)
|
290
290
|
|
291
291
|
# No need to merge into ourself
|
292
|
-
current_branch = branch_name(dir:
|
292
|
+
current_branch = branch_name(dir:)
|
293
293
|
return true if current_branch == branch
|
294
294
|
|
295
295
|
indent "Merging #{branch} into #{current_branch}"
|
@@ -326,7 +326,7 @@ module Dev
|
|
326
326
|
g = ::Git.open(dir)
|
327
327
|
g.fetch('origin', prune: true)
|
328
328
|
|
329
|
-
branch = branch_name(dir:
|
329
|
+
branch = branch_name(dir:)
|
330
330
|
indent "Pulling branch #{branch} from origin"
|
331
331
|
indent g.pull('origin', branch)
|
332
332
|
true
|
@@ -361,7 +361,7 @@ module Dev
|
|
361
361
|
g = ::Git.open(dir)
|
362
362
|
g.fetch('origin', prune: true)
|
363
363
|
|
364
|
-
branch = branch_name(dir:
|
364
|
+
branch = branch_name(dir:)
|
365
365
|
indent "Pushing branch #{branch} to origin"
|
366
366
|
indent g.push('origin', branch)
|
367
367
|
true
|
@@ -23,7 +23,7 @@ module Dev
|
|
23
23
|
# If none is found, it returns a Jira user object with only the id set
|
24
24
|
def self.lookup(id)
|
25
25
|
user = Dev::Jira.config.user_lookup_list&.find { |it| it.id == id }
|
26
|
-
user ||= new(name: '', email: '', id:
|
26
|
+
user ||= new(name: '', email: '', id:)
|
27
27
|
user
|
28
28
|
end
|
29
29
|
end
|
@@ -59,19 +59,19 @@ module Dev
|
|
59
59
|
end
|
60
60
|
|
61
61
|
# Query jira using the given jql and yield each matching result
|
62
|
-
def issues(jql, &
|
62
|
+
def issues(jql, &)
|
63
63
|
start_at = 0
|
64
64
|
max_results = 100
|
65
65
|
|
66
66
|
# Query Jira and yield all issues it returns
|
67
|
-
issues = @client.Issue.jql(jql, start_at
|
68
|
-
issues.map { |data| Issue.new(data) }.each(&
|
67
|
+
issues = @client.Issue.jql(jql, start_at:, max_results:)
|
68
|
+
issues.map { |data| Issue.new(data) }.each(&)
|
69
69
|
|
70
70
|
# If we returned the max_results then there may be more - add the max results to where we start at and query again
|
71
71
|
while issues.length >= max_results
|
72
72
|
start_at += max_results
|
73
|
-
issues = @client.Issue.jql(jql, start_at
|
74
|
-
issues.map { |data| Issue.new(data) }.each(&
|
73
|
+
issues = @client.Issue.jql(jql, start_at:, max_results:)
|
74
|
+
issues.map { |data| Issue.new(data) }.each(&)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'base_interface'
|
2
2
|
|
3
3
|
module Dev
|
4
4
|
module Template
|
@@ -12,7 +12,7 @@ module Dev
|
|
12
12
|
@cloudformations = Array(cloudformation).sort_by(&:name)
|
13
13
|
raise 'must specify an arry of cloudformation objects' unless @cloudformations.all?(Dev::Aws::Cloudformation)
|
14
14
|
|
15
|
-
super(exclude:
|
15
|
+
super(exclude:)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Create the rake task for creating the codepipeline
|
@@ -11,8 +11,8 @@ module Dev
|
|
11
11
|
|
12
12
|
# Allow for custom container path for the application
|
13
13
|
def initialize(application, container_path: nil, local_path: nil, exclude: [])
|
14
|
-
@node = Dev::Node.new(container_path
|
15
|
-
super(application, exclude:
|
14
|
+
@node = Dev::Node.new(container_path:, local_path:)
|
15
|
+
super(application, exclude:)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Create the rake task which runs linting for the application name
|
@@ -36,7 +36,7 @@ module Dev
|
|
36
36
|
|
37
37
|
options = []
|
38
38
|
options << '-T' if Dev::Common.new.running_codebuild?
|
39
|
-
Dev::Docker::Compose.new(services: application, options:
|
39
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*node.lint_command)
|
40
40
|
end
|
41
41
|
|
42
42
|
namespace :lint do
|
@@ -46,7 +46,7 @@ module Dev
|
|
46
46
|
|
47
47
|
options = []
|
48
48
|
options << '-T' if Dev::Common.new.running_codebuild?
|
49
|
-
Dev::Docker::Compose.new(services: application, options:
|
49
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*node.lint_fix_command)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -75,7 +75,7 @@ module Dev
|
|
75
75
|
|
76
76
|
options = []
|
77
77
|
options << '-T' if Dev::Common.new.running_codebuild?
|
78
|
-
Dev::Docker::Compose.new(services: application, options:
|
78
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*node.test_command)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
@@ -11,8 +11,8 @@ module Dev
|
|
11
11
|
|
12
12
|
# Allow for custom container path for the application
|
13
13
|
def initialize(application, container_path: nil, local_path: nil, exclude: [])
|
14
|
-
@php = Dev::Php.new(container_path
|
15
|
-
super(application, exclude:
|
14
|
+
@php = Dev::Php.new(container_path:, local_path:)
|
15
|
+
super(application, exclude:)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Create the rake task which downloads the vendor directory to your local system for the given application name
|
@@ -80,7 +80,7 @@ module Dev
|
|
80
80
|
|
81
81
|
options = []
|
82
82
|
options << '-T' if Dev::Common.new.running_codebuild?
|
83
|
-
Dev::Docker::Compose.new(services: application, options:
|
83
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*php.lint_command)
|
84
84
|
end
|
85
85
|
|
86
86
|
namespace :lint do
|
@@ -90,7 +90,7 @@ module Dev
|
|
90
90
|
|
91
91
|
options = []
|
92
92
|
options << '-T' if Dev::Common.new.running_codebuild?
|
93
|
-
Dev::Docker::Compose.new(services: application, options:
|
93
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*php.lint_fix_command)
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
@@ -119,7 +119,7 @@ module Dev
|
|
119
119
|
|
120
120
|
options = []
|
121
121
|
options << '-T' if Dev::Common.new.running_codebuild?
|
122
|
-
Dev::Docker::Compose.new(services: application, options:
|
122
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*php.test_command)
|
123
123
|
end
|
124
124
|
end
|
125
125
|
end
|
@@ -11,8 +11,8 @@ module Dev
|
|
11
11
|
|
12
12
|
# Allow for custom container path for the application
|
13
13
|
def initialize(application, container_path: nil, local_path: nil, exclude: [])
|
14
|
-
@ruby = Dev::Ruby.new(container_path
|
15
|
-
super(application, exclude:
|
14
|
+
@ruby = Dev::Ruby.new(container_path:, local_path:)
|
15
|
+
super(application, exclude:)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Create the rake task which runs linting for the application name
|
@@ -36,7 +36,7 @@ module Dev
|
|
36
36
|
|
37
37
|
options = []
|
38
38
|
options << '-T' if Dev::Common.new.running_codebuild?
|
39
|
-
Dev::Docker::Compose.new(services: application, options:
|
39
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*ruby.lint_command)
|
40
40
|
end
|
41
41
|
|
42
42
|
namespace :lint do
|
@@ -46,7 +46,7 @@ module Dev
|
|
46
46
|
|
47
47
|
options = []
|
48
48
|
options << '-T' if Dev::Common.new.running_codebuild?
|
49
|
-
Dev::Docker::Compose.new(services: application, options:
|
49
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*ruby.lint_fix_command)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -75,7 +75,7 @@ module Dev
|
|
75
75
|
|
76
76
|
options = []
|
77
77
|
options << '-T' if Dev::Common.new.running_codebuild?
|
78
|
-
Dev::Docker::Compose.new(services: application, options:
|
78
|
+
Dev::Docker::Compose.new(services: application, options:).exec(*ruby.test_command)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
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:
|
4
|
+
version: 2.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: 2023-07-
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,112 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.0.
|
19
|
+
version: 7.0.6
|
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.0.
|
26
|
+
version: 7.0.6
|
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.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.
|
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.
|
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.
|
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.
|
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
|
+
version: 1.61.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: aws-sdk-s3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.127.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.127.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: aws-sdk-ssm
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.154.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.154.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: aws-sdk-sts
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.10.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.10.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: colorize
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 1.1.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:
|
124
|
+
version: 1.1.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: docker-api
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,28 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.8.
|
145
|
+
version: 2.8.1
|
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: 2.8.
|
152
|
+
version: 2.8.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: git
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.18.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.18.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: inifile
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,84 +198,28 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - '='
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 4.1.1
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 4.1.1
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: public_suffix
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 5.0.
|
215
|
+
version: 5.0.1
|
216
216
|
type: :runtime
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 5.0.
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: rake
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - "~>"
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 13.0.0
|
230
|
-
type: :runtime
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - "~>"
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: 13.0.0
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: builder
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - "~>"
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: 3.2.4
|
244
|
-
type: :development
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - "~>"
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: 3.2.4
|
251
|
-
- !ruby/object:Gem::Dependency
|
252
|
-
name: bundler-audit
|
253
|
-
requirement: !ruby/object:Gem::Requirement
|
254
|
-
requirements:
|
255
|
-
- - "~>"
|
256
|
-
- !ruby/object:Gem::Version
|
257
|
-
version: 0.9.0
|
258
|
-
type: :development
|
259
|
-
prerelease: false
|
260
|
-
version_requirements: !ruby/object:Gem::Requirement
|
261
|
-
requirements:
|
262
|
-
- - "~>"
|
263
|
-
- !ruby/object:Gem::Version
|
264
|
-
version: 0.9.0
|
265
|
-
- !ruby/object:Gem::Dependency
|
266
|
-
name: launchy
|
267
|
-
requirement: !ruby/object:Gem::Requirement
|
268
|
-
requirements:
|
269
|
-
- - "~>"
|
270
|
-
- !ruby/object:Gem::Version
|
271
|
-
version: 2.5.2
|
272
|
-
type: :development
|
273
|
-
prerelease: false
|
274
|
-
version_requirements: !ruby/object:Gem::Requirement
|
275
|
-
requirements:
|
276
|
-
- - "~>"
|
277
|
-
- !ruby/object:Gem::Version
|
278
|
-
version: 2.5.2
|
222
|
+
version: 5.0.1
|
279
223
|
- !ruby/object:Gem::Dependency
|
280
224
|
name: rake
|
281
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,97 +227,13 @@ dependencies:
|
|
283
227
|
- - "~>"
|
284
228
|
- !ruby/object:Gem::Version
|
285
229
|
version: 13.0.6
|
286
|
-
type: :
|
230
|
+
type: :runtime
|
287
231
|
prerelease: false
|
288
232
|
version_requirements: !ruby/object:Gem::Requirement
|
289
233
|
requirements:
|
290
234
|
- - "~>"
|
291
235
|
- !ruby/object:Gem::Version
|
292
236
|
version: 13.0.6
|
293
|
-
- !ruby/object:Gem::Dependency
|
294
|
-
name: rspec
|
295
|
-
requirement: !ruby/object:Gem::Requirement
|
296
|
-
requirements:
|
297
|
-
- - "~>"
|
298
|
-
- !ruby/object:Gem::Version
|
299
|
-
version: 3.11.0
|
300
|
-
type: :development
|
301
|
-
prerelease: false
|
302
|
-
version_requirements: !ruby/object:Gem::Requirement
|
303
|
-
requirements:
|
304
|
-
- - "~>"
|
305
|
-
- !ruby/object:Gem::Version
|
306
|
-
version: 3.11.0
|
307
|
-
- !ruby/object:Gem::Dependency
|
308
|
-
name: rubocop
|
309
|
-
requirement: !ruby/object:Gem::Requirement
|
310
|
-
requirements:
|
311
|
-
- - "~>"
|
312
|
-
- !ruby/object:Gem::Version
|
313
|
-
version: 1.36.0
|
314
|
-
type: :development
|
315
|
-
prerelease: false
|
316
|
-
version_requirements: !ruby/object:Gem::Requirement
|
317
|
-
requirements:
|
318
|
-
- - "~>"
|
319
|
-
- !ruby/object:Gem::Version
|
320
|
-
version: 1.36.0
|
321
|
-
- !ruby/object:Gem::Dependency
|
322
|
-
name: rubocop-performance
|
323
|
-
requirement: !ruby/object:Gem::Requirement
|
324
|
-
requirements:
|
325
|
-
- - "~>"
|
326
|
-
- !ruby/object:Gem::Version
|
327
|
-
version: 1.15.0
|
328
|
-
type: :development
|
329
|
-
prerelease: false
|
330
|
-
version_requirements: !ruby/object:Gem::Requirement
|
331
|
-
requirements:
|
332
|
-
- - "~>"
|
333
|
-
- !ruby/object:Gem::Version
|
334
|
-
version: 1.15.0
|
335
|
-
- !ruby/object:Gem::Dependency
|
336
|
-
name: rubocop-rake
|
337
|
-
requirement: !ruby/object:Gem::Requirement
|
338
|
-
requirements:
|
339
|
-
- - "~>"
|
340
|
-
- !ruby/object:Gem::Version
|
341
|
-
version: 0.6.0
|
342
|
-
type: :development
|
343
|
-
prerelease: false
|
344
|
-
version_requirements: !ruby/object:Gem::Requirement
|
345
|
-
requirements:
|
346
|
-
- - "~>"
|
347
|
-
- !ruby/object:Gem::Version
|
348
|
-
version: 0.6.0
|
349
|
-
- !ruby/object:Gem::Dependency
|
350
|
-
name: simplecov
|
351
|
-
requirement: !ruby/object:Gem::Requirement
|
352
|
-
requirements:
|
353
|
-
- - "~>"
|
354
|
-
- !ruby/object:Gem::Version
|
355
|
-
version: 0.21.0
|
356
|
-
type: :development
|
357
|
-
prerelease: false
|
358
|
-
version_requirements: !ruby/object:Gem::Requirement
|
359
|
-
requirements:
|
360
|
-
- - "~>"
|
361
|
-
- !ruby/object:Gem::Version
|
362
|
-
version: 0.21.0
|
363
|
-
- !ruby/object:Gem::Dependency
|
364
|
-
name: yard
|
365
|
-
requirement: !ruby/object:Gem::Requirement
|
366
|
-
requirements:
|
367
|
-
- - "~>"
|
368
|
-
- !ruby/object:Gem::Version
|
369
|
-
version: 0.9.28
|
370
|
-
type: :development
|
371
|
-
prerelease: false
|
372
|
-
version_requirements: !ruby/object:Gem::Requirement
|
373
|
-
requirements:
|
374
|
-
- - "~>"
|
375
|
-
- !ruby/object:Gem::Version
|
376
|
-
version: 0.9.28
|
377
237
|
description: Ruby library for creating/maintaining your development environment
|
378
238
|
email: opensource@firespring.com
|
379
239
|
executables: []
|
@@ -450,14 +310,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
450
310
|
requirements:
|
451
311
|
- - ">="
|
452
312
|
- !ruby/object:Gem::Version
|
453
|
-
version: '2
|
313
|
+
version: '3.2'
|
454
314
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
455
315
|
requirements:
|
456
|
-
- - "
|
316
|
+
- - ">"
|
457
317
|
- !ruby/object:Gem::Version
|
458
|
-
version:
|
318
|
+
version: 1.3.1
|
459
319
|
requirements: []
|
460
|
-
rubygems_version: 3.
|
320
|
+
rubygems_version: 3.4.10
|
461
321
|
signing_key:
|
462
322
|
specification_version: 4
|
463
323
|
summary: Development environment maintenance command library
|