diff options
author | Christopher Baines <mail@cbaines.net> | 2018-04-03 07:30:34 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-04-03 21:58:55 +0100 |
commit | 9840280b5fb6c4fab31446d43e1a0b43bf540bcd (patch) | |
tree | 823bc89c0dfe6e6b83da2af4c23e670b67165940 /config | |
parent | 22e30d9482cbdd410fdfcb8c92bab8456b23e60a (diff) | |
download | govuk-mini-environment-admin-9840280b5fb6c4fab31446d43e1a0b43bf540bcd.tar govuk-mini-environment-admin-9840280b5fb6c4fab31446d43e1a0b43bf540bcd.tar.gz |
Rework the gem situation
Use gem rather than require in config/boot.rb. This is better, as it
only sets up the $LOAD_PATH, and doesn't actually require the
gem. This prevents Rails getting loaded early, and getting confused.
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 4 | ||||
-rw-r--r-- | config/boot.rb | 20 | ||||
-rw-r--r-- | config/initializers/gds-sso.rb | 2 | ||||
-rw-r--r-- | config/initializers/govuk_admin_template.rb | 2 | ||||
-rw-r--r-- | config/initializers/que.rb | 2 |
5 files changed, 23 insertions, 7 deletions
diff --git a/config/application.rb b/config/application.rb index 3093aee..a7c23fb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,6 +2,10 @@ require_relative 'boot' require 'rails/all' +# TODO Not sure if these are best here +require 'govuk_admin_template' +require 'plek' + module GovukMiniEnvironmentAdmin class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. diff --git a/config/boot.rb b/config/boot.rb index 84cfa4d..48d7d8b 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,7 +1,13 @@ -require 'rails' -require 'gds-sso' -require 'plek' -require 'govuk_admin_template' -require 'active_record' -require 'que' -require 'que/railtie' +require 'pathname' + +gem 'rails' +gem 'sass-rails' + +gem 'listen' + +gem 'govuk_admin_template' +gem 'gds-sso' +gem 'plek' +gem 'que' +gem 'ruby-terraform' +gem 'git' diff --git a/config/initializers/gds-sso.rb b/config/initializers/gds-sso.rb index 3e78219..d595be8 100644 --- a/config/initializers/gds-sso.rb +++ b/config/initializers/gds-sso.rb @@ -1,3 +1,5 @@ +require 'gds-sso' + GDS::SSO.config do |config| config.user_model = 'User' diff --git a/config/initializers/govuk_admin_template.rb b/config/initializers/govuk_admin_template.rb index ab074f5..5af1b06 100644 --- a/config/initializers/govuk_admin_template.rb +++ b/config/initializers/govuk_admin_template.rb @@ -1,3 +1,5 @@ +require 'govuk_admin_template' + GovukAdminTemplate.configure do |c| c.app_title = "GOV.UK Mini Environment Admin" c.show_flash = true diff --git a/config/initializers/que.rb b/config/initializers/que.rb index b9e5a68..c5f415f 100644 --- a/config/initializers/que.rb +++ b/config/initializers/que.rb @@ -1 +1,3 @@ +require 'que' + Que.mode = :off |