Sha256: 88f49157450ad4a6e70795a234b4b21cff6e60dd9de412cadbdd0f5b25324ca7
Contents?: true
Size: 1.04 KB
Versions: 34
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true require 'avm/eac_rails_base1/runner_with/rails_environment' require 'avm/eac_webapp_base0/runner' module Avm module EacRailsBase1 class Runner < ::Avm::EacWebappBase0::Runner class Log runner_with :help, ::Avm::EacRailsBase1::RunnerWith::RailsEnvironment do desc 'Read application\'s log.' bool_opt '-f', '--follow', 'Output appended data as the log grows.' end def run start_banner tail_command.system end private def log_path ::File.join(rails_instance.read_entry('install.path'), 'log', "#{rails_environment}.log") end def start_banner infov 'Environment', rails_environment infov 'Log path', log_path end def tail_command rails_instance.host_env.command(*tail_command_args) end def tail_command_args r = %w[tail] r << '--follow' if parsed.follow? r + [log_path] end end end end end
Version data entries
34 entries across 34 versions & 2 rubygems