fmq 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.3.4 2008-09-06
2
+
3
+ * 2 minor change:
4
+ * complete redesign of the admin interface
5
+ * complete redesign of the website
6
+
1
7
  == 0.3.3 2008-09-02
2
8
 
3
9
  * 1 minor change:
data/README.txt CHANGED
@@ -14,10 +14,10 @@ Project github repositiory: git://github.com/threez/fmq.git
14
14
  The project implements a queue system with a server and some client apis.
15
15
 
16
16
  The server is a rack server that holds REST-named queues, so that the
17
- implemention can be changed rapidly. You can GET, POST, DELETE, HEAD queue
17
+ implementation can be changed rapidly. You can GET, POST, DELETE, HEAD queue
18
18
  messages using the normal HTTP requests. The system itself uses a configuration
19
- file (*config.ru*) to setup queues at startup or even at runtime. The queue
20
- implementations can be changed or you can develep own queues with ease.
19
+ file (config.ru) to setup queues at startup or even at runtime. The queue
20
+ implementations can be changed or you can develop own queues with ease.
21
21
 
22
22
  For an simple administration try out the integrated ajax based web interface.
23
23
 
@@ -29,16 +29,6 @@ The queue itself is a RESTful url like http://localhost:5884/myQueueName/
29
29
  or http://localhost:5884/myApplication/myQueueName/. If you do a GET request
30
30
  to this url with a web browser you will receive one message from the queue.
31
31
 
32
- == FEATURES/PROBLEMS:
33
-
34
- * FIFO message store
35
- * easy setup and maintenance of system (rack)
36
- * using http for communication
37
- * changeable queue implementation
38
- * ruby client lib
39
- * simple ajax admin interface
40
- * implements a rack server stack
41
-
42
32
  == SYNOPSIS:
43
33
 
44
34
  After installing the gem you can start by creating a project:
@@ -1,50 +1,73 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <title>Free Message Queue</title>
5
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6
- <link rel="shortcut icon" href="images/logo.png" />
7
- <link href="stylesheets/application.css" rel="stylesheet" type="text/css" />
8
- <script type="text/javascript" src="javascript/prototype.js"></script>
9
- <script type="text/javascript" src="javascript/application.js"></script>
10
- </head>
11
- <body onload="updateSelects(); updateTable();">
12
- <div id="container">
13
- <div id="header">
14
- <div id="logo"></div>
15
- <h1>Free Message Queue - Admin Interface</h1>
16
- <h3>the easy http queue system for ruby and all others ...</h3>
17
- </div>
18
- <div id="content">
19
- <!-- LIST QUEUE -->
20
- <h1>Queues</h1>
21
- <p id="queue-table-space"></p>
22
- <input type="button" value="update" onclick="updateTable();" />
23
-
24
- <!-- CREATE QUEUE -->
25
- <h1>Create queue</h1>
26
- <p>Queue path: /<input id="queue-create-path" /></p>
27
- <p>Maximum messages: <input id="queue-create-max-messages" value="1000000" /></p>
28
- <p>Maximum queue size in kb, mb, gb: <input id="queue-create-size" value="100mb" /></p>
29
- <input type="button" value="create" onclick="createQueue()" />
30
-
31
- <!-- SEND MESSAGE TO QUEUE -->
32
- <h1>Send message to queue</h1>
33
- <p>Queue path: <select id="post-queue-name"><option>NONE</option></select></p>
34
- <p><textarea id="post-body" class="block-text" rows="5" cols="80" style="width: 780px; height: 100px;"></textarea></p>
35
- <input id="post-button" type="button" value="send"
36
- onclick="sendMessageToQueue('post-button', 'post-queue-name', 'post-body');"/>
37
-
38
- <!-- GET MESSAGE FROM QUEUE -->
39
- <h1>Get a message from queue</h1>
40
- <p>Queue path: <select id="get-queue-name"><option>NONE</option></select></p>
41
- <pre id="get-body" class="block-text"></pre>
42
- <input id="get-button" type="button" value="get one"
43
- onclick="getMessageFromQueue('get-button', 'get-queue-name', 'get-body');"/>
44
- </div>
45
- <div id="footer">
46
- This interface is based on <a href="http://www.prototypejs.org/">prototype</a>
47
- </div>
48
- </div>
49
- </body>
50
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>Free Message Queue</title>
6
+ <link href="stylesheets/application.css" rel="stylesheet" type="text/css" media="screen" />
7
+ <script type="text/javascript" src="javascript/prototype.js"></script>
8
+ <script type="text/javascript" src="javascript/application.js"></script>
9
+ <link rel="shortcut icon" href="images/logo.png" />
10
+ </head>
11
+ <body onload="updateSelects(); updateTable();">
12
+ <div id="header">
13
+ <div id="logo">
14
+ <h1><a href="#">Free Message Queue</a></h1>
15
+ <p>the easy http queue system</p>
16
+ </div>
17
+ </div>
18
+ <div id="page">
19
+ <div id="content">
20
+ <!-- SEND MESSAGE TO QUEUE -->
21
+ <h1 class="title">Put a message</h1>
22
+ <p>
23
+ Queue path: <select id="post-queue-name"><option>NONE</option></select><br />
24
+ <textarea id="post-body" class="block-text" rows="5" cols="20"></textarea><br />
25
+ <input id="post-button" type="button" value="send"
26
+ onclick="sendMessageToQueue('post-button', 'post-queue-name', 'post-body');"/>
27
+ </p>
28
+
29
+ <!-- GET MESSAGE FROM QUEUE -->
30
+ <h1 class="title">Poll a message</h1>
31
+ <p>
32
+ Queue path: <select id="get-queue-name"><option>NONE</option></select><br />
33
+ <code id="get-body" class="block-text"></code>
34
+ <input id="get-button" type="button" value="get one"
35
+ onclick="getMessageFromQueue('get-button', 'get-queue-name', 'get-body');"/>
36
+ </p>
37
+ </div>
38
+ <div id="sidebar">
39
+ <!-- LIST QUEUE -->
40
+ <h2>Queues</h2>
41
+ <p>
42
+ <span id="queue-table-space"></span>
43
+ <input type="button" value="delete" onclick="deleteQueue('queue_to_delete');"/>
44
+ <input type="button" value="update" onclick="updateTable();" />
45
+ </p>
46
+ <!-- CREATE QUEUE -->
47
+ <h2>Create queue</h2>
48
+ <p>
49
+ Queue path: /<input id="queue-create-path" /><br />
50
+ Maximum messages: <input id="queue-create-max-messages" value="1000000" /><br />
51
+ Maximum queue size in kb, mb, gb: <input id="queue-create-size" value="100mb" /><br />
52
+ <input type="button" value="create" onclick="createQueue()" />
53
+ </p>
54
+ </div>
55
+ <div style="clear: both;">&nbsp;</div>
56
+ </div>
57
+ <div id="footer">
58
+ <p>This interface is based on <a href="http://www.prototypejs.org/">prototype</a>.
59
+ Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
60
+ </div>
61
+ </body>
62
+ </html>
63
+ <!--
64
+ Design by Free CSS Templates
65
+ http://www.freecsstemplates.org
66
+ Released for free under a Creative Commons Attribution 2.5 License
67
+
68
+ Name : Printing
69
+ Description: A two-column, fixed-width design with dark color scheme.
70
+ Version : 1.0
71
+ Released : 20080425
72
+
73
+ -->
@@ -29,17 +29,17 @@ function updateTable() {
29
29
  }
30
30
 
31
31
  function fillTableSpaceWithQueues(table_space, queues) {
32
- var table = '<table style="width: 100%; border: 1px solid #292C44">' +
33
- '<tr><th>Queue name</th><th>queue size</th><th>messages in queue</th><th>options</th></tr>';
32
+ var list = '';
34
33
 
35
34
  queues.each ( function (queue) {
36
- table += "<tr><td>" + queue[0] + "</td><td>" + queue[1] + "/" + queue[2] +"</td><td>" + queue[3] + "/" +
37
- queue[4] +'</td><td><input type="button" value="delete" onClick="deleteQueue(\'' + queue[0] + '\');"/></td></tr>';
35
+ list += "<div><small>" +
36
+ '<input type="checkbox" class="queue_to_delete" value="' + queue[0] + '"/><strong>' +
37
+ queue[0] + "</strong><br />(" + queue[1] + "/" + queue[2] +") bytes (" +
38
+ queue[3] + "/" + queue[4] + ") messages</small> " +
39
+ '</div>';
38
40
  });
39
-
40
- table += '</table>';
41
41
 
42
- $(table_space).innerHTML = table;
42
+ $(table_space).innerHTML = list;
43
43
  }
44
44
 
45
45
  function fillSelectWithQueuePaths(select_id, queues) {
@@ -113,15 +113,21 @@ function createQueue() {
113
113
  });
114
114
  }
115
115
 
116
- function deleteQueue(path) {
117
- new Ajax.Request(ADMIN_QUEUE_PATH, {
118
- method: 'POST',
119
- postBody: "_method=delete&path=" + path,
120
- onSuccess: function(transport) {
121
- updateSelects();
122
- updateTable();
123
- alert("Queue " + path + " successfully deleted");
124
- },
125
- onFailure: function(transport){ alert(transport.getHeader("ERROR")) }
126
- });
116
+ function deleteQueue(delete_radio) {
117
+ radios = document.getElementsByClassName(delete_radio);
118
+ for (i = 0; i < radios.length; i++) {
119
+ radio = radios[i]
120
+ if (radio.checked) {
121
+ new Ajax.Request(ADMIN_QUEUE_PATH, {
122
+ method: 'POST',
123
+ postBody: "_method=delete&path=" + radio.value,
124
+ onSuccess: function(transport) {
125
+ updateSelects();
126
+ updateTable();
127
+ alert("Queue " + radio.value + " successfully deleted");
128
+ },
129
+ onFailure: function(transport){ alert(transport.getHeader("ERROR")) }
130
+ });
131
+ }
132
+ }
127
133
  }
@@ -1,61 +1,213 @@
1
- body {
2
- background-color: #687486;
3
- font-family: arial;
4
- font-size: 1em;
5
- }
6
- img {
7
- border: 0px;
8
- }
9
- a {
10
- color: #C7DAD1;
11
- }
12
- #container {
13
- margin: 10px auto;
14
- background-color: #C7DAD1;
15
- width: 800px;
16
- border: 1px solid #292C44;
17
- }
18
- #header {
19
- background-color: #2F3B4E;
20
- padding: 20px 20px 20px 30px;
21
- color: #C7DAD1;
22
- }
23
- #logo {
24
- width: 64px;
25
- height: 64px;
26
- float: right;
27
- margin-top: 20px;
28
- margin-right: 20px;
29
- background-image: url(../images/logo.png);
30
- }
31
- #content {
32
- padding: 10px;
33
- }
34
- #content h1 {
35
- font-size: 1.4em;
36
- }
37
- #footer {
38
- color: #C7DAD1;
39
- background-color: #2F3B4E;
40
- text-align: center;
41
- padding: 10px;
42
- font-weight: bold;
43
- }
44
- .block-text {
45
- font-family:"Courier New", Courier, monospace;
46
- border: 1px dashed #C7DAD1;
47
- background-color: #000;
48
- color: #C7DAD1;
49
- padding: 5px;
50
- font-size: 0.8em;
51
- }
52
- th {
53
- text-align: left;
54
- background-color: #2F3B4E;
55
- color: #C7DAD1;
56
- padding: 5px;
57
- }
58
- td {
59
- text-align: center;
60
- padding: 5px;
61
- }
1
+ /*
2
+ Design by Free CSS Templates
3
+ http://www.freecsstemplates.org
4
+ Released for free under a Creative Commons Attribution 2.5 License
5
+ */
6
+
7
+ body {
8
+ margin: 0;
9
+ background: #35393D;
10
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
11
+ font-size: 13px;
12
+ color: #787878;
13
+ }
14
+
15
+ h1, h2, h3 {
16
+ margin: 0;
17
+ text-transform: uppercase;
18
+ letter-spacing: .15em;
19
+ font-family: Arial, Helvetica, sans-serif;
20
+ }
21
+
22
+ h1 {
23
+ font-size: 1.8em;
24
+ }
25
+
26
+ h2 {
27
+ font-size: 1.4em;
28
+ }
29
+
30
+ h3 {
31
+ font-size: 1em;
32
+ }
33
+
34
+ p, ul, ol {
35
+ margin-top: 0;
36
+ line-height: 180%;
37
+ }
38
+
39
+ ul, ol {
40
+ }
41
+
42
+ a {
43
+ text-decoration: none;
44
+ color: #C0BFBF;
45
+ }
46
+
47
+ a:hover {
48
+ background: none;
49
+ }
50
+
51
+ /* Header */
52
+
53
+ #header {
54
+ width: 940px;
55
+ height: 160px;
56
+ margin: 0 auto;
57
+ background: #000000;
58
+ }
59
+
60
+ /* Logo */
61
+
62
+ #logo {
63
+ float: left;
64
+ }
65
+
66
+ #logo h1 {
67
+ float: left;
68
+ margin-left: 40px;
69
+ padding-top: 85px;
70
+ text-transform: uppercase;
71
+ font-size: 2.6em;
72
+ }
73
+
74
+ #logo p {
75
+ float: left;
76
+ margin: 0;
77
+ padding: 102px 0 0 2px;
78
+ text-transform: lowercase;
79
+ letter-spacing: .2em;
80
+ font: bold 1.2em Arial, Helvetica, sans-serif;
81
+ }
82
+
83
+ #logo a {
84
+ background: none;
85
+ text-decoration: none;
86
+ color: #FFFFFF;
87
+ }
88
+
89
+ /* Menu */
90
+
91
+ #menu {
92
+ width: 940px;
93
+ height: 60px;
94
+ margin: 0 auto;
95
+ }
96
+
97
+ #menu ul {
98
+ margin: 0;
99
+ margin-left: 30px;
100
+ padding: 16px 0 0 10px;
101
+ list-style: none;
102
+ line-height: normal;
103
+ }
104
+
105
+ #menu li {
106
+ float: left;
107
+ }
108
+
109
+ #menu a {
110
+ margin-right: 3px;
111
+ padding: 5px 20px;
112
+ background: #000000;
113
+ text-transform: lowercase;
114
+ text-decoration: none;
115
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
116
+ font-size: 16px;
117
+ font-weight: normal;
118
+ color: #FFFFFF;
119
+ }
120
+
121
+ #menu a:hover, #menu .current_page_item a {
122
+ color: #FFFFFF;
123
+ }
124
+
125
+ #menu a:hover {
126
+ text-decoration: underline;
127
+ }
128
+
129
+ /* Page */
130
+
131
+ #page {
132
+ width: 860px;
133
+ margin: 0 auto;
134
+ padding: 40px;
135
+ }
136
+
137
+ /* Content */
138
+
139
+ #content {
140
+ float: left;
141
+ width: 560px;
142
+ }
143
+
144
+ table {
145
+ width: 560px;
146
+ border: 1px solid black;
147
+ }
148
+
149
+ /* Sidebar */
150
+
151
+ #sidebar {
152
+ float: right;
153
+ width: 258px;
154
+ background: #E8E8E8;
155
+ border: 1px solid #D3D3D3;
156
+ }
157
+
158
+ #sidebar ul {
159
+ margin: 0;
160
+ padding: 0;
161
+ list-style: none;
162
+ }
163
+
164
+ #sidebar li {
165
+ }
166
+
167
+ #sidebar li ul {
168
+ padding: 20px;
169
+ }
170
+
171
+ #sidebar li li {
172
+ }
173
+
174
+ #sidebar h2 {
175
+ padding: 5px 10px;
176
+ background: #000000;
177
+ font-size: 1.2em;
178
+ }
179
+
180
+ #sidebar p {
181
+ padding: 20px;
182
+ }
183
+
184
+ /* Footer */
185
+
186
+ #footer {
187
+ width: 940px;
188
+ margin: 0 auto;
189
+ padding: 20px 0;
190
+ background: #000000;
191
+ border-top: 1px solid #000000;
192
+ border-bottom: 1px solid #000000;
193
+ }
194
+
195
+ #footer p {
196
+ margin: 0;
197
+ line-height: normal;
198
+ font-size: 9px;
199
+ text-transform: uppercase;
200
+ text-align: center;
201
+ }
202
+
203
+ .block-text {
204
+ font-family:"Courier New", Courier, monospace;
205
+ border: 1px solid #D3D3D3;
206
+ background-color: #000;
207
+ color: #D3D3D3;
208
+ padding: 5px;
209
+ font-size: 0.8em;
210
+ width: 560px;
211
+ min-height: 160px;
212
+ display: block;
213
+ }
data/lib/fmq/version.rb CHANGED
@@ -20,7 +20,7 @@ module FreeMessageQueue
20
20
  module VERSION #:nodoc:
21
21
  MAJOR = 0
22
22
  MINOR = 3
23
- TINY = 3
23
+ TINY = 4
24
24
 
25
25
  STRING = [MAJOR, MINOR, TINY].join('.')
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Landgraf
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-02 00:00:00 +02:00
12
+ date: 2008-09-06 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency