facets 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (589) hide show
  1. data/{doc/AUTHORS → AUTHORS} +12 -3
  2. data/README +35 -29
  3. data/WARNING +56 -0
  4. data/demo/annotation/demo_annotation.rb +22 -0
  5. data/demo/ansicolor/cdiff.rb +20 -0
  6. data/demo/ansicolor/example.rb +82 -0
  7. data/demo/io-reactor/chatserver.rb +347 -0
  8. data/demo/lisp/game.rb +47 -0
  9. data/lib/facet/all.rb +1 -0
  10. data/lib/facet/annattr.rb +1 -0
  11. data/lib/facet/class/to_proc.rb +1 -0
  12. data/lib/facet/cookie.rb +1 -0
  13. data/lib/facet/dir/self/descend.rb +1 -0
  14. data/lib/facet/enumerable/count.rb +1 -0
  15. data/lib/facet/hash/to_proc.rb +1 -0
  16. data/lib/facet/hashbuilder.rb +1 -0
  17. data/lib/facet/http.rb +1 -0
  18. data/lib/facet/httpaccess.rb +1 -0
  19. data/lib/facet/kernel/__get__.rb +1 -0
  20. data/lib/facet/kernel/__set__.rb +1 -0
  21. data/lib/facet/kernel/cache.rb +1 -0
  22. data/lib/facet/kernel/respond.rb +1 -0
  23. data/lib/facet/lazy.rb +1 -0
  24. data/lib/facet/module/class.rb +1 -0
  25. data/lib/facet/module/nodef.rb +1 -0
  26. data/lib/facet/opencascade.rb +1 -0
  27. data/lib/facet/pqueue.rb +1 -0
  28. data/lib/facet/taskable.rb +1 -0
  29. data/lib/facets.rb +98 -37
  30. data/lib/facets/core/all.rb +5 -0
  31. data/lib/facets/core/class/to_proc.rb +25 -0
  32. data/lib/facets/core/dir/self/ascend.rb +2 -1
  33. data/lib/facets/core/dir/self/descend.rb +11 -0
  34. data/lib/facets/core/enumerable/accumulate.rb +2 -2
  35. data/lib/facets/core/enumerable/count.rb +54 -0
  36. data/lib/facets/core/enumerable/cross.rb +3 -0
  37. data/lib/facets/core/enumerable/graph.rb +8 -4
  38. data/lib/facets/core/enumerable/self/cross.rb +11 -5
  39. data/lib/facets/core/hash/to_proc.rb +34 -0
  40. data/lib/facets/core/hash/traverse.rb +10 -5
  41. data/lib/facets/core/kernel/__class__.rb +1 -1
  42. data/lib/facets/core/kernel/__get__.rb +5 -0
  43. data/lib/facets/core/kernel/__set__.rb +2 -0
  44. data/lib/facets/core/kernel/assign_from.rb +1 -1
  45. data/lib/facets/core/kernel/assign_with.rb +11 -3
  46. data/lib/facets/core/kernel/bool.rb +1 -1
  47. data/lib/facets/core/kernel/cache.rb +31 -0
  48. data/lib/facets/core/kernel/demo.rb +4 -0
  49. data/lib/facets/core/kernel/get_by_id.rb +1 -0
  50. data/lib/facets/core/kernel/in.rb +1 -1
  51. data/lib/facets/core/kernel/instance_assign.rb +2 -3
  52. data/lib/facets/core/kernel/method.rb +25 -7
  53. data/lib/facets/core/kernel/methods.rb +1 -1
  54. data/lib/facets/core/kernel/new.rb +1 -1
  55. data/lib/facets/core/kernel/object_class.rb +1 -1
  56. data/lib/facets/core/kernel/object_hexid.rb +1 -1
  57. data/lib/facets/core/kernel/own.rb +1 -1
  58. data/lib/facets/core/kernel/require_all.rb +1 -0
  59. data/lib/facets/core/kernel/require_esc.rb +4 -2
  60. data/lib/facets/core/kernel/require_facet.rb +2 -0
  61. data/lib/facets/core/kernel/require_local.rb +1 -0
  62. data/lib/facets/core/kernel/respond.rb +14 -0
  63. data/lib/facets/core/kernel/send_as.rb +1 -1
  64. data/lib/facets/core/kernel/silence_warnings.rb +1 -1
  65. data/lib/facets/core/kernel/singleton.rb +3 -1
  66. data/lib/facets/core/matchdata/matchtree.rb +13 -3
  67. data/lib/facets/core/module/class.rb +3 -0
  68. data/lib/facets/core/module/integrate.rb +31 -4
  69. data/lib/facets/core/module/{undef.rb → nodef.rb} +8 -3
  70. data/lib/facets/core/module/revisal.rb +5 -5
  71. data/lib/facets/more/annattr.rb +147 -0
  72. data/lib/facets/more/annotation.rb +32 -136
  73. data/lib/facets/more/ansicode.rb +89 -100
  74. data/lib/facets/more/aspects.rb +28 -0
  75. data/lib/facets/more/association.rb +88 -47
  76. data/lib/facets/more/basicobject.rb +51 -33
  77. data/lib/facets/more/bbcode.rb +21 -34
  78. data/lib/facets/more/binaryreader.rb +62 -33
  79. data/lib/facets/more/bitmask.rb +24 -24
  80. data/lib/facets/more/blankslate.rb +4 -0
  81. data/lib/facets/more/builderobject.rb +16 -20
  82. data/lib/facets/more/bytes.rb +43 -24
  83. data/lib/facets/more/classinherit.rb +15 -31
  84. data/lib/facets/more/classmethods.rb +19 -29
  85. data/lib/facets/more/cloneable.rb +42 -30
  86. data/lib/facets/more/consoleapp.rb +42 -22
  87. data/lib/facets/more/cookie.rb +565 -0
  88. data/lib/facets/more/coroutine.rb +17 -21
  89. data/lib/facets/more/crypt.rb +33 -12
  90. data/lib/facets/more/dictionary.rb +27 -36
  91. data/lib/facets/more/downloader.rb +21 -17
  92. data/lib/facets/more/elementor.rb +22 -0
  93. data/lib/facets/more/enumerablepass.rb +19 -27
  94. data/lib/facets/more/expirable.rb +18 -28
  95. data/lib/facets/more/filelist.rb +33 -32
  96. data/lib/facets/more/floatstring.rb +31 -40
  97. data/lib/facets/more/functor.rb +15 -25
  98. data/lib/facets/more/hashbuilder.rb +76 -0
  99. data/lib/facets/more/heap.rb +29 -36
  100. data/lib/facets/more/htmlbuilder.rb +22 -24
  101. data/lib/facets/more/htmlhelper.rb +89 -0
  102. data/lib/facets/more/http.rb +570 -0
  103. data/lib/facets/more/httpaccess.rb +1608 -0
  104. data/lib/facets/more/inheritor.rb +29 -21
  105. data/lib/facets/more/interval.rb +21 -25
  106. data/lib/facets/more/ioredirect.rb +21 -25
  107. data/lib/facets/more/json.rb +27 -17
  108. data/lib/facets/more/lazy.rb +238 -0
  109. data/lib/facets/more/lisp.rb +24 -27
  110. data/lib/facets/more/lisp_format.rb +93 -85
  111. data/lib/facets/more/lrucache.rb +17 -27
  112. data/lib/facets/more/mathconstants.rb +22 -40
  113. data/lib/facets/more/methodprobe.rb +56 -61
  114. data/lib/facets/more/mock.rb +24 -17
  115. data/lib/facets/more/multipliers.rb +21 -17
  116. data/lib/facets/more/multiton.rb +18 -24
  117. data/lib/facets/more/nackclass.rb +17 -21
  118. data/lib/facets/more/nilcomparable.rb +28 -30
  119. data/lib/facets/more/nullclass.rb +16 -15
  120. data/lib/facets/more/one.rb +94 -58
  121. data/lib/facets/more/opencascade.rb +187 -0
  122. data/lib/facets/more/openobject.rb +89 -66
  123. data/lib/facets/more/orderedhash.rb +4 -0
  124. data/lib/facets/more/ormsupport.rb +18 -29
  125. data/lib/facets/more/overload.rb +39 -3
  126. data/lib/facets/more/paramix.rb +16 -24
  127. data/lib/facets/more/pathlist.rb +17 -23
  128. data/lib/facets/more/pool.rb +21 -29
  129. data/lib/facets/more/pqueue.rb +190 -0
  130. data/lib/facets/more/preinitialize.rb +17 -18
  131. data/lib/facets/more/progressbar.rb +19 -15
  132. data/lib/facets/more/promoteself.rb +17 -21
  133. data/lib/facets/more/quaternion.rb +379 -346
  134. data/lib/facets/more/recorder.rb +15 -20
  135. data/lib/facets/more/reference.rb +25 -22
  136. data/lib/facets/more/rexmlbuilder.rb +21 -6
  137. data/lib/facets/more/rtals.rb +27 -24
  138. data/lib/facets/more/semaphore.rb +15 -28
  139. data/lib/facets/more/snapshot.rb +45 -41
  140. data/lib/facets/more/stateparser.rb +25 -35
  141. data/lib/facets/more/statichash.rb +37 -29
  142. data/lib/facets/more/syncarray.rb +18 -26
  143. data/lib/facets/more/synchash.rb +17 -26
  144. data/lib/facets/more/system.rb +25 -17
  145. data/lib/facets/more/tagiterator.rb +15 -39
  146. data/lib/facets/more/taskable.rb +417 -0
  147. data/lib/facets/more/timer.rb +22 -26
  148. data/lib/facets/more/times.rb +23 -23
  149. data/lib/facets/more/tracepoint.rb +25 -24
  150. data/lib/facets/more/tuple.rb +25 -42
  151. data/lib/facets/more/typecast.rb +27 -29
  152. data/lib/facets/more/uninheritable.rb +15 -22
  153. data/lib/facets/more/units.rb +23 -29
  154. data/lib/facets/more/xmlbuilder.rb +20 -22
  155. data/lib/facets/more/xmlhelper.rb +18 -21
  156. data/lib/facets/more/xoxo.rb +23 -11
  157. data/lib/facets/more/yamlstruct.rb +25 -22
  158. data/test/lib/facets/core/array/test_at_rand.rb +1 -1
  159. data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
  160. data/test/lib/facets/core/array/test_delete_values.rb +1 -1
  161. data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
  162. data/test/lib/facets/core/array/test_first.rb +1 -1
  163. data/test/lib/facets/core/array/test_head.rb +1 -1
  164. data/test/lib/facets/core/array/test_last_index.rb +1 -1
  165. data/test/lib/facets/core/array/test_merge.rb +1 -1
  166. data/test/lib/facets/core/array/test_mid.rb +1 -1
  167. data/test/lib/facets/core/array/test_middle.rb +1 -1
  168. data/test/lib/facets/core/array/test_op_fetch.rb +1 -1
  169. data/test/lib/facets/core/array/test_op_store.rb +1 -1
  170. data/test/lib/facets/core/array/test_pick.rb +1 -1
  171. data/test/lib/facets/core/array/test_pos.rb +1 -1
  172. data/test/lib/facets/core/array/test_pot.rb +1 -1
  173. data/test/lib/facets/core/array/test_pull.rb +1 -1
  174. data/test/lib/facets/core/array/test_rand_index.rb +1 -1
  175. data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
  176. data/test/lib/facets/core/array/test_range.rb +1 -1
  177. data/test/lib/facets/core/array/test_rotate.rb +1 -1
  178. data/test/lib/facets/core/array/test_select.rb +1 -1
  179. data/test/lib/facets/core/array/test_shuffle.rb +1 -1
  180. data/test/lib/facets/core/array/test_thru.rb +1 -1
  181. data/test/lib/facets/core/array/test_to_b.rb +1 -1
  182. data/test/lib/facets/core/array/test_to_h.rb +1 -1
  183. data/test/lib/facets/core/array/test_to_hash.rb +1 -1
  184. data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
  185. data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
  186. data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
  187. data/test/lib/facets/core/binding/test_called.rb +1 -1
  188. data/test/lib/facets/core/binding/test_caller.rb +1 -1
  189. data/test/lib/facets/core/binding/test_defined.rb +1 -1
  190. data/test/lib/facets/core/binding/test_eval.rb +1 -1
  191. data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
  192. data/test/lib/facets/core/binding/test_method_name.rb +1 -1
  193. data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
  194. data/test/lib/facets/core/binding/test_op_store.rb +1 -1
  195. data/test/lib/facets/core/binding/test_self.rb +1 -1
  196. data/test/lib/facets/core/class/test_cattr.rb +1 -1
  197. data/test/lib/facets/core/class/test_descendents.rb +1 -1
  198. data/test/lib/facets/core/class/test_method_name.rb +1 -1
  199. data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
  200. data/test/lib/facets/core/class/test_unix_path.rb +1 -1
  201. data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
  202. data/test/lib/facets/core/comparable/test_clip.rb +1 -1
  203. data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
  204. data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
  205. data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
  206. data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
  207. data/test/lib/facets/core/date/test_stamp.rb +1 -1
  208. data/test/lib/facets/core/date/test_to_date.rb +1 -1
  209. data/test/lib/facets/core/date/test_to_s.rb +1 -1
  210. data/test/lib/facets/core/date/test_to_time.rb +1 -1
  211. data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
  212. data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
  213. data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
  214. data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
  215. data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
  216. data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
  217. data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
  218. data/test/lib/facets/core/enumerable/test_count.rb +38 -0
  219. data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
  220. data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
  221. data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
  222. data/test/lib/facets/core/enumerable/test_each_slice.rb +1 -1
  223. data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
  224. data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
  225. data/test/lib/facets/core/enumerable/test_every.rb +1 -1
  226. data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
  227. data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
  228. data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
  229. data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
  230. data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
  231. data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
  232. data/test/lib/facets/core/enumerable/test_none.rb +1 -1
  233. data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
  234. data/test/lib/facets/core/enumerable/test_one.rb +1 -1
  235. data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
  236. data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
  237. data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
  238. data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
  239. data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
  240. data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
  241. data/test/lib/facets/core/file/self/test_create.rb +1 -1
  242. data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
  243. data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
  244. data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
  245. data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
  246. data/test/lib/facets/core/float/test_round_at.rb +1 -1
  247. data/test/lib/facets/core/float/test_round_to.rb +1 -1
  248. data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
  249. data/test/lib/facets/core/hash/test_alias.rb +1 -1
  250. data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
  251. data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
  252. data/test/lib/facets/core/hash/test_at.rb +1 -1
  253. data/test/lib/facets/core/hash/test_collate.rb +1 -1
  254. data/test/lib/facets/core/hash/test_each.rb +1 -1
  255. data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
  256. data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
  257. data/test/lib/facets/core/hash/test_graph.rb +1 -1
  258. data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
  259. data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
  260. data/test/lib/facets/core/hash/test_inverse.rb +1 -1
  261. data/test/lib/facets/core/hash/test_keys_to_s.rb +1 -1
  262. data/test/lib/facets/core/hash/test_keys_to_sym.rb +1 -1
  263. data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
  264. data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
  265. data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
  266. data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
  267. data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
  268. data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
  269. data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
  270. data/test/lib/facets/core/hash/test_slice.rb +1 -1
  271. data/test/lib/facets/core/hash/test_swap.rb +1 -1
  272. data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
  273. data/test/lib/facets/core/hash/test_to_h.rb +1 -1
  274. data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
  275. data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
  276. data/test/lib/facets/core/hash/test_traverse.rb +1 -1
  277. data/test/lib/facets/core/hash/test_update_each.rb +1 -1
  278. data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
  279. data/test/lib/facets/core/hash/test_update_values.rb +1 -1
  280. data/test/lib/facets/core/hash/test_weave.rb +1 -1
  281. data/test/lib/facets/core/integer/test_factorial.rb +1 -1
  282. data/test/lib/facets/core/integer/test_multiple.rb +1 -1
  283. data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
  284. data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
  285. data/test/lib/facets/core/kernel/test___class__.rb +1 -1
  286. data/test/lib/facets/core/kernel/test_as.rb +1 -1
  287. data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
  288. data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
  289. data/test/lib/facets/core/kernel/test_bool.rb +1 -1
  290. data/test/lib/facets/core/kernel/test_bug.rb +1 -1
  291. data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
  292. data/test/lib/facets/core/kernel/test_called.rb +1 -1
  293. data/test/lib/facets/core/kernel/test_constant.rb +1 -1
  294. data/test/lib/facets/core/kernel/test_copy.rb +1 -1
  295. data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
  296. data/test/lib/facets/core/kernel/test_demo.rb +1 -1
  297. data/test/lib/facets/core/kernel/test_fn.rb +1 -1
  298. data/test/lib/facets/core/kernel/test_generate_method_name.rb +1 -1
  299. data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
  300. data/test/lib/facets/core/kernel/test_here.rb +1 -1
  301. data/test/lib/facets/core/kernel/test_in.rb +1 -1
  302. data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
  303. data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
  304. data/test/lib/facets/core/kernel/test_method.rb +1 -1
  305. data/test/lib/facets/core/kernel/test_methodname.rb +1 -1
  306. data/test/lib/facets/core/kernel/test_methods.rb +1 -1
  307. data/test/lib/facets/core/kernel/test_new.rb +1 -1
  308. data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
  309. data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
  310. data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
  311. data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
  312. data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
  313. data/test/lib/facets/core/kernel/test_resc.rb +1 -1
  314. data/test/lib/facets/core/kernel/test_returning.rb +1 -1
  315. data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
  316. data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
  317. data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
  318. data/test/lib/facets/core/kernel/test_silently.rb +1 -1
  319. data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
  320. data/test/lib/facets/core/kernel/test_superior.rb +1 -1
  321. data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
  322. data/test/lib/facets/core/kernel/test_this.rb +1 -1
  323. data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
  324. data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
  325. data/test/lib/facets/core/kernel/test_uri.rb +1 -1
  326. data/test/lib/facets/core/kernel/test_val.rb +1 -1
  327. data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
  328. data/test/lib/facets/core/matchdata/test_match.rb +1 -1
  329. data/test/lib/facets/core/matchdata/test_matchtree.rb +7 -2
  330. data/test/lib/facets/core/module/test_abstract.rb +1 -1
  331. data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
  332. data/test/lib/facets/core/module/test_ancestor.rb +1 -1
  333. data/test/lib/facets/core/module/test_basename.rb +1 -1
  334. data/test/lib/facets/core/module/test_by_name.rb +1 -1
  335. data/test/lib/facets/core/module/test_clone_using.rb +1 -1
  336. data/test/lib/facets/core/module/test_dirname.rb +1 -1
  337. data/test/lib/facets/core/module/test_equate_on.rb +1 -1
  338. data/test/lib/facets/core/module/test_generate_instance_method_name.rb +1 -1
  339. data/test/lib/facets/core/module/test_include_as.rb +1 -1
  340. data/test/lib/facets/core/module/test_inherit.rb +1 -1
  341. data/test/lib/facets/core/module/test_initializer.rb +1 -1
  342. data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
  343. data/test/lib/facets/core/module/test_integrate.rb +1 -1
  344. data/test/lib/facets/core/module/test_memoize.rb +1 -1
  345. data/test/lib/facets/core/module/test_modspace.rb +1 -1
  346. data/test/lib/facets/core/module/test_namespace.rb +1 -1
  347. data/test/lib/facets/core/module/test_nesting.rb +1 -1
  348. data/test/lib/facets/core/module/{test_undef.rb → test_nodef.rb} +5 -5
  349. data/test/lib/facets/core/module/test_on_included.rb +1 -1
  350. data/test/lib/facets/core/module/test_redef.rb +1 -1
  351. data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
  352. data/test/lib/facets/core/module/test_redirect.rb +1 -1
  353. data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
  354. data/test/lib/facets/core/module/test_remove.rb +1 -1
  355. data/test/lib/facets/core/module/test_rename.rb +1 -1
  356. data/test/lib/facets/core/module/test_rename_method.rb +1 -1
  357. data/test/lib/facets/core/module/test_revisal.rb +1 -1
  358. data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
  359. data/test/lib/facets/core/module/test_sort_on.rb +1 -1
  360. data/test/lib/facets/core/module/test_this.rb +1 -1
  361. data/test/lib/facets/core/module/test_wrap.rb +1 -1
  362. data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
  363. data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
  364. data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
  365. data/test/lib/facets/core/nilclass/test_include.rb +1 -1
  366. data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
  367. data/test/lib/facets/core/nilclass/test_size.rb +1 -1
  368. data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
  369. data/test/lib/facets/core/numeric/test_approx.rb +1 -1
  370. data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
  371. data/test/lib/facets/core/numeric/test_succ.rb +1 -1
  372. data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
  373. data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
  374. data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
  375. data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
  376. data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
  377. data/test/lib/facets/core/proc/test_compose.rb +1 -1
  378. data/test/lib/facets/core/proc/test_to_method.rb +1 -1
  379. data/test/lib/facets/core/range/test_to_r.rb +1 -1
  380. data/test/lib/facets/core/range/test_to_range.rb +1 -1
  381. data/test/lib/facets/core/range/test_umbrella.rb +1 -1
  382. data/test/lib/facets/core/range/test_within.rb +1 -1
  383. data/test/lib/facets/core/regexp/test_arity.rb +1 -1
  384. data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
  385. data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
  386. data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
  387. data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
  388. data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
  389. data/test/lib/facets/core/string/test_align_center.rb +1 -1
  390. data/test/lib/facets/core/string/test_at_rand.rb +1 -1
  391. data/test/lib/facets/core/string/test_basename.rb +1 -1
  392. data/test/lib/facets/core/string/test_blank.rb +1 -1
  393. data/test/lib/facets/core/string/test_bracket.rb +1 -1
  394. data/test/lib/facets/core/string/test_camelcase.rb +1 -1
  395. data/test/lib/facets/core/string/test_camelize.rb +1 -1
  396. data/test/lib/facets/core/string/test_capitalized.rb +1 -1
  397. data/test/lib/facets/core/string/test_chars.rb +1 -1
  398. data/test/lib/facets/core/string/test_cmp.rb +1 -1
  399. data/test/lib/facets/core/string/test_demodulize.rb +1 -1
  400. data/test/lib/facets/core/string/test_downcase.rb +1 -1
  401. data/test/lib/facets/core/string/test_dresner.rb +1 -1
  402. data/test/lib/facets/core/string/test_each_char.rb +1 -1
  403. data/test/lib/facets/core/string/test_each_word.rb +1 -1
  404. data/test/lib/facets/core/string/test_first.rb +1 -1
  405. data/test/lib/facets/core/string/test_fold.rb +1 -1
  406. data/test/lib/facets/core/string/test_frequency.rb +1 -1
  407. data/test/lib/facets/core/string/test_humanize.rb +1 -1
  408. data/test/lib/facets/core/string/test_indent.rb +1 -1
  409. data/test/lib/facets/core/string/test_index_all.rb +1 -1
  410. data/test/lib/facets/core/string/test_last.rb +1 -1
  411. data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
  412. data/test/lib/facets/core/string/test_lines.rb +1 -1
  413. data/test/lib/facets/core/string/test_lowercase.rb +1 -1
  414. data/test/lib/facets/core/string/test_margin.rb +1 -1
  415. data/test/lib/facets/core/string/test_methodize.rb +1 -1
  416. data/test/lib/facets/core/string/test_modulize.rb +1 -1
  417. data/test/lib/facets/core/string/test_mscan.rb +1 -1
  418. data/test/lib/facets/core/string/test_natcmp.rb +1 -1
  419. data/test/lib/facets/core/string/test_nchar.rb +1 -1
  420. data/test/lib/facets/core/string/test_pathize.rb +1 -1
  421. data/test/lib/facets/core/string/test_pop.rb +1 -1
  422. data/test/lib/facets/core/string/test_pot.rb +1 -1
  423. data/test/lib/facets/core/string/test_probability.rb +1 -1
  424. data/test/lib/facets/core/string/test_push.rb +1 -1
  425. data/test/lib/facets/core/string/test_quote.rb +1 -1
  426. data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
  427. data/test/lib/facets/core/string/test_rand_index.rb +1 -1
  428. data/test/lib/facets/core/string/test_range.rb +1 -1
  429. data/test/lib/facets/core/string/test_range_all.rb +1 -1
  430. data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
  431. data/test/lib/facets/core/string/test_regesc.rb +1 -1
  432. data/test/lib/facets/core/string/test_shatter.rb +1 -1
  433. data/test/lib/facets/core/string/test_shift.rb +1 -1
  434. data/test/lib/facets/core/string/test_shuffle.rb +1 -1
  435. data/test/lib/facets/core/string/test_similarity.rb +1 -1
  436. data/test/lib/facets/core/string/test_singular.rb +1 -1
  437. data/test/lib/facets/core/string/test_soundex.rb +1 -1
  438. data/test/lib/facets/core/string/test_succ.rb +1 -1
  439. data/test/lib/facets/core/string/test_to_a.rb +1 -1
  440. data/test/lib/facets/core/string/test_to_b.rb +1 -1
  441. data/test/lib/facets/core/string/test_to_const.rb +1 -1
  442. data/test/lib/facets/core/string/test_to_date.rb +1 -1
  443. data/test/lib/facets/core/string/test_to_proc.rb +1 -1
  444. data/test/lib/facets/core/string/test_to_re.rb +1 -1
  445. data/test/lib/facets/core/string/test_to_time.rb +1 -1
  446. data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
  447. data/test/lib/facets/core/string/test_unpack.rb +1 -1
  448. data/test/lib/facets/core/string/test_unshift.rb +1 -1
  449. data/test/lib/facets/core/string/test_upcase.rb +1 -1
  450. data/test/lib/facets/core/string/test_whitespace.rb +1 -1
  451. data/test/lib/facets/core/string/test_word_filter.rb +1 -1
  452. data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
  453. data/test/lib/facets/core/string/test_words.rb +1 -1
  454. data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
  455. data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
  456. data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
  457. data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
  458. data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
  459. data/test/lib/facets/core/symbol/test_not.rb +1 -1
  460. data/test/lib/facets/core/symbol/test_pad.rb +1 -1
  461. data/test/lib/facets/core/symbol/test_succ.rb +1 -1
  462. data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
  463. data/test/lib/facets/core/symbol/test_to_proc.rb +1 -1
  464. data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
  465. data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
  466. data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
  467. data/test/lib/facets/core/time/test_change.rb +1 -1
  468. data/test/lib/facets/core/time/test_elapse.rb +1 -1
  469. data/test/lib/facets/core/time/test_stamp.rb +1 -1
  470. data/test/lib/facets/core/time/test_to_date.rb +1 -1
  471. data/test/lib/facets/core/time/test_to_s.rb +1 -1
  472. data/test/lib/facets/core/time/test_to_time.rb +1 -1
  473. data/test/lib/facets/more/test_annattr.rb +39 -0
  474. data/test/lib/facets/more/test_annotatedattr.rb +39 -0
  475. data/test/lib/facets/more/test_annotation.rb +1 -22
  476. data/test/lib/facets/more/test_ansicode.rb +1 -1
  477. data/test/lib/facets/more/test_association.rb +6 -1
  478. data/test/lib/facets/more/test_basicobject.rb +1 -1
  479. data/test/lib/facets/more/test_bbcode.rb +1 -1
  480. data/test/lib/facets/more/test_binaryreader.rb +64 -0
  481. data/test/lib/facets/more/test_bitmask.rb +1 -1
  482. data/test/lib/facets/more/test_bytes.rb +1 -1
  483. data/test/lib/facets/more/test_classinherit.rb +1 -1
  484. data/test/lib/facets/more/test_classmethods.rb +1 -1
  485. data/test/lib/facets/more/test_coroutine.rb +1 -1
  486. data/test/lib/facets/more/test_crypt.rb +1 -1
  487. data/test/lib/facets/more/test_dictionary.rb +1 -1
  488. data/test/lib/facets/more/test_elementor.rb +1 -1
  489. data/test/lib/facets/more/test_enumerablepass.rb +1 -1
  490. data/test/lib/facets/more/test_floatstring.rb +1 -1
  491. data/test/lib/facets/more/test_functor.rb +1 -1
  492. data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
  493. data/test/lib/facets/more/test_inheritor.rb +1 -1
  494. data/test/lib/facets/more/test_interval.rb +1 -1
  495. data/test/lib/facets/more/test_json.rb +1 -1
  496. data/test/lib/facets/more/test_lisp.rb +1 -1
  497. data/test/lib/facets/more/test_lisp_format.rb +1 -1
  498. data/test/lib/facets/more/test_lrucache.rb +1 -1
  499. data/test/lib/facets/more/test_mathconstants.rb +1 -1
  500. data/test/lib/facets/more/test_methodprobe.rb +1 -1
  501. data/test/lib/facets/more/test_multipliers.rb +1 -1
  502. data/test/lib/facets/more/test_multiton.rb +1 -1
  503. data/test/lib/facets/more/test_nackclass.rb +1 -1
  504. data/test/lib/facets/more/test_nilcomparable.rb +1 -1
  505. data/test/lib/facets/more/test_opencascade.rb +66 -0
  506. data/test/lib/facets/more/test_openobject.rb +14 -2
  507. data/test/lib/facets/more/test_overload.rb +1 -1
  508. data/test/lib/facets/more/test_paramix.rb +1 -1
  509. data/test/lib/facets/more/test_pqueue.rb +39 -0
  510. data/test/lib/facets/more/test_preinitialize.rb +1 -1
  511. data/test/lib/facets/more/test_promoteself.rb +1 -1
  512. data/test/lib/facets/more/test_recorder.rb +1 -1
  513. data/test/lib/facets/more/test_snapshot.rb +1 -1
  514. data/test/lib/facets/more/test_statichash.rb +11 -11
  515. data/test/lib/facets/more/test_syncarray.rb +1 -1
  516. data/test/lib/facets/more/test_synchash.rb +1 -1
  517. data/test/lib/facets/more/test_tagiterator.rb +1 -1
  518. data/test/lib/facets/more/test_taskable.rb +151 -0
  519. data/test/lib/facets/more/test_timer.rb +1 -1
  520. data/test/lib/facets/more/test_times.rb +1 -1
  521. data/test/lib/facets/more/test_tuple.rb +1 -1
  522. data/test/lib/facets/more/test_typecast.rb +1 -1
  523. data/test/lib/facets/more/test_uninheritable.rb +1 -1
  524. data/test/lib/facets/more/test_units.rb +1 -1
  525. data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
  526. data/test/lib/facets/more/test_xmlhelper.rb +1 -1
  527. data/test/lib/facets/more/test_xoxo.rb +1 -1
  528. data/test/lib/facets/more/test_yamlstruct.rb +1 -1
  529. metadata +1243 -1247
  530. data/ProjectInfo +0 -89
  531. data/Rakefile +0 -181
  532. data/doc/CHANGELOG +0 -284
  533. data/doc/TODO +0 -73
  534. data/doc/noauto +0 -63
  535. data/lib/facet/array.rb +0 -1
  536. data/lib/facet/class.rb +0 -1
  537. data/lib/facet/comparable.rb +0 -1
  538. data/lib/facet/continuation.rb +0 -1
  539. data/lib/facet/date.rb +0 -1
  540. data/lib/facet/dir.rb +0 -1
  541. data/lib/facet/enumerable.rb +0 -1
  542. data/lib/facet/file.rb +0 -1
  543. data/lib/facet/fileutils.rb +0 -1
  544. data/lib/facet/float.rb +0 -1
  545. data/lib/facet/gem.rb +0 -1
  546. data/lib/facet/hash.rb +0 -1
  547. data/lib/facet/integer.rb +0 -1
  548. data/lib/facet/kernel.rb +0 -1
  549. data/lib/facet/logger.rb +0 -1
  550. data/lib/facet/matchdata.rb +0 -1
  551. data/lib/facet/module.rb +0 -1
  552. data/lib/facet/module/undef.rb +0 -1
  553. data/lib/facet/nilclass.rb +0 -1
  554. data/lib/facet/numeric.rb +0 -1
  555. data/lib/facet/pathname.rb +0 -1
  556. data/lib/facet/proc.rb +0 -1
  557. data/lib/facet/range.rb +0 -1
  558. data/lib/facet/regexp.rb +0 -1
  559. data/lib/facet/string.rb +0 -1
  560. data/lib/facet/symbol.rb +0 -1
  561. data/lib/facet/time.rb +0 -1
  562. data/lib/facet/unboundmethod.rb +0 -1
  563. data/lib/facets/core/array.rb +0 -35
  564. data/lib/facets/core/class.rb +0 -11
  565. data/lib/facets/core/comparable.rb +0 -5
  566. data/lib/facets/core/continuation.rb +0 -1
  567. data/lib/facets/core/date.rb +0 -6
  568. data/lib/facets/core/dir.rb +0 -4
  569. data/lib/facets/core/enumerable.rb +0 -42
  570. data/lib/facets/core/file.rb +0 -8
  571. data/lib/facets/core/fileutils.rb +0 -8
  572. data/lib/facets/core/float.rb +0 -4
  573. data/lib/facets/core/gem.rb +0 -4
  574. data/lib/facets/core/hash.rb +0 -40
  575. data/lib/facets/core/integer.rb +0 -9
  576. data/lib/facets/core/kernel.rb +0 -69
  577. data/lib/facets/core/logger.rb +0 -2
  578. data/lib/facets/core/matchdata.rb +0 -3
  579. data/lib/facets/core/module.rb +0 -43
  580. data/lib/facets/core/nilclass.rb +0 -9
  581. data/lib/facets/core/numeric.rb +0 -6
  582. data/lib/facets/core/pathname.rb +0 -2
  583. data/lib/facets/core/proc.rb +0 -3
  584. data/lib/facets/core/range.rb +0 -4
  585. data/lib/facets/core/regexp.rb +0 -3
  586. data/lib/facets/core/string.rb +0 -91
  587. data/lib/facets/core/symbol.rb +0 -13
  588. data/lib/facets/core/time.rb +0 -8
  589. data/lib/facets/core/unboundmethod.rb +0 -1
@@ -1,73 +1,70 @@
1
- #--
2
- # Method Probe
1
+ # = methodprobe.rb
3
2
  #
4
- # Copyright (c) 2004,2005 Thomas Sawyer
3
+ # == Copyright (c) 2004 Thomas Sawyer
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
15
- #
16
- # ===========================================================================
17
- # Revision History ::
18
- # ---------------------------------------------------------------------------
19
- # 5.7.21 Trans * Changed name from DuckHunter to Method::Probe.
20
- # ===========================================================================
21
- #++
22
-
23
- #:title: Method Probe
24
- #
25
- # Method::Probe (aka DuckHunter) is a decoy object which is dropped into
26
- # methods which records the calls made against it --hence a method probe.
27
- # Of course, it is not perfect --an inescapable matter it seems for any
28
- # internal probe. There are a couple of issues related to conditionals.
29
- # Since the method test for a certain condition against the decoy, how
30
- # is the decoy to respond? Thus ceratin paths in the code may never get
31
- # exceuted and thus go unmapped. If Ruby had better conditional reflection
32
- # (i.e. if 'if', 'case', 'unless', 'when', etc. were true methods) then
33
- # this could be fixed by making the Probe reentrant, mapping out variant
34
- # true/false/nil replies. The likely insurmountable problem though is the
35
- # Halting problem. A probe can cause some methods to complete execution.
36
- # It's pretty rare, but it can happen and little can be done about it (I think).
37
- #
38
- # Note, the alternative to this kind of probe is a program that examines, rather
39
- # then executes, the code. This would circumvent the above problems, but run
40
- # into difficulties with dynamic evals. It would also be more complicated,
41
- # but might prove a better means in the future.
42
- #
43
- # This script is provided for experimetnal purposes. Please inform the author
44
- # if you find ways to improve it or put it to an interesting use.
45
- #
46
- # == Synopsis
47
- #
48
- # require 'methodprobe'
49
- #
50
- # def amethod(x)
51
- # x + 1
52
- # end
53
- #
54
- # p method(:amethod).signiture
55
- # p method(:amethod).signiture(:class)
56
- # p method(:amethod).signiture(:pretty)
57
- #
58
- # produces
59
- #
60
- # [["+"]]
61
- # [{"+"=>[["Fixnum"]]}]
62
- # [["+( Fixnum )"]]
63
- #
64
- # == Authors(s)
14
+ # == Author(s)
65
15
  #
66
16
  # * Thomas Sawyer
17
+
18
+ # Author:: Thomas Sawyer
19
+ # Copyright:: Copyright (c) 2006 Thomas Sawyer
20
+ # License:: Ruby License
21
+
67
22
  #
68
23
 
69
24
  class Method
70
25
 
26
+ # = Method Probe
27
+ #
28
+ # Method::Probe (aka DuckHunter) is a decoy object which is dropped into
29
+ # methods which records the calls made against it --hence a method probe.
30
+ # Of course, it is not perfect --an inescapable matter it seems for any
31
+ # internal probe. There are a couple of issues related to conditionals.
32
+ # Since the method test for a certain condition against the decoy, how
33
+ # is the decoy to respond? Thus ceratin paths in the code may never get
34
+ # exceuted and thus go unmapped. If Ruby had better conditional reflection
35
+ # (i.e. if 'if', 'case', 'unless', 'when', etc. were true methods) then
36
+ # this could be fixed by making the Probe reentrant, mapping out variant
37
+ # true/false/nil replies. The likely insurmountable problem though is the
38
+ # Halting problem. A probe can cause some methods to complete execution.
39
+ # It's pretty rare, but it can happen and little can be done about it (I think).
40
+ #
41
+ # Note, the alternative to this kind of probe is a program that examines, rather
42
+ # then executes, the code. This would circumvent the above problems, but run
43
+ # into difficulties with dynamic evals. It would also be more complicated,
44
+ # but might prove a better means in the future.
45
+ #
46
+ # This script is provided for experimetnal purposes. Please inform the author
47
+ # if you find ways to improve it or put it to an interesting use.
48
+ #
49
+ # == Synopsis
50
+ #
51
+ # require 'methodprobe'
52
+ #
53
+ # def amethod(x)
54
+ # x + 1
55
+ # end
56
+ #
57
+ # p method(:amethod).signiture
58
+ # p method(:amethod).signiture(:class)
59
+ # p method(:amethod).signiture(:pretty)
60
+ #
61
+ # produces
62
+ #
63
+ # [["+"]]
64
+ # [{"+"=>[["Fixnum"]]}]
65
+ # [["+( Fixnum )"]]
66
+ #
67
+
71
68
  class Probe
72
69
 
73
70
  def Probe.duckcall
@@ -125,7 +122,6 @@ class Method
125
122
 
126
123
  end #class Probe
127
124
 
128
-
129
125
  # Outputs migration information.
130
126
  def migration
131
127
  parameters = []; argc = self.arity
@@ -139,7 +135,6 @@ class Method
139
135
  end
140
136
  private :migration
141
137
 
142
-
143
138
  # Outputs signiture information.
144
139
  def signature(detail=nil)
145
140
  ds = []
@@ -1,30 +1,37 @@
1
- #--
2
- # Mock
1
+ # = mock.rb
3
2
  #
4
- # Copyright (c) 2005 Thomas Sawyer, Michael Granger and George Moschovitis
3
+ # == Copyright (c) 2005 George Moschovitis, Michael Granger
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
14
+ # == Special Thanks
15
15
  #
16
- # ==========================================================================
17
- # Revision History ::
18
- # --------------------------------------------------------------------------
19
- # 0.5.8.24 trans Created, based-off of George's initial Mock idea, and
20
- # largely influence by Michael Granger's Test::Unit::Mock.
21
- # ==========================================================================
16
+ # Thanks goes to Michael Granger for Test::Unit::Mock on which
17
+ # this library is partially based.
22
18
  #
23
- #++
19
+ # == Author(s)
20
+ #
21
+ # * Thomas Sawyer
22
+ #
23
+ # == Developer Notes
24
+ #
25
+ # TODO Rename to MockObject ?
26
+ # Should this be under Test::Unit too ?
27
+
28
+ # Author:: George Moschovitis, Michael Granger
29
+ # Copyright:: Copyright (c) 2005 George Moschovitis, Michael Granger
30
+ # License:: Ruby License
24
31
 
25
32
  require 'ostruct'
26
33
 
27
- #:title: Mock
34
+ # = Mock
28
35
  #
29
36
  # A straightfoward mocking facility. Typically used in test cases.
30
37
  # The Mock class offers a few constructors for quickly building
@@ -1,25 +1,29 @@
1
- #--
2
- # multipliers.rb
1
+ # = multipliers.rb
3
2
  #
4
- # Copyright (c) 2005 Thomas Sawyer
3
+ # == Copyright (c) 2005 Thomas Sawyer
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
15
- # ==========================================================================
16
- # Revision History ::
17
- # --------------------------------------------------------------------------
18
- # 2005.08.10 trans * Created, inspired by Rich Kilmer's bytes.rb.
19
- # ==========================================================================
20
- #++
21
-
22
- #:title: Multipliers
14
+ # == Special Thanks
15
+ #
16
+ # Thanks to Rich Kilmer and bytes.rb which inspired this library.
17
+ #
18
+ # == Author(s)
19
+ #
20
+ # * Thomas Sawyer
21
+
22
+ # Author:: Thomas Sawyer
23
+ # Copyright:: Copyright (c) 2005 Thomas Sawyer
24
+ # License:: Ruby License
25
+
26
+ # = Multipliers
23
27
  #
24
28
  # Adds methods to Numeric to make working with
25
29
  # magnitudes (kilo, mega, giga, milli, micro, etc.)
@@ -1,26 +1,26 @@
1
- #--
2
- # Multiton
3
- # Copyright (c) 2005 Florian Frank, Thomas Sawyer
1
+ # = multiton.rb
4
2
  #
5
- # Ruby License
3
+ # == Copyright (c) 2005 Florian Frank, Thomas Sawyer
6
4
  #
7
- # This module is free software. You may use, modify, and/or redistribute this
8
- # software under the same terms as Ruby.
5
+ # Ruby License
9
6
  #
10
- # This program is distributed in the hope that it will be useful, but WITHOUT
11
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
- # FOR A PARTICULAR PURPOSE.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
13
9
  #
14
- # ==========================================================================
15
- # Revision Notes
16
- # --------------------------------------------------------------------------
17
- # 2005-11-27 trans * Simplifed variations to one.
18
- # 2005-08-01 trans * Minor modifications to documentation.
19
- # 2005-02-01 trans * Added New and Semi variations.
20
- # ==========================================================================
21
- #++
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
13
+ #
14
+ # == Author(s)
15
+ #
16
+ # * Florian Frank
17
+ # * Thomas Sawyer
22
18
 
23
- #:title: Multiton
19
+ # Author:: Florian Frank, Thomas Sawyer
20
+ # Copyright:: Copyright (c) 2005 Florian Frank, Thomas Sawyer
21
+ # License:: Ruby License
22
+
23
+ # = Multiton
24
24
  #
25
25
  # Multiton module that ensures only one object to be allocated for a given
26
26
  # argument list.
@@ -87,12 +87,6 @@
87
87
  #
88
88
  # Which should return a hash key used to identify the object being
89
89
  # constructed as (not) unique.
90
- #
91
- # == Author(s)
92
- #
93
- # * Florian Frank
94
- # * Thomas Sawyer
95
- #
96
90
 
97
91
  module Multiton
98
92
 
@@ -1,31 +1,31 @@
1
- #--
2
- # NackClass
1
+ # = nackclass.rb
3
2
  #
4
- # Copyright (c) 2005 Thomas Sawyer
3
+ # == Copyright (c) 2005 Thomas Sawyer
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
14
+ # == Author(s)
15
+ #
16
+ # * Thomas Sawyer
15
17
  #
16
- # ==========================================================================
17
- # Revision History ::
18
- # --------------------------------------------------------------------------
19
- # 04.09.10 Trans * Making progress. Just usable to some degree now.
20
- # ==========================================================================
18
+ # == Developer Notes
21
19
  #
22
20
  # TODO I beleive this class has even more potential yet.
23
21
  # It would be interesting to see if a catch/try correction
24
22
  # facility could be built into it too.
25
- #
26
- #++
27
23
 
28
- #:title: NackClass
24
+ # Author:: Thomas Sawyer
25
+ # Copyright:: Copyright (c) 2005 Thomas Sawyer
26
+ # License:: Ruby License
27
+
28
+ # = NackClass
29
29
  #
30
30
  # The NackClass is is like the NilClass except one step down.
31
31
  # Nack is never used to to mean nothingness or emptiness.
@@ -49,10 +49,6 @@
49
49
  # a = nail scaler( 1 ) #=> 1
50
50
  # b = nail scaler( [1,2] ) #=> ArgumentError
51
51
  #
52
- # == Author(s)
53
- #
54
- # * Thomas Sawyer
55
- #
56
52
 
57
53
  class InvalidNackError < ArgumentError
58
54
  end
@@ -1,26 +1,30 @@
1
- #--
2
- # NilComparable
1
+ # = nilcomparable.rb
3
2
  #
4
- # Copyright (c) 2005 Thomas Sawyer
3
+ # == Copyright (c) 2005 Thomas Sawyer, Paul Brannan
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
14
+ # == Special Thanks
15
15
  #
16
- # ==========================================================================
17
- # Revision History ::
18
- # --------------------------------------------------------------------------
19
- # 2005-4 trans * Documentation.
20
- # ==========================================================================
21
- #++
16
+ # Based on library from Paul Brannan's Ruby Treasures.
17
+ #
18
+ # == Author(s)
19
+ #
20
+ # * Thomas Sawyer
21
+ # * Paul Brannan
22
+
23
+ # Author:: Thomas Sawyer, Paul Brannan
24
+ # Copyright:: Copyright (c) 2005 Thomas Sawyer, Paul Brannan
25
+ # License:: Ruby License
22
26
 
23
- #:title: NilComparable
27
+ # = NilComparable
24
28
  #
25
29
  # This microframework simply makes nil comparable, such that
26
30
  # all things (except itself) are greater than it.
@@ -47,7 +51,7 @@
47
51
  # end
48
52
  #
49
53
  # end
50
- #
54
+ #
51
55
  # To do so for a pre-existing class with a pre-existing #<=> method, you'll
52
56
  # need to overide the method. As an example let's make Numeric comparable to nil.
53
57
  #
@@ -72,19 +76,13 @@
72
76
  #
73
77
  # == Note
74
78
  #
75
- # NilCompariable _was_ a module that could automatically make
76
- # a class comparable to nil. But it only worked if the #<=> was
77
- # previous defined, which isn't ideal. Since it is easy enough
78
- # to use the above examples, we decided to deprecate the module
79
- # and leave this as an explicit task for the end-programmer.
80
- # Changing this behavior for built-in classes is not something
81
- # to be done lightly anyway.
82
- #
83
- # == Author(s)
84
- #
85
- # * Paul Brannan
86
- # * Thomas Sawyer
87
- #
79
+ # NilCompariable _was_ a module that could automatically make
80
+ # a class comparable to nil. But it only worked if the #<=> was
81
+ # previous defined, which isn't ideal. Since it is easy enough
82
+ # to use the above examples, we decided to deprecate the module
83
+ # and leave this as an explicit task for the end-programmer.
84
+ # Changing this behavior for built-in classes is not something
85
+ # to be done lightly anyway.
88
86
 
89
87
  class NilClass
90
88
 
@@ -1,24 +1,25 @@
1
- #--
2
- # NullClass
1
+ # = nullclass.rb
3
2
  #
4
- # Copyright (c) 2005 Thomas Sawyer
3
+ # == Copyright (c) 2005 Thomas Sawyer
5
4
  #
6
- # Ruby License
5
+ # Ruby License
7
6
  #
8
- # This module is free software. You may use, modify, and/or redistribute this
9
- # software under the same terms as Ruby.
7
+ # This module is free software. You may use, modify, and/or redistribute this
8
+ # software under the same terms as Ruby.
10
9
  #
11
- # This program is distributed in the hope that it will be useful, but WITHOUT
12
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
- # FOR A PARTICULAR PURPOSE.
10
+ # This program is distributed in the hope that it will be useful, but WITHOUT
11
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ # FOR A PARTICULAR PURPOSE.
14
13
  #
15
- # ==========================================================================
16
- # Revision History ::
17
- # --------------------------------------------------------------------------
18
- # 2005.10.28 trans * Created.
19
- # ==========================================================================
14
+ # == Author(s)
15
+ #
16
+ # * Thomas Sawyer
17
+
18
+ # Author:: Thomas Sawyer
19
+ # Copyright:: Copyright (c) 2005 Thomas Sawyer
20
+ # License:: Ruby License
20
21
 
21
- # :title: NullClass
22
+ # = NullClass
22
23
  #
23
24
  # NullClass is essentially NilClass but it differs in one
24
25
  # important way. When a method is called against it that it