Mercurial > hg > soundsoftware-site
diff lib/redmine/info.rb @ 1115:433d4f72a19b redmine-2.2
Update to Redmine SVN revision 11137 on 2.2-stable branch
author | Chris Cannam |
---|---|
date | Mon, 07 Jan 2013 12:01:42 +0000 |
parents | 513646585e45 |
children | bb32da3bea34 261b3d9a4903 |
line wrap: on
line diff
--- a/lib/redmine/info.rb Wed Jun 27 14:54:18 2012 +0100 +++ b/lib/redmine/info.rb Mon Jan 07 12:01:42 2013 +0000 @@ -6,9 +6,23 @@ def help_url; 'http://www.redmine.org/guide' end def versioned_name; "#{app_name} #{Redmine::VERSION}" end - # Creates the url string to a specific Redmine issue - def issue(issue_id) - url + 'issues/' + issue_id.to_s + def environment + s = "Environment:\n" + s << [ + ["Redmine version", Redmine::VERSION], + ["Ruby version", "#{RUBY_VERSION} (#{RUBY_PLATFORM})"], + ["Rails version", Rails::VERSION::STRING], + ["Environment", Rails.env], + ["Database adapter", ActiveRecord::Base.connection.adapter_name] + ].map {|info| " %-40s %s" % info}.join("\n") + s << "\nRedmine plugins:\n" + + plugins = Redmine::Plugin.all + if plugins.any? + s << plugins.map {|plugin| " %-40s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n") + else + s << " no plugin installed" + end end end end