2019-03-17 16:36:34 +00:00
|
|
|
# frozen_string_literal: true
|
2019-03-15 01:32:57 +00:00
|
|
|
|
2023-11-26 14:07:17 +00:00
|
|
|
# Redmine - project management software
|
2024-02-26 22:55:54 +00:00
|
|
|
# Copyright (C) 2006- Jean-Philippe Lang
|
2023-11-26 14:07:17 +00:00
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
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
|
2019-03-17 16:36:34 +00:00
|
|
|
s = +"Environment:\n"
|
2012-05-01 11:41:15 +00:00
|
|
|
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],
|
2021-04-01 14:41:03 +00:00
|
|
|
["Mailer queue", ActionMailer::MailDeliveryJob.queue_adapter.class.name],
|
2018-10-10 17:13:09 +00:00
|
|
|
["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
|
|
|
|
2022-04-27 20:56:07 +00:00
|
|
|
theme_string = ''
|
|
|
|
|
theme_string += (Setting.ui_theme.blank? ? 'Default' : Setting.ui_theme.capitalize)
|
|
|
|
|
unless Setting.ui_theme.blank? ||
|
|
|
|
|
Redmine::Themes.theme(Setting.ui_theme).nil? ||
|
|
|
|
|
!Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme')
|
|
|
|
|
theme_string += ' (includes JavaScript)'
|
2021-12-12 04:15:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s << "Redmine settings:\n"
|
|
|
|
|
s << [
|
|
|
|
|
["Redmine theme", theme_string]
|
|
|
|
|
].map {|settings| " %-30s %s" % settings}.join("\n") + "\n"
|
|
|
|
|
|
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
|