facets 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (313) hide show
  1. data/CHANGES +6 -0
  2. data/NOTES +14 -1
  3. data/Rakefile +26 -0
  4. data/demo/bench/general/bench_calls.rb +74 -0
  5. data/demo/bench/general/bench_includes.rb +25 -0
  6. data/demo/bench/general/bench_methods.rb +17 -0
  7. data/demo/bench/general/bench_pathname.rb +24 -0
  8. data/demo/bench/general/bench_range.rb +64 -0
  9. data/demo/bench/general/bench_return.rb +56 -0
  10. data/demo/bench/general/bench_yeild.rb +75 -0
  11. data/lib/{more → class}/facets/association.rb +0 -0
  12. data/lib/{more → class}/facets/autoarray.rb +0 -0
  13. data/lib/{more → class}/facets/basicobject.rb +0 -0
  14. data/lib/{more → class}/facets/buildingblock.rb +0 -44
  15. data/lib/{more → class}/facets/cachedelegator.rb +3 -0
  16. data/lib/{more → class}/facets/coroutine.rb +0 -56
  17. data/lib/{more → class}/facets/dictionary.rb +0 -0
  18. data/lib/{more → class}/facets/downloader.rb +0 -0
  19. data/lib/{more → class}/facets/filelist.rb +0 -0
  20. data/lib/{more → class}/facets/fileshell.rb +0 -0
  21. data/lib/{more → class}/facets/hashbuilder.rb +0 -0
  22. data/lib/{more → class}/facets/heap.rb +0 -0
  23. data/lib/{more → class}/facets/infinity.rb +0 -46
  24. data/lib/{more → class}/facets/interval.rb +0 -0
  25. data/lib/{more → class}/facets/ioredirect.rb +0 -0
  26. data/lib/{more → class}/facets/linkedlist.rb +0 -42
  27. data/lib/{more → class}/facets/lrucache.rb +0 -23
  28. data/lib/{more → class}/facets/minitar.rb +0 -0
  29. data/lib/{more → class}/facets/nackclass.rb +0 -0
  30. data/lib/{more → class}/facets/nullclass.rb +0 -0
  31. data/lib/{more → class}/facets/opencascade.rb +0 -70
  32. data/lib/{more → class}/facets/opencollection.rb +0 -0
  33. data/lib/class/facets/openhash.rb +41 -0
  34. data/lib/{more → class}/facets/openobject.rb +0 -121
  35. data/lib/{more → class}/facets/orderedhash.rb +0 -0
  36. data/lib/{more → class}/facets/pathlist.rb +0 -0
  37. data/lib/{more → class}/facets/pool.rb +0 -0
  38. data/lib/{more → class}/facets/pqueue.rb +0 -0
  39. data/lib/{more → class}/facets/progressbar.rb +0 -0
  40. data/lib/{more → class}/facets/recorder.rb +0 -40
  41. data/lib/{more → class}/facets/reference.rb +0 -0
  42. data/lib/{more → class}/facets/rwdelegator.rb +0 -0
  43. data/lib/{more → class}/facets/semaphore.rb +0 -0
  44. data/lib/{more → class}/facets/syncarray.rb +0 -24
  45. data/lib/{more → class}/facets/synchash.rb +1 -25
  46. data/lib/{more → class}/facets/timer.rb +0 -62
  47. data/lib/{more → class}/facets/tuple.rb +0 -60
  48. data/lib/{more → class}/facets/version.rb +0 -0
  49. data/lib/core/facets/dir/multiglob.rb +20 -5
  50. data/lib/core/facets/enumerable/cartesian.rb +2 -2
  51. data/lib/core/facets/enumerable/combination.rb +9 -1
  52. data/lib/core/facets/kernel/object.rb +1 -1
  53. data/lib/{more → mixin}/facets/binreadable.rb +0 -62
  54. data/lib/{more → mixin}/facets/buildable.rb +0 -48
  55. data/lib/mixin/facets/cloneable.rb +90 -0
  56. data/lib/{more → mixin}/facets/enumerablepass.rb +0 -81
  57. data/lib/{more → mixin}/facets/expirable.rb +0 -0
  58. data/lib/{more → mixin}/facets/fileable.rb +0 -0
  59. data/lib/{more → mixin}/facets/instantiable.rb +0 -30
  60. data/lib/{more → mixin}/facets/multiton.rb +0 -0
  61. data/lib/{more → mixin}/facets/registerable.rb +0 -0
  62. data/lib/mixin/facets/tasksystem.rb +350 -0
  63. data/lib/{more → mixin}/facets/uninheritable.rb +1 -39
  64. data/lib/{more → mixin}/facets/validation.rb +0 -0
  65. data/lib/more/facets/arguments.rb +0 -66
  66. data/lib/more/facets/attributes.rb +0 -35
  67. data/lib/more/facets/bbcode.rb +1 -31
  68. data/lib/more/facets/bytes.rb +0 -80
  69. data/lib/more/facets/class_extension.rb +0 -66
  70. data/lib/more/facets/classmethods.rb +0 -64
  71. data/lib/more/facets/compare_on.rb +0 -52
  72. data/lib/more/facets/curry.rb +0 -29
  73. data/lib/more/facets/cut.rb +0 -27
  74. data/lib/more/facets/date.rb +0 -54
  75. data/lib/more/facets/dependency.rb +0 -70
  76. data/lib/more/facets/elementor.rb +0 -67
  77. data/lib/more/facets/getoptlong.rb +0 -30
  78. data/lib/more/facets/{hash_keyize.rb → hash/keyize.rb} +0 -0
  79. data/lib/more/facets/inheritor.rb +0 -150
  80. data/lib/more/facets/instantise.rb +0 -41
  81. data/lib/more/facets/let.rb +0 -20
  82. data/lib/more/facets/memoize.rb +0 -45
  83. data/lib/more/facets/multipliers.rb +0 -110
  84. data/lib/more/facets/ostruct.rb +0 -124
  85. data/lib/more/facets/random.rb +0 -153
  86. data/lib/more/facets/rbconfig.rb +55 -0
  87. data/lib/more/facets/set.rb +27 -0
  88. data/lib/more/facets/snapshot.rb +0 -30
  89. data/lib/more/facets/stylize.rb +0 -147
  90. data/lib/more/facets/times.rb +0 -98
  91. data/lib/more/facets/tracepoint.rb +194 -0
  92. data/lib/more/facets/typecast.rb +0 -63
  93. data/lib/more/facets/ziputils.rb +7 -0
  94. data/log/Changelog-0.txt +239 -0
  95. data/log/Changelog-1.txt +450 -0
  96. data/log/Changelog.txt +841 -0
  97. data/log/Fixme.txt +18 -0
  98. data/log/Testlog.txt +188 -0
  99. data/log/Todo.txt +326 -0
  100. data/meta/MANIFEST +1 -1
  101. data/meta/VERSION +1 -0
  102. data/meta/authors +48 -0
  103. data/meta/description +8 -0
  104. data/meta/project.yaml +11 -5
  105. data/task/install +4 -2
  106. data/task/rdoc +5 -0
  107. data/task/test +40 -0
  108. data/test/{unit → class}/test_association.rb +0 -0
  109. data/test/{unit → class}/test_autoarray.rb +0 -0
  110. data/test/{unit → class}/test_basicobject.rb +0 -0
  111. data/test/{unit → class}/test_buildingblock.rb +1 -0
  112. data/test/{unit → class}/test_coroutine.rb +0 -0
  113. data/test/{unit → class}/test_dictionary.rb +0 -0
  114. data/test/{unit → class}/test_infinity.rb +0 -0
  115. data/test/{unit → class}/test_interval.rb +0 -0
  116. data/test/{unit → class}/test_linkedlist.rb +1 -1
  117. data/test/{unit → class}/test_lrucache.rb +3 -0
  118. data/test/{unit → class}/test_opencascade.rb +0 -0
  119. data/test/{unit → class}/test_openobject.rb +0 -0
  120. data/test/{unit → class}/test_recorder.rb +0 -1
  121. data/test/{unit → class}/test_syncarray.rb +2 -4
  122. data/test/{unit → class}/test_synchash.rb +2 -4
  123. data/test/{unit → class}/test_timer.rb +0 -1
  124. data/test/{unit → class}/test_tuple.rb +0 -0
  125. data/test/{unit → core}/array/test_delete.rb +0 -0
  126. data/test/{unit → core}/array/test_indexable.rb +0 -0
  127. data/test/{unit → core}/array/test_merge.rb +0 -0
  128. data/test/{unit → core}/array/test_only.rb +0 -0
  129. data/test/{unit → core}/array/test_pad.rb +0 -0
  130. data/test/{unit → core}/array/test_rotate.rb +0 -0
  131. data/test/{unit → core}/array/test_select.rb +0 -0
  132. data/test/{unit → core}/array/test_stackable.rb +0 -0
  133. data/test/{unit/binding/test_cflow.rb → core/binding/test_caller.rb} +2 -2
  134. data/test/{unit → core}/binding/test_defined.rb +0 -0
  135. data/test/{unit → core}/binding/test_eval.rb +0 -0
  136. data/test/{unit → core}/binding/test_here.rb +0 -0
  137. data/test/{unit → core}/binding/test_self.rb +0 -0
  138. data/test/{unit → core}/binding/test_vars.rb +0 -0
  139. data/test/{unit → core}/class/test_descendents.rb +0 -0
  140. data/test/{unit → core}/class/test_initializer.rb +0 -0
  141. data/test/{unit → core}/class/test_remove_descendents.rb +0 -0
  142. data/test/{unit → core}/comparable/test_bound.rb +0 -0
  143. data/test/{unit → core}/comparable/test_cmp.rb +0 -0
  144. data/test/{unit → core}/dir/test_parent.rb +0 -0
  145. data/test/{unit → core}/dir/test_recurse.rb +0 -0
  146. data/test/{unit → core}/dir/test_traverse.rb +0 -0
  147. data/test/{unit → core}/enumerable/test_cartesian.rb +0 -0
  148. data/test/{unit → core}/enumerable/test_collect.rb +0 -0
  149. data/test/{unit → core}/enumerable/test_combination.rb +0 -0
  150. data/test/{unit → core}/enumerable/test_count.rb +0 -0
  151. data/test/{unit → core}/enumerable/test_each.rb +0 -0
  152. data/test/{unit → core}/enumerable/test_mash.rb +0 -0
  153. data/test/{unit → core}/enumerable/test_permutation.rb +0 -0
  154. data/test/{unit → core}/enumerable/test_probability.rb +0 -0
  155. data/test/{unit → core}/enumerable/test_split.rb +0 -0
  156. data/test/{unit → core}/exception/test_detail.rb +0 -0
  157. data/test/{unit → core}/file/test_null.rb +0 -0
  158. data/test/{unit → core}/file/test_read.rb +0 -0
  159. data/test/{unit → core}/file/test_sanitize.rb +0 -0
  160. data/test/{unit → core}/file/test_split_all.rb +0 -0
  161. data/test/{unit → core}/file/test_write.rb +0 -0
  162. data/test/{unit → core}/filetest/test_root.rb +0 -0
  163. data/test/{unit → core}/hash/test_alias.rb +0 -0
  164. data/test/{unit → core}/hash/test_at.rb +0 -0
  165. data/test/{unit → core}/hash/test_autonew.rb +0 -0
  166. data/test/core/hash/test_collate.rb +33 -0
  167. data/test/{unit → core}/hash/test_delete.rb +0 -0
  168. data/test/{unit → core}/hash/test_each_with_key.rb +0 -0
  169. data/test/{unit → core}/hash/test_has_keys.rb +0 -0
  170. data/test/{unit → core}/hash/test_insert.rb +0 -0
  171. data/test/{unit → core}/hash/test_inverse.rb +0 -0
  172. data/test/{unit → core}/hash/test_op.rb +0 -0
  173. data/test/{unit → core}/hash/test_rekey.rb +0 -0
  174. data/test/{unit → core}/hash/test_reverse_merge.rb +0 -0
  175. data/test/{unit → core}/hash/test_select.rb +0 -0
  176. data/test/{unit → core}/hash/test_swap.rb +0 -0
  177. data/test/{unit → core}/hash/test_traverse.rb +0 -0
  178. data/test/{unit → core}/hash/test_update.rb +0 -0
  179. data/test/{unit → core}/hash/test_weave.rb +0 -0
  180. data/test/{unit → core}/hash/test_zipnew.rb +0 -0
  181. data/test/{unit → core}/integer/test_bitmask.rb +0 -0
  182. data/test/{unit → core}/integer/test_factorial.rb +0 -0
  183. data/test/{unit → core}/integer/test_multiple.rb +0 -0
  184. data/test/{unit → core}/integer/test_of.rb +0 -0
  185. data/test/{unit → core}/kernel/test_callstack.rb +0 -0
  186. data/test/{unit → core}/kernel/test_constant.rb +0 -0
  187. data/test/{unit → core}/kernel/test_deepcopy.rb +0 -0
  188. data/test/{unit → core}/kernel/test_instance.rb +0 -0
  189. data/test/{unit → core}/kernel/test_metaid.rb +0 -0
  190. data/test/{unit → core}/kernel/test_object.rb +1 -1
  191. data/test/{unit → core}/kernel/test_populate.rb +0 -0
  192. data/test/{unit → core}/kernel/test_report.rb +0 -0
  193. data/test/{unit → core}/kernel/test_returning.rb +0 -0
  194. data/test/{unit → core}/kernel/test_silence.rb +0 -0
  195. data/test/{unit → core}/kernel/test_super.rb +0 -0
  196. data/test/{unit → core}/kernel/test_tap.rb +0 -0
  197. data/test/{unit → core}/kernel/test_val.rb +0 -0
  198. data/test/{unit → core}/kernel/test_withattr.rb +0 -0
  199. data/test/{unit → core}/matchdata/test_match.rb +0 -0
  200. data/test/{unit → core}/matchdata/test_matchset.rb +0 -0
  201. data/test/{unit → core}/module/test_abstract.rb +0 -0
  202. data/test/{unit → core}/module/test_alias.rb +0 -0
  203. data/test/{unit → core}/module/test_cattr.rb +0 -0
  204. data/test/{unit → core}/module/test_clone.rb +0 -0
  205. data/test/{unit → core}/module/test_include.rb +0 -0
  206. data/test/{unit → core}/module/test_modify.rb +0 -0
  207. data/test/{unit → core}/module/test_name.rb +0 -0
  208. data/test/{unit → core}/module/test_traits.rb +0 -0
  209. data/test/{unit → core}/numeric/test_round.rb +0 -0
  210. data/test/{unit → core}/proc/test_bind.rb +0 -0
  211. data/test/{unit → core}/proc/test_compose.rb +0 -0
  212. data/test/{unit → core}/range/test_combine.rb +0 -0
  213. data/test/{unit → core}/range/test_overlap.rb +0 -0
  214. data/test/{unit → core}/regexp/test_arity.rb +0 -0
  215. data/test/{unit → core}/string/test_align.rb +0 -0
  216. data/test/{unit → core}/string/test_blank.rb +0 -0
  217. data/test/{unit → core}/string/test_bracket.rb +0 -0
  218. data/test/{unit → core}/string/test_case.rb +0 -0
  219. data/test/{unit → core}/string/test_crypt.rb +0 -0
  220. data/test/{unit → core}/string/test_filter.rb +0 -0
  221. data/test/{unit → core}/string/test_indexable.rb +0 -0
  222. data/test/{unit → core}/string/test_interpolate.rb +0 -0
  223. data/test/{unit → core}/string/test_natcmp.rb +0 -0
  224. data/test/{unit → core}/string/test_nchar.rb +0 -0
  225. data/test/{unit → core}/string/test_op.rb +0 -0
  226. data/test/{unit → core}/string/test_partitions.rb +0 -0
  227. data/test/{unit → core}/string/test_range.rb +0 -0
  228. data/test/{unit → core}/string/test_regesc.rb +0 -0
  229. data/test/{unit → core}/string/test_scan.rb +0 -0
  230. data/test/{unit → core}/string/test_stackable.rb +0 -0
  231. data/test/{unit → core}/string/test_tabs.rb +0 -0
  232. data/test/{unit → core}/string/test_wrap.rb +0 -0
  233. data/test/{unit → core}/symbol/test_chomp.rb +0 -0
  234. data/test/{unit → core}/symbol/test_generate.rb +0 -0
  235. data/test/{unit → core}/symbol/test_not.rb +0 -0
  236. data/test/{unit → core}/symbol/test_shadow.rb +0 -0
  237. data/test/{unit → core}/symbol/test_succ.rb +0 -0
  238. data/test/{unit → core}/symbol/test_to_proc.rb +0 -0
  239. data/test/{unit → core}/test_1stclassmethod.rb +0 -0
  240. data/test/{unit → core}/test_boolean.rb +0 -0
  241. data/test/{unit → core}/test_conversion.rb +0 -0
  242. data/test/{unit → core}/test_functor.rb +0 -0
  243. data/test/{unit → core}/time/test_change.rb +0 -0
  244. data/test/{unit → core}/time/test_elapse.rb +0 -0
  245. data/test/{unit → core}/time/test_stamp.rb +0 -0
  246. data/test/{unit → mixin}/test_binreadable.rb +0 -0
  247. data/test/{unit → mixin}/test_buildable.rb +1 -0
  248. data/test/mixin/test_cloneable.rb +41 -0
  249. data/test/{unit → mixin}/test_enumerablepass.rb +0 -0
  250. data/test/{unit → mixin}/test_instantiable.rb +2 -1
  251. data/test/{unit → mixin}/test_multiton.rb +0 -0
  252. data/test/{unit → mixin}/test_uninheritable.rb +1 -2
  253. data/test/{unit → more/hash}/test_keyize.rb +1 -1
  254. data/test/{unit → more}/test_advice.rb +0 -0
  255. data/test/{unit → more}/test_annotations.rb +0 -0
  256. data/test/{unit → more}/test_ansicode.rb +0 -0
  257. data/test/{unit → more}/test_aop.rb +0 -0
  258. data/test/{unit → more}/test_arguments.rb +1 -0
  259. data/test/{unit → more}/test_attributes.rb +2 -2
  260. data/test/{unit → more}/test_bbcode.rb +1 -0
  261. data/test/{unit → more}/test_bytes.rb +1 -0
  262. data/test/{unit → more}/test_class_extension.rb +2 -1
  263. data/test/{unit → more}/test_classmethods.rb +2 -1
  264. data/test/{unit → more}/test_compare_on.rb +0 -1
  265. data/test/{unit → more}/test_continuation.rb +0 -0
  266. data/test/{unit → more}/test_crypt.rb +0 -0
  267. data/test/{unit → more}/test_curry.rb +1 -0
  268. data/test/{unit → more}/test_cut.rb +2 -1
  269. data/test/{unit → more}/test_date.rb +1 -1
  270. data/test/{unit → more}/test_dependency.rb +2 -2
  271. data/test/{unit → more}/test_elementor.rb +1 -1
  272. data/test/{unit → more}/test_getoptlong.rb +1 -0
  273. data/test/{unit → more}/test_inheritor.rb +1 -1
  274. data/test/{unit → more}/test_instantise.rb +2 -1
  275. data/test/{unit → more}/test_interface.rb +0 -0
  276. data/test/{unit → more}/test_let.rb +0 -1
  277. data/test/{unit → more}/test_memoize.rb +2 -3
  278. data/test/{unit → more}/test_multipliers.rb +1 -1
  279. data/test/{unit → more}/test_namespace.rb +0 -0
  280. data/test/{unit → more}/test_ostruct.rb +0 -0
  281. data/test/{unit → more}/test_overload.rb +0 -0
  282. data/test/{unit → more}/test_paramix.rb +0 -0
  283. data/test/{unit → more}/test_prototype.rb +0 -0
  284. data/test/more/test_random.rb +146 -0
  285. data/test/{unit → more}/test_snapshot.rb +0 -3
  286. data/test/{unit → more}/test_stylize.rb +1 -2
  287. data/test/{unit → more}/test_thread.rb +0 -0
  288. data/test/{unit → more}/test_times.rb +2 -2
  289. data/test/{unit → more}/test_typecast.rb +0 -3
  290. metadata +1117 -1098
  291. data/lib/more/facets/cloneable.rb +0 -75
  292. data/log/changelog.txt +0 -0
  293. data/meta/facets.roll +0 -4
  294. data/meta/google_ad.html +0 -15
  295. data/meta/icli.yaml +0 -17
  296. data/task/changes +0 -29
  297. data/task/clean +0 -17
  298. data/task/clobber/package +0 -10
  299. data/task/log +0 -17
  300. data/task/prepare +0 -7
  301. data/task/publish +0 -43
  302. data/task/release +0 -10
  303. data/task/stamp +0 -33
  304. data/task/stats +0 -138
  305. data/task/test/cross +0 -309
  306. data/task/test/each +0 -42
  307. data/task/test/load +0 -30
  308. data/task/test/pairs +0 -50
  309. data/task/test/solo +0 -294
  310. data/task/test/syntax +0 -31
  311. data/task/test/whole +0 -34
  312. data/test/unit/hash/test_collate.rb +0 -31
  313. data/test/unit/test_random.rb +0 -149
@@ -1,4 +1,4 @@
1
- # -x dev -x pkg -x doc
1
+ # -x work -x pkg -x doc
2
2
  AUTHORS
3
3
  CHANGES
4
4
  COPYING
@@ -0,0 +1 @@
1
+ 2.3.0 stable (2008-02-18)
@@ -0,0 +1,48 @@
1
+ Trans
2
+ Matthew Harris
3
+ Noah Gibbs
4
+ Thibaut Barrère
5
+ Daniel J. Berger
6
+ Paul Brannan
7
+ Mikael Brockman
8
+ Jamis Buck
9
+ Renald Buter
10
+ Shashank Date
11
+ Robert Feldt
12
+ Mauricio Fernandez
13
+ Florian Frank
14
+ Hal Fulton
15
+ Noah Gibbs
16
+ Michael Granger
17
+ Florian Gross
18
+ Sean O'Halpin
19
+ Matthew Harris
20
+ David Heinemeier Hansson
21
+ Thomas-Ivo Heinen
22
+ Dave Hoover
23
+ Ara T. Howard
24
+ MenTaLguY
25
+ Mohammad Khan
26
+ Richard Laugesen
27
+ Derek Lewis
28
+ Jan Molic
29
+ George Moschovitis
30
+ Michael Neumann
31
+ Tim Pease
32
+ Jonas Pfenniger
33
+ Ryan Platte
34
+ Oliver Renaud
35
+ Tyler Rick
36
+ Christoph Rippel
37
+ Daniel Schierbeck
38
+ Louis J Scoras
39
+ Gavin Sinclair
40
+ Tilo Sloboda
41
+ Phil Tomson
42
+ Peter Vanbroekhoven
43
+ Jim Weirich
44
+ Jeff Wood
45
+ Erik Veenstra
46
+ Austin Ziegler
47
+ Why The Lucky Stiff
48
+
@@ -0,0 +1,8 @@
1
+ Facets is a large collection of core extension methods
2
+ and standard additions for the Ruby programming language.
3
+ The core extensions are unique by virtue of thier atomicity.
4
+ Methods are stored in small, tightly related collections,
5
+ allowing for highly granular control of requirements.
6
+ The modules include a variety of useful classes, mixins
7
+ and microframeworks, from the Functor to a complete
8
+ Annotations system.
@@ -15,18 +15,24 @@ description :
15
15
  and microframeworks, from the Functor to a complete
16
16
  Annotations system.
17
17
 
18
+ project : facets
18
19
  author : Thomas Sawyer <transfire@gmail.com>
19
20
  email : facets-universal@rubyforge.org
20
21
  homepage : 'http://facets.rubyforge.org'
21
22
  download : 'http://rubyforge.org/projects/facets'
22
23
 
23
- # Packaging Information
24
-
25
- gem_paths:
24
+ loadpath :
26
25
  - lib/core
27
26
  - lib/more
27
+ - lib/class
28
+ - lib/mixin
29
+
30
+ #libpath:
31
+ # - lib/core/facets
32
+ # - lib/more/facets
33
+
34
+ # Packaging Information
28
35
 
36
+ exclude : [ work, doc, pkg, site ]
29
37
  document : false
30
- manifest : meta/MANIFEST
31
- exclude : [ dev, doc, pkg ]
32
38
 
@@ -7,7 +7,7 @@
7
7
  # If you want to change these, you can supply command
8
8
  # line paramters for '--prefix' and/or '--sitedir'.
9
9
 
10
- LIBPATHS = ['lib/core', 'lib/more', 'lib/methods']
10
+ LIBPATHS = ['lib/core', 'lib/more', 'lib/class', 'lib/mixin']
11
11
 
12
12
  require 'rbconfig'
13
13
  require 'fileutils'
@@ -92,5 +92,7 @@ end
92
92
  def noharm?; @noharm; end
93
93
 
94
94
  # Start installation.
95
- start_install
95
+ if $0 == __FILE__
96
+ start_install
97
+ end
96
98
 
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ puts "Our apologies. RDocs are temporarily unavailable."
4
+ puts "Please see http://facets.rubyforge.org in the mean time."
5
+
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Run unit tests
4
+
5
+ def test
6
+ live = ARGV.include?('--live')
7
+
8
+ unless live
9
+ $LOAD_PATH.unshift(File.expand_path('lib/core'))
10
+ $LOAD_PATH.unshift(File.expand_path('lib/more'))
11
+ $LOAD_PATH.unshift(File.expand_path('lib/class'))
12
+ $LOAD_PATH.unshift(File.expand_path('lib/mixin'))
13
+ end
14
+
15
+ puts "Ruby Version: #{RUBY_VERSION}"
16
+
17
+ if find = ARGV.select{|e| e !~ /^[-]/ }[0]
18
+ unless file?(find)
19
+ find = File.join(find, '**', 'test_*.rb')
20
+ end
21
+ else
22
+ find = 'test/**/test_*.rb'
23
+ end
24
+
25
+ files = Dir.glob(find)
26
+ files.each do |file|
27
+ next if File.directory?(file)
28
+ begin
29
+ puts "Loading: #{file}" if $DEBUG
30
+ load(file)
31
+ rescue LoadError
32
+ puts "Error loading: #{file}"
33
+ end
34
+ end
35
+ end
36
+
37
+ # Go!
38
+ if $0 == __FILE__
39
+ test
40
+ end
File without changes
File without changes
File without changes
@@ -33,3 +33,4 @@ class TestBuildingBlock < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  end
36
+
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- # Test lib/facets/linkedlist.rb
1
+ # Test facets/linkedlist.rb
2
2
 
3
3
  require 'facets/linkedlist.rb'
4
4
  require 'test/unit'
@@ -1,4 +1,6 @@
1
1
  # Test lib/facets/lrucache.rb
2
+ #
3
+ # TODO: Need test!!!!!!!
2
4
 
3
5
  require 'facets/lrucache.rb'
4
6
  require 'test/unit'
@@ -9,3 +11,4 @@ class TC_LRUCache < Test::Unit::TestCase
9
11
  end
10
12
 
11
13
  end
14
+
File without changes
File without changes
@@ -1,7 +1,6 @@
1
1
  # Test facets/recorder.rb
2
2
 
3
3
  require 'facets/recorder.rb'
4
-
5
4
  require 'test/unit'
6
5
 
7
6
  #class Object
@@ -1,10 +1,10 @@
1
1
  # Test facets/syncarray.rb
2
+ #
3
+ # TODO: Need test!!!!!!!!!
2
4
 
3
5
  require 'facets/syncarray.rb'
4
6
  require 'test/unit'
5
7
 
6
- # TODO
7
-
8
8
  class TC_SyncArray < Test::Unit::TestCase
9
9
 
10
10
  def test_01
@@ -13,5 +13,3 @@ class TC_SyncArray < Test::Unit::TestCase
13
13
 
14
14
  end
15
15
 
16
-
17
-
@@ -1,11 +1,10 @@
1
1
  # Test facets/synchash.rb
2
+ #
3
+ # TODO: Need test!!!!!
2
4
 
3
5
  require 'facets/synchash.rb'
4
-
5
6
  require 'test/unit'
6
7
 
7
- # TODO
8
-
9
8
  class TC_SyncHash < Test::Unit::TestCase
10
9
 
11
10
  def test_01
@@ -15,4 +14,3 @@ class TC_SyncHash < Test::Unit::TestCase
15
14
  end
16
15
 
17
16
 
18
-
@@ -1,7 +1,6 @@
1
1
  # Test facets/timer.rb
2
2
 
3
3
  require 'facets/timer.rb'
4
-
5
4
  require 'test/unit'
6
5
 
7
6
  class TC_Timer < Test::Unit::TestCase
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
- # Test for facets/binding/cflow.rb
1
+ # Test for facets/binding/caller.rb
2
2
 
3
- require 'facets/binding/cflow.rb'
3
+ require 'facets/binding/caller.rb'
4
4
 
5
5
  require 'test/unit'
6
6
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,33 @@
1
+ require 'test/unit'
2
+ require 'facets/hash/collate'
3
+
4
+ class TestHashCollation < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @a = { :a=>1, :b=>2, :z=>26, :all=>%w|a b z|, :stuff1=>%w|foo bar|, :whee=>%w|a b| }
8
+ @b = { :a=>1, :b=>4, :c=>9, :all=>%w|a b c|, :stuff2=>%w|jim jam|, :whee=>%w|a b| }
9
+ @c = { :a=>1, :b=>8, :c=>27 }
10
+ end
11
+
12
+ def test_defaults
13
+ collated = @a.collate(@b)
14
+ assert_equal( 8, collated.keys.length, "There are 7 unique keys" )
15
+ assert_equal( [1,1], collated[ :a ] )
16
+ assert_equal( [2,4], collated[ :b ] )
17
+ assert_equal( [9], collated[ :c ] )
18
+ assert_equal( [26], collated[ :z ] )
19
+ assert_equal( %w|a b z a b c|, collated[ :all ], "Arrays are merged by default." )
20
+ assert_equal( %w|foo bar|, collated[ :stuff1 ] )
21
+ assert_equal( %w|jim jam|, collated[ :stuff2 ] )
22
+ assert_equal( %w|a b a b|, collated[ :whee ] )
23
+ end
24
+
25
+ def test_multi_collate
26
+ collated = @a.collate(@b).collate(@c)
27
+ assert_equal( [1,1,1], collated[ :a ] )
28
+ assert_equal( [2,4,8], collated[ :b ] )
29
+ assert_equal( [9,27], collated[ :c ] )
30
+ end
31
+
32
+ end
33
+
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes