From 590e9120669b666605d19b845699ea921dbd17a2 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 16 Sep 2024 18:02:46 -0300 Subject: [PATCH] Add 'rake format:apply' --- rake/tasks/format.rake | 3 +++ rake/tasks/server.rake | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/rake/tasks/format.rake b/rake/tasks/format.rake index 21ebf50..d95fd8a 100644 --- a/rake/tasks/format.rake +++ b/rake/tasks/format.rake @@ -1,6 +1,9 @@ # frozen_string_literal: true namespace :format do + desc "Apply all formats" + task apply: %i[format:rubocop:apply format:eslint:apply] + desc "Run rubocop (Ruby)" task :rubocop do sh "bundle exec rubocop --config etc/rubocop.yml" diff --git a/rake/tasks/server.rake b/rake/tasks/server.rake index 6243735..860226c 100644 --- a/rake/tasks/server.rake +++ b/rake/tasks/server.rake @@ -9,10 +9,10 @@ task :server, [:protocol] do |_t, args| p = h[:protocol] || "tcp" n = File.basename(cwd) o = if p == "unix" - {unix: nanoc.server.unix.path} - else - {host: nanoc.server.tcp.host, port: nanoc.server.tcp.port} - end + {unix: nanoc.server.unix.path} + else + {host: nanoc.server.tcp.host, port: nanoc.server.tcp.port} + end s = Server.dir(nanoc.output_dir, o) Process.setproctitle "rake server[#{p}] [#{n}]" if p == "unix"