From 5110d3d33f7a6b63f218b889a5afec90e6df810f Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Fri, 8 Sep 2017 16:43:50 +0100 Subject: [PATCH] Remove require logic from Gemfile --- Gemfile | 2 +- config/application.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 64faada75..837a4f281 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem 'dalli' gem 'gds-api-adapters', '~> 43.0' gem 'govuk_ab_testing', '~> 2.0' gem 'govuk_frontend_toolkit', '5.1.0' -gem 'govuk_publishing_components', '~> 1.5.0', require: ENV['RAILS_ENV'] != "production" || ENV['HEROKU_APP_NAME'].to_s.length.positive? +gem 'govuk_publishing_components', '~> 1.5.0', require: false gem 'htmlentities', '4.3.4' gem 'logstasher', '0.6.1' gem 'plek', '1.11' diff --git a/config/application.rb b/config/application.rb index 816d8582f..60253093d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,10 @@ # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) +if !Rails.env.production? || ENV['HEROKU_APP_NAME'].present? + require 'govuk_publishing_components' +end + module GovernmentFrontend class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here.