primer 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/History.txt +17 -0
  2. data/README.rdoc +74 -35
  3. data/example/README.rdoc +33 -23
  4. data/example/application.rb +2 -2
  5. data/example/console.rb +133 -0
  6. data/example/db/blog.sqlite3 +0 -0
  7. data/example/{models → db}/connection.rb +0 -0
  8. data/example/environment.rb +17 -4
  9. data/example/models/comment.rb +5 -0
  10. data/example/models/post.rb +5 -0
  11. data/example/script/setup_database.rb +8 -2
  12. data/example/views/comments.erb +6 -0
  13. data/example/views/layout.erb +1 -1
  14. data/example/views/show.erb +5 -1
  15. data/lib/primer/bus/amqp.rb +7 -5
  16. data/lib/primer/bus/amqp.rbc +1045 -0
  17. data/lib/primer/bus/memory.rbc +344 -0
  18. data/lib/primer/bus.rb +3 -2
  19. data/lib/primer/bus.rbc +872 -0
  20. data/lib/primer/cache/memory.rbc +1443 -0
  21. data/lib/primer/cache/redis.rb +2 -2
  22. data/lib/primer/cache/redis.rbc +1643 -0
  23. data/lib/primer/cache.rb +2 -16
  24. data/lib/primer/cache.rbc +1502 -0
  25. data/lib/primer/enabler.rbc +414 -0
  26. data/lib/primer/helpers.rbc +1438 -0
  27. data/lib/primer/lazyness.rb +63 -0
  28. data/lib/primer/lazyness.rbc +1442 -0
  29. data/lib/primer/real_time.rbc +1999 -0
  30. data/lib/primer/route_set.rb +1 -0
  31. data/lib/primer/route_set.rbc +1475 -0
  32. data/lib/primer/watcher/active_record_macros.rb +13 -3
  33. data/lib/primer/watcher/active_record_macros.rbc +1796 -0
  34. data/lib/primer/watcher/macros.rb +11 -14
  35. data/lib/primer/watcher/macros.rbc +1628 -0
  36. data/lib/primer/watcher.rb +2 -7
  37. data/lib/primer/watcher.rbc +1416 -0
  38. data/lib/primer/worker/active_record_agent.rb +30 -33
  39. data/lib/primer/worker/active_record_agent.rbc +2840 -0
  40. data/lib/primer/worker/changes_agent.rb +20 -0
  41. data/lib/primer/worker/changes_agent.rbc +578 -0
  42. data/lib/primer/worker.rb +20 -3
  43. data/lib/primer/worker.rbc +1254 -0
  44. data/lib/primer.rb +10 -2
  45. data/lib/primer.rbc +944 -0
  46. data/spec/db/test.sqlite3 +0 -0
  47. data/spec/models/artist.rb +3 -2
  48. data/spec/models/artist.rbc +288 -0
  49. data/spec/models/blog_post.rb +3 -1
  50. data/spec/models/blog_post.rbc +181 -0
  51. data/spec/models/calendar.rbc +209 -0
  52. data/spec/models/concert.rbc +211 -0
  53. data/spec/models/performance.rbc +177 -0
  54. data/spec/models/person.rb +1 -0
  55. data/spec/models/person.rbc +306 -0
  56. data/spec/models/watchable.rbc +363 -0
  57. data/spec/primer/bus_spec.rbc +940 -0
  58. data/spec/primer/cache_spec.rb +3 -3
  59. data/spec/primer/cache_spec.rbc +8535 -0
  60. data/spec/primer/helpers/erb_spec.rb +14 -14
  61. data/spec/primer/helpers/erb_spec.rbc +2485 -0
  62. data/spec/primer/lazyness_spec.rb +61 -0
  63. data/spec/primer/lazyness_spec.rbc +1408 -0
  64. data/spec/primer/watcher/active_record_spec.rb +15 -15
  65. data/spec/primer/watcher/active_record_spec.rbc +5202 -0
  66. data/spec/primer/watcher_spec.rbc +2645 -0
  67. data/spec/schema.rbc +775 -0
  68. data/spec/spec_helper.rb +3 -0
  69. data/spec/spec_helper.rbc +1193 -0
  70. data/spec/templates/page.erb +0 -1
  71. metadata +77 -70
  72. data/example/models/blog_post.rb +0 -4
@@ -0,0 +1,872 @@
1
+ !RBIX
2
+ 10310238139619683799
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 28
13
+ 99
14
+ 7
15
+ 0
16
+ 65
17
+ 49
18
+ 1
19
+ 2
20
+ 13
21
+ 99
22
+ 12
23
+ 7
24
+ 2
25
+ 12
26
+ 7
27
+ 3
28
+ 12
29
+ 65
30
+ 12
31
+ 49
32
+ 4
33
+ 4
34
+ 15
35
+ 49
36
+ 2
37
+ 0
38
+ 15
39
+ 2
40
+ 11
41
+ I
42
+ 6
43
+ I
44
+ 0
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ n
50
+ p
51
+ 5
52
+ x
53
+ 6
54
+ Primer
55
+ x
56
+ 11
57
+ open_module
58
+ x
59
+ 15
60
+ __module_init__
61
+ M
62
+ 1
63
+ n
64
+ n
65
+ x
66
+ 6
67
+ Primer
68
+ i
69
+ 29
70
+ 5
71
+ 66
72
+ 99
73
+ 7
74
+ 0
75
+ 1
76
+ 65
77
+ 49
78
+ 1
79
+ 3
80
+ 13
81
+ 99
82
+ 12
83
+ 7
84
+ 2
85
+ 12
86
+ 7
87
+ 3
88
+ 12
89
+ 65
90
+ 12
91
+ 49
92
+ 4
93
+ 4
94
+ 15
95
+ 49
96
+ 2
97
+ 0
98
+ 11
99
+ I
100
+ 6
101
+ I
102
+ 0
103
+ I
104
+ 0
105
+ I
106
+ 0
107
+ n
108
+ p
109
+ 5
110
+ x
111
+ 3
112
+ Bus
113
+ x
114
+ 10
115
+ open_class
116
+ x
117
+ 14
118
+ __class_init__
119
+ M
120
+ 1
121
+ n
122
+ n
123
+ x
124
+ 3
125
+ Bus
126
+ i
127
+ 104
128
+ 5
129
+ 66
130
+ 5
131
+ 7
132
+ 0
133
+ 45
134
+ 1
135
+ 2
136
+ 7
137
+ 3
138
+ 64
139
+ 81
140
+ 4
141
+ 47
142
+ 49
143
+ 5
144
+ 2
145
+ 15
146
+ 5
147
+ 7
148
+ 6
149
+ 45
150
+ 1
151
+ 7
152
+ 7
153
+ 8
154
+ 64
155
+ 81
156
+ 4
157
+ 47
158
+ 49
159
+ 5
160
+ 2
161
+ 15
162
+ 99
163
+ 7
164
+ 9
165
+ 7
166
+ 10
167
+ 65
168
+ 67
169
+ 49
170
+ 11
171
+ 0
172
+ 49
173
+ 12
174
+ 4
175
+ 15
176
+ 99
177
+ 7
178
+ 13
179
+ 7
180
+ 14
181
+ 65
182
+ 67
183
+ 49
184
+ 11
185
+ 0
186
+ 49
187
+ 12
188
+ 4
189
+ 15
190
+ 99
191
+ 7
192
+ 15
193
+ 7
194
+ 16
195
+ 65
196
+ 67
197
+ 49
198
+ 11
199
+ 0
200
+ 49
201
+ 12
202
+ 4
203
+ 15
204
+ 99
205
+ 7
206
+ 17
207
+ 7
208
+ 18
209
+ 65
210
+ 67
211
+ 49
212
+ 11
213
+ 0
214
+ 49
215
+ 12
216
+ 4
217
+ 15
218
+ 99
219
+ 7
220
+ 19
221
+ 7
222
+ 20
223
+ 65
224
+ 67
225
+ 49
226
+ 11
227
+ 0
228
+ 49
229
+ 12
230
+ 4
231
+ 11
232
+ I
233
+ 5
234
+ I
235
+ 0
236
+ I
237
+ 0
238
+ I
239
+ 0
240
+ n
241
+ p
242
+ 21
243
+ x
244
+ 6
245
+ Memory
246
+ x
247
+ 4
248
+ ROOT
249
+ n
250
+ s
251
+ 18
252
+ /primer/bus/memory
253
+ x
254
+ 1
255
+ +
256
+ x
257
+ 8
258
+ autoload
259
+ x
260
+ 4
261
+ AMQP
262
+ n
263
+ s
264
+ 16
265
+ /primer/bus/amqp
266
+ x
267
+ 10
268
+ initialize
269
+ M
270
+ 1
271
+ n
272
+ n
273
+ x
274
+ 10
275
+ initialize
276
+ i
277
+ 4
278
+ 5
279
+ 48
280
+ 0
281
+ 11
282
+ I
283
+ 1
284
+ I
285
+ 0
286
+ I
287
+ 0
288
+ I
289
+ 0
290
+ n
291
+ p
292
+ 1
293
+ x
294
+ 15
295
+ unsubscribe_all
296
+ p
297
+ 5
298
+ I
299
+ -1
300
+ I
301
+ 7
302
+ I
303
+ 0
304
+ I
305
+ 8
306
+ I
307
+ 4
308
+ x
309
+ 48
310
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
311
+ p
312
+ 0
313
+ x
314
+ 17
315
+ method_visibility
316
+ x
317
+ 15
318
+ add_defn_method
319
+ x
320
+ 10
321
+ distribute
322
+ M
323
+ 1
324
+ n
325
+ n
326
+ x
327
+ 10
328
+ distribute
329
+ i
330
+ 36
331
+ 20
332
+ 0
333
+ 49
334
+ 0
335
+ 0
336
+ 19
337
+ 0
338
+ 15
339
+ 39
340
+ 1
341
+ 20
342
+ 0
343
+ 49
344
+ 2
345
+ 1
346
+ 9
347
+ 20
348
+ 1
349
+ 8
350
+ 22
351
+ 1
352
+ 11
353
+ 15
354
+ 39
355
+ 1
356
+ 20
357
+ 0
358
+ 49
359
+ 3
360
+ 1
361
+ 56
362
+ 4
363
+ 50
364
+ 5
365
+ 0
366
+ 11
367
+ I
368
+ 4
369
+ I
370
+ 2
371
+ I
372
+ 2
373
+ I
374
+ 2
375
+ n
376
+ p
377
+ 6
378
+ x
379
+ 4
380
+ to_s
381
+ x
382
+ 10
383
+ @listeners
384
+ x
385
+ 8
386
+ has_key?
387
+ x
388
+ 2
389
+ []
390
+ M
391
+ 1
392
+ p
393
+ 2
394
+ x
395
+ 9
396
+ for_block
397
+ t
398
+ n
399
+ x
400
+ 10
401
+ distribute
402
+ i
403
+ 13
404
+ 57
405
+ 19
406
+ 0
407
+ 15
408
+ 20
409
+ 0
410
+ 21
411
+ 1
412
+ 1
413
+ 49
414
+ 0
415
+ 1
416
+ 11
417
+ I
418
+ 4
419
+ I
420
+ 1
421
+ I
422
+ 1
423
+ I
424
+ 1
425
+ n
426
+ p
427
+ 1
428
+ x
429
+ 4
430
+ call
431
+ p
432
+ 3
433
+ I
434
+ 0
435
+ I
436
+ e
437
+ I
438
+ d
439
+ x
440
+ 48
441
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
442
+ p
443
+ 1
444
+ x
445
+ 2
446
+ cb
447
+ x
448
+ 4
449
+ each
450
+ p
451
+ 9
452
+ I
453
+ -1
454
+ I
455
+ b
456
+ I
457
+ 0
458
+ I
459
+ c
460
+ I
461
+ 8
462
+ I
463
+ d
464
+ I
465
+ 17
466
+ I
467
+ e
468
+ I
469
+ 24
470
+ x
471
+ 48
472
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
473
+ p
474
+ 2
475
+ x
476
+ 5
477
+ topic
478
+ x
479
+ 7
480
+ message
481
+ x
482
+ 9
483
+ subscribe
484
+ M
485
+ 1
486
+ n
487
+ n
488
+ x
489
+ 9
490
+ subscribe
491
+ i
492
+ 20
493
+ 95
494
+ 19
495
+ 1
496
+ 15
497
+ 39
498
+ 0
499
+ 20
500
+ 0
501
+ 49
502
+ 1
503
+ 0
504
+ 49
505
+ 2
506
+ 1
507
+ 20
508
+ 1
509
+ 49
510
+ 3
511
+ 1
512
+ 11
513
+ I
514
+ 4
515
+ I
516
+ 2
517
+ I
518
+ 1
519
+ I
520
+ 1
521
+ n
522
+ p
523
+ 4
524
+ x
525
+ 10
526
+ @listeners
527
+ x
528
+ 4
529
+ to_s
530
+ x
531
+ 2
532
+ []
533
+ x
534
+ 3
535
+ add
536
+ p
537
+ 5
538
+ I
539
+ -1
540
+ I
541
+ 11
542
+ I
543
+ 4
544
+ I
545
+ 12
546
+ I
547
+ 14
548
+ x
549
+ 48
550
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
551
+ p
552
+ 2
553
+ x
554
+ 5
555
+ topic
556
+ x
557
+ 8
558
+ listener
559
+ x
560
+ 11
561
+ unsubscribe
562
+ M
563
+ 1
564
+ n
565
+ n
566
+ x
567
+ 11
568
+ unsubscribe
569
+ i
570
+ 20
571
+ 95
572
+ 19
573
+ 1
574
+ 15
575
+ 39
576
+ 0
577
+ 20
578
+ 0
579
+ 49
580
+ 1
581
+ 0
582
+ 49
583
+ 2
584
+ 1
585
+ 20
586
+ 1
587
+ 49
588
+ 3
589
+ 1
590
+ 11
591
+ I
592
+ 4
593
+ I
594
+ 2
595
+ I
596
+ 1
597
+ I
598
+ 1
599
+ n
600
+ p
601
+ 4
602
+ x
603
+ 10
604
+ @listeners
605
+ x
606
+ 4
607
+ to_s
608
+ x
609
+ 2
610
+ []
611
+ x
612
+ 6
613
+ delete
614
+ p
615
+ 5
616
+ I
617
+ -1
618
+ I
619
+ 15
620
+ I
621
+ 4
622
+ I
623
+ 16
624
+ I
625
+ 14
626
+ x
627
+ 48
628
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
629
+ p
630
+ 2
631
+ x
632
+ 5
633
+ topic
634
+ x
635
+ 8
636
+ listener
637
+ x
638
+ 15
639
+ unsubscribe_all
640
+ M
641
+ 1
642
+ n
643
+ n
644
+ x
645
+ 15
646
+ unsubscribe_all
647
+ i
648
+ 11
649
+ 45
650
+ 0
651
+ 1
652
+ 56
653
+ 2
654
+ 50
655
+ 3
656
+ 0
657
+ 38
658
+ 4
659
+ 11
660
+ I
661
+ 2
662
+ I
663
+ 0
664
+ I
665
+ 0
666
+ I
667
+ 0
668
+ n
669
+ p
670
+ 5
671
+ x
672
+ 4
673
+ Hash
674
+ n
675
+ M
676
+ 1
677
+ p
678
+ 2
679
+ x
680
+ 9
681
+ for_block
682
+ t
683
+ n
684
+ x
685
+ 15
686
+ unsubscribe_all
687
+ i
688
+ 46
689
+ 58
690
+ 37
691
+ 19
692
+ 0
693
+ 15
694
+ 37
695
+ 19
696
+ 1
697
+ 15
698
+ 15
699
+ 20
700
+ 0
701
+ 20
702
+ 1
703
+ 45
704
+ 0
705
+ 1
706
+ 13
707
+ 71
708
+ 2
709
+ 47
710
+ 9
711
+ 35
712
+ 47
713
+ 49
714
+ 3
715
+ 0
716
+ 13
717
+ 47
718
+ 49
719
+ 4
720
+ 0
721
+ 15
722
+ 8
723
+ 38
724
+ 49
725
+ 2
726
+ 0
727
+ 13
728
+ 18
729
+ 3
730
+ 49
731
+ 5
732
+ 2
733
+ 15
734
+ 11
735
+ I
736
+ 7
737
+ I
738
+ 2
739
+ I
740
+ 2
741
+ I
742
+ 2
743
+ n
744
+ p
745
+ 6
746
+ x
747
+ 3
748
+ Set
749
+ n
750
+ x
751
+ 3
752
+ new
753
+ x
754
+ 8
755
+ allocate
756
+ x
757
+ 10
758
+ initialize
759
+ x
760
+ 3
761
+ []=
762
+ p
763
+ 3
764
+ I
765
+ 0
766
+ I
767
+ 1a
768
+ I
769
+ 2e
770
+ x
771
+ 48
772
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
773
+ p
774
+ 2
775
+ x
776
+ 1
777
+ h
778
+ x
779
+ 1
780
+ k
781
+ x
782
+ 3
783
+ new
784
+ x
785
+ 10
786
+ @listeners
787
+ p
788
+ 5
789
+ I
790
+ -1
791
+ I
792
+ 19
793
+ I
794
+ 0
795
+ I
796
+ 1a
797
+ I
798
+ b
799
+ x
800
+ 48
801
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
802
+ p
803
+ 0
804
+ p
805
+ 15
806
+ I
807
+ 2
808
+ I
809
+ 4
810
+ I
811
+ 12
812
+ I
813
+ 5
814
+ I
815
+ 22
816
+ I
817
+ 7
818
+ I
819
+ 30
820
+ I
821
+ b
822
+ I
823
+ 3e
824
+ I
825
+ 11
826
+ I
827
+ 4c
828
+ I
829
+ 15
830
+ I
831
+ 5a
832
+ I
833
+ 19
834
+ I
835
+ 68
836
+ x
837
+ 48
838
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
839
+ p
840
+ 0
841
+ x
842
+ 13
843
+ attach_method
844
+ p
845
+ 3
846
+ I
847
+ 2
848
+ I
849
+ 2
850
+ I
851
+ 1d
852
+ x
853
+ 48
854
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
855
+ p
856
+ 0
857
+ x
858
+ 13
859
+ attach_method
860
+ p
861
+ 3
862
+ I
863
+ 0
864
+ I
865
+ 1
866
+ I
867
+ 1c
868
+ x
869
+ 48
870
+ /Users/jcoglan/projects/primer/lib/primer/bus.rb
871
+ p
872
+ 0