Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 55b03bc

Browse files
committed
:fix: Compatibility with ruby 2.5
1 parent 9e49a15 commit 55b03bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ecs_deploy_cli/runners/setup.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def setup_cluster!(cluster_options)
5353

5454
def setup_services!(services, resolved_tasks:)
5555
services.each do |service_name, service_definition|
56-
existing_services = ecs_client.describe_services(cluster: config[:cluster], services: [service_name]).to_h[:services].filter { |s| s[:status] != 'INACTIVE' }
56+
existing_services = ecs_client.describe_services(cluster: config[:cluster], services: [service_name]).to_h[:services].select { |s| s[:status] != 'INACTIVE' }
5757
if existing_services.any?
5858
EcsDeployCli.logger.info "Service #{service_name} already created, skipping."
5959
next
@@ -124,7 +124,7 @@ def create_params(cluster_options)
124124
def cluster_exists?
125125
clusters = ecs_client.describe_clusters(clusters: [config[:cluster]]).to_h[:clusters]
126126

127-
clusters.filter { |c| c[:status] != 'INACTIVE' }.length == 1
127+
clusters.count { |c| c[:status] != 'INACTIVE' } == 1
128128
end
129129

130130
def ensure_ecs_roles_exists!

0 commit comments

Comments
 (0)