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