summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBrett Walker <brett@digitalmoksha.com>2018-05-03 14:58:43 +0000
committerRobert Speicher <robert@gitlab.com>2018-05-03 14:58:43 +0000
commitec5489838a90d4997c72a19ea25dd9da4e307642 (patch)
tree334619849d9c962dd89ebbc254f2d31036b45326 /config
parent17f598e9c36944dc98b2967689622f9d374ea6f4 (diff)
downloadgitlab-ce-ec5489838a90d4997c72a19ea25dd9da4e307642.tar.gz
Output some useful information when running the rails console
Diffstat (limited to 'config')
-rw-r--r--config/initializers/console_message.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/initializers/console_message.rb b/config/initializers/console_message.rb
new file mode 100644
index 00000000000..536ab337d85
--- /dev/null
+++ b/config/initializers/console_message.rb
@@ -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