From 91550ac82f4d5f92ad7d1b02ad3dcbb085c67f21 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 10 Sep 2013 09:50:16 +1000 Subject: [PATCH] Move distributor config to its own file, re-enable pry for tests --- config/application.rb | 4 ---- config/initializers/distributors.rb | 3 +++ spec/spec_helper.rb | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 config/initializers/distributors.rb 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__)