| 
									
										
										
										
											2007-08-29 22:27:43 +00:00
										 |  |  | module Redmine | 
					
						
							|  |  |  |   module Info | 
					
						
							|  |  |  |     class << self | 
					
						
							|  |  |  |       def app_name; 'Redmine' end | 
					
						
							| 
									
										
										
										
											2015-07-05 13:53:17 +00:00
										 |  |  |       def url; 'https://www.redmine.org/' end | 
					
						
							|  |  |  |       def help_url; 'https://www.redmine.org/guide' end | 
					
						
							| 
									
										
										
										
											2007-08-29 22:27:43 +00:00
										 |  |  |       def versioned_name; "#{app_name} #{Redmine::VERSION}" end | 
					
						
							| 
									
										
										
										
											2012-05-01 11:41:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       def environment | 
					
						
							|  |  |  |         s = "Environment:\n" | 
					
						
							|  |  |  |         s << [ | 
					
						
							|  |  |  |           ["Redmine version", Redmine::VERSION], | 
					
						
							| 
									
										
										
										
											2013-07-11 18:45:43 +00:00
										 |  |  |           ["Ruby version", "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"], | 
					
						
							| 
									
										
										
										
											2012-05-01 11:41:15 +00:00
										 |  |  |           ["Rails version", Rails::VERSION::STRING], | 
					
						
							|  |  |  |           ["Environment", Rails.env], | 
					
						
							| 
									
										
										
										
											2018-10-10 17:13:09 +00:00
										 |  |  |           ["Database adapter", ActiveRecord::Base.connection.adapter_name], | 
					
						
							|  |  |  |           ["Mailer queue", ActionMailer::DeliveryJob.queue_adapter.class.name], | 
					
						
							|  |  |  |           ["Mailer delivery", ActionMailer::Base.delivery_method] | 
					
						
							| 
									
										
										
										
											2013-07-11 18:45:43 +00:00
										 |  |  |         ].map {|info| "  %-30s %s" % info}.join("\n") + "\n" | 
					
						
							| 
									
										
										
										
											2012-05-01 11:41:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-01 16:32:29 +00:00
										 |  |  |         s << "SCM:\n" | 
					
						
							|  |  |  |         Redmine::Scm::Base.all.each do |scm| | 
					
						
							|  |  |  |           scm_class = "Repository::#{scm}".constantize | 
					
						
							|  |  |  |           if scm_class.scm_available | 
					
						
							| 
									
										
										
										
											2013-07-11 18:45:43 +00:00
										 |  |  |             s << "  %-30s %s\n" % [scm, scm_class.scm_version_string] | 
					
						
							| 
									
										
										
										
											2013-06-01 16:32:29 +00:00
										 |  |  |           end | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         s << "Redmine plugins:\n" | 
					
						
							| 
									
										
										
										
											2012-05-01 11:41:15 +00:00
										 |  |  |         plugins = Redmine::Plugin.all | 
					
						
							|  |  |  |         if plugins.any? | 
					
						
							| 
									
										
										
										
											2013-07-11 18:45:43 +00:00
										 |  |  |           s << plugins.map {|plugin| "  %-30s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n") | 
					
						
							| 
									
										
										
										
											2012-05-01 11:41:15 +00:00
										 |  |  |         else | 
					
						
							|  |  |  |           s << "  no plugin installed" | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2007-08-29 22:27:43 +00:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |