vanity 1.3.0 → 1.4.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/CHANGELOG +61 -3
  2. data/Gemfile +22 -14
  3. data/README.rdoc +9 -4
  4. data/Rakefile +72 -12
  5. data/bin/vanity +16 -4
  6. data/lib/vanity.rb +7 -5
  7. data/lib/vanity/adapters/abstract_adapter.rb +135 -0
  8. data/lib/vanity/adapters/mock_adapter.rb +157 -0
  9. data/lib/vanity/adapters/mongo_adapter.rb +162 -0
  10. data/lib/vanity/adapters/redis_adapter.rb +154 -0
  11. data/lib/vanity/backport.rb +0 -17
  12. data/lib/vanity/commands/upgrade.rb +34 -0
  13. data/lib/vanity/experiment/ab_test.rb +46 -41
  14. data/lib/vanity/experiment/base.rb +13 -15
  15. data/lib/vanity/frameworks/rails.rb +5 -9
  16. data/lib/vanity/metric/active_record.rb +10 -4
  17. data/lib/vanity/metric/base.rb +46 -23
  18. data/lib/vanity/metric/google_analytics.rb +7 -0
  19. data/lib/vanity/metric/remote.rb +53 -0
  20. data/lib/vanity/playground.rb +133 -49
  21. data/test/{ab_test_test.rb → experiment/ab_test.rb} +47 -3
  22. data/test/{experiment_test.rb → experiment/base_test.rb} +8 -8
  23. data/test/metric/active_record_test.rb +253 -0
  24. data/test/metric/base_test.rb +293 -0
  25. data/test/metric/google_analytics_test.rb +104 -0
  26. data/test/metric/remote_test.rb +108 -0
  27. data/test/myapp/app/controllers/application_controller.rbc +66 -0
  28. data/test/myapp/app/controllers/main_controller.rb +3 -3
  29. data/test/myapp/app/controllers/main_controller.rbc +347 -0
  30. data/test/myapp/config/boot.rbc +2534 -0
  31. data/test/myapp/config/environment.rbc +403 -0
  32. data/test/myapp/config/routes.rbc +174 -0
  33. data/test/myapp/log/production.log +2601 -0
  34. data/test/passenger_test.rb +14 -5
  35. data/test/passenger_test.rbc +0 -0
  36. data/test/playground_test.rbc +256 -0
  37. data/test/rails_test.rb +75 -22
  38. data/test/rails_test.rbc +4086 -0
  39. data/test/test_helper.rb +30 -7
  40. data/test/test_helper.rbc +4297 -0
  41. data/vanity.gemspec +6 -2
  42. metadata +74 -73
  43. data/lib/vanity/commands.rb +0 -2
  44. data/lib/vanity/mock_redis.rb +0 -76
  45. data/test/metric_test.rb +0 -622
  46. data/vendor/cache/RedCloth-4.2.2.gem +0 -0
  47. data/vendor/cache/actionmailer-2.3.5.gem +0 -0
  48. data/vendor/cache/actionpack-2.3.5.gem +0 -0
  49. data/vendor/cache/activerecord-2.3.5.gem +0 -0
  50. data/vendor/cache/activeresource-2.3.5.gem +0 -0
  51. data/vendor/cache/activesupport-2.3.5.gem +0 -0
  52. data/vendor/cache/autotest-4.2.7.gem +0 -0
  53. data/vendor/cache/autotest-fsevent-0.2.1.gem +0 -0
  54. data/vendor/cache/autotest-growl-0.2.0.gem +0 -0
  55. data/vendor/cache/bundler-0.9.7.gem +0 -0
  56. data/vendor/cache/classifier-1.3.1.gem +0 -0
  57. data/vendor/cache/directory_watcher-1.3.1.gem +0 -0
  58. data/vendor/cache/fastthread-1.0.7.gem +0 -0
  59. data/vendor/cache/garb-0.7.0.gem +0 -0
  60. data/vendor/cache/happymapper-0.3.0.gem +0 -0
  61. data/vendor/cache/jekyll-0.5.7.gem +0 -0
  62. data/vendor/cache/libxml-ruby-1.1.3.gem +0 -0
  63. data/vendor/cache/liquid-2.0.0.gem +0 -0
  64. data/vendor/cache/maruku-0.6.0.gem +0 -0
  65. data/vendor/cache/mocha-0.9.8.gem +0 -0
  66. data/vendor/cache/open4-1.0.1.gem +0 -0
  67. data/vendor/cache/passenger-2.2.9.gem +0 -0
  68. data/vendor/cache/rack-1.0.1.gem +0 -0
  69. data/vendor/cache/rails-2.3.5.gem +0 -0
  70. data/vendor/cache/rake-0.8.7.gem +0 -0
  71. data/vendor/cache/rubygems-update-1.3.5.gem +0 -0
  72. data/vendor/cache/shoulda-2.10.3.gem +0 -0
  73. data/vendor/cache/sqlite3-ruby-1.2.5.gem +0 -0
  74. data/vendor/cache/stemmer-1.0.1.gem +0 -0
  75. data/vendor/cache/syntax-1.0.0.gem +0 -0
  76. data/vendor/cache/sys-uname-0.8.4.gem +0 -0
  77. data/vendor/cache/timecop-0.3.4.gem +0 -0
  78. data/vendor/redis-rb/LICENSE +0 -20
  79. data/vendor/redis-rb/README.markdown +0 -36
  80. data/vendor/redis-rb/Rakefile +0 -62
  81. data/vendor/redis-rb/bench.rb +0 -44
  82. data/vendor/redis-rb/benchmarking/suite.rb +0 -24
  83. data/vendor/redis-rb/benchmarking/worker.rb +0 -71
  84. data/vendor/redis-rb/bin/distredis +0 -33
  85. data/vendor/redis-rb/examples/basic.rb +0 -16
  86. data/vendor/redis-rb/examples/incr-decr.rb +0 -18
  87. data/vendor/redis-rb/examples/list.rb +0 -26
  88. data/vendor/redis-rb/examples/sets.rb +0 -36
  89. data/vendor/redis-rb/lib/dist_redis.rb +0 -124
  90. data/vendor/redis-rb/lib/hash_ring.rb +0 -128
  91. data/vendor/redis-rb/lib/pipeline.rb +0 -21
  92. data/vendor/redis-rb/lib/redis.rb +0 -370
  93. data/vendor/redis-rb/lib/redis/raketasks.rb +0 -1
  94. data/vendor/redis-rb/profile.rb +0 -22
  95. data/vendor/redis-rb/redis-rb.gemspec +0 -30
  96. data/vendor/redis-rb/spec/redis_spec.rb +0 -637
  97. data/vendor/redis-rb/spec/spec_helper.rb +0 -4
  98. data/vendor/redis-rb/speed.rb +0 -16
  99. data/vendor/redis-rb/tasks/redis.tasks.rb +0 -140
@@ -0,0 +1,403 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 38
13
+ 5
14
+ 45
15
+ 0
16
+ 1
17
+ 45
18
+ 0
19
+ 2
20
+ 65
21
+ 49
22
+ 3
23
+ 0
24
+ 49
25
+ 4
26
+ 1
27
+ 7
28
+ 5
29
+ 64
30
+ 49
31
+ 6
32
+ 2
33
+ 47
34
+ 49
35
+ 7
36
+ 1
37
+ 15
38
+ 45
39
+ 8
40
+ 9
41
+ 43
42
+ 10
43
+ 56
44
+ 11
45
+ 50
46
+ 12
47
+ 0
48
+ 15
49
+ 2
50
+ 11
51
+ I
52
+ 4
53
+ I
54
+ 0
55
+ I
56
+ 0
57
+ I
58
+ 0
59
+ n
60
+ p
61
+ 13
62
+ x
63
+ 4
64
+ File
65
+ n
66
+ n
67
+ x
68
+ 11
69
+ active_path
70
+ x
71
+ 7
72
+ dirname
73
+ s
74
+ 4
75
+ boot
76
+ x
77
+ 4
78
+ join
79
+ x
80
+ 7
81
+ require
82
+ x
83
+ 5
84
+ Rails
85
+ n
86
+ x
87
+ 11
88
+ Initializer
89
+ M
90
+ 1
91
+ p
92
+ 2
93
+ x
94
+ 9
95
+ for_block
96
+ t
97
+ n
98
+ x
99
+ 9
100
+ __block__
101
+ i
102
+ 77
103
+ 57
104
+ 19
105
+ 0
106
+ 15
107
+ 20
108
+ 0
109
+ 13
110
+ 49
111
+ 0
112
+ 0
113
+ 7
114
+ 1
115
+ 7
116
+ 2
117
+ 7
118
+ 3
119
+ 35
120
+ 3
121
+ 49
122
+ 4
123
+ 1
124
+ 13
125
+ 18
126
+ 2
127
+ 49
128
+ 5
129
+ 1
130
+ 15
131
+ 15
132
+ 20
133
+ 0
134
+ 49
135
+ 6
136
+ 0
137
+ 44
138
+ 43
139
+ 7
140
+ 80
141
+ 49
142
+ 8
143
+ 1
144
+ 13
145
+ 7
146
+ 9
147
+ 7
148
+ 10
149
+ 64
150
+ 49
151
+ 11
152
+ 2
153
+ 15
154
+ 13
155
+ 7
156
+ 12
157
+ 7
158
+ 13
159
+ 64
160
+ 49
161
+ 11
162
+ 2
163
+ 15
164
+ 13
165
+ 18
166
+ 2
167
+ 49
168
+ 14
169
+ 1
170
+ 15
171
+ 15
172
+ 20
173
+ 0
174
+ 56
175
+ 15
176
+ 50
177
+ 16
178
+ 0
179
+ 11
180
+ I
181
+ 7
182
+ I
183
+ 1
184
+ I
185
+ 1
186
+ I
187
+ 1
188
+ n
189
+ p
190
+ 17
191
+ x
192
+ 10
193
+ frameworks
194
+ x
195
+ 13
196
+ active_record
197
+ x
198
+ 15
199
+ active_resource
200
+ x
201
+ 13
202
+ action_mailer
203
+ x
204
+ 1
205
+ -
206
+ x
207
+ 11
208
+ frameworks=
209
+ x
210
+ 17
211
+ action_controller
212
+ x
213
+ 4
214
+ Hash
215
+ x
216
+ 16
217
+ new_from_literal
218
+ x
219
+ 3
220
+ key
221
+ s
222
+ 14
223
+ _myapp_session
224
+ x
225
+ 3
226
+ []=
227
+ x
228
+ 6
229
+ secret
230
+ s
231
+ 40
232
+ Stay hungry. Stay foolish. -- Steve Jobs
233
+ x
234
+ 8
235
+ session=
236
+ M
237
+ 1
238
+ p
239
+ 2
240
+ x
241
+ 9
242
+ for_block
243
+ t
244
+ n
245
+ x
246
+ 9
247
+ __block__
248
+ i
249
+ 36
250
+ 99
251
+ 43
252
+ 0
253
+ 7
254
+ 1
255
+ 49
256
+ 2
257
+ 1
258
+ 45
259
+ 3
260
+ 4
261
+ 65
262
+ 49
263
+ 5
264
+ 0
265
+ 49
266
+ 6
267
+ 1
268
+ 7
269
+ 7
270
+ 64
271
+ 81
272
+ 8
273
+ 49
274
+ 9
275
+ 1
276
+ 15
277
+ 5
278
+ 7
279
+ 10
280
+ 64
281
+ 47
282
+ 49
283
+ 11
284
+ 1
285
+ 11
286
+ I
287
+ 4
288
+ I
289
+ 0
290
+ I
291
+ 0
292
+ I
293
+ 0
294
+ I
295
+ -2
296
+ p
297
+ 12
298
+ x
299
+ 7
300
+ Globals
301
+ x
302
+ 2
303
+ $:
304
+ x
305
+ 2
306
+ []
307
+ x
308
+ 4
309
+ File
310
+ n
311
+ x
312
+ 11
313
+ active_path
314
+ x
315
+ 7
316
+ dirname
317
+ s
318
+ 14
319
+ /../../../lib/
320
+ x
321
+ 1
322
+ +
323
+ x
324
+ 7
325
+ unshift
326
+ s
327
+ 6
328
+ vanity
329
+ x
330
+ 7
331
+ require
332
+ p
333
+ 7
334
+ I
335
+ 0
336
+ I
337
+ 6
338
+ I
339
+ 0
340
+ I
341
+ 7
342
+ I
343
+ 1b
344
+ I
345
+ 8
346
+ I
347
+ 24
348
+ x
349
+ 61
350
+ /Users/assaf/projects/vanity/test/myapp/config/environment.rb
351
+ p
352
+ 0
353
+ x
354
+ 16
355
+ after_initialize
356
+ p
357
+ 9
358
+ I
359
+ 0
360
+ I
361
+ 3
362
+ I
363
+ 4
364
+ I
365
+ 4
366
+ I
367
+ 1d
368
+ I
369
+ 5
370
+ I
371
+ 45
372
+ I
373
+ 6
374
+ I
375
+ 4d
376
+ x
377
+ 61
378
+ /Users/assaf/projects/vanity/test/myapp/config/environment.rb
379
+ p
380
+ 1
381
+ x
382
+ 6
383
+ config
384
+ x
385
+ 3
386
+ run
387
+ p
388
+ 5
389
+ I
390
+ 0
391
+ I
392
+ 1
393
+ I
394
+ 19
395
+ I
396
+ 3
397
+ I
398
+ 26
399
+ x
400
+ 61
401
+ /Users/assaf/projects/vanity/test/myapp/config/environment.rb
402
+ p
403
+ 0
@@ -0,0 +1,174 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 15
13
+ 45
14
+ 0
15
+ 1
16
+ 43
17
+ 2
18
+ 43
19
+ 3
20
+ 56
21
+ 4
22
+ 50
23
+ 5
24
+ 0
25
+ 15
26
+ 2
27
+ 11
28
+ I
29
+ 2
30
+ I
31
+ 0
32
+ I
33
+ 0
34
+ I
35
+ 0
36
+ n
37
+ p
38
+ 6
39
+ x
40
+ 16
41
+ ActionController
42
+ n
43
+ x
44
+ 7
45
+ Routing
46
+ x
47
+ 6
48
+ Routes
49
+ M
50
+ 1
51
+ p
52
+ 2
53
+ x
54
+ 9
55
+ for_block
56
+ t
57
+ n
58
+ x
59
+ 9
60
+ __block__
61
+ i
62
+ 38
63
+ 57
64
+ 19
65
+ 0
66
+ 15
67
+ 20
68
+ 0
69
+ 7
70
+ 0
71
+ 64
72
+ 44
73
+ 43
74
+ 1
75
+ 80
76
+ 49
77
+ 2
78
+ 1
79
+ 13
80
+ 7
81
+ 3
82
+ 7
83
+ 4
84
+ 49
85
+ 5
86
+ 2
87
+ 15
88
+ 13
89
+ 7
90
+ 6
91
+ 7
92
+ 7
93
+ 49
94
+ 5
95
+ 2
96
+ 15
97
+ 49
98
+ 8
99
+ 2
100
+ 11
101
+ I
102
+ 8
103
+ I
104
+ 1
105
+ I
106
+ 1
107
+ I
108
+ 1
109
+ n
110
+ p
111
+ 9
112
+ s
113
+ 1
114
+ /
115
+ x
116
+ 4
117
+ Hash
118
+ x
119
+ 16
120
+ new_from_literal
121
+ x
122
+ 10
123
+ controller
124
+ x
125
+ 4
126
+ main
127
+ x
128
+ 3
129
+ []=
130
+ x
131
+ 6
132
+ action
133
+ x
134
+ 5
135
+ index
136
+ x
137
+ 7
138
+ connect
139
+ p
140
+ 5
141
+ I
142
+ 0
143
+ I
144
+ 1
145
+ I
146
+ 4
147
+ I
148
+ 2
149
+ I
150
+ 26
151
+ x
152
+ 56
153
+ /Users/assaf/projects/vanity/test/myapp/config/routes.rb
154
+ p
155
+ 1
156
+ x
157
+ 3
158
+ map
159
+ x
160
+ 4
161
+ draw
162
+ p
163
+ 3
164
+ I
165
+ 0
166
+ I
167
+ 1
168
+ I
169
+ f
170
+ x
171
+ 56
172
+ /Users/assaf/projects/vanity/test/myapp/config/routes.rb
173
+ p
174
+ 0