facets 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/NOTES +14 -1
- data/Rakefile +26 -0
- data/demo/bench/general/bench_calls.rb +74 -0
- data/demo/bench/general/bench_includes.rb +25 -0
- data/demo/bench/general/bench_methods.rb +17 -0
- data/demo/bench/general/bench_pathname.rb +24 -0
- data/demo/bench/general/bench_range.rb +64 -0
- data/demo/bench/general/bench_return.rb +56 -0
- data/demo/bench/general/bench_yeild.rb +75 -0
- data/lib/{more → class}/facets/association.rb +0 -0
- data/lib/{more → class}/facets/autoarray.rb +0 -0
- data/lib/{more → class}/facets/basicobject.rb +0 -0
- data/lib/{more → class}/facets/buildingblock.rb +0 -44
- data/lib/{more → class}/facets/cachedelegator.rb +3 -0
- data/lib/{more → class}/facets/coroutine.rb +0 -56
- data/lib/{more → class}/facets/dictionary.rb +0 -0
- data/lib/{more → class}/facets/downloader.rb +0 -0
- data/lib/{more → class}/facets/filelist.rb +0 -0
- data/lib/{more → class}/facets/fileshell.rb +0 -0
- data/lib/{more → class}/facets/hashbuilder.rb +0 -0
- data/lib/{more → class}/facets/heap.rb +0 -0
- data/lib/{more → class}/facets/infinity.rb +0 -46
- data/lib/{more → class}/facets/interval.rb +0 -0
- data/lib/{more → class}/facets/ioredirect.rb +0 -0
- data/lib/{more → class}/facets/linkedlist.rb +0 -42
- data/lib/{more → class}/facets/lrucache.rb +0 -23
- data/lib/{more → class}/facets/minitar.rb +0 -0
- data/lib/{more → class}/facets/nackclass.rb +0 -0
- data/lib/{more → class}/facets/nullclass.rb +0 -0
- data/lib/{more → class}/facets/opencascade.rb +0 -70
- data/lib/{more → class}/facets/opencollection.rb +0 -0
- data/lib/class/facets/openhash.rb +41 -0
- data/lib/{more → class}/facets/openobject.rb +0 -121
- data/lib/{more → class}/facets/orderedhash.rb +0 -0
- data/lib/{more → class}/facets/pathlist.rb +0 -0
- data/lib/{more → class}/facets/pool.rb +0 -0
- data/lib/{more → class}/facets/pqueue.rb +0 -0
- data/lib/{more → class}/facets/progressbar.rb +0 -0
- data/lib/{more → class}/facets/recorder.rb +0 -40
- data/lib/{more → class}/facets/reference.rb +0 -0
- data/lib/{more → class}/facets/rwdelegator.rb +0 -0
- data/lib/{more → class}/facets/semaphore.rb +0 -0
- data/lib/{more → class}/facets/syncarray.rb +0 -24
- data/lib/{more → class}/facets/synchash.rb +1 -25
- data/lib/{more → class}/facets/timer.rb +0 -62
- data/lib/{more → class}/facets/tuple.rb +0 -60
- data/lib/{more → class}/facets/version.rb +0 -0
- data/lib/core/facets/dir/multiglob.rb +20 -5
- data/lib/core/facets/enumerable/cartesian.rb +2 -2
- data/lib/core/facets/enumerable/combination.rb +9 -1
- data/lib/core/facets/kernel/object.rb +1 -1
- data/lib/{more → mixin}/facets/binreadable.rb +0 -62
- data/lib/{more → mixin}/facets/buildable.rb +0 -48
- data/lib/mixin/facets/cloneable.rb +90 -0
- data/lib/{more → mixin}/facets/enumerablepass.rb +0 -81
- data/lib/{more → mixin}/facets/expirable.rb +0 -0
- data/lib/{more → mixin}/facets/fileable.rb +0 -0
- data/lib/{more → mixin}/facets/instantiable.rb +0 -30
- data/lib/{more → mixin}/facets/multiton.rb +0 -0
- data/lib/{more → mixin}/facets/registerable.rb +0 -0
- data/lib/mixin/facets/tasksystem.rb +350 -0
- data/lib/{more → mixin}/facets/uninheritable.rb +1 -39
- data/lib/{more → mixin}/facets/validation.rb +0 -0
- data/lib/more/facets/arguments.rb +0 -66
- data/lib/more/facets/attributes.rb +0 -35
- data/lib/more/facets/bbcode.rb +1 -31
- data/lib/more/facets/bytes.rb +0 -80
- data/lib/more/facets/class_extension.rb +0 -66
- data/lib/more/facets/classmethods.rb +0 -64
- data/lib/more/facets/compare_on.rb +0 -52
- data/lib/more/facets/curry.rb +0 -29
- data/lib/more/facets/cut.rb +0 -27
- data/lib/more/facets/date.rb +0 -54
- data/lib/more/facets/dependency.rb +0 -70
- data/lib/more/facets/elementor.rb +0 -67
- data/lib/more/facets/getoptlong.rb +0 -30
- data/lib/more/facets/{hash_keyize.rb → hash/keyize.rb} +0 -0
- data/lib/more/facets/inheritor.rb +0 -150
- data/lib/more/facets/instantise.rb +0 -41
- data/lib/more/facets/let.rb +0 -20
- data/lib/more/facets/memoize.rb +0 -45
- data/lib/more/facets/multipliers.rb +0 -110
- data/lib/more/facets/ostruct.rb +0 -124
- data/lib/more/facets/random.rb +0 -153
- data/lib/more/facets/rbconfig.rb +55 -0
- data/lib/more/facets/set.rb +27 -0
- data/lib/more/facets/snapshot.rb +0 -30
- data/lib/more/facets/stylize.rb +0 -147
- data/lib/more/facets/times.rb +0 -98
- data/lib/more/facets/tracepoint.rb +194 -0
- data/lib/more/facets/typecast.rb +0 -63
- data/lib/more/facets/ziputils.rb +7 -0
- data/log/Changelog-0.txt +239 -0
- data/log/Changelog-1.txt +450 -0
- data/log/Changelog.txt +841 -0
- data/log/Fixme.txt +18 -0
- data/log/Testlog.txt +188 -0
- data/log/Todo.txt +326 -0
- data/meta/MANIFEST +1 -1
- data/meta/VERSION +1 -0
- data/meta/authors +48 -0
- data/meta/description +8 -0
- data/meta/project.yaml +11 -5
- data/task/install +4 -2
- data/task/rdoc +5 -0
- data/task/test +40 -0
- data/test/{unit → class}/test_association.rb +0 -0
- data/test/{unit → class}/test_autoarray.rb +0 -0
- data/test/{unit → class}/test_basicobject.rb +0 -0
- data/test/{unit → class}/test_buildingblock.rb +1 -0
- data/test/{unit → class}/test_coroutine.rb +0 -0
- data/test/{unit → class}/test_dictionary.rb +0 -0
- data/test/{unit → class}/test_infinity.rb +0 -0
- data/test/{unit → class}/test_interval.rb +0 -0
- data/test/{unit → class}/test_linkedlist.rb +1 -1
- data/test/{unit → class}/test_lrucache.rb +3 -0
- data/test/{unit → class}/test_opencascade.rb +0 -0
- data/test/{unit → class}/test_openobject.rb +0 -0
- data/test/{unit → class}/test_recorder.rb +0 -1
- data/test/{unit → class}/test_syncarray.rb +2 -4
- data/test/{unit → class}/test_synchash.rb +2 -4
- data/test/{unit → class}/test_timer.rb +0 -1
- data/test/{unit → class}/test_tuple.rb +0 -0
- data/test/{unit → core}/array/test_delete.rb +0 -0
- data/test/{unit → core}/array/test_indexable.rb +0 -0
- data/test/{unit → core}/array/test_merge.rb +0 -0
- data/test/{unit → core}/array/test_only.rb +0 -0
- data/test/{unit → core}/array/test_pad.rb +0 -0
- data/test/{unit → core}/array/test_rotate.rb +0 -0
- data/test/{unit → core}/array/test_select.rb +0 -0
- data/test/{unit → core}/array/test_stackable.rb +0 -0
- data/test/{unit/binding/test_cflow.rb → core/binding/test_caller.rb} +2 -2
- data/test/{unit → core}/binding/test_defined.rb +0 -0
- data/test/{unit → core}/binding/test_eval.rb +0 -0
- data/test/{unit → core}/binding/test_here.rb +0 -0
- data/test/{unit → core}/binding/test_self.rb +0 -0
- data/test/{unit → core}/binding/test_vars.rb +0 -0
- data/test/{unit → core}/class/test_descendents.rb +0 -0
- data/test/{unit → core}/class/test_initializer.rb +0 -0
- data/test/{unit → core}/class/test_remove_descendents.rb +0 -0
- data/test/{unit → core}/comparable/test_bound.rb +0 -0
- data/test/{unit → core}/comparable/test_cmp.rb +0 -0
- data/test/{unit → core}/dir/test_parent.rb +0 -0
- data/test/{unit → core}/dir/test_recurse.rb +0 -0
- data/test/{unit → core}/dir/test_traverse.rb +0 -0
- data/test/{unit → core}/enumerable/test_cartesian.rb +0 -0
- data/test/{unit → core}/enumerable/test_collect.rb +0 -0
- data/test/{unit → core}/enumerable/test_combination.rb +0 -0
- data/test/{unit → core}/enumerable/test_count.rb +0 -0
- data/test/{unit → core}/enumerable/test_each.rb +0 -0
- data/test/{unit → core}/enumerable/test_mash.rb +0 -0
- data/test/{unit → core}/enumerable/test_permutation.rb +0 -0
- data/test/{unit → core}/enumerable/test_probability.rb +0 -0
- data/test/{unit → core}/enumerable/test_split.rb +0 -0
- data/test/{unit → core}/exception/test_detail.rb +0 -0
- data/test/{unit → core}/file/test_null.rb +0 -0
- data/test/{unit → core}/file/test_read.rb +0 -0
- data/test/{unit → core}/file/test_sanitize.rb +0 -0
- data/test/{unit → core}/file/test_split_all.rb +0 -0
- data/test/{unit → core}/file/test_write.rb +0 -0
- data/test/{unit → core}/filetest/test_root.rb +0 -0
- data/test/{unit → core}/hash/test_alias.rb +0 -0
- data/test/{unit → core}/hash/test_at.rb +0 -0
- data/test/{unit → core}/hash/test_autonew.rb +0 -0
- data/test/core/hash/test_collate.rb +33 -0
- data/test/{unit → core}/hash/test_delete.rb +0 -0
- data/test/{unit → core}/hash/test_each_with_key.rb +0 -0
- data/test/{unit → core}/hash/test_has_keys.rb +0 -0
- data/test/{unit → core}/hash/test_insert.rb +0 -0
- data/test/{unit → core}/hash/test_inverse.rb +0 -0
- data/test/{unit → core}/hash/test_op.rb +0 -0
- data/test/{unit → core}/hash/test_rekey.rb +0 -0
- data/test/{unit → core}/hash/test_reverse_merge.rb +0 -0
- data/test/{unit → core}/hash/test_select.rb +0 -0
- data/test/{unit → core}/hash/test_swap.rb +0 -0
- data/test/{unit → core}/hash/test_traverse.rb +0 -0
- data/test/{unit → core}/hash/test_update.rb +0 -0
- data/test/{unit → core}/hash/test_weave.rb +0 -0
- data/test/{unit → core}/hash/test_zipnew.rb +0 -0
- data/test/{unit → core}/integer/test_bitmask.rb +0 -0
- data/test/{unit → core}/integer/test_factorial.rb +0 -0
- data/test/{unit → core}/integer/test_multiple.rb +0 -0
- data/test/{unit → core}/integer/test_of.rb +0 -0
- data/test/{unit → core}/kernel/test_callstack.rb +0 -0
- data/test/{unit → core}/kernel/test_constant.rb +0 -0
- data/test/{unit → core}/kernel/test_deepcopy.rb +0 -0
- data/test/{unit → core}/kernel/test_instance.rb +0 -0
- data/test/{unit → core}/kernel/test_metaid.rb +0 -0
- data/test/{unit → core}/kernel/test_object.rb +1 -1
- data/test/{unit → core}/kernel/test_populate.rb +0 -0
- data/test/{unit → core}/kernel/test_report.rb +0 -0
- data/test/{unit → core}/kernel/test_returning.rb +0 -0
- data/test/{unit → core}/kernel/test_silence.rb +0 -0
- data/test/{unit → core}/kernel/test_super.rb +0 -0
- data/test/{unit → core}/kernel/test_tap.rb +0 -0
- data/test/{unit → core}/kernel/test_val.rb +0 -0
- data/test/{unit → core}/kernel/test_withattr.rb +0 -0
- data/test/{unit → core}/matchdata/test_match.rb +0 -0
- data/test/{unit → core}/matchdata/test_matchset.rb +0 -0
- data/test/{unit → core}/module/test_abstract.rb +0 -0
- data/test/{unit → core}/module/test_alias.rb +0 -0
- data/test/{unit → core}/module/test_cattr.rb +0 -0
- data/test/{unit → core}/module/test_clone.rb +0 -0
- data/test/{unit → core}/module/test_include.rb +0 -0
- data/test/{unit → core}/module/test_modify.rb +0 -0
- data/test/{unit → core}/module/test_name.rb +0 -0
- data/test/{unit → core}/module/test_traits.rb +0 -0
- data/test/{unit → core}/numeric/test_round.rb +0 -0
- data/test/{unit → core}/proc/test_bind.rb +0 -0
- data/test/{unit → core}/proc/test_compose.rb +0 -0
- data/test/{unit → core}/range/test_combine.rb +0 -0
- data/test/{unit → core}/range/test_overlap.rb +0 -0
- data/test/{unit → core}/regexp/test_arity.rb +0 -0
- data/test/{unit → core}/string/test_align.rb +0 -0
- data/test/{unit → core}/string/test_blank.rb +0 -0
- data/test/{unit → core}/string/test_bracket.rb +0 -0
- data/test/{unit → core}/string/test_case.rb +0 -0
- data/test/{unit → core}/string/test_crypt.rb +0 -0
- data/test/{unit → core}/string/test_filter.rb +0 -0
- data/test/{unit → core}/string/test_indexable.rb +0 -0
- data/test/{unit → core}/string/test_interpolate.rb +0 -0
- data/test/{unit → core}/string/test_natcmp.rb +0 -0
- data/test/{unit → core}/string/test_nchar.rb +0 -0
- data/test/{unit → core}/string/test_op.rb +0 -0
- data/test/{unit → core}/string/test_partitions.rb +0 -0
- data/test/{unit → core}/string/test_range.rb +0 -0
- data/test/{unit → core}/string/test_regesc.rb +0 -0
- data/test/{unit → core}/string/test_scan.rb +0 -0
- data/test/{unit → core}/string/test_stackable.rb +0 -0
- data/test/{unit → core}/string/test_tabs.rb +0 -0
- data/test/{unit → core}/string/test_wrap.rb +0 -0
- data/test/{unit → core}/symbol/test_chomp.rb +0 -0
- data/test/{unit → core}/symbol/test_generate.rb +0 -0
- data/test/{unit → core}/symbol/test_not.rb +0 -0
- data/test/{unit → core}/symbol/test_shadow.rb +0 -0
- data/test/{unit → core}/symbol/test_succ.rb +0 -0
- data/test/{unit → core}/symbol/test_to_proc.rb +0 -0
- data/test/{unit → core}/test_1stclassmethod.rb +0 -0
- data/test/{unit → core}/test_boolean.rb +0 -0
- data/test/{unit → core}/test_conversion.rb +0 -0
- data/test/{unit → core}/test_functor.rb +0 -0
- data/test/{unit → core}/time/test_change.rb +0 -0
- data/test/{unit → core}/time/test_elapse.rb +0 -0
- data/test/{unit → core}/time/test_stamp.rb +0 -0
- data/test/{unit → mixin}/test_binreadable.rb +0 -0
- data/test/{unit → mixin}/test_buildable.rb +1 -0
- data/test/mixin/test_cloneable.rb +41 -0
- data/test/{unit → mixin}/test_enumerablepass.rb +0 -0
- data/test/{unit → mixin}/test_instantiable.rb +2 -1
- data/test/{unit → mixin}/test_multiton.rb +0 -0
- data/test/{unit → mixin}/test_uninheritable.rb +1 -2
- data/test/{unit → more/hash}/test_keyize.rb +1 -1
- data/test/{unit → more}/test_advice.rb +0 -0
- data/test/{unit → more}/test_annotations.rb +0 -0
- data/test/{unit → more}/test_ansicode.rb +0 -0
- data/test/{unit → more}/test_aop.rb +0 -0
- data/test/{unit → more}/test_arguments.rb +1 -0
- data/test/{unit → more}/test_attributes.rb +2 -2
- data/test/{unit → more}/test_bbcode.rb +1 -0
- data/test/{unit → more}/test_bytes.rb +1 -0
- data/test/{unit → more}/test_class_extension.rb +2 -1
- data/test/{unit → more}/test_classmethods.rb +2 -1
- data/test/{unit → more}/test_compare_on.rb +0 -1
- data/test/{unit → more}/test_continuation.rb +0 -0
- data/test/{unit → more}/test_crypt.rb +0 -0
- data/test/{unit → more}/test_curry.rb +1 -0
- data/test/{unit → more}/test_cut.rb +2 -1
- data/test/{unit → more}/test_date.rb +1 -1
- data/test/{unit → more}/test_dependency.rb +2 -2
- data/test/{unit → more}/test_elementor.rb +1 -1
- data/test/{unit → more}/test_getoptlong.rb +1 -0
- data/test/{unit → more}/test_inheritor.rb +1 -1
- data/test/{unit → more}/test_instantise.rb +2 -1
- data/test/{unit → more}/test_interface.rb +0 -0
- data/test/{unit → more}/test_let.rb +0 -1
- data/test/{unit → more}/test_memoize.rb +2 -3
- data/test/{unit → more}/test_multipliers.rb +1 -1
- data/test/{unit → more}/test_namespace.rb +0 -0
- data/test/{unit → more}/test_ostruct.rb +0 -0
- data/test/{unit → more}/test_overload.rb +0 -0
- data/test/{unit → more}/test_paramix.rb +0 -0
- data/test/{unit → more}/test_prototype.rb +0 -0
- data/test/more/test_random.rb +146 -0
- data/test/{unit → more}/test_snapshot.rb +0 -3
- data/test/{unit → more}/test_stylize.rb +1 -2
- data/test/{unit → more}/test_thread.rb +0 -0
- data/test/{unit → more}/test_times.rb +2 -2
- data/test/{unit → more}/test_typecast.rb +0 -3
- metadata +1117 -1098
- data/lib/more/facets/cloneable.rb +0 -75
- data/log/changelog.txt +0 -0
- data/meta/facets.roll +0 -4
- data/meta/google_ad.html +0 -15
- data/meta/icli.yaml +0 -17
- data/task/changes +0 -29
- data/task/clean +0 -17
- data/task/clobber/package +0 -10
- data/task/log +0 -17
- data/task/prepare +0 -7
- data/task/publish +0 -43
- data/task/release +0 -10
- data/task/stamp +0 -33
- data/task/stats +0 -138
- data/task/test/cross +0 -309
- data/task/test/each +0 -42
- data/task/test/load +0 -30
- data/task/test/pairs +0 -50
- data/task/test/solo +0 -294
- data/task/test/syntax +0 -31
- data/task/test/whole +0 -34
- data/test/unit/hash/test_collate.rb +0 -31
- data/test/unit/test_random.rb +0 -149
data/meta/MANIFEST
CHANGED
data/meta/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.0 stable (2008-02-18)
|
data/meta/authors
ADDED
@@ -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
|
+
|
data/meta/description
ADDED
@@ -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.
|
data/meta/project.yaml
CHANGED
@@ -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
|
-
|
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
|
|
data/task/install
CHANGED
@@ -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/
|
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
|
-
|
95
|
+
if $0 == __FILE__
|
96
|
+
start_install
|
97
|
+
end
|
96
98
|
|
data/task/rdoc
ADDED
data/task/test
ADDED
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
-
|
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
|
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
|
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
|
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
|
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
|