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,363 @@
1
+ !RBIX
2
+ 10310238139619683799
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 29
13
+ 99
14
+ 7
15
+ 0
16
+ 1
17
+ 65
18
+ 49
19
+ 1
20
+ 3
21
+ 13
22
+ 99
23
+ 12
24
+ 7
25
+ 2
26
+ 12
27
+ 7
28
+ 3
29
+ 12
30
+ 65
31
+ 12
32
+ 49
33
+ 4
34
+ 4
35
+ 15
36
+ 49
37
+ 2
38
+ 0
39
+ 15
40
+ 2
41
+ 11
42
+ I
43
+ 6
44
+ I
45
+ 0
46
+ I
47
+ 0
48
+ I
49
+ 0
50
+ n
51
+ p
52
+ 5
53
+ x
54
+ 9
55
+ Watchable
56
+ x
57
+ 10
58
+ open_class
59
+ x
60
+ 14
61
+ __class_init__
62
+ M
63
+ 1
64
+ n
65
+ n
66
+ x
67
+ 9
68
+ Watchable
69
+ i
70
+ 65
71
+ 5
72
+ 66
73
+ 5
74
+ 45
75
+ 0
76
+ 1
77
+ 43
78
+ 2
79
+ 47
80
+ 49
81
+ 3
82
+ 1
83
+ 15
84
+ 5
85
+ 7
86
+ 4
87
+ 7
88
+ 5
89
+ 47
90
+ 49
91
+ 6
92
+ 2
93
+ 15
94
+ 99
95
+ 7
96
+ 7
97
+ 7
98
+ 8
99
+ 65
100
+ 67
101
+ 49
102
+ 9
103
+ 0
104
+ 49
105
+ 10
106
+ 4
107
+ 15
108
+ 99
109
+ 7
110
+ 4
111
+ 7
112
+ 11
113
+ 65
114
+ 67
115
+ 49
116
+ 9
117
+ 0
118
+ 49
119
+ 10
120
+ 4
121
+ 15
122
+ 99
123
+ 7
124
+ 5
125
+ 7
126
+ 12
127
+ 65
128
+ 67
129
+ 49
130
+ 9
131
+ 0
132
+ 49
133
+ 10
134
+ 4
135
+ 11
136
+ I
137
+ 5
138
+ I
139
+ 0
140
+ I
141
+ 0
142
+ I
143
+ 0
144
+ n
145
+ p
146
+ 13
147
+ x
148
+ 6
149
+ Primer
150
+ n
151
+ x
152
+ 7
153
+ Watcher
154
+ x
155
+ 7
156
+ include
157
+ x
158
+ 4
159
+ name
160
+ x
161
+ 10
162
+ is_called?
163
+ x
164
+ 14
165
+ watch_calls_to
166
+ x
167
+ 10
168
+ initialize
169
+ M
170
+ 1
171
+ n
172
+ n
173
+ x
174
+ 10
175
+ initialize
176
+ i
177
+ 5
178
+ 20
179
+ 0
180
+ 38
181
+ 0
182
+ 11
183
+ I
184
+ 2
185
+ I
186
+ 1
187
+ I
188
+ 1
189
+ I
190
+ 1
191
+ n
192
+ p
193
+ 1
194
+ x
195
+ 5
196
+ @name
197
+ p
198
+ 5
199
+ I
200
+ -1
201
+ I
202
+ 5
203
+ I
204
+ 0
205
+ I
206
+ 6
207
+ I
208
+ 5
209
+ x
210
+ 55
211
+ /Users/jcoglan/projects/primer/spec/models/watchable.rb
212
+ p
213
+ 1
214
+ x
215
+ 4
216
+ name
217
+ x
218
+ 17
219
+ method_visibility
220
+ x
221
+ 15
222
+ add_defn_method
223
+ M
224
+ 1
225
+ n
226
+ n
227
+ x
228
+ 4
229
+ name
230
+ i
231
+ 3
232
+ 39
233
+ 0
234
+ 11
235
+ I
236
+ 1
237
+ I
238
+ 0
239
+ I
240
+ 0
241
+ I
242
+ 0
243
+ n
244
+ p
245
+ 1
246
+ x
247
+ 5
248
+ @name
249
+ p
250
+ 5
251
+ I
252
+ -1
253
+ I
254
+ 9
255
+ I
256
+ 0
257
+ I
258
+ a
259
+ I
260
+ 3
261
+ x
262
+ 55
263
+ /Users/jcoglan/projects/primer/spec/models/watchable.rb
264
+ p
265
+ 0
266
+ M
267
+ 1
268
+ n
269
+ n
270
+ x
271
+ 10
272
+ is_called?
273
+ i
274
+ 7
275
+ 39
276
+ 0
277
+ 20
278
+ 0
279
+ 83
280
+ 1
281
+ 11
282
+ I
283
+ 3
284
+ I
285
+ 1
286
+ I
287
+ 1
288
+ I
289
+ 1
290
+ n
291
+ p
292
+ 2
293
+ x
294
+ 5
295
+ @name
296
+ x
297
+ 2
298
+ ==
299
+ p
300
+ 5
301
+ I
302
+ -1
303
+ I
304
+ d
305
+ I
306
+ 0
307
+ I
308
+ e
309
+ I
310
+ 7
311
+ x
312
+ 55
313
+ /Users/jcoglan/projects/primer/spec/models/watchable.rb
314
+ p
315
+ 1
316
+ x
317
+ 4
318
+ name
319
+ p
320
+ 11
321
+ I
322
+ 2
323
+ I
324
+ 2
325
+ I
326
+ d
327
+ I
328
+ 3
329
+ I
330
+ 17
331
+ I
332
+ 5
333
+ I
334
+ 25
335
+ I
336
+ 9
337
+ I
338
+ 33
339
+ I
340
+ d
341
+ I
342
+ 41
343
+ x
344
+ 55
345
+ /Users/jcoglan/projects/primer/spec/models/watchable.rb
346
+ p
347
+ 0
348
+ x
349
+ 13
350
+ attach_method
351
+ p
352
+ 3
353
+ I
354
+ 0
355
+ I
356
+ 1
357
+ I
358
+ 1d
359
+ x
360
+ 55
361
+ /Users/jcoglan/projects/primer/spec/models/watchable.rb
362
+ p
363
+ 0