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