emdrb 0.1.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.
data/COPYING ADDED
@@ -0,0 +1,403 @@
1
+ EMDRb is copyrighted free software owned by Rafael Sevilla (dido
2
+ ... imperium.ph). The Owner of this software permits you to
3
+ redistribute and/or modify the software under either the terms of the
4
+ GPL version 2 (see further below), or the conditions below ("Ruby
5
+ License"):
6
+
7
+ 1. You may make and give away verbatim copies of the source form of this
8
+ software without restriction, provided that you retain ALL of the
9
+ original copyright notices and associated disclaimers.
10
+
11
+ 2. You may modify your copy of the software in any way, provided that
12
+ you do at least ONE of the following:
13
+
14
+ a) place your modifications in the Public Domain or otherwise
15
+ make them Freely Available, such as by posting said
16
+ modifications to Usenet or an equivalent medium, or by allowing
17
+ the author to include your modifications in the software.
18
+
19
+ b) use the modified software only within your corporation or
20
+ organization.
21
+
22
+ c) give non-standard binaries non-standard names, with
23
+ instructions on where to get the original software distribution.
24
+
25
+ d) make other distribution arrangements with the Owner.
26
+
27
+ 3. You may distribute the software in object code or binary form,
28
+ provided that you do at least ONE of the following:
29
+
30
+ a) distribute the binaries and library files of the software,
31
+ together with instructions (in a manual page or equivalent)
32
+ on where to get the original distribution.
33
+
34
+ b) accompany the distribution with the machine-readable source of
35
+ the software.
36
+
37
+ c) give non-standard binaries non-standard names, with
38
+ instructions on where to get the original software distribution.
39
+
40
+ d) make other distribution arrangements with the Owner.
41
+
42
+ 4. You may modify and include parts of the software into any other
43
+ software (possibly commercial), provided you comply with the terms in
44
+ Sections 1, 2, and 3 above. But some files in the distribution
45
+ are not written by the Owner, so they may be made available to you
46
+ under different terms.
47
+
48
+ For the list of those files and their copying conditions, see the
49
+ file LEGAL.
50
+
51
+ 5. The scripts and library files supplied as input to or produced as
52
+ output from the software do not automatically fall under the
53
+ copyright of the software, but belong to whoever generated them,
54
+ and may be sold commercially, and may be aggregated with this
55
+ software.
56
+
57
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
58
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
59
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
60
+ PURPOSE.
61
+
62
+ ---------------------------------------------------------------------
63
+
64
+ GNU GENERAL PUBLIC LICENSE
65
+ Version 2, June 1991
66
+
67
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
68
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
69
+ Everyone is permitted to copy and distribute verbatim copies
70
+ of this license document, but changing it is not allowed.
71
+
72
+ Preamble
73
+
74
+ The licenses for most software are designed to take away your
75
+ freedom to share and change it. By contrast, the GNU General Public
76
+ License is intended to guarantee your freedom to share and change free
77
+ software--to make sure the software is free for all its users. This
78
+ General Public License applies to most of the Free Software
79
+ Foundation's software and to any other program whose authors commit to
80
+ using it. (Some other Free Software Foundation software is covered by
81
+ the GNU Library General Public License instead.) You can apply it to
82
+ your programs, too.
83
+
84
+ When we speak of free software, we are referring to freedom, not
85
+ price. Our General Public Licenses are designed to make sure that you
86
+ have the freedom to distribute copies of free software (and charge for
87
+ this service if you wish), that you receive source code or can get it
88
+ if you want it, that you can change the software or use pieces of it
89
+ in new free programs; and that you know you can do these things.
90
+
91
+ To protect your rights, we need to make restrictions that forbid
92
+ anyone to deny you these rights or to ask you to surrender the rights.
93
+ These restrictions translate to certain responsibilities for you if you
94
+ distribute copies of the software, or if you modify it.
95
+
96
+ For example, if you distribute copies of such a program, whether
97
+ gratis or for a fee, you must give the recipients all the rights that
98
+ you have. You must make sure that they, too, receive or can get the
99
+ source code. And you must show them these terms so they know their
100
+ rights.
101
+
102
+ We protect your rights with two steps: (1) copyright the software, and
103
+ (2) offer you this license which gives you legal permission to copy,
104
+ distribute and/or modify the software.
105
+
106
+ Also, for each author's protection and ours, we want to make certain
107
+ that everyone understands that there is no warranty for this free
108
+ software. If the software is modified by someone else and passed on, we
109
+ want its recipients to know that what they have is not the original, so
110
+ that any problems introduced by others will not reflect on the original
111
+ authors' reputations.
112
+
113
+ Finally, any free program is threatened constantly by software
114
+ patents. We wish to avoid the danger that redistributors of a free
115
+ program will individually obtain patent licenses, in effect making the
116
+ program proprietary. To prevent this, we have made it clear that any
117
+ patent must be licensed for everyone's free use or not licensed at all.
118
+
119
+ The precise terms and conditions for copying, distribution and
120
+ modification follow.
121
+
122
+ GNU GENERAL PUBLIC LICENSE
123
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
124
+
125
+ 0. This License applies to any program or other work which contains
126
+ a notice placed by the copyright holder saying it may be distributed
127
+ under the terms of this General Public License. The "Program", below,
128
+ refers to any such program or work, and a "work based on the Program"
129
+ means either the Program or any derivative work under copyright law:
130
+ that is to say, a work containing the Program or a portion of it,
131
+ either verbatim or with modifications and/or translated into another
132
+ language. (Hereinafter, translation is included without limitation in
133
+ the term "modification".) Each licensee is addressed as "you".
134
+
135
+ Activities other than copying, distribution and modification are not
136
+ covered by this License; they are outside its scope. The act of
137
+ running the Program is not restricted, and the output from the Program
138
+ is covered only if its contents constitute a work based on the
139
+ Program (independent of having been made by running the Program).
140
+ Whether that is true depends on what the Program does.
141
+
142
+ 1. You may copy and distribute verbatim copies of the Program's
143
+ source code as you receive it, in any medium, provided that you
144
+ conspicuously and appropriately publish on each copy an appropriate
145
+ copyright notice and disclaimer of warranty; keep intact all the
146
+ notices that refer to this License and to the absence of any warranty;
147
+ and give any other recipients of the Program a copy of this License
148
+ along with the Program.
149
+
150
+ You may charge a fee for the physical act of transferring a copy, and
151
+ you may at your option offer warranty protection in exchange for a fee.
152
+
153
+ 2. You may modify your copy or copies of the Program or any portion
154
+ of it, thus forming a work based on the Program, and copy and
155
+ distribute such modifications or work under the terms of Section 1
156
+ above, provided that you also meet all of these conditions:
157
+
158
+ a) You must cause the modified files to carry prominent notices
159
+ stating that you changed the files and the date of any change.
160
+
161
+ b) You must cause any work that you distribute or publish, that in
162
+ whole or in part contains or is derived from the Program or any
163
+ part thereof, to be licensed as a whole at no charge to all third
164
+ parties under the terms of this License.
165
+
166
+ c) If the modified program normally reads commands interactively
167
+ when run, you must cause it, when started running for such
168
+ interactive use in the most ordinary way, to print or display an
169
+ announcement including an appropriate copyright notice and a
170
+ notice that there is no warranty (or else, saying that you provide
171
+ a warranty) and that users may redistribute the program under
172
+ these conditions, and telling the user how to view a copy of this
173
+ License. (Exception: if the Program itself is interactive but
174
+ does not normally print such an announcement, your work based on
175
+ the Program is not required to print an announcement.)
176
+
177
+ These requirements apply to the modified work as a whole. If
178
+ identifiable sections of that work are not derived from the Program,
179
+ and can be reasonably considered independent and separate works in
180
+ themselves, then this License, and its terms, do not apply to those
181
+ sections when you distribute them as separate works. But when you
182
+ distribute the same sections as part of a whole which is a work based
183
+ on the Program, the distribution of the whole must be on the terms of
184
+ this License, whose permissions for other licensees extend to the
185
+ entire whole, and thus to each and every part regardless of who wrote it.
186
+
187
+ Thus, it is not the intent of this section to claim rights or contest
188
+ your rights to work written entirely by you; rather, the intent is to
189
+ exercise the right to control the distribution of derivative or
190
+ collective works based on the Program.
191
+
192
+ In addition, mere aggregation of another work not based on the Program
193
+ with the Program (or with a work based on the Program) on a volume of
194
+ a storage or distribution medium does not bring the other work under
195
+ the scope of this License.
196
+
197
+ 3. You may copy and distribute the Program (or a work based on it,
198
+ under Section 2) in object code or executable form under the terms of
199
+ Sections 1 and 2 above provided that you also do one of the following:
200
+
201
+ a) Accompany it with the complete corresponding machine-readable
202
+ source code, which must be distributed under the terms of Sections
203
+ 1 and 2 above on a medium customarily used for software interchange; or,
204
+
205
+ b) Accompany it with a written offer, valid for at least three
206
+ years, to give any third party, for a charge no more than your
207
+ cost of physically performing source distribution, a complete
208
+ machine-readable copy of the corresponding source code, to be
209
+ distributed under the terms of Sections 1 and 2 above on a medium
210
+ customarily used for software interchange; or,
211
+
212
+ c) Accompany it with the information you received as to the offer
213
+ to distribute corresponding source code. (This alternative is
214
+ allowed only for noncommercial distribution and only if you
215
+ received the program in object code or executable form with such
216
+ an offer, in accord with Subsection b above.)
217
+
218
+ The source code for a work means the preferred form of the work for
219
+ making modifications to it. For an executable work, complete source
220
+ code means all the source code for all modules it contains, plus any
221
+ associated interface definition files, plus the scripts used to
222
+ control compilation and installation of the executable. However, as a
223
+ special exception, the source code distributed need not include
224
+ anything that is normally distributed (in either source or binary
225
+ form) with the major components (compiler, kernel, and so on) of the
226
+ operating system on which the executable runs, unless that component
227
+ itself accompanies the executable.
228
+
229
+ If distribution of executable or object code is made by offering
230
+ access to copy from a designated place, then offering equivalent
231
+ access to copy the source code from the same place counts as
232
+ distribution of the source code, even though third parties are not
233
+ compelled to copy the source along with the object code.
234
+
235
+ 4. You may not copy, modify, sublicense, or distribute the Program
236
+ except as expressly provided under this License. Any attempt
237
+ otherwise to copy, modify, sublicense or distribute the Program is
238
+ void, and will automatically terminate your rights under this License.
239
+ However, parties who have received copies, or rights, from you under
240
+ this License will not have their licenses terminated so long as such
241
+ parties remain in full compliance.
242
+
243
+ 5. You are not required to accept this License, since you have not
244
+ signed it. However, nothing else grants you permission to modify or
245
+ distribute the Program or its derivative works. These actions are
246
+ prohibited by law if you do not accept this License. Therefore, by
247
+ modifying or distributing the Program (or any work based on the
248
+ Program), you indicate your acceptance of this License to do so, and
249
+ all its terms and conditions for copying, distributing or modifying
250
+ the Program or works based on it.
251
+
252
+ 6. Each time you redistribute the Program (or any work based on the
253
+ Program), the recipient automatically receives a license from the
254
+ original licensor to copy, distribute or modify the Program subject to
255
+ these terms and conditions. You may not impose any further
256
+ restrictions on the recipients' exercise of the rights granted herein.
257
+ You are not responsible for enforcing compliance by third parties to
258
+ this License.
259
+
260
+ 7. If, as a consequence of a court judgment or allegation of patent
261
+ infringement or for any other reason (not limited to patent issues),
262
+ conditions are imposed on you (whether by court order, agreement or
263
+ otherwise) that contradict the conditions of this License, they do not
264
+ excuse you from the conditions of this License. If you cannot
265
+ distribute so as to satisfy simultaneously your obligations under this
266
+ License and any other pertinent obligations, then as a consequence you
267
+ may not distribute the Program at all. For example, if a patent
268
+ license would not permit royalty-free redistribution of the Program by
269
+ all those who receive copies directly or indirectly through you, then
270
+ the only way you could satisfy both it and this License would be to
271
+ refrain entirely from distribution of the Program.
272
+
273
+ If any portion of this section is held invalid or unenforceable under
274
+ any particular circumstance, the balance of the section is intended to
275
+ apply and the section as a whole is intended to apply in other
276
+ circumstances.
277
+
278
+ It is not the purpose of this section to induce you to infringe any
279
+ patents or other property right claims or to contest validity of any
280
+ such claims; this section has the sole purpose of protecting the
281
+ integrity of the free software distribution system, which is
282
+ implemented by public license practices. Many people have made
283
+ generous contributions to the wide range of software distributed
284
+ through that system in reliance on consistent application of that
285
+ system; it is up to the author/donor to decide if he or she is willing
286
+ to distribute software through any other system and a licensee cannot
287
+ impose that choice.
288
+
289
+ This section is intended to make thoroughly clear what is believed to
290
+ be a consequence of the rest of this License.
291
+
292
+ 8. If the distribution and/or use of the Program is restricted in
293
+ certain countries either by patents or by copyrighted interfaces, the
294
+ original copyright holder who places the Program under this License
295
+ may add an explicit geographical distribution limitation excluding
296
+ those countries, so that distribution is permitted only in or among
297
+ countries not thus excluded. In such case, this License incorporates
298
+ the limitation as if written in the body of this License.
299
+
300
+ 9. The Free Software Foundation may publish revised and/or new versions
301
+ of the General Public License from time to time. Such new versions will
302
+ be similar in spirit to the present version, but may differ in detail to
303
+ address new problems or concerns.
304
+
305
+ Each version is given a distinguishing version number. If the Program
306
+ specifies a version number of this License which applies to it and "any
307
+ later version", you have the option of following the terms and conditions
308
+ either of that version or of any later version published by the Free
309
+ Software Foundation. If the Program does not specify a version number of
310
+ this License, you may choose any version ever published by the Free Software
311
+ Foundation.
312
+
313
+ 10. If you wish to incorporate parts of the Program into other free
314
+ programs whose distribution conditions are different, write to the author
315
+ to ask for permission. For software which is copyrighted by the Free
316
+ Software Foundation, write to the Free Software Foundation; we sometimes
317
+ make exceptions for this. Our decision will be guided by the two goals
318
+ of preserving the free status of all derivatives of our free software and
319
+ of promoting the sharing and reuse of software generally.
320
+
321
+ NO WARRANTY
322
+
323
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
324
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
325
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
326
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
327
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
328
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
329
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
330
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
331
+ REPAIR OR CORRECTION.
332
+
333
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
334
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
335
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
336
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
337
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
338
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
339
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
340
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
341
+ POSSIBILITY OF SUCH DAMAGES.
342
+
343
+ END OF TERMS AND CONDITIONS
344
+
345
+ How to Apply These Terms to Your New Programs
346
+
347
+ If you develop a new program, and you want it to be of the greatest
348
+ possible use to the public, the best way to achieve this is to make it
349
+ free software which everyone can redistribute and change under these terms.
350
+
351
+ To do so, attach the following notices to the program. It is safest
352
+ to attach them to the start of each source file to most effectively
353
+ convey the exclusion of warranty; and each file should have at least
354
+ the "copyright" line and a pointer to where the full notice is found.
355
+
356
+ <one line to give the program's name and a brief idea of what it does.>
357
+ Copyright (C) <year> <name of author>
358
+
359
+ This program is free software; you can redistribute it and/or modify
360
+ it under the terms of the GNU General Public License as published by
361
+ the Free Software Foundation; either version 2 of the License, or
362
+ (at your option) any later version.
363
+
364
+ This program is distributed in the hope that it will be useful,
365
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
366
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
367
+ GNU General Public License for more details.
368
+
369
+ You should have received a copy of the GNU General Public License
370
+ along with this program; if not, write to the Free Software
371
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
372
+
373
+
374
+ Also add information on how to contact you by electronic and paper mail.
375
+
376
+ If the program is interactive, make it output a short notice like this
377
+ when it starts in an interactive mode:
378
+
379
+ Gnomovision version 69, Copyright (C) year name of author
380
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
381
+ This is free software, and you are welcome to redistribute it
382
+ under certain conditions; type `show c' for details.
383
+
384
+ The hypothetical commands `show w' and `show c' should show the appropriate
385
+ parts of the General Public License. Of course, the commands you use may
386
+ be called something other than `show w' and `show c'; they could even be
387
+ mouse-clicks or menu items--whatever suits your program.
388
+
389
+ You should also get your employer (if you work as a programmer) or your
390
+ school, if any, to sign a "copyright disclaimer" for the program, if
391
+ necessary. Here is a sample; alter the names:
392
+
393
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
394
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
395
+
396
+ <signature of Ty Coon>, 1 April 1989
397
+ Ty Coon, President of Vice
398
+
399
+ This General Public License does not permit incorporating your program into
400
+ proprietary programs. If your program is a subroutine library, you may
401
+ consider it more useful to permit linking proprietary applications with the
402
+ library. If this is what you want to do, use the GNU Library General
403
+ Public License instead of this License.
@@ -0,0 +1,3 @@
1
+ == 0.1.0 / 2008-10-23
2
+
3
+ * First public release
data/LEGAL ADDED
@@ -0,0 +1,14 @@
1
+ LEGAL NOTICE INFORMATION
2
+ ------------------------
3
+
4
+ EMDRb is Copyright (C) 2008 by Rafael Sevilla.
5
+
6
+ EMDRb is copyrighted software owned by Rafael Sevilla (dido
7
+ ... imperium.ph). You may redistribute and/or modify this software as
8
+ long as you comply with either the terms of the GPL or Ruby's
9
+ license. Please see the file COPYING for the details of these
10
+ licenses.
11
+
12
+ Your use of all the files in this distribution is controlled by these
13
+ license terms.
14
+
@@ -0,0 +1,23 @@
1
+ COPYING
2
+ History.txt
3
+ LEGAL
4
+ Manifest.txt
5
+ README.txt
6
+ Rakefile
7
+ lib/emdrb.rb
8
+ lib/emdrb/emdrb.rb
9
+ lib/emdrb/version.rb
10
+ tasks/ann.rake
11
+ tasks/bones.rake
12
+ tasks/gem.rake
13
+ tasks/git.rake
14
+ tasks/manifest.rake
15
+ tasks/notes.rake
16
+ tasks/post_load.rake
17
+ tasks/rdoc.rake
18
+ tasks/rubyforge.rake
19
+ tasks/setup.rb
20
+ tasks/spec.rake
21
+ tasks/svn.rake
22
+ tasks/test.rake
23
+ test/test_emdrb.rb
@@ -0,0 +1,65 @@
1
+ emdrb
2
+ by Rafael R. Sevilla <dido@imperium.ph>
3
+ http://emdrb.rubyforge.org
4
+
5
+ == DESCRIPTION:
6
+
7
+ This is a distributed Ruby client and server which should work as a
8
+ drop-in replacement for the standard distributed Ruby implementation
9
+ available in the Ruby standard library.
10
+
11
+ == FEATURES/PROBLEMS:
12
+
13
+ This is a simple but working DRb server implementation that uses
14
+ EventMachine as its basis, rather than the default implementation that
15
+ uses traditional Ruby sockets. This should be somewhat more scalable
16
+ than a server using the standard DRb library.
17
+
18
+ Obviously, this is a quick and dirty release, just to get something
19
+ out there, and of course it has a number of limitations.
20
+
21
+ * We still don't have a DRb client. We use the client implementation
22
+ of the standard DRb.
23
+ * No SSL support.
24
+ * No support for ACLs.
25
+ * No unit tests so it probably still has a lot of bugs.
26
+ * Many standard configuration options for DRb still unsupported
27
+
28
+ These and many other problems are scheduled to be addressed in the
29
+ next release.
30
+
31
+ == SYNOPSIS:
32
+
33
+ Creating a server using EMDRb has been made as close as possible to
34
+ making one with the standard library DRb:
35
+
36
+ require 'emdrb'
37
+
38
+ URI = "druby://localhost:8787"
39
+
40
+ class TimeServer
41
+ def get_current_time
42
+ return(Time.now)
43
+ end
44
+ end
45
+
46
+ $SAFE=1
47
+ EMDRb.start_service(URI, TimeServer.new)
48
+ EMDRb.thread.join
49
+
50
+ == REQUIREMENTS:
51
+
52
+ * Obviously, EMDRb requires EventMachine.
53
+
54
+ == INSTALL:
55
+
56
+ * Standard gem installation: 'sudo gem install' ought to do the trick.
57
+
58
+ == LICENSE:
59
+
60
+ Copyright (c) 2008 Rafael R. Sevilla. You can redistribute it and/or
61
+ modify it under the same terms as Ruby. Please see the file COPYING for
62
+ more details.
63
+
64
+
65
+