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