mad_chatter 0.2.9 → 0.3.0

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.
Files changed (80) hide show
  1. data/.gitignore +2 -1
  2. data/.rvmrc +1 -0
  3. data/Gemfile.lock +1 -3
  4. data/README.md +25 -20
  5. data/lib/mad_chatter/actions/dsl.rb +4 -10
  6. data/lib/mad_chatter/actions.rb +29 -0
  7. data/lib/mad_chatter/channel.rb +56 -0
  8. data/lib/mad_chatter/config.rb +22 -5
  9. data/lib/mad_chatter/connection.rb +29 -0
  10. data/lib/mad_chatter/extensions.rb +12 -0
  11. data/lib/mad_chatter/markdown_renderer.rb +6 -0
  12. data/lib/mad_chatter/message.rb +39 -12
  13. data/lib/mad_chatter/message_history.rb +8 -5
  14. data/lib/mad_chatter/message_listener.rb +17 -0
  15. data/lib/mad_chatter/message_listeners/code.rb +30 -0
  16. data/lib/mad_chatter/message_listeners/image.rb +27 -0
  17. data/lib/mad_chatter/message_listeners/join.rb +30 -0
  18. data/lib/mad_chatter/message_listeners/markdown.rb +45 -0
  19. data/lib/mad_chatter/message_listeners/nick.rb +26 -0
  20. data/lib/mad_chatter/server.rb +0 -55
  21. data/lib/mad_chatter/servers/em_websocket.rb +5 -14
  22. data/lib/mad_chatter/user.rb +78 -0
  23. data/lib/mad_chatter/users.rb +32 -24
  24. data/lib/mad_chatter/version.rb +1 -1
  25. data/lib/mad_chatter.rb +98 -34
  26. data/mad_chatter.gemspec +1 -1
  27. data/screenshot.png +0 -0
  28. data/spec/actions_spec.rb +7 -0
  29. data/spec/message_history_spec.rb +12 -10
  30. data/spec/message_listeners/code_spec.rb +37 -0
  31. data/spec/message_listeners/join_spec.rb +34 -0
  32. data/spec/message_listeners/markdown_spec.rb +47 -0
  33. data/spec/message_spec.rb +28 -16
  34. data/spec/server_spec.rb +43 -0
  35. data/spec/users_spec.rb +23 -0
  36. data/templates/extensions/example.rb +1 -1
  37. data/templates/extensions.rb +16 -14
  38. data/templates/web/css/bootstrap.css +3363 -0
  39. data/templates/web/css/bootstrap.min.css +610 -0
  40. data/templates/web/css/bootstrap.min.responsive.css +3 -0
  41. data/templates/web/css/bootstrap.responsive.css +567 -0
  42. data/templates/web/css/mad_chatter.css +59 -0
  43. data/templates/web/{styles.css → css/styles.css} +26 -20
  44. data/templates/web/img/glyphicons-halflings-white.png +0 -0
  45. data/templates/web/img/glyphicons-halflings.png +0 -0
  46. data/templates/web/index.html +173 -40
  47. data/templates/web/js/bootstrap.js +1722 -0
  48. data/templates/web/js/bootstrap.min.js +1 -0
  49. data/templates/web/js/mad_chatter.js +292 -0
  50. data/templates/web/{mad_chatter_actions.js → js/mad_chatter_actions.js} +0 -0
  51. data/templates/web/js/mad_chatter_config.js +3 -0
  52. data/templates/web/js/swfobject.js +4 -0
  53. data/templates/web/js/web_socket.js +389 -0
  54. data/templates/web/swf/WebSocketMain.swf +0 -0
  55. metadata +65 -62
  56. data/TODO.txt +0 -10
  57. data/templates/web/mad_chatter.js +0 -161
  58. data/templates/web/mad_chatter_config.js +0 -1
  59. data/templates/web/markitup/jquery.markitup.js +0 -593
  60. data/templates/web/markitup/sets/markdown/images/bold.png +0 -0
  61. data/templates/web/markitup/sets/markdown/images/code.png +0 -0
  62. data/templates/web/markitup/sets/markdown/images/h1.png +0 -0
  63. data/templates/web/markitup/sets/markdown/images/h2.png +0 -0
  64. data/templates/web/markitup/sets/markdown/images/h3.png +0 -0
  65. data/templates/web/markitup/sets/markdown/images/h4.png +0 -0
  66. data/templates/web/markitup/sets/markdown/images/h5.png +0 -0
  67. data/templates/web/markitup/sets/markdown/images/h6.png +0 -0
  68. data/templates/web/markitup/sets/markdown/images/italic.png +0 -0
  69. data/templates/web/markitup/sets/markdown/images/link.png +0 -0
  70. data/templates/web/markitup/sets/markdown/images/list-bullet.png +0 -0
  71. data/templates/web/markitup/sets/markdown/images/list-numeric.png +0 -0
  72. data/templates/web/markitup/sets/markdown/images/picture.png +0 -0
  73. data/templates/web/markitup/sets/markdown/images/preview.png +0 -0
  74. data/templates/web/markitup/sets/markdown/images/quotes.png +0 -0
  75. data/templates/web/markitup/sets/markdown/readme.txt +0 -11
  76. data/templates/web/markitup/sets/markdown/style.css +0 -6
  77. data/templates/web/markitup/skins/mad_chatter/images/handle.png +0 -0
  78. data/templates/web/markitup/skins/mad_chatter/images/menu.png +0 -0
  79. data/templates/web/markitup/skins/mad_chatter/images/submenu.png +0 -0
  80. data/templates/web/markitup/skins/mad_chatter/style.css +0 -121
@@ -0,0 +1,389 @@
1
+ // Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
2
+ // License: New BSD License
3
+ // Reference: http://dev.w3.org/html5/websockets/
4
+ // Reference: http://tools.ietf.org/html/rfc6455
5
+
6
+ (function() {
7
+
8
+ if (window.WEB_SOCKET_FORCE_FLASH) {
9
+ // Keeps going.
10
+ } else if (window.WebSocket) {
11
+ return;
12
+ } else if (window.MozWebSocket) {
13
+ // Firefox.
14
+ window.WebSocket = MozWebSocket;
15
+ return;
16
+ }
17
+
18
+ var logger;
19
+ if (window.WEB_SOCKET_LOGGER) {
20
+ logger = WEB_SOCKET_LOGGER;
21
+ } else if (window.console && window.console.log && window.console.error) {
22
+ // In some environment, console is defined but console.log or console.error is missing.
23
+ logger = window.console;
24
+ } else {
25
+ logger = {log: function(){ }, error: function(){ }};
26
+ }
27
+
28
+ // swfobject.hasFlashPlayerVersion("10.0.0") doesn't work with Gnash.
29
+ if (swfobject.getFlashPlayerVersion().major < 10) {
30
+ logger.error("Flash Player >= 10.0.0 is required.");
31
+ return;
32
+ }
33
+ if (location.protocol == "file:") {
34
+ logger.error(
35
+ "WARNING: web-socket-js doesn't work in file:///... URL " +
36
+ "unless you set Flash Security Settings properly. " +
37
+ "Open the page via Web server i.e. http://...");
38
+ }
39
+
40
+ /**
41
+ * Our own implementation of WebSocket class using Flash.
42
+ * @param {string} url
43
+ * @param {array or string} protocols
44
+ * @param {string} proxyHost
45
+ * @param {int} proxyPort
46
+ * @param {string} headers
47
+ */
48
+ window.WebSocket = function(url, protocols, proxyHost, proxyPort, headers) {
49
+ var self = this;
50
+ self.__id = WebSocket.__nextId++;
51
+ WebSocket.__instances[self.__id] = self;
52
+ self.readyState = WebSocket.CONNECTING;
53
+ self.bufferedAmount = 0;
54
+ self.__events = {};
55
+ if (!protocols) {
56
+ protocols = [];
57
+ } else if (typeof protocols == "string") {
58
+ protocols = [protocols];
59
+ }
60
+ // Uses setTimeout() to make sure __createFlash() runs after the caller sets ws.onopen etc.
61
+ // Otherwise, when onopen fires immediately, onopen is called before it is set.
62
+ self.__createTask = setTimeout(function() {
63
+ WebSocket.__addTask(function() {
64
+ self.__createTask = null;
65
+ WebSocket.__flash.create(
66
+ self.__id, url, protocols, proxyHost || null, proxyPort || 0, headers || null);
67
+ });
68
+ }, 0);
69
+ };
70
+
71
+ /**
72
+ * Send data to the web socket.
73
+ * @param {string} data The data to send to the socket.
74
+ * @return {boolean} True for success, false for failure.
75
+ */
76
+ WebSocket.prototype.send = function(data) {
77
+ if (this.readyState == WebSocket.CONNECTING) {
78
+ throw "INVALID_STATE_ERR: Web Socket connection has not been established";
79
+ }
80
+ // We use encodeURIComponent() here, because FABridge doesn't work if
81
+ // the argument includes some characters. We don't use escape() here
82
+ // because of this:
83
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions
84
+ // But it looks decodeURIComponent(encodeURIComponent(s)) doesn't
85
+ // preserve all Unicode characters either e.g. "\uffff" in Firefox.
86
+ // Note by wtritch: Hopefully this will not be necessary using ExternalInterface. Will require
87
+ // additional testing.
88
+ var result = WebSocket.__flash.send(this.__id, encodeURIComponent(data));
89
+ if (result < 0) { // success
90
+ return true;
91
+ } else {
92
+ this.bufferedAmount += result;
93
+ return false;
94
+ }
95
+ };
96
+
97
+ /**
98
+ * Close this web socket gracefully.
99
+ */
100
+ WebSocket.prototype.close = function() {
101
+ if (this.__createTask) {
102
+ clearTimeout(this.__createTask);
103
+ this.__createTask = null;
104
+ this.readyState = WebSocket.CLOSED;
105
+ return;
106
+ }
107
+ if (this.readyState == WebSocket.CLOSED || this.readyState == WebSocket.CLOSING) {
108
+ return;
109
+ }
110
+ this.readyState = WebSocket.CLOSING;
111
+ WebSocket.__flash.close(this.__id);
112
+ };
113
+
114
+ /**
115
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
116
+ *
117
+ * @param {string} type
118
+ * @param {function} listener
119
+ * @param {boolean} useCapture
120
+ * @return void
121
+ */
122
+ WebSocket.prototype.addEventListener = function(type, listener, useCapture) {
123
+ if (!(type in this.__events)) {
124
+ this.__events[type] = [];
125
+ }
126
+ this.__events[type].push(listener);
127
+ };
128
+
129
+ /**
130
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
131
+ *
132
+ * @param {string} type
133
+ * @param {function} listener
134
+ * @param {boolean} useCapture
135
+ * @return void
136
+ */
137
+ WebSocket.prototype.removeEventListener = function(type, listener, useCapture) {
138
+ if (!(type in this.__events)) return;
139
+ var events = this.__events[type];
140
+ for (var i = events.length - 1; i >= 0; --i) {
141
+ if (events[i] === listener) {
142
+ events.splice(i, 1);
143
+ break;
144
+ }
145
+ }
146
+ };
147
+
148
+ /**
149
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
150
+ *
151
+ * @param {Event} event
152
+ * @return void
153
+ */
154
+ WebSocket.prototype.dispatchEvent = function(event) {
155
+ var events = this.__events[event.type] || [];
156
+ for (var i = 0; i < events.length; ++i) {
157
+ events[i](event);
158
+ }
159
+ var handler = this["on" + event.type];
160
+ if (handler) handler.apply(this, [event]);
161
+ };
162
+
163
+ /**
164
+ * Handles an event from Flash.
165
+ * @param {Object} flashEvent
166
+ */
167
+ WebSocket.prototype.__handleEvent = function(flashEvent) {
168
+
169
+ if ("readyState" in flashEvent) {
170
+ this.readyState = flashEvent.readyState;
171
+ }
172
+ if ("protocol" in flashEvent) {
173
+ this.protocol = flashEvent.protocol;
174
+ }
175
+
176
+ var jsEvent;
177
+ if (flashEvent.type == "open" || flashEvent.type == "error") {
178
+ jsEvent = this.__createSimpleEvent(flashEvent.type);
179
+ } else if (flashEvent.type == "close") {
180
+ jsEvent = this.__createSimpleEvent("close");
181
+ jsEvent.wasClean = flashEvent.wasClean ? true : false;
182
+ jsEvent.code = flashEvent.code;
183
+ jsEvent.reason = flashEvent.reason;
184
+ } else if (flashEvent.type == "message") {
185
+ var data = decodeURIComponent(flashEvent.message);
186
+ jsEvent = this.__createMessageEvent("message", data);
187
+ } else {
188
+ throw "unknown event type: " + flashEvent.type;
189
+ }
190
+
191
+ this.dispatchEvent(jsEvent);
192
+
193
+ };
194
+
195
+ WebSocket.prototype.__createSimpleEvent = function(type) {
196
+ if (document.createEvent && window.Event) {
197
+ var event = document.createEvent("Event");
198
+ event.initEvent(type, false, false);
199
+ return event;
200
+ } else {
201
+ return {type: type, bubbles: false, cancelable: false};
202
+ }
203
+ };
204
+
205
+ WebSocket.prototype.__createMessageEvent = function(type, data) {
206
+ if (document.createEvent && window.MessageEvent && !window.opera) {
207
+ var event = document.createEvent("MessageEvent");
208
+ event.initMessageEvent("message", false, false, data, null, null, window, null);
209
+ return event;
210
+ } else {
211
+ // IE and Opera, the latter one truncates the data parameter after any 0x00 bytes.
212
+ return {type: type, data: data, bubbles: false, cancelable: false};
213
+ }
214
+ };
215
+
216
+ /**
217
+ * Define the WebSocket readyState enumeration.
218
+ */
219
+ WebSocket.CONNECTING = 0;
220
+ WebSocket.OPEN = 1;
221
+ WebSocket.CLOSING = 2;
222
+ WebSocket.CLOSED = 3;
223
+
224
+ WebSocket.__initialized = false;
225
+ WebSocket.__flash = null;
226
+ WebSocket.__instances = {};
227
+ WebSocket.__tasks = [];
228
+ WebSocket.__nextId = 0;
229
+
230
+ /**
231
+ * Load a new flash security policy file.
232
+ * @param {string} url
233
+ */
234
+ WebSocket.loadFlashPolicyFile = function(url){
235
+ WebSocket.__addTask(function() {
236
+ WebSocket.__flash.loadManualPolicyFile(url);
237
+ });
238
+ };
239
+
240
+ /**
241
+ * Loads WebSocketMain.swf and creates WebSocketMain object in Flash.
242
+ */
243
+ WebSocket.__initialize = function() {
244
+
245
+ if (WebSocket.__initialized) return;
246
+ WebSocket.__initialized = true;
247
+
248
+ if (WebSocket.__swfLocation) {
249
+ // For backword compatibility.
250
+ window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation;
251
+ }
252
+ if (!window.WEB_SOCKET_SWF_LOCATION) {
253
+ logger.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
254
+ return;
255
+ }
256
+ if (!window.WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR &&
257
+ !WEB_SOCKET_SWF_LOCATION.match(/(^|\/)WebSocketMainInsecure\.swf(\?.*)?$/) &&
258
+ WEB_SOCKET_SWF_LOCATION.match(/^\w+:\/\/([^\/]+)/)) {
259
+ var swfHost = RegExp.$1;
260
+ if (location.host != swfHost) {
261
+ logger.error(
262
+ "[WebSocket] You must host HTML and WebSocketMain.swf in the same host " +
263
+ "('" + location.host + "' != '" + swfHost + "'). " +
264
+ "See also 'How to host HTML file and SWF file in different domains' section " +
265
+ "in README.md. If you use WebSocketMainInsecure.swf, you can suppress this message " +
266
+ "by WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = true;");
267
+ }
268
+ }
269
+ var container = document.createElement("div");
270
+ container.id = "webSocketContainer";
271
+ // Hides Flash box. We cannot use display: none or visibility: hidden because it prevents
272
+ // Flash from loading at least in IE. So we move it out of the screen at (-100, -100).
273
+ // But this even doesn't work with Flash Lite (e.g. in Droid Incredible). So with Flash
274
+ // Lite, we put it at (0, 0). This shows 1x1 box visible at left-top corner but this is
275
+ // the best we can do as far as we know now.
276
+ container.style.position = "absolute";
277
+ if (WebSocket.__isFlashLite()) {
278
+ container.style.left = "0px";
279
+ container.style.top = "0px";
280
+ } else {
281
+ container.style.left = "-100px";
282
+ container.style.top = "-100px";
283
+ }
284
+ var holder = document.createElement("div");
285
+ holder.id = "webSocketFlash";
286
+ container.appendChild(holder);
287
+ document.body.appendChild(container);
288
+ // See this article for hasPriority:
289
+ // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html
290
+ swfobject.embedSWF(
291
+ WEB_SOCKET_SWF_LOCATION,
292
+ "webSocketFlash",
293
+ "1" /* width */,
294
+ "1" /* height */,
295
+ "10.0.0" /* SWF version */,
296
+ null,
297
+ null,
298
+ {hasPriority: true, swliveconnect : true, allowScriptAccess: "always"},
299
+ null,
300
+ function(e) {
301
+ if (!e.success) {
302
+ logger.error("[WebSocket] swfobject.embedSWF failed");
303
+ }
304
+ }
305
+ );
306
+
307
+ };
308
+
309
+ /**
310
+ * Called by Flash to notify JS that it's fully loaded and ready
311
+ * for communication.
312
+ */
313
+ WebSocket.__onFlashInitialized = function() {
314
+ // We need to set a timeout here to avoid round-trip calls
315
+ // to flash during the initialization process.
316
+ setTimeout(function() {
317
+ WebSocket.__flash = document.getElementById("webSocketFlash");
318
+ WebSocket.__flash.setCallerUrl(location.href);
319
+ WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);
320
+ for (var i = 0; i < WebSocket.__tasks.length; ++i) {
321
+ WebSocket.__tasks[i]();
322
+ }
323
+ WebSocket.__tasks = [];
324
+ }, 0);
325
+ };
326
+
327
+ /**
328
+ * Called by Flash to notify WebSockets events are fired.
329
+ */
330
+ WebSocket.__onFlashEvent = function() {
331
+ setTimeout(function() {
332
+ try {
333
+ // Gets events using receiveEvents() instead of getting it from event object
334
+ // of Flash event. This is to make sure to keep message order.
335
+ // It seems sometimes Flash events don't arrive in the same order as they are sent.
336
+ var events = WebSocket.__flash.receiveEvents();
337
+ for (var i = 0; i < events.length; ++i) {
338
+ WebSocket.__instances[events[i].webSocketId].__handleEvent(events[i]);
339
+ }
340
+ } catch (e) {
341
+ logger.error(e);
342
+ }
343
+ }, 0);
344
+ return true;
345
+ };
346
+
347
+ // Called by Flash.
348
+ WebSocket.__log = function(message) {
349
+ logger.log(decodeURIComponent(message));
350
+ };
351
+
352
+ // Called by Flash.
353
+ WebSocket.__error = function(message) {
354
+ logger.error(decodeURIComponent(message));
355
+ };
356
+
357
+ WebSocket.__addTask = function(task) {
358
+ if (WebSocket.__flash) {
359
+ task();
360
+ } else {
361
+ WebSocket.__tasks.push(task);
362
+ }
363
+ };
364
+
365
+ /**
366
+ * Test if the browser is running flash lite.
367
+ * @return {boolean} True if flash lite is running, false otherwise.
368
+ */
369
+ WebSocket.__isFlashLite = function() {
370
+ if (!window.navigator || !window.navigator.mimeTypes) {
371
+ return false;
372
+ }
373
+ var mimeType = window.navigator.mimeTypes["application/x-shockwave-flash"];
374
+ if (!mimeType || !mimeType.enabledPlugin || !mimeType.enabledPlugin.filename) {
375
+ return false;
376
+ }
377
+ return mimeType.enabledPlugin.filename.match(/flashlite/i) ? true : false;
378
+ };
379
+
380
+ if (!window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION) {
381
+ // NOTE:
382
+ // This fires immediately if web_socket.js is dynamically loaded after
383
+ // the document is loaded.
384
+ swfobject.addDomLoadEvent(function() {
385
+ WebSocket.__initialize();
386
+ });
387
+ }
388
+
389
+ })();
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mad_chatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-13 00:00:00.000000000 Z
12
+ date: 2012-02-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &2164352360 !ruby/object:Gem::Requirement
16
+ requirement: &2168644280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164352360
24
+ version_requirements: *2168644280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: eventmachine
27
- requirement: &2164351740 !ruby/object:Gem::Requirement
27
+ requirement: &2168643860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2164351740
35
+ version_requirements: *2168643860
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-websocket
38
- requirement: &2164351060 !ruby/object:Gem::Requirement
38
+ requirement: &2168643440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,21 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2164351060
47
- - !ruby/object:Gem::Dependency
48
- name: redcarpet
49
- requirement: &2164372120 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: *2164372120
46
+ version_requirements: *2168643440
58
47
  - !ruby/object:Gem::Dependency
59
48
  name: daemons
60
- requirement: &2164371620 !ruby/object:Gem::Requirement
49
+ requirement: &2168642940 !ruby/object:Gem::Requirement
61
50
  none: false
62
51
  requirements:
63
52
  - - =
@@ -65,10 +54,10 @@ dependencies:
65
54
  version: 1.1.4
66
55
  type: :runtime
67
56
  prerelease: false
68
- version_requirements: *2164371620
57
+ version_requirements: *2168642940
69
58
  - !ruby/object:Gem::Dependency
70
59
  name: rspec
71
- requirement: &2164371200 !ruby/object:Gem::Requirement
60
+ requirement: &2168642460 !ruby/object:Gem::Requirement
72
61
  none: false
73
62
  requirements:
74
63
  - - ! '>='
@@ -76,10 +65,10 @@ dependencies:
76
65
  version: '0'
77
66
  type: :development
78
67
  prerelease: false
79
- version_requirements: *2164371200
68
+ version_requirements: *2168642460
80
69
  - !ruby/object:Gem::Dependency
81
70
  name: shoulda
82
- requirement: &2164370740 !ruby/object:Gem::Requirement
71
+ requirement: &2168641940 !ruby/object:Gem::Requirement
83
72
  none: false
84
73
  requirements:
85
74
  - - ! '>='
@@ -87,10 +76,10 @@ dependencies:
87
76
  version: '0'
88
77
  type: :development
89
78
  prerelease: false
90
- version_requirements: *2164370740
79
+ version_requirements: *2168641940
91
80
  - !ruby/object:Gem::Dependency
92
81
  name: simplecov
93
- requirement: &2164370320 !ruby/object:Gem::Requirement
82
+ requirement: &2168641360 !ruby/object:Gem::Requirement
94
83
  none: false
95
84
  requirements:
96
85
  - - ! '>='
@@ -98,10 +87,10 @@ dependencies:
98
87
  version: '0'
99
88
  type: :development
100
89
  prerelease: false
101
- version_requirements: *2164370320
90
+ version_requirements: *2168641360
102
91
  - !ruby/object:Gem::Dependency
103
92
  name: guard
104
- requirement: &2164369900 !ruby/object:Gem::Requirement
93
+ requirement: &2168640800 !ruby/object:Gem::Requirement
105
94
  none: false
106
95
  requirements:
107
96
  - - ! '>='
@@ -109,10 +98,10 @@ dependencies:
109
98
  version: '0'
110
99
  type: :development
111
100
  prerelease: false
112
- version_requirements: *2164369900
101
+ version_requirements: *2168640800
113
102
  - !ruby/object:Gem::Dependency
114
103
  name: guard-rspec
115
- requirement: &2164369480 !ruby/object:Gem::Requirement
104
+ requirement: &2168640080 !ruby/object:Gem::Requirement
116
105
  none: false
117
106
  requirements:
118
107
  - - ! '>='
@@ -120,10 +109,10 @@ dependencies:
120
109
  version: '0'
121
110
  type: :development
122
111
  prerelease: false
123
- version_requirements: *2164369480
112
+ version_requirements: *2168640080
124
113
  - !ruby/object:Gem::Dependency
125
114
  name: rb-fsevent
126
- requirement: &2164369060 !ruby/object:Gem::Requirement
115
+ requirement: &2168639640 !ruby/object:Gem::Requirement
127
116
  none: false
128
117
  requirements:
129
118
  - - ! '>='
@@ -131,10 +120,10 @@ dependencies:
131
120
  version: '0'
132
121
  type: :development
133
122
  prerelease: false
134
- version_requirements: *2164369060
123
+ version_requirements: *2168639640
135
124
  - !ruby/object:Gem::Dependency
136
125
  name: ruby-growl
137
- requirement: &2164368640 !ruby/object:Gem::Requirement
126
+ requirement: &2168639220 !ruby/object:Gem::Requirement
138
127
  none: false
139
128
  requirements:
140
129
  - - ! '>='
@@ -142,7 +131,7 @@ dependencies:
142
131
  version: '0'
143
132
  type: :development
144
133
  prerelease: false
145
- version_requirements: *2164368640
134
+ version_requirements: *2168639220
146
135
  description: Mad Chatter is a fun, easy to customize chat server, utilizing HTML 5
147
136
  Web Sockets
148
137
  email:
@@ -153,6 +142,7 @@ extensions: []
153
142
  extra_rdoc_files: []
154
143
  files:
155
144
  - .gitignore
145
+ - .rvmrc
156
146
  - CHANGELOG.txt
157
147
  - Gemfile
158
148
  - Gemfile.lock
@@ -160,59 +150,66 @@ files:
160
150
  - LICENSE.txt
161
151
  - README.md
162
152
  - Rakefile
163
- - TODO.txt
164
153
  - bin/mad_chatter
165
154
  - lib/mad_chatter.rb
155
+ - lib/mad_chatter/actions.rb
166
156
  - lib/mad_chatter/actions/base.rb
167
157
  - lib/mad_chatter/actions/dsl.rb
168
158
  - lib/mad_chatter/actions/join.rb
169
159
  - lib/mad_chatter/actions/rename.rb
160
+ - lib/mad_chatter/channel.rb
170
161
  - lib/mad_chatter/config.rb
162
+ - lib/mad_chatter/connection.rb
171
163
  - lib/mad_chatter/daemon.rb
164
+ - lib/mad_chatter/extensions.rb
172
165
  - lib/mad_chatter/markdown_renderer.rb
173
166
  - lib/mad_chatter/message.rb
174
167
  - lib/mad_chatter/message_history.rb
168
+ - lib/mad_chatter/message_listener.rb
169
+ - lib/mad_chatter/message_listeners/code.rb
170
+ - lib/mad_chatter/message_listeners/image.rb
171
+ - lib/mad_chatter/message_listeners/join.rb
172
+ - lib/mad_chatter/message_listeners/markdown.rb
173
+ - lib/mad_chatter/message_listeners/nick.rb
175
174
  - lib/mad_chatter/server.rb
176
175
  - lib/mad_chatter/servers/em_websocket.rb
177
176
  - lib/mad_chatter/servers/juggernaut.rb
178
177
  - lib/mad_chatter/servers/websocket_rack.rb
178
+ - lib/mad_chatter/user.rb
179
179
  - lib/mad_chatter/users.rb
180
180
  - lib/mad_chatter/version.rb
181
181
  - lib/mad_chatter/web_server.rb
182
182
  - mad_chatter.gemspec
183
+ - screenshot.png
184
+ - spec/actions_spec.rb
183
185
  - spec/message_history_spec.rb
186
+ - spec/message_listeners/code_spec.rb
187
+ - spec/message_listeners/join_spec.rb
188
+ - spec/message_listeners/markdown_spec.rb
184
189
  - spec/message_spec.rb
190
+ - spec/server_spec.rb
185
191
  - spec/spec_helper.rb
192
+ - spec/users_spec.rb
186
193
  - templates/config.yml
187
194
  - templates/extensions.rb
188
195
  - templates/extensions/example.rb
196
+ - templates/web/css/bootstrap.css
197
+ - templates/web/css/bootstrap.min.css
198
+ - templates/web/css/bootstrap.min.responsive.css
199
+ - templates/web/css/bootstrap.responsive.css
200
+ - templates/web/css/mad_chatter.css
201
+ - templates/web/css/styles.css
202
+ - templates/web/img/glyphicons-halflings-white.png
203
+ - templates/web/img/glyphicons-halflings.png
189
204
  - templates/web/index.html
190
- - templates/web/mad_chatter.js
191
- - templates/web/mad_chatter_actions.js
192
- - templates/web/mad_chatter_config.js
193
- - templates/web/markitup/jquery.markitup.js
194
- - templates/web/markitup/sets/markdown/images/bold.png
195
- - templates/web/markitup/sets/markdown/images/code.png
196
- - templates/web/markitup/sets/markdown/images/h1.png
197
- - templates/web/markitup/sets/markdown/images/h2.png
198
- - templates/web/markitup/sets/markdown/images/h3.png
199
- - templates/web/markitup/sets/markdown/images/h4.png
200
- - templates/web/markitup/sets/markdown/images/h5.png
201
- - templates/web/markitup/sets/markdown/images/h6.png
202
- - templates/web/markitup/sets/markdown/images/italic.png
203
- - templates/web/markitup/sets/markdown/images/link.png
204
- - templates/web/markitup/sets/markdown/images/list-bullet.png
205
- - templates/web/markitup/sets/markdown/images/list-numeric.png
206
- - templates/web/markitup/sets/markdown/images/picture.png
207
- - templates/web/markitup/sets/markdown/images/preview.png
208
- - templates/web/markitup/sets/markdown/images/quotes.png
209
- - templates/web/markitup/sets/markdown/readme.txt
210
- - templates/web/markitup/sets/markdown/style.css
211
- - templates/web/markitup/skins/mad_chatter/images/handle.png
212
- - templates/web/markitup/skins/mad_chatter/images/menu.png
213
- - templates/web/markitup/skins/mad_chatter/images/submenu.png
214
- - templates/web/markitup/skins/mad_chatter/style.css
215
- - templates/web/styles.css
205
+ - templates/web/js/bootstrap.js
206
+ - templates/web/js/bootstrap.min.js
207
+ - templates/web/js/mad_chatter.js
208
+ - templates/web/js/mad_chatter_actions.js
209
+ - templates/web/js/mad_chatter_config.js
210
+ - templates/web/js/swfobject.js
211
+ - templates/web/js/web_socket.js
212
+ - templates/web/swf/WebSocketMain.swf
216
213
  homepage: http://github.com/andrewhavens/mad_chatter
217
214
  licenses: []
218
215
  post_install_message:
@@ -239,6 +236,12 @@ specification_version: 3
239
236
  summary: Mad Chatter is a fun, easy to customize chat server, utilizing HTML 5 Web
240
237
  Sockets
241
238
  test_files:
239
+ - spec/actions_spec.rb
242
240
  - spec/message_history_spec.rb
241
+ - spec/message_listeners/code_spec.rb
242
+ - spec/message_listeners/join_spec.rb
243
+ - spec/message_listeners/markdown_spec.rb
243
244
  - spec/message_spec.rb
245
+ - spec/server_spec.rb
244
246
  - spec/spec_helper.rb
247
+ - spec/users_spec.rb
data/TODO.txt DELETED
@@ -1,10 +0,0 @@
1
- Goal: to become an open-source version of https://www.hipchat.com/ or https://www.flowdock.com
2
-
3
- TODO:
4
-
5
- FEATURES:
6
- ...
7
-
8
- BUGS:
9
- ...
10
-