connfu-client 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/.rspec +3 -0
  2. data/.rvmrc +2 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +120 -0
  5. data/LICENSE.txt +661 -0
  6. data/README.rdoc +398 -0
  7. data/Rakefile +38 -0
  8. data/bin/.DS_Store +0 -0
  9. data/bin/connfu-client +94 -0
  10. data/connfu-client.gemspec +41 -0
  11. data/examples/conference/application.rb +68 -0
  12. data/examples/conference/conference.rb +33 -0
  13. data/examples/conference/conference_app.rb +25 -0
  14. data/examples/conference/connfu.log +5 -0
  15. data/examples/conference/wall.rb +11 -0
  16. data/examples/provisioning/app/get.rb +29 -0
  17. data/examples/provisioning/channels/get.rb +34 -0
  18. data/examples/provisioning/rss/create.rb +28 -0
  19. data/examples/provisioning/rss/delete.rb +27 -0
  20. data/examples/provisioning/rss/get.rb +32 -0
  21. data/examples/provisioning/rss/put.rb +29 -0
  22. data/examples/provisioning/setup.rb +2 -0
  23. data/examples/provisioning/twitter/create.rb +31 -0
  24. data/examples/provisioning/twitter/delete.rb +27 -0
  25. data/examples/provisioning/twitter/get.rb +32 -0
  26. data/examples/provisioning/twitter/put.rb +29 -0
  27. data/examples/provisioning/voice/create.rb +26 -0
  28. data/examples/provisioning/voice/delete.rb +27 -0
  29. data/examples/provisioning/voice/get.rb +36 -0
  30. data/examples/provisioning/voice/phones/create.rb +26 -0
  31. data/examples/provisioning/voice/phones/delete.rb +28 -0
  32. data/examples/provisioning/voice/phones/get.rb +38 -0
  33. data/examples/provisioning/voice/put.rb +38 -0
  34. data/examples/provisioning/voice/whitelist/create.rb +26 -0
  35. data/examples/provisioning/voice/whitelist/delete.rb +27 -0
  36. data/examples/provisioning/voice/whitelist/get.rb +36 -0
  37. data/examples/provisioning/voice/whitelist/put.rb +27 -0
  38. data/lib/connfu.rb +134 -0
  39. data/lib/connfu/cli/generator.rb +71 -0
  40. data/lib/connfu/connfu_logger.rb +88 -0
  41. data/lib/connfu/connfu_message_formatter.rb +134 -0
  42. data/lib/connfu/connfu_stream.rb +182 -0
  43. data/lib/connfu/dispatcher.rb +164 -0
  44. data/lib/connfu/dsl.rb +84 -0
  45. data/lib/connfu/events.rb +32 -0
  46. data/lib/connfu/listener.rb +85 -0
  47. data/lib/connfu/listener_channel.rb +100 -0
  48. data/lib/connfu/message.rb +74 -0
  49. data/lib/connfu/provisioning.rb +12 -0
  50. data/lib/connfu/provisioning/application.rb +374 -0
  51. data/lib/connfu/provisioning/base.rb +95 -0
  52. data/lib/connfu/provisioning/channel.rb +79 -0
  53. data/lib/connfu/provisioning/phone.rb +55 -0
  54. data/lib/connfu/provisioning/rss.rb +21 -0
  55. data/lib/connfu/provisioning/twitter.rb +28 -0
  56. data/lib/connfu/provisioning/voice.rb +89 -0
  57. data/lib/connfu/provisioning/whitelist.rb +62 -0
  58. data/lib/connfu/version.rb +6 -0
  59. data/lib/rdoc/generator/template/connfu/_context.rhtml +209 -0
  60. data/lib/rdoc/generator/template/connfu/_head.rhtml +7 -0
  61. data/lib/rdoc/generator/template/connfu/class.rhtml +38 -0
  62. data/lib/rdoc/generator/template/connfu/file.rhtml +36 -0
  63. data/lib/rdoc/generator/template/connfu/index.rhtml +13 -0
  64. data/lib/rdoc/generator/template/connfu/resources/apple-touch-icon.png +0 -0
  65. data/lib/rdoc/generator/template/connfu/resources/css/github.css +129 -0
  66. data/lib/rdoc/generator/template/connfu/resources/css/main.css +339 -0
  67. data/lib/rdoc/generator/template/connfu/resources/css/panel.css +389 -0
  68. data/lib/rdoc/generator/template/connfu/resources/css/reset.css +53 -0
  69. data/lib/rdoc/generator/template/connfu/resources/favicon.ico +0 -0
  70. data/lib/rdoc/generator/template/connfu/resources/i/arrows.png +0 -0
  71. data/lib/rdoc/generator/template/connfu/resources/i/results_bg.png +0 -0
  72. data/lib/rdoc/generator/template/connfu/resources/i/tree_bg.png +0 -0
  73. data/lib/rdoc/generator/template/connfu/resources/js/highlight.pack.js +1 -0
  74. data/lib/rdoc/generator/template/connfu/resources/js/jquery-1.3.2.min.js +19 -0
  75. data/lib/rdoc/generator/template/connfu/resources/js/jquery-effect.js +593 -0
  76. data/lib/rdoc/generator/template/connfu/resources/js/main.js +20 -0
  77. data/lib/rdoc/generator/template/connfu/resources/js/searchdoc.js +628 -0
  78. data/lib/rdoc/generator/template/connfu/resources/panel/index.html +72 -0
  79. data/lib/rdoc/generator/template/connfu/se_index.rhtml +8 -0
  80. data/spec/connfu_message_formatter_spec.rb +88 -0
  81. data/spec/connfu_spec.rb +51 -0
  82. data/spec/connfu_stream_spec.rb +84 -0
  83. data/spec/dispatcher_spec.rb +227 -0
  84. data/spec/dsl_spec.rb +159 -0
  85. data/spec/listener_channel_spec.rb +130 -0
  86. data/spec/listener_spec.rb +67 -0
  87. data/spec/provisioning/application_spec.rb +47 -0
  88. data/spec/provisioning/channel_shared_examples.rb +52 -0
  89. data/spec/provisioning/channel_spec.rb +13 -0
  90. data/spec/provisioning/phone_spec.rb +88 -0
  91. data/spec/provisioning/voice_spec.rb +138 -0
  92. data/spec/provisioning_spec.rb +500 -0
  93. data/spec/spec_helper.rb +51 -0
  94. metadata +298 -0
@@ -0,0 +1,389 @@
1
+ /* Panel (begin) */
2
+ .panel
3
+ {
4
+ position: absolute;
5
+ width: 100%;
6
+ height: 100%;
7
+ top: 0;
8
+ left: 0;
9
+ background: #FFF;
10
+ z-index: 2;
11
+ font-family: "Helvetica Neue", "Arial", sans-serif;
12
+ //zoom: 1;
13
+ }
14
+
15
+ .panel_tree .results,
16
+ .panel_results .tree
17
+ {
18
+ display: none;
19
+ }
20
+
21
+ /* Header with search box (begin) */
22
+ .panel .header
23
+ {
24
+ width: 100%;
25
+ height: 29px;
26
+ border-bottom: 1px solid #666;
27
+ position: relative;
28
+ left: 0; top: 0;
29
+ background: #e8e8e8;
30
+ }
31
+
32
+ .panel .header div
33
+ {
34
+ margin: 0 7px;
35
+ }
36
+ .panel .header table
37
+ {
38
+ height: 29px;
39
+ width: 100%;
40
+ }
41
+
42
+ .panel .header table td
43
+ {
44
+ vertical-align: middle;
45
+ text-align: middle;
46
+ }
47
+
48
+ .panel .header label
49
+ {
50
+ position: absolute;
51
+ font-size: 12px;
52
+ line-height: 29px;
53
+ margin-left: 3px;
54
+ color: #777;
55
+ cursor: text;
56
+ }
57
+
58
+ .panel .header table input
59
+ {
60
+ width: 100%;
61
+ box-sizing: border-box;
62
+ -moz-box-sizing: border-box;
63
+ -webkit-box-sizing: border-box;
64
+ display: inline-block;
65
+ -webkit-appearance: searchfield;
66
+ height: 22px;
67
+ //height: auto;
68
+ }
69
+
70
+ /* Header with search box (end) */
71
+
72
+
73
+ /* Results (begin) */
74
+ .panel .result
75
+ {
76
+ position: absolute;
77
+ top: 30px;
78
+ bottom: 0;
79
+ left: 0;
80
+ width: 100%;
81
+ //height: expression((this.parentNode.offsetHeight - 31));
82
+ overflow-y: scroll;
83
+ overflow-x: hidden;
84
+ -overflow-y: hidden;
85
+ background: #EEE url(../i/results_bg.png);
86
+ z-index: 2;
87
+ //zoom:1;
88
+ }
89
+
90
+ .panel .result ul
91
+ {
92
+ font-size: 0.8em;
93
+ width: 100%;
94
+ background: #EEE url(../i/results_bg.png);
95
+ //zoom:1;
96
+ }
97
+
98
+ .panel .result ul li
99
+ {
100
+ height: 46px;
101
+ -height: 50px;
102
+ //display: inline;
103
+ //width: 100%;
104
+ //zoom: 1;
105
+ overflow: hidden;
106
+ padding: 4px 10px 0 10px;
107
+ cursor: pointer;
108
+ }
109
+
110
+ .panel .result ul li h1
111
+ {
112
+ font-size: 13px;
113
+ font-weight: normal;
114
+ color: #333;
115
+ margin-bottom: 2px;
116
+ white-space: nowrap;
117
+ }
118
+
119
+ .panel .result ul li p
120
+ {
121
+ font-size: 11px;
122
+ color: #333;
123
+ margin-bottom: 2px;
124
+ white-space: nowrap;
125
+ }
126
+
127
+ .panel .result ul li h1 i,
128
+ .panel .result ul li p.snippet
129
+ {
130
+ color: #777;
131
+ }
132
+
133
+ .panel .result ul li b
134
+ {
135
+ color: #000;
136
+ }
137
+
138
+ .panel .result ul li.current
139
+ {
140
+ background: #C52F24;
141
+ }
142
+
143
+ .panel .result ul li.current h1,
144
+ .panel .result ul li.current p
145
+ {
146
+ color: #D9D9D9;
147
+ }
148
+
149
+ .panel .result ul li.current h1 i,
150
+ .panel .result ul li.current p.snippet
151
+ {
152
+ color: #ACACAC;
153
+ }
154
+
155
+ .panel .result ul li.current b
156
+ {
157
+ color: #FFF;
158
+ }
159
+
160
+
161
+ .panel .result ul li:hover,
162
+ .panel .result ul li.selected
163
+ {
164
+ background: #d0d0d0;
165
+ }
166
+
167
+ .panel .result ul li.current:hover
168
+ {
169
+ background: #C52F24;
170
+ }
171
+
172
+ .panel .result ul li .badge
173
+ {
174
+ margin-right: 0.4em;
175
+ margin-left: -0.2em;
176
+ padding: 0 0.2em;
177
+ color: #000;
178
+ border-radius: 3px;
179
+ }
180
+
181
+ .panel .result ul li .badge_1
182
+ {
183
+ background: #ACDBF4;
184
+ }
185
+
186
+ .panel .result ul li.current .badge_1
187
+ {
188
+ background: #97BFD7;
189
+ }
190
+
191
+ .panel .result ul li .badge_2
192
+ {
193
+ background: #ACF3C3;
194
+ }
195
+
196
+ .panel .result ul li.current .badge_2
197
+ {
198
+ background: #98D7AC;
199
+ }
200
+
201
+ .panel .result ul li .badge_3
202
+ {
203
+ background: #E0F3AC;
204
+ }
205
+
206
+ .panel .result ul li.current .badge_3
207
+ {
208
+ background: #C4D798;
209
+ }
210
+
211
+ .panel .result ul li .badge_4
212
+ {
213
+ background: #D7CA98;
214
+ }
215
+
216
+ .panel .result ul li.current .badge_4
217
+ {
218
+ background: #A6B0AC;
219
+ }
220
+
221
+ .panel .result ul li .badge_5
222
+ {
223
+ background: #F3C8AC;
224
+ }
225
+
226
+ .panel .result ul li.current .badge_5
227
+ {
228
+ background: #D7B198;
229
+ }
230
+
231
+ .panel .result ul li .badge_6
232
+ {
233
+ background: #F3ACC3;
234
+ }
235
+
236
+ .panel .result ul li.current .badge_6
237
+ {
238
+ background: #D798AB;
239
+ }
240
+
241
+ /* Results (end) */
242
+
243
+ /* Tree (begin) */ /**/
244
+ .panel .tree
245
+ {
246
+ position: absolute;
247
+ top: 30px;
248
+ bottom: 0;
249
+ left: 0;
250
+ width: 100%;
251
+ //zoom: 1;
252
+ //height: expression((this.parentNode.offsetHeight - 31));
253
+ overflow-y: scroll;
254
+ overflow-x: hidden;
255
+ -overflow-y: hidden;
256
+ background: #EEE url(../i/tree_bg.png);
257
+ z-index: 30;
258
+ }
259
+
260
+ .panel .tree ul
261
+ {
262
+ background: #EEE url(../i/tree_bg.png);
263
+ }
264
+
265
+ .panel .tree li
266
+ {
267
+ cursor: pointer;
268
+ overflow: hidden;
269
+ //height: 23px;
270
+ //display: inline;
271
+ //zoom: 1;
272
+ //width: 100%;
273
+ }
274
+
275
+
276
+ .panel .tree li .content
277
+ {
278
+ padding-left: 18px;
279
+ padding-top: 5px;
280
+ height: 18px;
281
+ overflow: hidden;
282
+ position: relative;
283
+ }
284
+
285
+ .panel .tree li .icon
286
+ {
287
+ width: 10px;
288
+ height: 9px;
289
+ background: url(../i/arrows.png);
290
+ background-position: 0 -9px;
291
+ position: absolute;
292
+ left: 1px;
293
+ top: 8px;
294
+ cursor: default;
295
+ }
296
+
297
+ .panel .tree li.closed .icon
298
+ {
299
+ background-position: 0 0;
300
+ }
301
+
302
+ .panel .tree ul li h1
303
+ {
304
+ font-size: 13px;
305
+ font-weight: normal;
306
+ color: #000;
307
+ margin-bottom: 2px;
308
+ white-space: nowrap;
309
+ }
310
+
311
+ .panel .tree ul li p
312
+ {
313
+ font-size: 11px;
314
+ color: #666;
315
+ margin-bottom: 2px;
316
+ white-space: nowrap;
317
+ }
318
+
319
+ .panel .tree ul li h1 i
320
+ {
321
+ color: #999;
322
+ font-style: normal;
323
+ }
324
+
325
+ .panel .tree ul li.current h1 i
326
+ {
327
+ color: #CCC;
328
+ }
329
+
330
+ .panel .tree ul li.empty
331
+ {
332
+ cursor: text;
333
+ }
334
+
335
+ .panel .tree ul li.empty h1,
336
+ .panel .tree ul li.empty p
337
+ {
338
+ color: #666;
339
+ font-style: italic;
340
+ }
341
+
342
+ .panel .tree ul li.current
343
+ {
344
+ background: #C52F24;
345
+ }
346
+
347
+ .panel .tree ul li.current .icon
348
+ {
349
+ background-position: -10px -9px;
350
+ }
351
+
352
+ .panel .tree ul li.current.closed .icon
353
+ {
354
+ background-position: -10px 0;
355
+ }
356
+
357
+ .panel .tree ul li.current h1
358
+ {
359
+ color: #FFF;
360
+ }
361
+
362
+ .panel .tree ul li.current p
363
+ {
364
+ color: #CCC;
365
+ }
366
+
367
+ .panel .tree ul li.current.empty h1,
368
+ .panel .tree ul li.current.empty p
369
+ {
370
+ color: #999;
371
+ }
372
+
373
+ .panel .tree ul li:hover
374
+ {
375
+ background: #d0d0d0;
376
+ }
377
+
378
+ .panel .tree ul li.current:hover
379
+ {
380
+ background: #C52F24;
381
+ }
382
+
383
+ .panel .tree .stopper
384
+ {
385
+ display: none;
386
+ }
387
+ /* Tree (end) */ /**/
388
+
389
+ /* Panel (end) */
@@ -0,0 +1,53 @@
1
+ /* http://meyerweb.com/eric/tools/css/reset/ */
2
+ /* v1.0 | 20080212 */
3
+
4
+ html, body, div, span, applet, object, iframe,
5
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
+ a, abbr, acronym, address, big, cite, code,
7
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
8
+ small, strike, strong, sub, sup, tt, var,
9
+ b, u, i, center,
10
+ dl, dt, dd, ol, ul, li,
11
+ fieldset, form, label, legend,
12
+ table, caption, tbody, tfoot, thead, tr, th, td {
13
+ margin: 0;
14
+ padding: 0;
15
+ border: 0;
16
+ outline: 0;
17
+ font-size: 100%;
18
+ vertical-align: baseline;
19
+ background: transparent;
20
+ }
21
+ body {
22
+ line-height: 1;
23
+ }
24
+ ol, ul {
25
+ list-style: none;
26
+ }
27
+ blockquote, q {
28
+ quotes: none;
29
+ }
30
+ blockquote:before, blockquote:after,
31
+ q:before, q:after {
32
+ content: '';
33
+ content: none;
34
+ }
35
+
36
+ /* remember to define focus styles! */
37
+ :focus {
38
+ outline: 0;
39
+ }
40
+
41
+ /* remember to highlight inserts somehow! */
42
+ ins {
43
+ text-decoration: none;
44
+ }
45
+ del {
46
+ text-decoration: line-through;
47
+ }
48
+
49
+ /* tables still need 'cellspacing="0"' in the markup */
50
+ table {
51
+ border-collapse: collapse;
52
+ border-spacing: 0;
53
+ }