From 17637042b72af292ed35a1ba3a6004d7bd3d82ef Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 29 Jun 2024 21:01:28 -0300 Subject: [PATCH] lint --- src/faaso.cr | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/faaso.cr b/src/faaso.cr index 46cb4cd..310db4c 100644 --- a/src/faaso.cr +++ b/src/faaso.cr @@ -16,18 +16,17 @@ module Faaso # A simple persistent k/v store store = Kiwi::FileStore.new(".kiwi") - # Ensure the faaso-net network exists + # Ensure the faaso-net network exists def self.setup_network - begin docker_api = Docr::API.new(Docr::Client.new) docker_api.networks.create(Docr::Types::NetworkConfig.new( name: "faaso-net", check_duplicate: false, driver: "bridge" )) - rescue ex : Docr::Errors::DockerAPIError - raise ex if ex.status_code != 409 # Network already exists - end + rescue ex : Docr::Errors::DockerAPIError + raise ex if ex.status_code != 409 # Network already exists + end module Commands @@ -156,7 +155,7 @@ module Faaso end # Deploy from scratch - Faaso.setup_network # We need it + Faaso.setup_network # We need it puts "Creating new container" conf = Docr::Types::CreateContainerConfig.new( image: "#{funko.name}:latest", @@ -180,7 +179,7 @@ module Faaso filters: {"name" => [container_name]} ) - (1..5).each { |i| + (1..5).each { |_| break if containers[0].state == "running" sleep 0.1.seconds }