diff --git a/src/amber/cli/commands/exec.cr b/src/amber/cli/commands/exec.cr index ad24a1323..a68e6f2cc 100644 --- a/src/amber/cli/commands/exec.cr +++ b/src/amber/cli/commands/exec.cr @@ -53,7 +53,7 @@ module Amber::CLI spawn show process = Process.run(code, shell: true, output: file, error: file) sleep 1.millisecond - process.exit_status + process.exit_code end private def wrap(code) diff --git a/src/amber/cli/helpers/process_runner.cr b/src/amber/cli/helpers/process_runner.cr index aa147443e..ffee669be 100644 --- a/src/amber/cli/helpers/process_runner.cr +++ b/src/amber/cli/helpers/process_runner.cr @@ -13,7 +13,7 @@ module Sentry @build_commands = Hash(String, String).new, # { "task1" => [ ... ], "task2" => [ ... ] } @run_commands = Hash(String, String).new, # { "task1" => [ ... ], "task2" => [ ... ] } @includes = Hash(String, Array(String)).new, # { "task1" => [ ... ], "task2" => [ ... ] } - @excludes = Hash(String, Array(String)).new # { "task1" => [ ... ], "task2" => [ ... ] } + @excludes = Hash(String, Array(String)).new, # { "task1" => [ ... ], "task2" => [ ... ] } ) @app_running = false end @@ -25,7 +25,7 @@ module Sentry loop do scan_files check_processes - sleep 1 + sleep 1.second end end @@ -120,11 +120,11 @@ module Sentry ok_to_run = true else log :run, "Building..." - time = Time.monotonic + time = Time.instant build_result = Amber::CLI::Helpers.run(build_command_run) exit 1 unless build_result.is_a? Process::Status if build_result.success? - log :run, "Compiled in #{(Time.monotonic - time)}" + log :run, "Compiled in #{(Time.instant - time)}" stop_processes("run") if @app_running ok_to_run = true elsif !@app_running # first run diff --git a/src/amber/dsl/router.cr b/src/amber/dsl/router.cr index b851048b5..369a016c9 100644 --- a/src/amber/dsl/router.cr +++ b/src/amber/dsl/router.cr @@ -33,12 +33,12 @@ module Amber::DSL {% for verb in RESOURCES %} macro {{verb.id}}(*args) - route {{verb}}, \{{*args}} + route {{verb}}, \{{args.splat}} {% if verb == :get %} - route :head, \{{*args}} + route :head, \{{args.splat}} {% end %} {% if ![:trace, :connect, :options, :head].includes? verb %} - route :options, \{{*args}} + route :options, \{{args.splat}} {% end %} end {% end %}