lib/split.rb in split-0.4.6 vs lib/split.rb in split-0.5.0
- old
+ new
@@ -1,10 +1,9 @@
-require 'split/experiment'
-require 'split/alternative'
-require 'split/helper'
-require 'split/version'
-require 'split/configuration'
+%w[algorithms extensions metric trial experiment alternative helper version configuration persistence exceptions].each do |f|
+ require "split/#{f}"
+end
+
require 'split/engine' if defined?(Rails)
require 'redis/namespace'
module Split
extend self
@@ -50,11 +49,11 @@
# @example
# Split.configure do |config|
# config.ignore_ips = '192.168.2.1'
# end
def configure
- self.configuration ||= Configuration.new
- yield(configuration)
- end
+ self.configuration ||= Configuration.new
+ yield(configuration)
+ end
end
-Split.configure {}
\ No newline at end of file
+Split.configure {}