Output some useful information when running the rails console
This commit is contained in:
parent
17f598e9c3
commit
ec5489838a
2 changed files with 15 additions and 0 deletions
5
changelogs/unreleased/bw-add-console-message.yml
Normal file
5
changelogs/unreleased/bw-add-console-message.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Output some useful information when running the rails console
|
||||
merge_request: 18697
|
||||
author:
|
||||
type: added
|
10
config/initializers/console_message.rb
Normal file
10
config/initializers/console_message.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# rubocop:disable Rails/Output
|
||||
if defined?(Rails::Console)
|
||||
# note that this will not print out when using `spring`
|
||||
justify = 15
|
||||
puts "-------------------------------------------------------------------------------------"
|
||||
puts " Gitlab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab::REVISION})"
|
||||
puts " Gitlab Shell:".ljust(justify) + Gitlab::Shell.new.version
|
||||
puts " #{Gitlab::Database.adapter_name}:".ljust(justify) + Gitlab::Database.version
|
||||
puts "-------------------------------------------------------------------------------------"
|
||||
end
|
Loading…
Reference in a new issue