Add plugins information to script/about (#3387).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2766 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
85ce903cfa
commit
53b002b497
|
@ -0,0 +1,16 @@
|
|||
module Redmine
|
||||
class About
|
||||
def self.print_plugin_info
|
||||
plugins = Redmine::Plugin.registered_plugins
|
||||
|
||||
if !plugins.empty?
|
||||
column_with = plugins.map {|internal_name, plugin| plugin.name.length}.max
|
||||
puts "\nAbout your Redmine plugins"
|
||||
|
||||
plugins.each do |internal_name, plugin|
|
||||
puts sprintf("%-#{column_with}s %s", plugin.name, plugin.version)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -2,3 +2,5 @@
|
|||
require File.dirname(__FILE__) + '/../config/boot'
|
||||
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
|
||||
require 'commands/about'
|
||||
|
||||
Redmine::About.print_plugin_info
|
||||
|
|
Loading…
Reference in New Issue