From 53b002b4970c6c0f690a0d6788f20ca50306f233 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 May 2009 19:10:26 +0000 Subject: Add plugins information to script/about (#3387). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2766 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/about.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/redmine/about.rb (limited to 'lib') diff --git a/lib/redmine/about.rb b/lib/redmine/about.rb new file mode 100644 index 000000000..0fcc29a97 --- /dev/null +++ b/lib/redmine/about.rb @@ -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 -- cgit v1.2.3