Run rubocop

This commit is contained in:
0x1eef 2024-06-19 18:36:03 -03:00
parent 3d56ecb00e
commit 31741a1bbd
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "bundler/setup" require "bundler/setup"
require "nanoc" require "nanoc"
cwd = File.realpath File.join(__dir__, "..", "..") cwd = File.realpath File.join(__dir__, "..", "..")

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
desc "Start web server" desc "Start web server"
task :server, [:protocol] do |_t, args| task :server, [:protocol] do |_t, args|
require "yaml" require "yaml"
@ -8,10 +10,10 @@ task :server, [:protocol] do |_t, args|
p = h[:protocol] || "tcp" p = h[:protocol] || "tcp"
n = File.basename File.realpath(File.join(__dir__, "..", "..", ".")) n = File.basename File.realpath(File.join(__dir__, "..", "..", "."))
o = if p == "unix" o = if p == "unix"
{unix: nanoc.server.unix.path} {unix: nanoc.server.unix.path}
else else
{host: nanoc.server.tcp.host, port: nanoc.server.tcp.port} {host: nanoc.server.tcp.host, port: nanoc.server.tcp.port}
end end
Process.setproctitle "rake server[#{p}] [#{n}]" Process.setproctitle "rake server[#{p}] [#{n}]"
s = Server.dir(nanoc.output_dir, o) s = Server.dir(nanoc.output_dir, o)
s.start(block: true) s.start(block: true)