2021-03-11 19:13:27 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
# rubocop:disable Rails/Output
|
2020-03-13 15:44:24 +05:30
|
|
|
if Gitlab::Runtime.console?
|
2018-10-15 14:42:47 +05:30
|
|
|
# note that this will not print out when using `spring`
|
|
|
|
justify = 15
|
2019-09-30 21:07:59 +05:30
|
|
|
|
|
|
|
puts '-' * 80
|
2021-01-29 00:20:46 +05:30
|
|
|
puts " Ruby:".ljust(justify) + RUBY_DESCRIPTION
|
2020-03-13 15:44:24 +05:30
|
|
|
puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision}) #{Gitlab.ee? ? 'EE' : 'FOSS'}"
|
2020-04-08 14:13:33 +05:30
|
|
|
puts " GitLab Shell:".ljust(justify) + "#{Gitlab::VersionInfo.parse(Gitlab::Shell.version)}"
|
2019-09-30 21:07:59 +05:30
|
|
|
|
2021-12-11 22:18:48 +05:30
|
|
|
if ApplicationRecord.database.exists?
|
|
|
|
puts " #{ApplicationRecord.database.human_adapter_name}:".ljust(justify) + ApplicationRecord.database.version
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
if Gitlab::Geo.connected? && Gitlab::Geo.enabled?
|
|
|
|
puts " Geo enabled:".ljust(justify) + 'yes'
|
|
|
|
puts " Geo server:".ljust(justify) + EE::GeoHelper.current_node_human_status
|
|
|
|
end
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
puts '-' * 80
|
2021-01-29 00:20:46 +05:30
|
|
|
|
|
|
|
# Stop irb from writing a history file by default.
|
|
|
|
module IrbNoHistory
|
|
|
|
def init_config(*)
|
|
|
|
super
|
|
|
|
|
|
|
|
IRB.conf[:SAVE_HISTORY] = false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
IRB.singleton_class.prepend(IrbNoHistory)
|
2018-10-15 14:42:47 +05:30
|
|
|
end
|