comparison 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
comparison
equal deleted inserted replaced
929:5f33065ddc4b 1115:433d4f72a19b
4 def app_name; 'Redmine' end 4 def app_name; 'Redmine' end
5 def url; 'http://www.redmine.org/' end 5 def url; 'http://www.redmine.org/' end
6 def help_url; 'http://www.redmine.org/guide' end 6 def help_url; 'http://www.redmine.org/guide' end
7 def versioned_name; "#{app_name} #{Redmine::VERSION}" end 7 def versioned_name; "#{app_name} #{Redmine::VERSION}" end
8 8
9 # Creates the url string to a specific Redmine issue 9 def environment
10 def issue(issue_id) 10 s = "Environment:\n"
11 url + 'issues/' + issue_id.to_s 11 s << [
12 ["Redmine version", Redmine::VERSION],
13 ["Ruby version", "#{RUBY_VERSION} (#{RUBY_PLATFORM})"],
14 ["Rails version", Rails::VERSION::STRING],
15 ["Environment", Rails.env],
16 ["Database adapter", ActiveRecord::Base.connection.adapter_name]
17 ].map {|info| " %-40s %s" % info}.join("\n")
18 s << "\nRedmine plugins:\n"
19
20 plugins = Redmine::Plugin.all
21 if plugins.any?
22 s << plugins.map {|plugin| " %-40s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n")
23 else
24 s << " no plugin installed"
25 end
12 end 26 end
13 end 27 end
14 end 28 end
15 end 29 end