add-plugin-information-to-script-about.patch

Eric Davis, 2009-05-19 00:14

Download (978 Bytes)

View differences:

lib/redmine/about.rb
1
module Redmine
2
  class About
3
    def self.print_plugin_info
4
      plugins = Redmine::Plugin.registered_plugins
5

  
6
      if !plugins.empty?
7
        column_with = plugins.map {|internal_name, plugin| plugin.name.length}.max
8
        puts "\nAbout your Redmine plugins"
9

  
10
        plugins.each do |internal_name, plugin|
11
          puts sprintf("%-#{column_with}s   %s", plugin.name, plugin.version)
12
        end
13
      end
14
    end
15
  end
16
end
script/about
1 1
#!/usr/bin/env ruby
2 2
require File.dirname(__FILE__) + '/../config/boot'
3 3
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
require 'commands/about'
4
require 'commands/about'
5

  
6
Redmine::About.print_plugin_info