summaryrefslogtreecommitdiffstats
path: root/lib/redmine/about.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-05-25 19:10:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-05-25 19:10:26 +0000
commit53b002b4970c6c0f690a0d6788f20ca50306f233 (patch)
tree47442cc499a80ca0e9e64cfce5c0be98ef66d263 /lib/redmine/about.rb
parent85ce903cfa5f13eadef140f82466b258756a44eb (diff)
downloadredmine-53b002b4970c6c0f690a0d6788f20ca50306f233.tar.gz
redmine-53b002b4970c6c0f690a0d6788f20ca50306f233.zip
Add plugins information to script/about (#3387).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2766 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/about.rb')
-rw-r--r--lib/redmine/about.rb16
1 files changed, 16 insertions, 0 deletions
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