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 "nanoc"
cwd = File.realpath File.join(__dir__, "..", "..")

View file

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