You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

info.rb 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. module Redmine
  2. module Info
  3. class << self
  4. def app_name; 'Redmine' end
  5. def url; 'http://www.redmine.org/' end
  6. def help_url; 'http://www.redmine.org/guide' end
  7. def versioned_name; "#{app_name} #{Redmine::VERSION}" end
  8. def environment
  9. s = "Environment:\n"
  10. s << [
  11. ["Redmine version", Redmine::VERSION],
  12. ["Ruby version", "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"],
  13. ["Rails version", Rails::VERSION::STRING],
  14. ["Environment", Rails.env],
  15. ["Database adapter", ActiveRecord::Base.connection.adapter_name]
  16. ].map {|info| " %-30s %s" % info}.join("\n") + "\n"
  17. s << "SCM:\n"
  18. Redmine::Scm::Base.all.each do |scm|
  19. scm_class = "Repository::#{scm}".constantize
  20. if scm_class.scm_available
  21. s << " %-30s %s\n" % [scm, scm_class.scm_version_string]
  22. end
  23. end
  24. s << "Redmine plugins:\n"
  25. plugins = Redmine::Plugin.all
  26. if plugins.any?
  27. s << plugins.map {|plugin| " %-30s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n")
  28. else
  29. s << " no plugin installed"
  30. end
  31. end
  32. end
  33. end
  34. end