summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/about.rb16
-rwxr-xr-xscript/about10
2 files changed, 22 insertions, 4 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
diff --git a/script/about b/script/about
index ed8deb0df..9f7dff2f1 100755
--- a/script/about
+++ b/script/about
@@ -1,4 +1,6 @@
-#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
-require 'commands/about' \ No newline at end of file
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
+require 'commands/about'
+
+Redmine::About.print_plugin_info