diff --git a/config/application.rb b/config/application.rb index 7b009727fd..f0d852500a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -79,7 +79,3 @@ module Openfoodweb config.assets.precompile += ['store/all.css', 'store/all.js', 'admin/all.css', 'admin/*.js', 'admin/**/*.js', 'comfortable_mexican_sofa/*', 'search/all.css', 'search/*.js'] end end - -# YAML distributors config -DISTRIBUTOR_CONFIG = YAML.load(File.read(File.expand_path('../distributors.yml', __FILE__))) -DISTRIBUTOR_CONFIG.merge! DISTRIBUTOR_CONFIG.fetch(Rails.env, {}) diff --git a/config/initializers/distributors.rb b/config/initializers/distributors.rb new file mode 100644 index 0000000000..e7815092f3 --- /dev/null +++ b/config/initializers/distributors.rb @@ -0,0 +1,3 @@ +# YAML distributors config +DISTRIBUTOR_CONFIG = YAML.load(File.read(File.expand_path('../../distributors.yml', __FILE__))) +DISTRIBUTOR_CONFIG.merge! DISTRIBUTOR_CONFIG.fetch(Rails.env, {}) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ee6042f997..ef04d8c84c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ SimpleCov.start require 'rubygems' # Require pry when we're not inside Travis-CI -#require 'pry' unless ENV['HAS_JOSH_K_SEAL_OF_APPROVAL'] +require 'pry' unless ENV['HAS_JOSH_K_SEAL_OF_APPROVAL'] ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__)