lib/field_test.rb in field_test-0.1.0 vs lib/field_test.rb in field_test-0.1.1

- old
+ new

@@ -1,12 +1,21 @@ +require "distribution/math_extension" require "field_test/experiment" require "field_test/engine" require "field_test/helpers" +require "field_test/participant" require "field_test/version" module FieldTest class Error < StandardError; end - class ExperimentNotFound < Error; end +class ExperimentNotFound < Error; end + +def self.config + # reload in dev + @config = nil if Rails.env.development? + + @config ||= YAML.load(ERB.new(File.read("config/field_test.yml")).result) + end end ActiveSupport.on_load(:action_controller) do include FieldTest::Helpers end