2021-02-03 21:09:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-03 14:58:43 +00:00
|
|
|
# rubocop:disable Rails/Output
|
2020-02-03 03:08:30 +00:00
|
|
|
if Gitlab::Runtime.console?
|
2020-01-28 15:08:36 +00:00
|
|
|
# note that this will not print out when using `spring`
|
2018-05-03 14:58:43 +00:00
|
|
|
justify = 15
|
2019-07-08 19:47:16 +00:00
|
|
|
|
|
|
|
puts '-' * 80
|
2020-10-20 15:08:57 +00:00
|
|
|
puts " Ruby:".ljust(justify) + RUBY_DESCRIPTION
|
2020-02-03 03:08:30 +00:00
|
|
|
puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision}) #{Gitlab.ee? ? 'EE' : 'FOSS'}"
|
2020-03-16 15:09:27 +00:00
|
|
|
puts " GitLab Shell:".ljust(justify) + "#{Gitlab::VersionInfo.parse(Gitlab::Shell.version)}"
|
2019-07-08 19:47:16 +00:00
|
|
|
|
2021-11-15 15:10:57 +00:00
|
|
|
if ApplicationRecord.database.exists?
|
|
|
|
puts " #{ApplicationRecord.database.human_adapter_name}:".ljust(justify) + ApplicationRecord.database.version
|
2020-01-29 09:08:49 +00:00
|
|
|
|
|
|
|
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-07-08 19:47:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
puts '-' * 80
|
2020-11-04 18:08:42 +00:00
|
|
|
|
|
|
|
# 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-05-03 14:58:43 +00:00
|
|
|
end
|