From 49d525c3a7964b159aca27f995b6faac7133bff4 Mon Sep 17 00:00:00 2001 From: Tatsuki Sugiura Date: Wed, 15 Feb 2017 14:49:38 +0900 Subject: [PATCH] Fix command class loader to support ruby1.9.x. --- ChangeLog | 5 +++++ lib/osdn/cli/runner.rb | 2 +- lib/osdn/cli/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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 -- 2.11.0