From: Tatsuki Sugiura Date: Wed, 15 Feb 2017 05:49:38 +0000 (+0900) Subject: Fix command class loader to support ruby1.9.x. X-Git-Tag: v0.1.8^0 X-Git-Url: http://git.osdn.net/view?p=osdn-codes%2Fosdn-cli.git;a=commitdiff_plain;h=49d525c3a7964b159aca27f995b6faac7133bff4 Fix command class loader to support ruby1.9.x. --- diff --git a/ChangeLog b/ChangeLog index 641f103..c47df02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-02-15 Tatsuki Sugiura + + * Fix command class loader to support ruby 1.9.x. + * Version 0.1.8 + 2016-10-04 Tatsuki Sugiura * Version 0.1.7 diff --git a/lib/osdn/cli/runner.rb b/lib/osdn/cli/runner.rb index d9eeb4f..752b1d5 100644 --- a/lib/osdn/cli/runner.rb +++ b/lib/osdn/cli/runner.rb @@ -55,7 +55,7 @@ module OSDN def get_command_class(command_name) class_name = command_name.to_s.split('_').map(&:capitalize).join begin - return self.class.const_get("OSDN::CLI::Command::#{class_name}") + return OSDN::CLI::Command.const_get(class_name) rescue NameError => e logger.fatal "Invalid command name '#{command_name}'. Use 'help' to list commands." exit diff --git a/lib/osdn/cli/version.rb b/lib/osdn/cli/version.rb index 22045d1..3dffa84 100644 --- a/lib/osdn/cli/version.rb +++ b/lib/osdn/cli/version.rb @@ -1,5 +1,5 @@ module OSDN module CLI - VERSION = "0.1.7" + VERSION = "0.1.8" end end