OSDN Git Service
(root)
/
osdn-codes
/
osdn-cli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix command class loader to support ruby1.9.x.
[osdn-codes/osdn-cli.git]
/
lib
/
osdn
/
cli
/
runner.rb
diff --git
a/lib/osdn/cli/runner.rb
b/lib/osdn/cli/runner.rb
index
d9eeb4f
..
752b1d5
100644
(file)
--- 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
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
rescue NameError => e
logger.fatal "Invalid command name '#{command_name}'. Use 'help' to list commands."
exit