camping-abingo 1.0.3
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/README +3 -0
- data/doc/classes/ABingoCampingPlugin.html +188 -0
- data/doc/classes/ABingoCampingPlugin.src/M000016.html +18 -0
- data/doc/classes/ABingoCampingPlugin.src/M000017.html +18 -0
- data/doc/classes/ABingoCampingPlugin.src/M000018.html +19 -0
- data/doc/classes/ABingoCampingPlugin.src/M000034.html +18 -0
- data/doc/classes/ABingoCampingPlugin.src/M000035.html +18 -0
- data/doc/classes/ABingoCampingPlugin.src/M000036.html +19 -0
- data/doc/classes/ABingoCampingPlugin/ABingo.html +121 -0
- data/doc/classes/ABingoCampingPlugin/Controllers.html +191 -0
- data/doc/classes/ABingoCampingPlugin/Controllers.src/M000022.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Controllers.src/M000023.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Controllers.src/M000040.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Controllers.src/M000041.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Filters.html +158 -0
- data/doc/classes/ABingoCampingPlugin/Filters.src/M000037.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Filters.src/M000055.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.html +372 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000024.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000025.html +19 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000026.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000027.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000028.html +36 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000029.html +28 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000030.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000031.html +48 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000032.html +32 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000033.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000034.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000035.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000036.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000042.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000043.html +19 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000044.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000045.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000046.html +36 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000047.html +28 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000048.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000049.html +48 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000050.html +32 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000051.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000052.html +26 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000053.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Helpers.src/M000054.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Models.html +208 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000038.html +22 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000039.html +39 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000040.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000056.html +22 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000057.html +39 -0
- data/doc/classes/ABingoCampingPlugin/Models.src/M000058.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.html +181 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000041.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000042.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000043.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000059.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000060.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Alternative.src/M000061.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.html +273 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000044.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000045.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000046.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000047.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000048.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000049.html +23 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000050.html +29 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000051.html +50 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000052.html +28 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000062.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000063.html +21 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000064.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000065.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000066.html +20 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000067.html +23 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000068.html +29 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000069.html +50 -0
- data/doc/classes/ABingoCampingPlugin/Models/Experiment.src/M000070.html +28 -0
- data/doc/classes/ABingoCampingPlugin/Views.html +196 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000019.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000020.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000021.html +30 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000037.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000038.html +18 -0
- data/doc/classes/ABingoCampingPlugin/Views.src/M000039.html +30 -0
- data/doc/classes/Abingo.html +429 -0
- data/doc/classes/Abingo.src/M000001.html +18 -0
- data/doc/classes/Abingo.src/M000002.html +18 -0
- data/doc/classes/Abingo.src/M000003.html +18 -0
- data/doc/classes/Abingo.src/M000004.html +22 -0
- data/doc/classes/Abingo.src/M000005.html +69 -0
- data/doc/classes/Abingo.src/M000006.html +47 -0
- data/doc/classes/Abingo.src/M000007.html +31 -0
- data/doc/classes/Abingo.src/M000008.html +36 -0
- data/doc/classes/Abingo.src/M000009.html +18 -0
- data/doc/classes/Abingo.src/M000010.html +36 -0
- data/doc/classes/Abingo.src/M000011.html +22 -0
- data/doc/classes/Abingo.src/M000012.html +21 -0
- data/doc/classes/Abingo.src/M000013.html +18 -0
- data/doc/classes/Abingo.src/M000014.html +39 -0
- data/doc/classes/Abingo.src/M000015.html +25 -0
- data/doc/classes/ActiveSupport.html +107 -0
- data/doc/classes/ActiveSupport/Cache.html +111 -0
- data/doc/classes/ActiveSupport/Cache/MemoryStore.html +137 -0
- data/doc/classes/ActiveSupport/Cache/MemoryStore.src/M000016.html +18 -0
- data/doc/classes/CampingABingoTest.html +149 -0
- data/doc/classes/CampingABingoTest.src/M000017.html +24 -0
- data/doc/classes/CampingABingoTest/Controllers.html +116 -0
- data/doc/classes/CampingABingoTest/Controllers/Index.html +137 -0
- data/doc/classes/CampingABingoTest/Controllers/Index.src/M000024.html +18 -0
- data/doc/classes/CampingABingoTest/Controllers/Landing.html +137 -0
- data/doc/classes/CampingABingoTest/Controllers/Landing.src/M000026.html +18 -0
- data/doc/classes/CampingABingoTest/Controllers/SignIn.html +152 -0
- data/doc/classes/CampingABingoTest/Controllers/SignIn.src/M000030.html +18 -0
- data/doc/classes/CampingABingoTest/Controllers/SignIn.src/M000031.html +34 -0
- data/doc/classes/CampingABingoTest/Controllers/SignOut.html +137 -0
- data/doc/classes/CampingABingoTest/Controllers/SignOut.src/M000029.html +21 -0
- data/doc/classes/CampingABingoTest/Controllers/SignUp.html +152 -0
- data/doc/classes/CampingABingoTest/Controllers/SignUp.src/M000027.html +23 -0
- data/doc/classes/CampingABingoTest/Controllers/SignUp.src/M000028.html +33 -0
- data/doc/classes/CampingABingoTest/Controllers/Welcome.html +137 -0
- data/doc/classes/CampingABingoTest/Controllers/Welcome.src/M000025.html +18 -0
- data/doc/classes/CampingABingoTest/Helpers.html +112 -0
- data/doc/classes/CampingABingoTest/Models.html +119 -0
- data/doc/classes/CampingABingoTest/Models/CreateUserSchema.html +152 -0
- data/doc/classes/CampingABingoTest/Models/CreateUserSchema.src/M000032.html +26 -0
- data/doc/classes/CampingABingoTest/Models/CreateUserSchema.src/M000033.html +19 -0
- data/doc/classes/CampingABingoTest/Models/User.html +111 -0
- data/doc/classes/CampingABingoTest/Views.html +206 -0
- data/doc/classes/CampingABingoTest/Views.src/M000018.html +70 -0
- data/doc/classes/CampingABingoTest/Views.src/M000019.html +22 -0
- data/doc/classes/CampingABingoTest/Views.src/M000020.html +51 -0
- data/doc/classes/CampingABingoTest/Views.src/M000021.html +31 -0
- data/doc/classes/CampingABingoTest/Views.src/M000022.html +31 -0
- data/doc/classes/CampingABingoTest/Views.src/M000023.html +20 -0
- data/doc/created.rid +1 -0
- data/doc/files/examples/camping-abingo-test/camping-abingo-test_rb.html +101 -0
- data/doc/files/lib/camping-abingo_rb.html +457 -0
- data/doc/fr_class_index.html +52 -0
- data/doc/fr_file_index.html +28 -0
- data/doc/fr_method_index.html +96 -0
- data/doc/index.html +24 -0
- data/lib/camping-abingo.rb +1233 -0
- metadata +279 -0
@@ -0,0 +1,70 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>layout (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 166</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout</span>
|
15
|
+
<span class="ruby-identifier">html</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
|
17
|
+
<span class="ruby-identifier">head</span> <span class="ruby-keyword kw">do</span>
|
18
|
+
<span class="ruby-identifier">title</span> <span class="ruby-value str">"Ruby Camping ABingo Plugin Demo"</span>
|
19
|
+
|
20
|
+
<span class="ruby-identifier">style</span> <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'text/css'</span> <span class="ruby-keyword kw">do</span>
|
21
|
+
<span class="ruby-value str">"\n/* --- General Test App Styles --- */\n\nbody {\npadding:0 0 0 0;\nmargin:5px;\nfont-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;\nfont-size: 0.8em;\ncolor:#303030;\nbackground-color: #fbf9b5;\n}\n\na {\ncolor:#303030;\ntext-decoration:none;\nborder-bottom:1px dotted #505050;\n}\n\na:hover {\ncolor:#303030;\nbackground: yellow;\ntext-decoration:none;\nborder-bottom:4px solid orange;\n}\n\nh1 {\nfont-size: 14px;\ncolor: #cc3300;\n}\n\ntable {\nfont-size:0.9em;\nwidth: 1050px;\n}\n\ntr\n{\nbackground:lightgoldenRodYellow;\nvertical-align:top;\n}\n\nth\n{\nfont-size: 0.9em;\nfont-weight:bold;\nbackground:lightBlue none repeat scroll 0 0;\n\ntext-align:left;\n}\n\n#header\n{\nwidth: 100%;\nheight: 30px;\nborder-bottom: 4px solid #ccc;\n}\n\n#header_title\n{\nfloat: left;\n}\n\n#top_nav\n{\nfloat: right;\n}\n\n#footer\n{\nwidth: 100%;\nborder-top: 4px solid #ccc;\n}\n\n\n#footer_notices\n{\nwidth: 100%;\nborder-top: 4px solid #ccc;\n}\n\n#home\n{\nbackground-color: #C9E3F5;\npadding: 10px;\nheight: 300px;\n}\n\n#debug_panel\n{\nbackground-color: wheat;\npadding: 10px;\n}\n\n.xyz\n{\nbackground-color: #D1F2A5;\npadding: 10px;\nheight: 300px;\n}\n\n.xyz h1\n{\ncolor: #9D9F89;\n}\n\n#special_promo\n{\nmargin: 20px;\n}\n\n#landing a:hover\n{\nbackground-color: #B2DE93;\nborder-bottom-color:green;\n}\n\n#marketing\n{\nwidth: 480px;\nheight: 100px;\nmargin: 20px;\n}\n\n#benefits\n{\nfloat: left;\nwidth: 300px;\nheight: 100px;\nfont-size: 1.3em;\nfont-weight: bold;\ncolor: green;\nbackground-color: #B2DE93;\n}\n\n#actnow\n{\nfloat: right;\nwidth: 180px;\nheight: 100px;\ntext-align: center;\nbackground-color: #8BC59B;\n}\n\n#signup_btn\n{\nbackground-color:#91F1A0;\nborder:4px solid green;\nfont-size:1.5em;\nfont-weight:bold;\nheight:72px;\nmargin: 10px 20px 10px 22px;\nwidth:130px;\n}\n\n#actnow a:hover #signup_btn\n{\nbackground-color: #69F17F;\ncolor: #007300;\nborder: 4px solid #00AA00;\n}\n\n/* --- ABingo Dashboard Styles ---*/\n\n#abingo_dashboard\n{\nbackground-color: white;\npadding: 10px;\n}\n\nabingo_experiment_table\n{\nwidth: 100%;\n}\n\n.abingo_experiment_row\n{\n}\n\n.abingo_alternative_row\n{\ncolor: red;\nfont-weight: bold;\n}\n\n.abingo_debug\n{\ndisplay: block;\nwidth: 100%;\n}\n\n.abingo_explain\n{\ncolor: #CCC;\nfont-style:italics;\n}\n\n\n"</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#head</span>
|
24
|
+
|
25
|
+
<span class="ruby-identifier">body</span> <span class="ruby-keyword kw">do</span>
|
26
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">header!</span> <span class="ruby-keyword kw">do</span>
|
27
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">header_title!</span> <span class="ruby-value str">"Ruby Camping ABingo Plugin Demo"</span>
|
28
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">top_nav!</span> <span class="ruby-keyword kw">do</span>
|
29
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"Home"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/"</span>
|
30
|
+
<span class="ruby-identifier">span</span> <span class="ruby-value str">" | "</span>
|
31
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">user_id</span>.<span class="ruby-identifier">nil?</span>
|
32
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"Sign-In"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">'/signin'</span>
|
33
|
+
<span class="ruby-identifier">span</span> <span class="ruby-value str">" | "</span>
|
34
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"Sign-Up"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">'/signup'</span>
|
35
|
+
<span class="ruby-keyword kw">else</span>
|
36
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"XYZ"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/welcome"</span>
|
37
|
+
<span class="ruby-identifier">span</span> <span class="ruby-value str">" | "</span>
|
38
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"Sign-Out"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">'/signout'</span>
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">user_id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">abingo_administrator_user_id</span>
|
40
|
+
<span class="ruby-identifier">span</span> <span class="ruby-value str">" | "</span>
|
41
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"ABingo Dashboard"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/abingo/dashboard"</span>
|
42
|
+
<span class="ruby-keyword kw">end</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
<span class="ruby-keyword kw">end</span>
|
45
|
+
<span class="ruby-keyword kw">end</span>
|
46
|
+
|
47
|
+
<span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">yield</span>
|
48
|
+
|
49
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">footer!</span> <span class="ruby-keyword kw">do</span>
|
50
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">debug_panel!</span> <span class="ruby-keyword kw">do</span>
|
51
|
+
<span class="ruby-identifier">h4</span> <span class="ruby-value str">"Debugging Information:"</span>
|
52
|
+
<span class="ruby-identifier">h5</span> <span class="ruby-value str">"State:"</span>
|
53
|
+
<span class="ruby-identifier">div</span> <span class="ruby-node">"#{@state.inspect}"</span>
|
54
|
+
|
55
|
+
<span class="ruby-identifier">h5</span> <span class="ruby-value str">"Cache Data:"</span>
|
56
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Abingo</span>.<span class="ruby-identifier">cache</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">Abingo</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">data</span>
|
57
|
+
<span class="ruby-constant">Abingo</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span> <span class="ruby-operator">|</span>
|
58
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">abingo_debug</span> <span class="ruby-node">"#{k} => #{v.inspect}"</span>;
|
59
|
+
<span class="ruby-keyword kw">end</span>
|
60
|
+
<span class="ruby-keyword kw">end</span>
|
61
|
+
<span class="ruby-keyword kw">end</span>
|
62
|
+
|
63
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">footer_notices!</span> { <span class="ruby-node">"Copyright &copy; 2010 &nbsp; - #{ a('Patrick McKenzie', :href => 'http://www.bingocardcreator.com/abingo') } and #{ a('Philippe Monnet', :href => 'http://blog.monnet-usa.com/') } "</span> }
|
64
|
+
<span class="ruby-keyword kw">end</span>
|
65
|
+
<span class="ruby-keyword kw">end</span>
|
66
|
+
|
67
|
+
<span class="ruby-keyword kw">end</span>
|
68
|
+
<span class="ruby-keyword kw">end</span></pre>
|
69
|
+
</body>
|
70
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>index (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 422</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
|
15
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">home!</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">h1</span> <span class="ruby-value str">'My CampingABingoTest App'</span>
|
17
|
+
|
18
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"XYZ SAAS Application Landing page variations"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/landing"</span>; <span class="ruby-identifier">br</span>;
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>landing (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 430</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">landing</span>
|
15
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">xyz</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">h1</span> <span class="ruby-value str">'XYZ SAAS Application'</span>
|
17
|
+
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ab_test</span>(<span class="ruby-value str">"special_promo"</span>)
|
19
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">special_promo!</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
<span class="ruby-identifier">div</span> <span class="ruby-value str">"Special offer for today only"</span>
|
21
|
+
<span class="ruby-identifier">a</span> <span class="ruby-value str">"Sign-Up Now and get a month free!"</span>, <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/signup?special_promo=1"</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-keyword kw">else</span>
|
24
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">abingo_explain</span> <span class="ruby-value str">"The special promo was not selected for this user"</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
|
27
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">marketing!</span> <span class="ruby-keyword kw">do</span>
|
28
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">benefits!</span> <span class="ruby-keyword kw">do</span>
|
29
|
+
<span class="ruby-identifier">ul</span> <span class="ruby-keyword kw">do</span>
|
30
|
+
<span class="ruby-identifier">li</span> <span class="ruby-value str">"Save XYZ time in half"</span>
|
31
|
+
<span class="ruby-identifier">li</span> <span class="ruby-value str">"Reduce XYZ cost by 25%"</span>
|
32
|
+
<span class="ruby-identifier">li</span> <span class="ruby-value str">"Improve quality"</span>
|
33
|
+
<span class="ruby-keyword kw">end</span>
|
34
|
+
<span class="ruby-keyword kw">end</span>
|
35
|
+
|
36
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">actnow!</span> <span class="ruby-keyword kw">do</span>
|
37
|
+
<span class="ruby-identifier">signup_text</span> = <span class="ruby-identifier">ab_test</span>(<span class="ruby-value str">"call_to_action"</span>,
|
38
|
+
[ <span class="ruby-value str">"Sign-Up Now!"</span>,
|
39
|
+
<span class="ruby-value str">"Try It For Free Now!"</span>,
|
40
|
+
<span class="ruby-value str">"Start Your Free Trial Now!"</span>,
|
41
|
+
])
|
42
|
+
|
43
|
+
<span class="ruby-identifier">a</span> <span class="ruby-identifier">:href=</span><span class="ruby-operator">></span><span class="ruby-value str">"/signup"</span> <span class="ruby-keyword kw">do</span>
|
44
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">signup_btn!</span> <span class="ruby-identifier">signup_text</span>
|
45
|
+
<span class="ruby-keyword kw">end</span>
|
46
|
+
<span class="ruby-keyword kw">end</span>
|
47
|
+
<span class="ruby-keyword kw">end</span>
|
48
|
+
<span class="ruby-keyword kw">end</span>
|
49
|
+
<span class="ruby-keyword kw">end</span></pre>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>signin (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 467</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">signin</span>
|
15
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">xyz</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">h1</span> <span class="ruby-value str">'XYZ SAAS Application Sign-In'</span>
|
17
|
+
<span class="ruby-identifier">div</span> <span class="ruby-ivar">@info</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@info</span>
|
18
|
+
|
19
|
+
<span class="ruby-identifier">form</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-constant">R</span>(<span class="ruby-constant">SignIn</span>), <span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'post'</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
<span class="ruby-identifier">label</span> <span class="ruby-value str">'Username'</span>, <span class="ruby-identifier">:for</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'username'</span>; <span class="ruby-identifier">br</span>
|
21
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'username'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'text'</span>; <span class="ruby-identifier">br</span>
|
22
|
+
|
23
|
+
<span class="ruby-identifier">label</span> <span class="ruby-value str">'Password'</span>, <span class="ruby-identifier">:for</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'password'</span>; <span class="ruby-identifier">br</span>
|
24
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'password'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'text'</span>; <span class="ruby-identifier">br</span>
|
25
|
+
|
26
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'submit'</span>, <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'signin'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Sign-In'</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>signup (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 484</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">signup</span>
|
15
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">xyz</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">h1</span> <span class="ruby-value str">'XYZ SAAS Application Sign-Up'</span>
|
17
|
+
<span class="ruby-identifier">div</span> <span class="ruby-ivar">@info</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@info</span>
|
18
|
+
|
19
|
+
<span class="ruby-identifier">form</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-constant">R</span>(<span class="ruby-constant">SignUp</span>), <span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'post'</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
<span class="ruby-identifier">label</span> <span class="ruby-value str">'Username'</span>, <span class="ruby-identifier">:for</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'username'</span>; <span class="ruby-identifier">br</span>
|
21
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'username'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'text'</span>; <span class="ruby-identifier">br</span>
|
22
|
+
|
23
|
+
<span class="ruby-identifier">label</span> <span class="ruby-value str">'Password'</span>, <span class="ruby-identifier">:for</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'password'</span>; <span class="ruby-identifier">br</span>
|
24
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'password'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'password'</span>; <span class="ruby-identifier">br</span>;<span class="ruby-identifier">br</span>
|
25
|
+
|
26
|
+
<span class="ruby-identifier">input</span> <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'submit'</span>, <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'signup'</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Sign-Up'</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>welcome (CampingABingoTest::Views)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-abingo-test/camping-abingo-test.rb, line 501</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">welcome</span>
|
15
|
+
<span class="ruby-identifier">div</span>.<span class="ruby-identifier">xyz</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">h1</span> <span class="ruby-value str">'Welcome'</span>
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
data/doc/created.rid
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Sun, 28 Nov 2010 11:05:56 -0700
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: camping-abingo-test.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>camping-abingo-test.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>examples/camping-abingo-test/camping-abingo-test.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Sat Nov 27 12:34:18 -0700 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|
@@ -0,0 +1,457 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: camping-abingo.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>camping-abingo.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/camping-abingo.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Sun Nov 28 10:58:07 -0700 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
[<a
|
74
|
+
href="../../classes/Abingo.html">Abingo</a>|identity|flip();test();bingo!(){bg:red}]
|
75
|
+
[Experiment|test_name;status|start_experiment!();end_experiment!(){bg:green}]
|
76
|
+
[Alternative|content;lookup;weight;participants;conversions|score_conversion();score_participation(){bg:yellow}]
|
77
|
+
[User|id;username{bg:blue}] [<a
|
78
|
+
href="../../classes/Abingo.html">Abingo</a>]uses -.->[Experiment] [<a
|
79
|
+
href="../../classes/Abingo.html">Abingo</a>]-id>[User]
|
80
|
+
[Experiment]++1-alternatives >*[Alternative]
|
81
|
+
</p>
|
82
|
+
<table>
|
83
|
+
<tr><td valign="top">Author:</td><td>Philippe F. Monnet (<a
|
84
|
+
href="mailto:pfmonnet@gmail.com">pfmonnet@gmail.com</a>)
|
85
|
+
|
86
|
+
</td></tr>
|
87
|
+
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010 Philippe F. Monnet - ABingo Camping plugin
|
88
|
+
|
89
|
+
</td></tr>
|
90
|
+
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2009 Patrick McKenzie - A subset of the Rails ABingo plugin
|
91
|
+
reused in ABingo Camping
|
92
|
+
|
93
|
+
</td></tr>
|
94
|
+
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
95
|
+
|
96
|
+
</td></tr>
|
97
|
+
<tr><td valign="top">Version:</td><td>1.0.3
|
98
|
+
|
99
|
+
</td></tr>
|
100
|
+
</table>
|
101
|
+
<h1>Installing Camping-ABingo</h1>
|
102
|
+
<p>
|
103
|
+
A lightweight ABingo plugin for Ruby Camping. To install the library and
|
104
|
+
its prerequisisites, type the following command(s):
|
105
|
+
</p>
|
106
|
+
<pre>
|
107
|
+
$ gem install camping-abingo
|
108
|
+
</pre>
|
109
|
+
<h1>Adding ABingo Provider Support To Your App</h1>
|
110
|
+
<h3>Add new gem and require statements</h3>
|
111
|
+
<p>
|
112
|
+
Add the following statements towards the top of your source file (before
|
113
|
+
the Camping.goes statement):
|
114
|
+
</p>
|
115
|
+
<pre>
|
116
|
+
gem 'camping' , '>= 2.0'
|
117
|
+
gem 'filtering_camping' , '>= 1.0'
|
118
|
+
|
119
|
+
%w(rubygems active_record erb fileutils json markaby md5 redcloth
|
120
|
+
camping camping/session filtering_camping camping-abingo
|
121
|
+
).each { |lib| require lib }
|
122
|
+
</pre>
|
123
|
+
<h3>Customizing the main module</h3>
|
124
|
+
<p>
|
125
|
+
First we‘ll make sure to include the Camping::Session and
|
126
|
+
CampingFilters modules, and to extend the app module with <a
|
127
|
+
href="../../classes/ABingoCampingPlugin.html">ABingoCampingPlugin</a>, like
|
128
|
+
so:
|
129
|
+
</p>
|
130
|
+
<pre>
|
131
|
+
module CampingABingoTest
|
132
|
+
include Camping::Session
|
133
|
+
include CampingFilters
|
134
|
+
|
135
|
+
extend ABingoCampingPlugin
|
136
|
+
include ABingoCampingPlugin::Filters
|
137
|
+
|
138
|
+
# ...
|
139
|
+
end
|
140
|
+
</pre>
|
141
|
+
<p>
|
142
|
+
This gives us the ability to leverage a logger for the camping-abingo
|
143
|
+
plugin.
|
144
|
+
</p>
|
145
|
+
<pre>
|
146
|
+
app_logger = Logger.new(File.dirname(__FILE__) + '/camping-abingo-test.log')
|
147
|
+
app_logger.level = Logger::DEBUG
|
148
|
+
Camping::Models::Base.logger = app_logger
|
149
|
+
ABingoCampingPlugin.logger = app_logger
|
150
|
+
</pre>
|
151
|
+
<p>
|
152
|
+
Now let‘s customize the create method by adding a call to <a
|
153
|
+
href="../../classes/ABingoCampingPlugin.html#M000036">ABingoCampingPlugin.create</a>,
|
154
|
+
so we can give the plugin to run any needed initialization (such as running
|
155
|
+
the ABingo-specific ActiveRecord migration).
|
156
|
+
</p>
|
157
|
+
<pre>
|
158
|
+
def CampingABingoTest.create
|
159
|
+
ABingoCampingPlugin.create
|
160
|
+
end
|
161
|
+
</pre>
|
162
|
+
<p>
|
163
|
+
Also if you plan on using the ABingo dashboard to view the statistics, you
|
164
|
+
need to define the user id associated with the administrator:
|
165
|
+
</p>
|
166
|
+
<pre>
|
167
|
+
Abingo.options[:abingo_administrator_user_id] = 1 #change this id to match the account id you need
|
168
|
+
</pre>
|
169
|
+
<p>
|
170
|
+
Ok, at this point we have a minimally configured application module. Our
|
171
|
+
next step is to move on to the Models module.
|
172
|
+
</p>
|
173
|
+
<h3>Plugging in the ABingo models</h3>
|
174
|
+
<p>
|
175
|
+
First, we‘ll include the include <a
|
176
|
+
href="../../classes/ABingoCampingPlugin/Models.html">ABingoCampingPlugin::Models</a>
|
177
|
+
module so we can get all the ABingo-specific models. Then we‘ll
|
178
|
+
define a User model. The User will need to keep track of the applications
|
179
|
+
it provided access to. It will also manage the tokens associated with these
|
180
|
+
applications. Our model will look like this:
|
181
|
+
</p>
|
182
|
+
<pre>
|
183
|
+
class User < Base;
|
184
|
+
has_many :client_applications
|
185
|
+
has_many :tokens,
|
186
|
+
:class_name=>"OauthToken",
|
187
|
+
:order=>"authorized_at desc",
|
188
|
+
:include=>[:client_application]
|
189
|
+
|
190
|
+
end
|
191
|
+
</pre>
|
192
|
+
<p>
|
193
|
+
Now we need a CreateUserSchema migration class to define our database
|
194
|
+
tables for User, and ABingo models. In the up and down methods we will
|
195
|
+
plugin a call to the corresponding method from the <a
|
196
|
+
href="../../classes/ABingoCampingPlugin/Models.html">ABingoCampingPlugin::Models</a>
|
197
|
+
module to create the tables for the Experiment and Alternative models.
|
198
|
+
</p>
|
199
|
+
<pre>
|
200
|
+
class CreateUserSchema < V 1.0
|
201
|
+
def self.up
|
202
|
+
create_table :CampingABingoTest_users, :force => true do |t|
|
203
|
+
t.integer :id, :null => false
|
204
|
+
t.string :username
|
205
|
+
t.string :password
|
206
|
+
end
|
207
|
+
|
208
|
+
User.create :username => 'admin', :password => 'camping'
|
209
|
+
|
210
|
+
ABingoCampingPlugin::Models.up
|
211
|
+
end
|
212
|
+
|
213
|
+
def self.down
|
214
|
+
ABingoCampingPlugin::Models.down
|
215
|
+
|
216
|
+
drop_table :CampingABingoTest_users
|
217
|
+
end
|
218
|
+
end
|
219
|
+
</pre>
|
220
|
+
<p>
|
221
|
+
At this point we can go back to the main module and add the code to
|
222
|
+
configure the ActiveRecord connection and invoke our new schema migration
|
223
|
+
if the User table does not exist yet. This code will be added to the create
|
224
|
+
method:
|
225
|
+
</p>
|
226
|
+
<pre>
|
227
|
+
module CampingABingoTest
|
228
|
+
# ...
|
229
|
+
|
230
|
+
def CampingABingoTest.create
|
231
|
+
dbconfig = YAML.load(File.read('config/database.yml'))
|
232
|
+
Camping::Models::Base.establish_connection dbconfig['development']
|
233
|
+
|
234
|
+
ABingoCampingPlugin.create
|
235
|
+
Abingo.cache.logger = Camping::Models::Base.logger
|
236
|
+
Abingo.options[:abingo_administrator_user_id] = 1
|
237
|
+
|
238
|
+
CampingABingoTest::Models.create_schema :assume => (CampingABingoTest::Models::User.table_exists? ? 1.1 : 0.0)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
</pre>
|
242
|
+
<p>
|
243
|
+
You probably noticed that the database configuration is loaded from a
|
244
|
+
database.yml file. So let‘s create a subfolder named config and a
|
245
|
+
file named database.yml, then let‘s configure the yaml file as
|
246
|
+
follows:
|
247
|
+
</p>
|
248
|
+
<pre>
|
249
|
+
development:
|
250
|
+
adapter: sqlite3
|
251
|
+
database: camping-abingo-test.db
|
252
|
+
</pre>
|
253
|
+
<p>
|
254
|
+
Now if we restart the application, our migration should be executed.
|
255
|
+
</p>
|
256
|
+
<h3>Creating a common helpers module</h3>
|
257
|
+
<p>
|
258
|
+
The Helpers module is used in Camping to provide common utilities to both
|
259
|
+
the Controllers and Views modules. Enhancing our Helpers module is very
|
260
|
+
easy, we need to add both and extend and an include of the <a
|
261
|
+
href="../../classes/ABingoCampingPlugin/Helpers.html">ABingoCampingPlugin::Helpers</a>
|
262
|
+
module so we can enhance both instance and class sides:
|
263
|
+
</p>
|
264
|
+
<pre>
|
265
|
+
module CampingABingoTest::Helpers
|
266
|
+
extend ABingoCampingPlugin::Helpers
|
267
|
+
include ABingoCampingPlugin::Helpers
|
268
|
+
end
|
269
|
+
</pre>
|
270
|
+
<h3>Plugging in the ABingo controllers</h3>
|
271
|
+
<p>
|
272
|
+
We will need to extend our app Controllers module with the <a
|
273
|
+
href="../../classes/ABingoCampingPlugin/Controllers.html">ABingoCampingPlugin::Controllers</a>
|
274
|
+
module using the extend statement. Then just before the end of the
|
275
|
+
Controllers module, we‘ll add a call to the
|
276
|
+
include_abingo_controllers method. This is how camping-abingo will inject
|
277
|
+
and plugin the common ABingo controllers and helpers. It is important that
|
278
|
+
this call always remain the last statement of the module, even when you add
|
279
|
+
new controller classes. So the module should look like so:
|
280
|
+
</p>
|
281
|
+
<pre>
|
282
|
+
module CampingABingoTest::Controllers
|
283
|
+
extend ABingoCampingPlugin::Controllers
|
284
|
+
|
285
|
+
# ...
|
286
|
+
|
287
|
+
include_abingo_controllers
|
288
|
+
end #Controllers
|
289
|
+
</pre>
|
290
|
+
<p>
|
291
|
+
Before we continue fleshing out the logic of our controllers, let‘s
|
292
|
+
finish hooking up the Views module.
|
293
|
+
</p>
|
294
|
+
<h3>Plugging in the ABingo common views</h3>
|
295
|
+
<p>
|
296
|
+
We will need to extend our app Views module with the <a
|
297
|
+
href="../../classes/ABingoCampingPlugin/Views.html">ABingoCampingPlugin::Views</a>
|
298
|
+
module using the extend statement. Then just before the end of the Views
|
299
|
+
module, we‘ll add a call to the include_abingo_views method. This is
|
300
|
+
how camping-abingo will inject and plugin the common ABingo views. It is
|
301
|
+
important that this call always remain the last statement of the module,
|
302
|
+
even when you add new view methods. So the module should look like so:
|
303
|
+
</p>
|
304
|
+
<pre>
|
305
|
+
module CampingABingoTest::Views
|
306
|
+
extend ABingoCampingPlugin::Views
|
307
|
+
|
308
|
+
# ...
|
309
|
+
|
310
|
+
include_abingo_views
|
311
|
+
end
|
312
|
+
</pre>
|
313
|
+
<h2>Testing And Troubleshooting</h2>
|
314
|
+
<p>
|
315
|
+
At this stage, we have a basic Camping ABingo Tester, now let‘s test
|
316
|
+
it! Run:
|
317
|
+
</p>
|
318
|
+
<pre>
|
319
|
+
camping --port 3301 camping-abingo-test.rb
|
320
|
+
</pre>
|
321
|
+
<p>
|
322
|
+
The migrations for both our test app and the plugin will be run. So at this
|
323
|
+
point you should see 3 tables:
|
324
|
+
</p>
|
325
|
+
<ul>
|
326
|
+
<li>abingo_alternatives
|
327
|
+
|
328
|
+
</li>
|
329
|
+
<li>abingo_experiments
|
330
|
+
|
331
|
+
</li>
|
332
|
+
<li>CampingABingoTest_users
|
333
|
+
|
334
|
+
</li>
|
335
|
+
</ul>
|
336
|
+
<h3>Test App</h3>
|
337
|
+
<p>
|
338
|
+
I suggest you test the app using FireFox with the Firebug and Firecookie
|
339
|
+
activated. This will make troubleshooting much easier.
|
340
|
+
</p>
|
341
|
+
<p>
|
342
|
+
Navigate to:
|
343
|
+
</p>
|
344
|
+
<pre>
|
345
|
+
http://localhost:3301/
|
346
|
+
</pre>
|
347
|
+
<p>
|
348
|
+
Notice in the Debugging Information panel of the page that <a
|
349
|
+
href="../../classes/Abingo.html">Abingo</a> assigned a state variable named
|
350
|
+
abingo_identity with a random value. Click on the "XYZ SAAS
|
351
|
+
Application Landing page variations" link. This page contains 2
|
352
|
+
variable content areas:
|
353
|
+
</p>
|
354
|
+
<ul>
|
355
|
+
<li>The "special_promo" div content
|
356
|
+
|
357
|
+
</li>
|
358
|
+
<li>The "signup_btn" button text
|
359
|
+
|
360
|
+
</li>
|
361
|
+
</ul>
|
362
|
+
<p>
|
363
|
+
<a href="../../classes/Abingo.html">Abingo</a> will randomly select an
|
364
|
+
alternative for each area. Once you click on the sign up button, ABingo
|
365
|
+
will track the conversion.
|
366
|
+
</p>
|
367
|
+
<p>
|
368
|
+
Now, using Firecookie, delete the campingabingotest.state cookie. And go
|
369
|
+
back to the main page. Notice that the abingo_identity has changed. You can
|
370
|
+
repeat the scenario and probably will get different results.
|
371
|
+
</p>
|
372
|
+
<h3>Dashboard</h3>
|
373
|
+
<p>
|
374
|
+
If you had created a test account and logged in, the sign-out and sign back
|
375
|
+
in as the administrator of the test app (admin/camping)/ You should now see
|
376
|
+
an "ABingo Dashboard" option on the top navigation. Click on it
|
377
|
+
or navigate to:
|
378
|
+
</p>
|
379
|
+
<pre>
|
380
|
+
http://localhost:3301/abingo/dashboard
|
381
|
+
</pre>
|
382
|
+
<p>
|
383
|
+
You should see two experiments:
|
384
|
+
</p>
|
385
|
+
<ul>
|
386
|
+
<li>Special Promo
|
387
|
+
|
388
|
+
</li>
|
389
|
+
<li>Call To Action
|
390
|
+
|
391
|
+
</li>
|
392
|
+
</ul>
|
393
|
+
<p>
|
394
|
+
For each experiment you can see the various alternatives and their
|
395
|
+
associated number of participants and conversions.There is also a summary
|
396
|
+
of the experiment. If you want to terminate an experiment click on the
|
397
|
+
corresponding link in the far right column.
|
398
|
+
</p>
|
399
|
+
<h3>Examples Source Code</h3>
|
400
|
+
<p>
|
401
|
+
Under the examples/camping-abingo-test you will find the full source for
|
402
|
+
the <a href="../../classes/CampingABingoTest.html">CampingABingoTest</a>
|
403
|
+
app.
|
404
|
+
</p>
|
405
|
+
<h1>More information</h1>
|
406
|
+
<p>
|
407
|
+
Check for updates :
|
408
|
+
</p>
|
409
|
+
<ul>
|
410
|
+
<li><a href="http://blog.monnet-usa.com">blog.monnet-usa.com</a>
|
411
|
+
|
412
|
+
</li>
|
413
|
+
<li><a
|
414
|
+
href="https://github.com/techarch/camping-abingo">github.com/techarch/camping-abingo</a>
|
415
|
+
|
416
|
+
</li>
|
417
|
+
</ul>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
<div id="requires-list">
|
422
|
+
<h3 class="section-bar">Required files</h3>
|
423
|
+
|
424
|
+
<div class="name-list">
|
425
|
+
active_record
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
|
429
|
+
</div>
|
430
|
+
|
431
|
+
|
432
|
+
</div>
|
433
|
+
|
434
|
+
|
435
|
+
<!-- if includes -->
|
436
|
+
|
437
|
+
<div id="section">
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
<!-- if method_list -->
|
447
|
+
|
448
|
+
|
449
|
+
</div>
|
450
|
+
|
451
|
+
|
452
|
+
<div id="validator-badges">
|
453
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
454
|
+
</div>
|
455
|
+
|
456
|
+
</body>
|
457
|
+
</html>
|