Chris@1295: module Redmine Chris@1295: module Info Chris@1295: class << self Chris@1295: def app_name; 'Redmine' end Chris@1295: def url; 'http://www.redmine.org/' end Chris@1295: def help_url; 'http://www.redmine.org/guide' end Chris@1295: def versioned_name; "#{app_name} #{Redmine::VERSION}" end Chris@1295: Chris@1295: def environment Chris@1295: s = "Environment:\n" Chris@1295: s << [ Chris@1295: ["Redmine version", Redmine::VERSION], Chris@1295: ["Ruby version", "#{RUBY_VERSION} (#{RUBY_PLATFORM})"], Chris@1295: ["Rails version", Rails::VERSION::STRING], Chris@1295: ["Environment", Rails.env], Chris@1295: ["Database adapter", ActiveRecord::Base.connection.adapter_name] Chris@1295: ].map {|info| " %-40s %s" % info}.join("\n") Chris@1295: s << "\nRedmine plugins:\n" Chris@1295: Chris@1295: plugins = Redmine::Plugin.all Chris@1295: if plugins.any? Chris@1295: s << plugins.map {|plugin| " %-40s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n") Chris@1295: else Chris@1295: s << " no plugin installed" Chris@1295: end Chris@1295: end Chris@1295: end Chris@1295: end Chris@1295: end