From f3aaf08b51a2be1ae277dfb3aaf5364249191cb4 Mon Sep 17 00:00:00 2001 From: Adrian Toth Date: Tue, 12 Sep 2017 09:56:49 +0200 Subject: [PATCH] Permanently deleted app/helpers/ui_constants.rb ... end of issue #1661 --- app/helpers/ui_constants.rb | 5 ----- lib/manageiq/ui/classic/engine.rb | 5 ----- lib/report_formatter.rb | 5 ----- spec/spec_helper.rb | 2 -- 4 files changed, 17 deletions(-) delete mode 100644 app/helpers/ui_constants.rb diff --git a/app/helpers/ui_constants.rb b/app/helpers/ui_constants.rb deleted file mode 100644 index b6d89144f61..00000000000 --- a/app/helpers/ui_constants.rb +++ /dev/null @@ -1,5 +0,0 @@ -module UiConstants -end - -# Make these constants globally available -include UiConstants diff --git a/lib/manageiq/ui/classic/engine.rb b/lib/manageiq/ui/classic/engine.rb index 78391a54a80..5c9604fa12e 100644 --- a/lib/manageiq/ui/classic/engine.rb +++ b/lib/manageiq/ui/classic/engine.rb @@ -42,11 +42,6 @@ class Engine < ::Rails::Engine ) end - config.after_initialize do - # HACK: Autoload UiConstants so other repos don't need to do this. This file pollutes the global namespace for legacy bad reasons. - UiConstants - end - def vmdb_plugin? true end diff --git a/lib/report_formatter.rb b/lib/report_formatter.rb index 522ac6f66e5..87e8a976380 100644 --- a/lib/report_formatter.rb +++ b/lib/report_formatter.rb @@ -1,8 +1,3 @@ -# Make these constants globally available -# TODO: Stop including constants in Object via UiConstants module since these -# singleton constants don't play nice with Rails class reloading in dev mode. -# Either access the constants through the UiConstants namespace or get it to -# work with including it in all the views/controllers via application_helper. include ActionView::Helpers::NumberHelper require 'report_formatter/report_renderer' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 027a5e3746b..5848b2b4be4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -48,11 +48,9 @@ config.include Spec::Support::AuthHelper, :type => :view config.include Spec::Support::ViewHelper, :type => :view - config.include UiConstants, :type => :view config.include Spec::Support::ControllerHelper, :type => :controller config.include Spec::Support::AuthHelper, :type => :controller - config.include UiConstants, :type => :controller config.include Spec::Support::AuthHelper, :type => :helper