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