i_wonder 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/i_wonder/ab_tests_controller.rb +0 -2
- data/app/views/i_wonder/ab_tests/_show_not_started.html.erb +1 -1
- data/lib/i_wonder/ab_testing/action_controller_mixins.rb +5 -0
- data/lib/i_wonder/ab_testing/loader.rb +8 -6
- data/lib/i_wonder/version.rb +1 -1
- data/test/dummy/log/development.log +869 -0
- data/test/dummy/log/test.log +9619 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/functional/ab_controller_mixins_test.rb +9 -0
- metadata +23 -21
@@ -18,7 +18,6 @@ module IWonder
|
|
18
18
|
@ab_test = AbTest.new(params[:ab_test])
|
19
19
|
|
20
20
|
if @ab_test.save
|
21
|
-
AbTesting::Loader.save_ab_tests
|
22
21
|
redirect_to @ab_test, :notice => "Successfully created ABTest"
|
23
22
|
else
|
24
23
|
render "new"
|
@@ -34,7 +33,6 @@ module IWonder
|
|
34
33
|
@ab_test = AbTest.find(params[:id])
|
35
34
|
|
36
35
|
if @ab_test.update_attributes(params[:ab_test])
|
37
|
-
AbTesting::Loader.save_ab_tests
|
38
36
|
redirect_to @ab_test, :notice => "Successfully updated ABTest"
|
39
37
|
else
|
40
38
|
render "edit"
|
@@ -11,6 +11,11 @@ module IWonder
|
|
11
11
|
def which_test_group?(event_sym)
|
12
12
|
ab_test = IWonder::AbTest.find_by_sym(event_sym.to_s)
|
13
13
|
return false unless ab_test
|
14
|
+
|
15
|
+
if params[:_force_ab_test] and params[:_to_option] and params[:_force_ab_test]==event_sym.to_s
|
16
|
+
return params[:_to_option]
|
17
|
+
end
|
18
|
+
|
14
19
|
ab_test.which_test_group?(self)
|
15
20
|
end
|
16
21
|
|
@@ -14,12 +14,14 @@ module IWonder
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.load_all
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
if File.exists?(I_WONDER_DATA_DIR) and File.exists?(AB_TEST_DATA_DIR)
|
18
|
+
Dir.open(AB_TEST_DATA_DIR) do |dir|
|
19
|
+
dir.each{|file_name|
|
20
|
+
if file_name =~ /(.+).xml/
|
21
|
+
load_sym($1)
|
22
|
+
end
|
23
|
+
}
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
data/lib/i_wonder/version.rb
CHANGED