lib/command.rb in narou-3.2.5.1 vs lib/command.rb in narou-3.3.0
- old
+ new
@@ -1,11 +1,11 @@
-# -*- coding: utf-8 -*-
+# frozen_string_literal: true
+
#
# Copyright 2013 whiteleaf. All rights reserved.
#
-require "optparse"
require_relative "commandbase"
Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "command", "*.rb"))) do |path|
require path
end
@@ -36,14 +36,19 @@
"web" => Web,
"mail" => Mail,
"backup" => Backup,
"csv" => Csv,
"clean" => Clean,
+ "log" => Log,
"trace" => Trace,
"help" => Help,
"version" => Version,
"init" => Init
}
+
+ if $development
+ COMMAND_LIST["console"] = Console
+ end
# ショートカット定義
# COMMAND_LIST の上から順に優先度が高い
Shortcuts = Hash[*get_list.keys.reverse.map { |s|
[s[0], s, s[0..1], s]