io_shuten 0.0.1.dev5 → 0.0.3.dev1

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 (47) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +3 -4
  3. data/Gemfile.lock +2 -8
  4. data/README.md +17 -3
  5. data/Rakefile +25 -1
  6. data/benchmark/compare_mem_w_buf.rb +134 -0
  7. data/doc/IO_3A_3ABuffer.html +198 -0
  8. data/doc/IO_shuten/Base.html +349 -1943
  9. data/doc/IO_shuten/Buffer.html +1842 -0
  10. data/doc/IO_shuten/Errors/FileAccessError.html +5 -4
  11. data/doc/IO_shuten/Errors/FileNotFoundError.html +5 -4
  12. data/doc/IO_shuten/Errors/NodeExistsError.html +5 -4
  13. data/doc/IO_shuten/Errors/NodeNameError.html +5 -4
  14. data/doc/IO_shuten/Errors/NodeNotFoundError.html +5 -4
  15. data/doc/IO_shuten/Errors/NotYetImplemented.html +5 -4
  16. data/doc/IO_shuten/Errors.html +5 -4
  17. data/doc/IO_shuten/Memory.html +1798 -0
  18. data/doc/IO_shuten/Mongo.html +9 -13
  19. data/doc/IO_shuten/Redis.html +803 -8
  20. data/doc/IO_shuten/Stores/Mongo/Collection.html +5 -4
  21. data/doc/IO_shuten/Stores/Mongo/GridFS.html +5 -4
  22. data/doc/IO_shuten/Stores/Mongo.html +5 -4
  23. data/doc/IO_shuten/Stores/Redis/KeyValue.html +5 -4
  24. data/doc/IO_shuten/Stores/Redis/PubSub.html +5 -4
  25. data/doc/IO_shuten/Stores/Redis.html +5 -4
  26. data/doc/IO_shuten/Stores.html +5 -4
  27. data/doc/IO_shuten.html +7 -6
  28. data/doc/_index.html +20 -6
  29. data/doc/class_list.html +1 -1
  30. data/doc/file.README.html +21 -6
  31. data/doc/index.html +21 -6
  32. data/doc/method_list.html +119 -15
  33. data/doc/top-level-namespace.html +2 -2
  34. data/io_shuten.gemspec +16 -12
  35. data/lib/io_shuten/base.rb +1 -129
  36. data/lib/io_shuten/buffer.rb +156 -0
  37. data/lib/io_shuten/memory.rb +145 -0
  38. data/lib/io_shuten/redis.rb +65 -0
  39. data/lib/io_shuten/version.rb +1 -1
  40. data/lib/io_shuten.rb +2 -0
  41. data/spec/examples/logger_spec.rb +18 -2
  42. data/spec/lib/buffer_spec.rb +387 -0
  43. data/spec/lib/{base_spec.rb → memory_spec.rb} +92 -82
  44. data/spec/lib/mongo_spec.rb +1 -1
  45. data/spec/lib/redis_spec.rb +1 -1
  46. data/spec/spec_helper.rb +16 -12
  47. metadata +233 -163
@@ -81,8 +81,9 @@
81
81
 
82
82
  <h2>Overview</h2><div class="docstring">
83
83
  <div class="discussion">
84
-
85
- <p>MongoDB Backend for Collection based storage</p>
84
+ <p>
85
+ MongoDB Backend for Collection based storage
86
+ </p>
86
87
 
87
88
 
88
89
  </div>
@@ -100,9 +101,9 @@
100
101
  </div>
101
102
 
102
103
  <div id="footer">
103
- Generated on Mon Jan 23 01:15:28 2012 by
104
+ Generated on Thu Jan 26 00:45:39 2012 by
104
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.7.4 (ruby-1.9.3).
106
+ 0.7.4 (ruby-1.8.7).
106
107
  </div>
107
108
 
108
109
  </body>
@@ -81,8 +81,9 @@
81
81
 
82
82
  <h2>Overview</h2><div class="docstring">
83
83
  <div class="discussion">
84
-
85
- <p>MongoDB Backend for GridFS based storage</p>
84
+ <p>
85
+ MongoDB Backend for GridFS based storage
86
+ </p>
86
87
 
87
88
 
88
89
  </div>
@@ -100,9 +101,9 @@
100
101
  </div>
101
102
 
102
103
  <div id="footer">
103
- Generated on Mon Jan 23 01:15:28 2012 by
104
+ Generated on Thu Jan 26 00:45:40 2012 by
104
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.7.4 (ruby-1.9.3).
106
+ 0.7.4 (ruby-1.8.7).
106
107
  </div>
107
108
 
108
109
  </body>
@@ -83,8 +83,9 @@
83
83
 
84
84
  <h2>Overview</h2><div class="docstring">
85
85
  <div class="discussion">
86
-
87
- <p>Namespace for mongodb backends</p>
86
+ <p>
87
+ Namespace for mongodb backends
88
+ </p>
88
89
 
89
90
 
90
91
  </div>
@@ -112,9 +113,9 @@
112
113
  </div>
113
114
 
114
115
  <div id="footer">
115
- Generated on Mon Jan 23 01:15:28 2012 by
116
+ Generated on Thu Jan 26 00:45:41 2012 by
116
117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
117
- 0.7.4 (ruby-1.9.3).
118
+ 0.7.4 (ruby-1.8.7).
118
119
  </div>
119
120
 
120
121
  </body>
@@ -81,8 +81,9 @@
81
81
 
82
82
  <h2>Overview</h2><div class="docstring">
83
83
  <div class="discussion">
84
-
85
- <p>Redis Backend for key-value based storage</p>
84
+ <p>
85
+ Redis Backend for key-value based storage
86
+ </p>
86
87
 
87
88
 
88
89
  </div>
@@ -100,9 +101,9 @@
100
101
  </div>
101
102
 
102
103
  <div id="footer">
103
- Generated on Mon Jan 23 01:15:28 2012 by
104
+ Generated on Thu Jan 26 00:45:40 2012 by
104
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.7.4 (ruby-1.9.3).
106
+ 0.7.4 (ruby-1.8.7).
106
107
  </div>
107
108
 
108
109
  </body>
@@ -81,8 +81,9 @@
81
81
 
82
82
  <h2>Overview</h2><div class="docstring">
83
83
  <div class="discussion">
84
-
85
- <p>Redis Backend for pub-sub (event/message) based storage</p>
84
+ <p>
85
+ Redis Backend for pub-sub (event/message) based storage
86
+ </p>
86
87
 
87
88
 
88
89
  </div>
@@ -100,9 +101,9 @@
100
101
  </div>
101
102
 
102
103
  <div id="footer">
103
- Generated on Mon Jan 23 01:15:28 2012 by
104
+ Generated on Thu Jan 26 00:45:41 2012 by
104
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.7.4 (ruby-1.9.3).
106
+ 0.7.4 (ruby-1.8.7).
106
107
  </div>
107
108
 
108
109
  </body>
@@ -83,8 +83,9 @@
83
83
 
84
84
  <h2>Overview</h2><div class="docstring">
85
85
  <div class="discussion">
86
-
87
- <p>Namespace for redis backends</p>
86
+ <p>
87
+ Namespace for redis backends
88
+ </p>
88
89
 
89
90
 
90
91
  </div>
@@ -112,9 +113,9 @@
112
113
  </div>
113
114
 
114
115
  <div id="footer">
115
- Generated on Mon Jan 23 01:15:28 2012 by
116
+ Generated on Thu Jan 26 00:45:39 2012 by
116
117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
117
- 0.7.4 (ruby-1.9.3).
118
+ 0.7.4 (ruby-1.8.7).
118
119
  </div>
119
120
 
120
121
  </body>
@@ -83,8 +83,9 @@
83
83
 
84
84
  <h2>Overview</h2><div class="docstring">
85
85
  <div class="discussion">
86
-
87
- <p>Namespace for the storage implementations</p>
86
+ <p>
87
+ Namespace for the storage implementations
88
+ </p>
88
89
 
89
90
 
90
91
  </div>
@@ -112,9 +113,9 @@
112
113
  </div>
113
114
 
114
115
  <div id="footer">
115
- Generated on Mon Jan 23 01:15:28 2012 by
116
+ Generated on Thu Jan 26 00:45:39 2012 by
116
117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
117
- 0.7.4 (ruby-1.9.3).
118
+ 0.7.4 (ruby-1.8.7).
118
119
  </div>
119
120
 
120
121
  </body>
data/doc/IO_shuten.html CHANGED
@@ -75,7 +75,7 @@
75
75
 
76
76
  <dt class="r1 last">Defined in:</dt>
77
77
  <dd class="r1 last">lib/io_shuten.rb<span class="defines">,<br />
78
- lib/io_shuten/base.rb,<br /> lib/io_shuten/mongo.rb,<br /> lib/io_shuten/redis.rb,<br /> lib/io_shuten/stores.rb,<br /> lib/io_shuten/errors.rb,<br /> lib/io_shuten/version.rb</span>
78
+ lib/io_shuten/base.rb,<br /> lib/io_shuten/mongo.rb,<br /> lib/io_shuten/redis.rb,<br /> lib/io_shuten/stores.rb,<br /> lib/io_shuten/buffer.rb,<br /> lib/io_shuten/memory.rb,<br /> lib/io_shuten/errors.rb,<br /> lib/io_shuten/version.rb</span>
79
79
  </dd>
80
80
 
81
81
  </dl>
@@ -83,8 +83,9 @@
83
83
 
84
84
  <h2>Overview</h2><div class="docstring">
85
85
  <div class="discussion">
86
-
87
- <p>Namespace of the IO implementations</p>
86
+ <p>
87
+ Namespace of the IO implementations
88
+ </p>
88
89
 
89
90
 
90
91
  </div>
@@ -100,7 +101,7 @@
100
101
 
101
102
 
102
103
 
103
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="IO_shuten/Base.html" title="IO_shuten::Base (class)">Base</a></span>, <span class='object_link'><a href="IO_shuten/Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span>, <span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span>
104
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="IO_shuten/Base.html" title="IO_shuten::Base (class)">Base</a></span>, <span class='object_link'><a href="IO_shuten/Buffer.html" title="IO_shuten::Buffer (class)">Buffer</a></span>, <span class='object_link'><a href="IO_shuten/Memory.html" title="IO_shuten::Memory (class)">Memory</a></span>, <span class='object_link'><a href="IO_shuten/Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span>, <span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span>
104
105
 
105
106
 
106
107
  </p>
@@ -117,9 +118,9 @@
117
118
  </div>
118
119
 
119
120
  <div id="footer">
120
- Generated on Mon Jan 23 01:15:28 2012 by
121
+ Generated on Thu Jan 26 00:45:40 2012 by
121
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
122
- 0.7.4 (ruby-1.9.3).
123
+ 0.7.4 (ruby-1.8.7).
123
124
  </div>
124
125
 
125
126
  </body>
data/doc/_index.html CHANGED
@@ -89,6 +89,13 @@
89
89
 
90
90
  </li>
91
91
 
92
+ <li>
93
+ <span class='object_link'><a href="IO_shuten/Buffer.html" title="IO_shuten::Buffer (class)">Buffer</a></span>
94
+
95
+ <small>(IO_shuten)</small>
96
+
97
+ </li>
98
+
92
99
  </ul>
93
100
  </ul>
94
101
 
@@ -195,6 +202,13 @@
195
202
  <li class="letter">M</li>
196
203
  <ul>
197
204
 
205
+ <li>
206
+ <span class='object_link'><a href="IO_shuten/Memory.html" title="IO_shuten::Memory (class)">Memory</a></span>
207
+
208
+ <small>(IO_shuten)</small>
209
+
210
+ </li>
211
+
198
212
  <li>
199
213
  <span class='object_link'><a href="IO_shuten/Stores/Mongo.html" title="IO_shuten::Stores::Mongo (module)">Mongo</a></span>
200
214
 
@@ -269,16 +283,16 @@
269
283
  <ul>
270
284
 
271
285
  <li>
272
- <span class='object_link'><a href="IO_shuten/Stores/Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span>
286
+ <span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span>
273
287
 
274
- <small>(IO_shuten::Stores)</small>
288
+ <small>(IO_shuten)</small>
275
289
 
276
290
  </li>
277
291
 
278
292
  <li>
279
- <span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span>
293
+ <span class='object_link'><a href="IO_shuten/Stores/Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span>
280
294
 
281
- <small>(IO_shuten)</small>
295
+ <small>(IO_shuten::Stores)</small>
282
296
 
283
297
  </li>
284
298
 
@@ -309,9 +323,9 @@
309
323
  </div>
310
324
 
311
325
  <div id="footer">
312
- Generated on Mon Jan 23 01:15:28 2012 by
326
+ Generated on Thu Jan 26 00:45:39 2012 by
313
327
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
314
- 0.7.4 (ruby-1.9.3).
328
+ 0.7.4 (ruby-1.8.7).
315
329
  </div>
316
330
 
317
331
  </body>
data/doc/class_list.html CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  <ul id="full_list" class="class">
41
41
  <li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
42
- <li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten.html" title="IO_shuten (module)">IO_shuten</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="IO_shuten/Base.html" title="IO_shuten::Base (class)">Base</a></span> &lt; Object<small class='search_info'>IO_shuten</small></li><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Errors.html" title="IO_shuten::Errors (module)">Errors</a></span><small class='search_info'>IO_shuten</small></li><ul><li><span class='object_link'><a href="IO_shuten/Errors/FileAccessError.html" title="IO_shuten::Errors::FileAccessError (class)">FileAccessError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/FileNotFoundError.html" title="IO_shuten::Errors::FileNotFoundError (class)">FileNotFoundError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeExistsError.html" title="IO_shuten::Errors::NodeExistsError (class)">NodeExistsError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeNameError.html" title="IO_shuten::Errors::NodeNameError (class)">NodeNameError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeNotFoundError.html" title="IO_shuten::Errors::NodeNotFoundError (class)">NodeNotFoundError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NotYetImplemented.html" title="IO_shuten::Errors::NotYetImplemented (class)">NotYetImplemented</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li></ul><li><span class='object_link'><a href="IO_shuten/Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores.html" title="IO_shuten::Stores (module)">Stores</a></span><small class='search_info'>IO_shuten</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores/Mongo.html" title="IO_shuten::Stores::Mongo (module)">Mongo</a></span><small class='search_info'>IO_shuten::Stores</small></li><ul><li><span class='object_link'><a href="IO_shuten/Stores/Mongo/Collection.html" title="IO_shuten::Stores::Mongo::Collection (module)">Collection</a></span><small class='search_info'>IO_shuten::Stores::Mongo</small></li><li><span class='object_link'><a href="IO_shuten/Stores/Mongo/GridFS.html" title="IO_shuten::Stores::Mongo::GridFS (module)">GridFS</a></span><small class='search_info'>IO_shuten::Stores::Mongo</small></li></ul><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores/Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span><small class='search_info'>IO_shuten::Stores</small></li><ul><li><span class='object_link'><a href="IO_shuten/Stores/Redis/KeyValue.html" title="IO_shuten::Stores::Redis::KeyValue (module)">KeyValue</a></span><small class='search_info'>IO_shuten::Stores::Redis</small></li><li><span class='object_link'><a href="IO_shuten/Stores/Redis/PubSub.html" title="IO_shuten::Stores::Redis::PubSub (module)">PubSub</a></span><small class='search_info'>IO_shuten::Stores::Redis</small></li></ul></ul></ul>
42
+ <li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten.html" title="IO_shuten (module)">IO_shuten</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="IO_shuten/Base.html" title="IO_shuten::Base (class)">Base</a></span> &lt; Object<small class='search_info'>IO_shuten</small></li><li><span class='object_link'><a href="IO_shuten/Buffer.html" title="IO_shuten::Buffer (class)">Buffer</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Errors.html" title="IO_shuten::Errors (module)">Errors</a></span><small class='search_info'>IO_shuten</small></li><ul><li><span class='object_link'><a href="IO_shuten/Errors/FileAccessError.html" title="IO_shuten::Errors::FileAccessError (class)">FileAccessError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/FileNotFoundError.html" title="IO_shuten::Errors::FileNotFoundError (class)">FileNotFoundError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeExistsError.html" title="IO_shuten::Errors::NodeExistsError (class)">NodeExistsError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeNameError.html" title="IO_shuten::Errors::NodeNameError (class)">NodeNameError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NodeNotFoundError.html" title="IO_shuten::Errors::NodeNotFoundError (class)">NodeNotFoundError</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li><li><span class='object_link'><a href="IO_shuten/Errors/NotYetImplemented.html" title="IO_shuten::Errors::NotYetImplemented (class)">NotYetImplemented</a></span> &lt; StandardError<small class='search_info'>IO_shuten::Errors</small></li></ul><li><span class='object_link'><a href="IO_shuten/Memory.html" title="IO_shuten::Memory (class)">Memory</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><span class='object_link'><a href="IO_shuten/Mongo.html" title="IO_shuten::Mongo (class)">Mongo</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><span class='object_link'><a href="IO_shuten/Redis.html" title="IO_shuten::Redis (class)">Redis</a></span> &lt; Base<small class='search_info'>IO_shuten</small></li><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores.html" title="IO_shuten::Stores (module)">Stores</a></span><small class='search_info'>IO_shuten</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores/Mongo.html" title="IO_shuten::Stores::Mongo (module)">Mongo</a></span><small class='search_info'>IO_shuten::Stores</small></li><ul><li><span class='object_link'><a href="IO_shuten/Stores/Mongo/Collection.html" title="IO_shuten::Stores::Mongo::Collection (module)">Collection</a></span><small class='search_info'>IO_shuten::Stores::Mongo</small></li><li><span class='object_link'><a href="IO_shuten/Stores/Mongo/GridFS.html" title="IO_shuten::Stores::Mongo::GridFS (module)">GridFS</a></span><small class='search_info'>IO_shuten::Stores::Mongo</small></li></ul><li><a class='toggle'></a> <span class='object_link'><a href="IO_shuten/Stores/Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span><small class='search_info'>IO_shuten::Stores</small></li><ul><li><span class='object_link'><a href="IO_shuten/Stores/Redis/KeyValue.html" title="IO_shuten::Stores::Redis::KeyValue (module)">KeyValue</a></span><small class='search_info'>IO_shuten::Stores::Redis</small></li><li><span class='object_link'><a href="IO_shuten/Stores/Redis/PubSub.html" title="IO_shuten::Stores::Redis::PubSub (module)">PubSub</a></span><small class='search_info'>IO_shuten::Stores::Redis</small></li></ul></ul></ul>
43
43
 
44
44
  </ul>
45
45
  </div>
data/doc/file.README.html CHANGED
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -72,10 +72,10 @@
72
72
  require &quot;io_shuten&quot;
73
73
  require &quot;logger&quot;</p>
74
74
 
75
- <p>logdev = IO<em>shuten::Redis.new( REDIS</em>INSTANCE )
75
+ <p>logdev = IO<em>shuten::Memory.new(&#39;log</em>node&#39;)
76
76
  logger = Logger.new(logdev)</p>
77
77
 
78
- <p>logger.info &quot;This message will be stored in redis.&quot;
78
+ <p>logger.info &quot;This message will be stored in memory.&quot;
79
79
  ```</p>
80
80
 
81
81
  <h2>IO::shuten? 【五百::終点】(io shūten)!</h2>
@@ -84,20 +84,35 @@ logger = Logger.new(logdev)</p>
84
84
 
85
85
  <h2>Types</h2>
86
86
 
87
- <h3>IO_shuten::Base</h3>
87
+ <h3>IO_shuten::Memory</h3>
88
88
 
89
89
  <p>An in-memory storage system (handles simple StringIO objects).</p>
90
90
 
91
91
  <p>Offers write-to-disk for single instance and all instances.</p>
92
92
 
93
+ <p>Provides all methods of StringIO.</p>
94
+
95
+ <h3>IO_shuten::Buffer</h3>
96
+
97
+ <p>Like IO_shuten::Memory but with IO::Buffer as container instead of StringIO.
98
+ (Install it with <code>gem install iobuffer</code>.)</p>
99
+
100
+ <p>Performance depends on machine and ruby version. Almost same throughput, on 1.9.3 is the native StringIO better than the IO::Buffer cext.</p>
101
+
93
102
  <h3>IO_shuten::Redis</h3>
94
103
 
95
104
  <p>Stores content in a redis database.</p>
96
105
 
106
+ <p>Provides basic methods like <code>#read</code>, <code>#write</code> and <code>#close</code>.
107
+ A logger only needs write and close methods of an IO object.</p>
108
+
97
109
  <h3>IO_shuten::Mongo</h3>
98
110
 
99
111
  <p>Stores content in a mongodb database.</p>
100
112
 
113
+ <p>Provides basic methods like <code>#read</code>, <code>#write</code> and <code>#close</code>.
114
+ A logger only needs write and close methods of an IO object.</p>
115
+
101
116
  <h2>Not for production!</h2>
102
117
 
103
118
  <p>This project is freshly started and currently not usable.</p>
@@ -127,9 +142,9 @@ logger = Logger.new(logdev)</p>
127
142
  </div></div>
128
143
 
129
144
  <div id="footer">
130
- Generated on Mon Jan 23 01:15:28 2012 by
145
+ Generated on Thu Jan 26 00:45:39 2012 by
131
146
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
- 0.7.4 (ruby-1.9.3).
147
+ 0.7.4 (ruby-1.8.7).
133
148
  </div>
134
149
 
135
150
  </body>
data/doc/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -72,10 +72,10 @@
72
72
  require &quot;io_shuten&quot;
73
73
  require &quot;logger&quot;</p>
74
74
 
75
- <p>logdev = IO<em>shuten::Redis.new( REDIS</em>INSTANCE )
75
+ <p>logdev = IO<em>shuten::Memory.new(&#39;log</em>node&#39;)
76
76
  logger = Logger.new(logdev)</p>
77
77
 
78
- <p>logger.info &quot;This message will be stored in redis.&quot;
78
+ <p>logger.info &quot;This message will be stored in memory.&quot;
79
79
  ```</p>
80
80
 
81
81
  <h2>IO::shuten? 【五百::終点】(io shūten)!</h2>
@@ -84,20 +84,35 @@ logger = Logger.new(logdev)</p>
84
84
 
85
85
  <h2>Types</h2>
86
86
 
87
- <h3>IO_shuten::Base</h3>
87
+ <h3>IO_shuten::Memory</h3>
88
88
 
89
89
  <p>An in-memory storage system (handles simple StringIO objects).</p>
90
90
 
91
91
  <p>Offers write-to-disk for single instance and all instances.</p>
92
92
 
93
+ <p>Provides all methods of StringIO.</p>
94
+
95
+ <h3>IO_shuten::Buffer</h3>
96
+
97
+ <p>Like IO_shuten::Memory but with IO::Buffer as container instead of StringIO.
98
+ (Install it with <code>gem install iobuffer</code>.)</p>
99
+
100
+ <p>Performance depends on machine and ruby version. Almost same throughput, on 1.9.3 is the native StringIO better than the IO::Buffer cext.</p>
101
+
93
102
  <h3>IO_shuten::Redis</h3>
94
103
 
95
104
  <p>Stores content in a redis database.</p>
96
105
 
106
+ <p>Provides basic methods like <code>#read</code>, <code>#write</code> and <code>#close</code>.
107
+ A logger only needs write and close methods of an IO object.</p>
108
+
97
109
  <h3>IO_shuten::Mongo</h3>
98
110
 
99
111
  <p>Stores content in a mongodb database.</p>
100
112
 
113
+ <p>Provides basic methods like <code>#read</code>, <code>#write</code> and <code>#close</code>.
114
+ A logger only needs write and close methods of an IO object.</p>
115
+
101
116
  <h2>Not for production!</h2>
102
117
 
103
118
  <p>This project is freshly started and currently not usable.</p>
@@ -127,9 +142,9 @@ logger = Logger.new(logdev)</p>
127
142
  </div></div>
128
143
 
129
144
  <div id="footer">
130
- Generated on Mon Jan 23 01:15:28 2012 by
145
+ Generated on Thu Jan 26 00:45:39 2012 by
131
146
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
- 0.7.4 (ruby-1.9.3).
147
+ 0.7.4 (ruby-1.8.7).
133
148
  </div>
134
149
 
135
150
  </body>
data/doc/method_list.html CHANGED
@@ -41,6 +41,14 @@
41
41
 
42
42
 
43
43
  <li class="r1 ">
44
+ <span class='object_link'><a href="IO_shuten/Redis.html#close-instance_method" title="IO_shuten::Redis#close (method)">#close</a></span>
45
+
46
+ <small>IO_shuten::Redis</small>
47
+
48
+ </li>
49
+
50
+
51
+ <li class="r2 ">
44
52
  <span class='object_link'><a href="IO_shuten/Base.html#container-instance_method" title="IO_shuten::Base#container (method)">#container</a></span>
45
53
 
46
54
  <small>IO_shuten::Base</small>
@@ -48,7 +56,7 @@
48
56
  </li>
49
57
 
50
58
 
51
- <li class="r2 ">
59
+ <li class="r1 ">
52
60
  <span class='object_link'><a href="IO_shuten/Base.html#delete_instance-class_method" title="IO_shuten::Base.delete_instance (method)">delete_instance</a></span>
53
61
 
54
62
  <small>IO_shuten::Base</small>
@@ -56,18 +64,42 @@
56
64
  </li>
57
65
 
58
66
 
67
+ <li class="r2 ">
68
+ <span class='object_link'><a href="IO_shuten/Memory.html#file_exists%3F-instance_method" title="IO_shuten::Memory#file_exists? (method)">#file_exists?</a></span>
69
+
70
+ <small>IO_shuten::Memory</small>
71
+
72
+ </li>
73
+
74
+
59
75
  <li class="r1 ">
60
- <span class='object_link'><a href="IO_shuten/Base.html#file_exists%3F-instance_method" title="IO_shuten::Base#file_exists? (method)">#file_exists?</a></span>
76
+ <span class='object_link'><a href="IO_shuten/Buffer.html#file_exists%3F-instance_method" title="IO_shuten::Buffer#file_exists? (method)">#file_exists?</a></span>
61
77
 
62
- <small>IO_shuten::Base</small>
78
+ <small>IO_shuten::Buffer</small>
63
79
 
64
80
  </li>
65
81
 
66
82
 
67
83
  <li class="r2 ">
68
- <span class='object_link'><a href="IO_shuten/Base.html#initialize-instance_method" title="IO_shuten::Base#initialize (method)">#initialize</a></span>
84
+ <span class='object_link'><a href="IO_shuten/Buffer.html#initialize-instance_method" title="IO_shuten::Buffer#initialize (method)">#initialize</a></span>
69
85
 
70
- <small>IO_shuten::Base</small>
86
+ <small>IO_shuten::Buffer</small>
87
+
88
+ </li>
89
+
90
+
91
+ <li class="r1 ">
92
+ <span class='object_link'><a href="IO_shuten/Memory.html#initialize-instance_method" title="IO_shuten::Memory#initialize (method)">#initialize</a></span>
93
+
94
+ <small>IO_shuten::Memory</small>
95
+
96
+ </li>
97
+
98
+
99
+ <li class="r2 ">
100
+ <span class='object_link'><a href="IO_shuten/Redis.html#initialize-instance_method" title="IO_shuten::Redis#initialize (method)">#initialize</a></span>
101
+
102
+ <small>IO_shuten::Redis</small>
71
103
 
72
104
  </li>
73
105
 
@@ -89,17 +121,33 @@
89
121
 
90
122
 
91
123
  <li class="r1 ">
92
- <span class='object_link'><a href="IO_shuten/Base.html#load_from_file-instance_method" title="IO_shuten::Base#load_from_file (method)">#load_from_file</a></span>
124
+ <span class='object_link'><a href="IO_shuten/Buffer.html#load_from_file-instance_method" title="IO_shuten::Buffer#load_from_file (method)">#load_from_file</a></span>
93
125
 
94
- <small>IO_shuten::Base</small>
126
+ <small>IO_shuten::Buffer</small>
95
127
 
96
128
  </li>
97
129
 
98
130
 
99
131
  <li class="r2 ">
100
- <span class='object_link'><a href="IO_shuten/Base.html#load_instances-class_method" title="IO_shuten::Base.load_instances (method)">load_instances</a></span>
132
+ <span class='object_link'><a href="IO_shuten/Memory.html#load_from_file-instance_method" title="IO_shuten::Memory#load_from_file (method)">#load_from_file</a></span>
101
133
 
102
- <small>IO_shuten::Base</small>
134
+ <small>IO_shuten::Memory</small>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="r1 ">
140
+ <span class='object_link'><a href="IO_shuten/Memory.html#load_instances-class_method" title="IO_shuten::Memory.load_instances (method)">load_instances</a></span>
141
+
142
+ <small>IO_shuten::Memory</small>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="r2 ">
148
+ <span class='object_link'><a href="IO_shuten/Buffer.html#load_instances-class_method" title="IO_shuten::Buffer.load_instances (method)">load_instances</a></span>
149
+
150
+ <small>IO_shuten::Buffer</small>
103
151
 
104
152
  </li>
105
153
 
@@ -113,14 +161,22 @@
113
161
 
114
162
 
115
163
  <li class="r2 ">
116
- <span class='object_link'><a href="IO_shuten/Base.html#open-class_method" title="IO_shuten::Base.open (method)">open</a></span>
164
+ <span class='object_link'><a href="IO_shuten/Buffer.html#open-class_method" title="IO_shuten::Buffer.open (method)">open</a></span>
117
165
 
118
- <small>IO_shuten::Base</small>
166
+ <small>IO_shuten::Buffer</small>
119
167
 
120
168
  </li>
121
169
 
122
170
 
123
171
  <li class="r1 ">
172
+ <span class='object_link'><a href="IO_shuten/Memory.html#open-class_method" title="IO_shuten::Memory.open (method)">open</a></span>
173
+
174
+ <small>IO_shuten::Memory</small>
175
+
176
+ </li>
177
+
178
+
179
+ <li class="r2 ">
124
180
  <span class='object_link'><a href="IO_shuten/Base.html#purge_instances%21-class_method" title="IO_shuten::Base.purge_instances! (method)">purge_instances!</a></span>
125
181
 
126
182
  <small>IO_shuten::Base</small>
@@ -128,18 +184,66 @@
128
184
  </li>
129
185
 
130
186
 
187
+ <li class="r1 ">
188
+ <span class='object_link'><a href="IO_shuten/Redis.html#read-instance_method" title="IO_shuten::Redis#read (method)">#read</a></span>
189
+
190
+ <small>IO_shuten::Redis</small>
191
+
192
+ </li>
193
+
194
+
131
195
  <li class="r2 ">
132
- <span class='object_link'><a href="IO_shuten/Base.html#save_instances-class_method" title="IO_shuten::Base.save_instances (method)">save_instances</a></span>
196
+ <span class='object_link'><a href="IO_shuten/Redis.html#redis-class_method" title="IO_shuten::Redis.redis (method)">redis</a></span>
133
197
 
134
- <small>IO_shuten::Base</small>
198
+ <small>IO_shuten::Redis</small>
135
199
 
136
200
  </li>
137
201
 
138
202
 
139
203
  <li class="r1 ">
140
- <span class='object_link'><a href="IO_shuten/Base.html#save_to_file-instance_method" title="IO_shuten::Base#save_to_file (method)">#save_to_file</a></span>
204
+ <span class='object_link'><a href="IO_shuten/Redis.html#redis%3D-class_method" title="IO_shuten::Redis.redis= (method)">redis=</a></span>
141
205
 
142
- <small>IO_shuten::Base</small>
206
+ <small>IO_shuten::Redis</small>
207
+
208
+ </li>
209
+
210
+
211
+ <li class="r2 ">
212
+ <span class='object_link'><a href="IO_shuten/Buffer.html#save_instances-class_method" title="IO_shuten::Buffer.save_instances (method)">save_instances</a></span>
213
+
214
+ <small>IO_shuten::Buffer</small>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="r1 ">
220
+ <span class='object_link'><a href="IO_shuten/Memory.html#save_instances-class_method" title="IO_shuten::Memory.save_instances (method)">save_instances</a></span>
221
+
222
+ <small>IO_shuten::Memory</small>
223
+
224
+ </li>
225
+
226
+
227
+ <li class="r2 ">
228
+ <span class='object_link'><a href="IO_shuten/Memory.html#save_to_file-instance_method" title="IO_shuten::Memory#save_to_file (method)">#save_to_file</a></span>
229
+
230
+ <small>IO_shuten::Memory</small>
231
+
232
+ </li>
233
+
234
+
235
+ <li class="r1 ">
236
+ <span class='object_link'><a href="IO_shuten/Buffer.html#save_to_file-instance_method" title="IO_shuten::Buffer#save_to_file (method)">#save_to_file</a></span>
237
+
238
+ <small>IO_shuten::Buffer</small>
239
+
240
+ </li>
241
+
242
+
243
+ <li class="r2 ">
244
+ <span class='object_link'><a href="IO_shuten/Redis.html#write-instance_method" title="IO_shuten::Redis#write (method)">#write</a></span>
245
+
246
+ <small>IO_shuten::Redis</small>
143
247
 
144
248
  </li>
145
249