facets 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ProjectInfo +22 -34
- metadata +37 -895
- data/CHANGELOG +0 -254
- data/Rakefile +0 -173
- data/TODO +0 -46
- data/conf/facets/noauto +0 -48
- data/data/facets/index.yml +0 -446
- data/lib/facet/array.rb +0 -33
- data/lib/facet/array/at_rand.rb +0 -52
- data/lib/facet/array/body.rb +0 -2
- data/lib/facet/array/delete_unless.rb +0 -35
- data/lib/facet/array/delete_values.rb +0 -38
- data/lib/facet/array/delete_values_at.rb +0 -57
- data/lib/facet/array/each_with_key.rb +0 -9
- data/lib/facet/array/first.rb +0 -84
- data/lib/facet/array/foot.rb +0 -2
- data/lib/facet/array/head.rb +0 -80
- data/lib/facet/array/last.rb +0 -2
- data/lib/facet/array/last_index.rb +0 -35
- data/lib/facet/array/merge.rb +0 -40
- data/lib/facet/array/mid.rb +0 -50
- data/lib/facet/array/middle.rb +0 -45
- data/lib/facet/array/op_fetch.rb +0 -40
- data/lib/facet/array/op_store.rb +0 -47
- data/lib/facet/array/pick.rb +0 -68
- data/lib/facet/array/pos.rb +0 -39
- data/lib/facet/array/pull.rb +0 -37
- data/lib/facet/array/rand_index.rb +0 -30
- data/lib/facet/array/rand_subset.rb +0 -56
- data/lib/facet/array/range.rb +0 -47
- data/lib/facet/array/rotate.rb +0 -67
- data/lib/facet/array/select.rb +0 -37
- data/lib/facet/array/shuffle.rb +0 -66
- data/lib/facet/array/slap.rb +0 -37
- data/lib/facet/array/store.rb +0 -7
- data/lib/facet/array/tail.rb +0 -2
- data/lib/facet/array/thru.rb +0 -38
- data/lib/facet/array/to_b.rb +0 -31
- data/lib/facet/array/to_h.rb +0 -57
- data/lib/facet/array/to_hash.rb +0 -46
- data/lib/facet/array/unzip.rb +0 -20
- data/lib/facet/binding.rb +0 -14
- data/lib/facet/binding/__DIR__.rb +0 -2
- data/lib/facet/binding/__FILE__.rb +0 -2
- data/lib/facet/binding/__LINE__.rb +0 -58
- data/lib/facet/binding/call_stack.rb +0 -42
- data/lib/facet/binding/called.rb +0 -41
- data/lib/facet/binding/caller.rb +0 -42
- data/lib/facet/binding/defined.rb +0 -41
- data/lib/facet/binding/eval.rb +0 -42
- data/lib/facet/binding/local_variables.rb +0 -45
- data/lib/facet/binding/method_name.rb +0 -48
- data/lib/facet/binding/op_fetch.rb +0 -45
- data/lib/facet/binding/op_store.rb +0 -46
- data/lib/facet/binding/self.rb +0 -41
- data/lib/facet/binding/self/of_caller.rb +0 -122
- data/lib/facet/class.rb +0 -5
- data/lib/facet/class/by_name.rb +0 -1
- data/lib/facet/class/descendents.rb +0 -44
- data/lib/facet/class/remove_descendents.rb +0 -46
- data/lib/facet/class/remove_subclasses.rb +0 -2
- data/lib/facet/class/subclasses.rb +0 -2
- data/lib/facet/comparable.rb +0 -5
- data/lib/facet/comparable/at_least.rb +0 -53
- data/lib/facet/comparable/at_most.rb +0 -2
- data/lib/facet/comparable/cap.rb +0 -2
- data/lib/facet/comparable/clip.rb +0 -72
- data/lib/facet/comparable/cmp.rb +0 -38
- data/lib/facet/continuation.rb +0 -1
- data/lib/facet/continuation/self/create.rb +0 -71
- data/lib/facet/date.rb +0 -0
- data/lib/facet/date/days_in_month.rb +0 -42
- data/lib/facet/date/days_of_month.rb +0 -34
- data/lib/facet/date/stamp.rb +0 -52
- data/lib/facet/date/to_date.rb +0 -36
- data/lib/facet/date/to_s.rb +0 -33
- data/lib/facet/date/to_time.rb +0 -36
- data/lib/facet/dir.rb +0 -4
- data/lib/facet/dir/self/ancestor.rb +0 -33
- data/lib/facet/dir/self/ascend.rb +0 -56
- data/lib/facet/dir/self/ls_r.rb +0 -76
- data/lib/facet/dir/self/recurse.rb +0 -2
- data/lib/facet/enumerable.rb +0 -38
- data/lib/facet/enumerable/collect_with_counter.rb +0 -2
- data/lib/facet/enumerable/collect_with_index.rb +0 -51
- data/lib/facet/enumerable/commonality.rb +0 -63
- data/lib/facet/enumerable/compact_collect.rb +0 -50
- data/lib/facet/enumerable/compact_map.rb +0 -2
- data/lib/facet/enumerable/cross.rb +0 -44
- data/lib/facet/enumerable/each_by.rb +0 -2
- data/lib/facet/enumerable/each_combination.rb +0 -59
- data/lib/facet/enumerable/each_pair.rb +0 -50
- data/lib/facet/enumerable/each_permutation.rb +0 -2
- data/lib/facet/enumerable/each_slice.rb +0 -131
- data/lib/facet/enumerable/each_unique_pair.rb +0 -66
- data/lib/facet/enumerable/each_with_counter.rb +0 -8
- data/lib/facet/enumerable/elementwise.rb +0 -2
- data/lib/facet/enumerable/entropy.rb +0 -52
- data/lib/facet/enumerable/every.rb +0 -65
- data/lib/facet/enumerable/ew.rb +0 -64
- data/lib/facet/enumerable/filter_collect.rb +0 -58
- data/lib/facet/enumerable/filter_map.rb +0 -2
- data/lib/facet/enumerable/find_collisions.rb +0 -41
- data/lib/facet/enumerable/frequency.rb +0 -39
- data/lib/facet/enumerable/graph.rb +0 -59
- data/lib/facet/enumerable/ideal_entropy.rb +0 -49
- data/lib/facet/enumerable/map_with_counter.rb +0 -2
- data/lib/facet/enumerable/map_with_index.rb +0 -2
- data/lib/facet/enumerable/none.rb +0 -56
- data/lib/facet/enumerable/nonuniq.rb +0 -39
- data/lib/facet/enumerable/occur.rb +0 -62
- data/lib/facet/enumerable/one.rb +0 -65
- data/lib/facet/enumerable/op_pow.rb +0 -38
- data/lib/facet/enumerable/partition_by.rb +0 -55
- data/lib/facet/enumerable/permute.rb +0 -135
- data/lib/facet/enumerable/probability.rb +0 -59
- data/lib/facet/enumerable/project.rb +0 -11
- data/lib/facet/enumerable/self/combinations.rb +0 -68
- data/lib/facet/enumerable/self/cross.rb +0 -79
- data/lib/facet/enumerable/to_h.rb +0 -50
- data/lib/facet/enumerable/uniq_by.rb +0 -39
- data/lib/facet/enumerable/where.rb +0 -12
- data/lib/facet/file.rb +0 -5
- data/lib/facet/file/self/create.rb +0 -52
- data/lib/facet/file/self/open_as_string.rb +0 -81
- data/lib/facet/file/self/read_list.rb +0 -47
- data/lib/facet/file/self/sanitize.rb +0 -50
- data/lib/facet/file/self/split_all.rb +0 -36
- data/lib/facet/fileutils.rb +0 -0
- data/lib/facet/fileutils/head.rb +0 -2
- data/lib/facet/fileutils/safe_ln.rb +0 -38
- data/lib/facet/fileutils/slice.rb +0 -152
- data/lib/facet/fileutils/split_all.rb +0 -29
- data/lib/facet/fileutils/tail.rb +0 -2
- data/lib/facet/fileutils/wc.rb +0 -128
- data/lib/facet/fileutils/whereis.rb +0 -76
- data/lib/facet/fileutils/which.rb +0 -117
- data/lib/facet/float.rb +0 -3
- data/lib/facet/float/approx.rb +0 -42
- data/lib/facet/float/round_at.rb +0 -72
- data/lib/facet/float/round_to.rb +0 -73
- data/lib/facet/hash.rb +0 -40
- data/lib/facet/hash/alias.rb +0 -54
- data/lib/facet/hash/assert_has_keys.rb +0 -38
- data/lib/facet/hash/assert_has_only_keys.rb +0 -38
- data/lib/facet/hash/at.rb +0 -26
- data/lib/facet/hash/collate.rb +0 -53
- data/lib/facet/hash/delete_unless.rb +0 -15
- data/lib/facet/hash/each.rb +0 -61
- data/lib/facet/hash/each_with_index.rb +0 -35
- data/lib/facet/hash/each_with_key.rb +0 -32
- data/lib/facet/hash/graph.rb +0 -31
- data/lib/facet/hash/has_keys.rb +0 -37
- data/lib/facet/hash/has_only_keys.rb +0 -37
- data/lib/facet/hash/inverse.rb +0 -51
- data/lib/facet/hash/join.rb +0 -19
- data/lib/facet/hash/keys_to_iv.rb +0 -60
- data/lib/facet/hash/keys_to_s.rb +0 -80
- data/lib/facet/hash/keys_to_sym.rb +0 -91
- data/lib/facet/hash/op_fetch.rb +0 -146
- data/lib/facet/hash/op_lshift.rb +0 -28
- data/lib/facet/hash/op_store.rb +0 -2
- data/lib/facet/hash/rand_key.rb +0 -47
- data/lib/facet/hash/rand_pair.rb +0 -50
- data/lib/facet/hash/rand_value.rb +0 -60
- data/lib/facet/hash/replace_each.rb +0 -33
- data/lib/facet/hash/self/zipnew.rb +0 -37
- data/lib/facet/hash/shuffle.rb +0 -53
- data/lib/facet/hash/slice.rb +0 -33
- data/lib/facet/hash/stringify_keys.rb +0 -2
- data/lib/facet/hash/swap.rb +0 -36
- data/lib/facet/hash/swapkey.rb +0 -44
- data/lib/facet/hash/symoblize_keys.rb +0 -2
- data/lib/facet/hash/to_h.rb +0 -35
- data/lib/facet/hash/to_ostruct.rb +0 -40
- data/lib/facet/hash/to_ostruct_recurse.rb +0 -45
- data/lib/facet/hash/traverse.rb +0 -63
- data/lib/facet/hash/update_each.rb +0 -43
- data/lib/facet/hash/update_keys.rb +0 -31
- data/lib/facet/hash/update_values.rb +0 -32
- data/lib/facet/hash/variablize_keys.rb +0 -2
- data/lib/facet/hash/weave.rb +0 -88
- data/lib/facet/integer.rb +0 -8
- data/lib/facet/integer/even.rb +0 -2
- data/lib/facet/integer/fac.rb +0 -2
- data/lib/facet/integer/fact.rb +0 -2
- data/lib/facet/integer/factorial.rb +0 -61
- data/lib/facet/integer/multiple.rb +0 -69
- data/lib/facet/integer/odd.rb +0 -2
- data/lib/facet/integer/ordinal.rb +0 -41
- data/lib/facet/integer/times_collect.rb +0 -39
- data/lib/facet/integer/times_map.rb +0 -2
- data/lib/facet/kernel.rb +0 -65
- data/lib/facet/kernel/__DIR__.rb +0 -11
- data/lib/facet/kernel/__class__.rb +0 -31
- data/lib/facet/kernel/__meta__.rb +0 -28
- data/lib/facet/kernel/adhoc.rb +0 -11
- data/lib/facet/kernel/as.rb +0 -91
- data/lib/facet/kernel/assign_from.rb +0 -82
- data/lib/facet/kernel/assign_with.rb +0 -75
- data/lib/facet/kernel/autoreload.rb +0 -46
- data/lib/facet/kernel/autoreload_glob.rb +0 -36
- data/lib/facet/kernel/bool.rb +0 -77
- data/lib/facet/kernel/bug.rb +0 -39
- data/lib/facet/kernel/call_stack.rb +0 -59
- data/lib/facet/kernel/called.rb +0 -40
- data/lib/facet/kernel/complete.rb +0 -6
- data/lib/facet/kernel/constant.rb +0 -52
- data/lib/facet/kernel/copy.rb +0 -48
- data/lib/facet/kernel/deep_copy.rb +0 -49
- data/lib/facet/kernel/demo.rb +0 -46
- data/lib/facet/kernel/eigenclass.rb +0 -17
- data/lib/facet/kernel/false.rb +0 -2
- data/lib/facet/kernel/fn.rb +0 -33
- data/lib/facet/kernel/generate_method_name.rb +0 -39
- data/lib/facet/kernel/get_by_id.rb +0 -33
- data/lib/facet/kernel/here.rb +0 -34
- data/lib/facet/kernel/in.rb +0 -35
- data/lib/facet/kernel/instance_assign.rb +0 -25
- data/lib/facet/kernel/instvar.rb +0 -13
- data/lib/facet/kernel/is.rb +0 -5
- data/lib/facet/kernel/maybe.rb +0 -41
- data/lib/facet/kernel/me.rb +0 -17
- data/lib/facet/kernel/meta.rb +0 -2
- data/lib/facet/kernel/metaclass.rb +0 -42
- data/lib/facet/kernel/method.rb +0 -76
- data/lib/facet/kernel/method_name.rb +0 -49
- data/lib/facet/kernel/methods.rb +0 -79
- data/lib/facet/kernel/nack.rb +0 -12
- data/lib/facet/kernel/new.rb +0 -40
- data/lib/facet/kernel/object_class.rb +0 -31
- data/lib/facet/kernel/object_hexid.rb +0 -35
- data/lib/facet/kernel/op_esc.rb +0 -37
- data/lib/facet/kernel/own.rb +0 -17
- data/lib/facet/kernel/p.rb +0 -12
- data/lib/facet/kernel/require_all.rb +0 -44
- data/lib/facet/kernel/require_esc.rb +0 -42
- data/lib/facet/kernel/require_facet.rb +0 -41
- data/lib/facet/kernel/require_local.rb +0 -25
- data/lib/facet/kernel/resc.rb +0 -32
- data/lib/facet/kernel/returning.rb +0 -49
- data/lib/facet/kernel/send_as.rb +0 -34
- data/lib/facet/kernel/set_from.rb +0 -69
- data/lib/facet/kernel/set_with.rb +0 -74
- data/lib/facet/kernel/silence_warnings.rb +0 -2
- data/lib/facet/kernel/silently.rb +0 -41
- data/lib/facet/kernel/singleton.rb +0 -47
- data/lib/facet/kernel/superior.rb +0 -53
- data/lib/facet/kernel/supermethod.rb +0 -44
- data/lib/facet/kernel/this.rb +0 -33
- data/lib/facet/kernel/to_b.rb +0 -41
- data/lib/facet/kernel/to_bool.rb +0 -47
- data/lib/facet/kernel/true.rb +0 -2
- data/lib/facet/kernel/unuri.rb +0 -2
- data/lib/facet/kernel/uri.rb +0 -38
- data/lib/facet/kernel/val.rb +0 -52
- data/lib/facet/kernel/warn_with_line.rb +0 -30
- data/lib/facet/kernel/with_accessor.rb +0 -94
- data/lib/facet/kernel/with_reader.rb +0 -2
- data/lib/facet/kernel/with_writer.rb +0 -2
- data/lib/facet/logger.rb +0 -0
- data/lib/facet/logger/format.rb +0 -28
- data/lib/facet/logger/format_message.rb +0 -1
- data/lib/facet/matchdata.rb +0 -3
- data/lib/facet/matchdata/match.rb +0 -37
- data/lib/facet/matchdata/matchset.rb +0 -2
- data/lib/facet/matchdata/matchtree.rb +0 -62
- data/lib/facet/module.rb +0 -40
- data/lib/facet/module/abstract.rb +0 -50
- data/lib/facet/module/alias_module_function.rb +0 -57
- data/lib/facet/module/ancestor.rb +0 -38
- data/lib/facet/module/attr.rb +0 -23
- data/lib/facet/module/attr_setter.rb +0 -48
- data/lib/facet/module/attr_tester.rb +0 -56
- data/lib/facet/module/basename.rb +0 -39
- data/lib/facet/module/by_name.rb +0 -68
- data/lib/facet/module/cattr_accessor.rb +0 -141
- data/lib/facet/module/cattr_reader.rb +0 -2
- data/lib/facet/module/cattr_writer.rb +0 -2
- data/lib/facet/module/clone_removing.rb +0 -2
- data/lib/facet/module/clone_renaming.rb +0 -2
- data/lib/facet/module/clone_using.rb +0 -87
- data/lib/facet/module/dirname.rb +0 -42
- data/lib/facet/module/equate_on.rb +0 -70
- data/lib/facet/module/generate_instance_method_name.rb +0 -47
- data/lib/facet/module/include_as.rb +0 -102
- data/lib/facet/module/initializer.rb +0 -65
- data/lib/facet/module/instance_methods.rb +0 -186
- data/lib/facet/module/integrate.rb +0 -51
- data/lib/facet/module/is.rb +0 -34
- data/lib/facet/module/memoize.rb +0 -95
- data/lib/facet/module/modspace.rb +0 -43
- data/lib/facet/module/namespace.rb +0 -61
- data/lib/facet/module/nesting.rb +0 -45
- data/lib/facet/module/redef.rb +0 -31
- data/lib/facet/module/redefine_method.rb +0 -57
- data/lib/facet/module/redirect.rb +0 -30
- data/lib/facet/module/redirect_method.rb +0 -64
- data/lib/facet/module/remove.rb +0 -29
- data/lib/facet/module/rename.rb +0 -31
- data/lib/facet/module/rename_method.rb +0 -38
- data/lib/facet/module/revisal.rb +0 -49
- data/lib/facet/module/shadow_all.rb +0 -17
- data/lib/facet/module/shadow_method.rb +0 -42
- data/lib/facet/module/sort_on.rb +0 -73
- data/lib/facet/module/undef.rb +0 -29
- data/lib/facet/module/wrap.rb +0 -30
- data/lib/facet/module/wrap_method.rb +0 -48
- data/lib/facet/nilclass.rb +0 -7
- data/lib/facet/nilclass/empty.rb +0 -32
- data/lib/facet/nilclass/include.rb +0 -32
- data/lib/facet/nilclass/length.rb +0 -2
- data/lib/facet/nilclass/op_fetch.rb +0 -37
- data/lib/facet/nilclass/size.rb +0 -44
- data/lib/facet/nilclass/to_f.rb +0 -32
- data/lib/facet/nilclass/to_h.rb +0 -33
- data/lib/facet/numeric.rb +0 -5
- data/lib/facet/numeric/ceil_multiple.rb +0 -40
- data/lib/facet/numeric/pred.rb +0 -2
- data/lib/facet/numeric/succ.rb +0 -69
- data/lib/facet/numeric/to_b.rb +0 -38
- data/lib/facet/ostruct.rb +0 -0
- data/lib/facet/ostruct/__merge__.rb +0 -52
- data/lib/facet/ostruct/__table__.rb +0 -17
- data/lib/facet/ostruct/__update__.rb +0 -45
- data/lib/facet/ostruct/op_fetch.rb +0 -40
- data/lib/facet/ostruct/op_store.rb +0 -42
- data/lib/facet/ostruct/to_h.rb +0 -8
- data/lib/facet/pathname.rb +0 -2
- data/lib/facet/pathname/ascend.rb +0 -22
- data/lib/facet/pathname/descend.rb +0 -20
- data/lib/facet/proc.rb +0 -3
- data/lib/facet/proc/compose.rb +0 -62
- data/lib/facet/proc/op_mul.rb +0 -2
- data/lib/facet/proc/to_method.rb +0 -74
- data/lib/facet/range.rb +0 -4
- data/lib/facet/range/to_r.rb +0 -32
- data/lib/facet/range/to_range.rb +0 -36
- data/lib/facet/range/umbrella.rb +0 -67
- data/lib/facet/range/within.rb +0 -44
- data/lib/facet/regexp.rb +0 -3
- data/lib/facet/regexp/arity.rb +0 -41
- data/lib/facet/regexp/to_re.rb +0 -38
- data/lib/facet/regexp/to_regexp.rb +0 -36
- data/lib/facet/string.rb +0 -86
- data/lib/facet/string/align_center.rb +0 -87
- data/lib/facet/string/align_left.rb +0 -2
- data/lib/facet/string/align_right.rb +0 -2
- data/lib/facet/string/at.rb +0 -8
- data/lib/facet/string/at_rand.rb +0 -65
- data/lib/facet/string/basename.rb +0 -48
- data/lib/facet/string/blank.rb +0 -36
- data/lib/facet/string/bracket.rb +0 -70
- data/lib/facet/string/brief.rb +0 -33
- data/lib/facet/string/bytes.rb +0 -19
- data/lib/facet/string/camelcase.rb +0 -58
- data/lib/facet/string/camelize.rb +0 -35
- data/lib/facet/string/capitalized.rb +0 -38
- data/lib/facet/string/chars.rb +0 -34
- data/lib/facet/string/cmp.rb +0 -43
- data/lib/facet/string/demodulize.rb +0 -40
- data/lib/facet/string/dequote.rb +0 -29
- data/lib/facet/string/downcase.rb +0 -37
- data/lib/facet/string/dresner.rb +0 -49
- data/lib/facet/string/each_char.rb +0 -35
- data/lib/facet/string/each_word.rb +0 -50
- data/lib/facet/string/ends_with.rb +0 -2
- data/lib/facet/string/first.rb +0 -94
- data/lib/facet/string/first_char.rb +0 -20
- data/lib/facet/string/fold.rb +0 -67
- data/lib/facet/string/format.rb +0 -17
- data/lib/facet/string/frequency.rb +0 -39
- data/lib/facet/string/humanize.rb +0 -31
- data/lib/facet/string/indent.rb +0 -68
- data/lib/facet/string/index_all.rb +0 -40
- data/lib/facet/string/last.rb +0 -94
- data/lib/facet/string/last_char.rb +0 -22
- data/lib/facet/string/line_wrap.rb +0 -77
- data/lib/facet/string/lines.rb +0 -33
- data/lib/facet/string/lowercase.rb +0 -32
- data/lib/facet/string/margin.rb +0 -138
- data/lib/facet/string/mscan.rb +0 -42
- data/lib/facet/string/natcmp.rb +0 -108
- data/lib/facet/string/nchar.rb +0 -45
- data/lib/facet/string/ordinal.rb +0 -16
- data/lib/facet/string/plural.rb +0 -2
- data/lib/facet/string/pop.rb +0 -54
- data/lib/facet/string/probability.rb +0 -34
- data/lib/facet/string/pull.rb +0 -17
- data/lib/facet/string/push.rb +0 -44
- data/lib/facet/string/quote.rb +0 -68
- data/lib/facet/string/rand_byte.rb +0 -55
- data/lib/facet/string/rand_index.rb +0 -29
- data/lib/facet/string/range.rb +0 -37
- data/lib/facet/string/range_all.rb +0 -48
- data/lib/facet/string/range_of_line.rb +0 -42
- data/lib/facet/string/regesc.rb +0 -32
- data/lib/facet/string/self/format.rb +0 -17
- data/lib/facet/string/self/interpolate.rb +0 -31
- data/lib/facet/string/self/patterns.rb +0 -51
- data/lib/facet/string/self/rand_letter.rb +0 -34
- data/lib/facet/string/self/random.rb +0 -36
- data/lib/facet/string/shatter.rb +0 -45
- data/lib/facet/string/shift.rb +0 -42
- data/lib/facet/string/shuffle.rb +0 -42
- data/lib/facet/string/similarity.rb +0 -108
- data/lib/facet/string/singular.rb +0 -117
- data/lib/facet/string/slap.rb +0 -44
- data/lib/facet/string/soundex.rb +0 -102
- data/lib/facet/string/starts_with.rb +0 -24
- data/lib/facet/string/succ.rb +0 -38
- data/lib/facet/string/tab.rb +0 -2
- data/lib/facet/string/tabto.rb +0 -2
- data/lib/facet/string/to_a.rb +0 -35
- data/lib/facet/string/to_arr.rb +0 -55
- data/lib/facet/string/to_b.rb +0 -64
- data/lib/facet/string/to_const.rb +0 -39
- data/lib/facet/string/to_date.rb +0 -35
- data/lib/facet/string/to_proc.rb +0 -54
- data/lib/facet/string/to_re.rb +0 -46
- data/lib/facet/string/to_rx.rb +0 -2
- data/lib/facet/string/to_time.rb +0 -34
- data/lib/facet/string/unbracket.rb +0 -46
- data/lib/facet/string/underscore.rb +0 -18
- data/lib/facet/string/unix_crypt.rb +0 -41
- data/lib/facet/string/unpack.rb +0 -45
- data/lib/facet/string/unshift.rb +0 -42
- data/lib/facet/string/upcase.rb +0 -45
- data/lib/facet/string/uppercase.rb +0 -2
- data/lib/facet/string/whitespace.rb +0 -27
- data/lib/facet/string/word_filter.rb +0 -61
- data/lib/facet/string/word_wrap.rb +0 -90
- data/lib/facet/string/words.rb +0 -45
- data/lib/facet/symbol.rb +0 -13
- data/lib/facet/symbol/camelcase.rb +0 -42
- data/lib/facet/symbol/camelize.rb +0 -33
- data/lib/facet/symbol/capitalize.rb +0 -31
- data/lib/facet/symbol/capitalized.rb +0 -33
- data/lib/facet/symbol/downcase.rb +0 -36
- data/lib/facet/symbol/not.rb +0 -40
- data/lib/facet/symbol/pad.rb +0 -43
- data/lib/facet/symbol/succ.rb +0 -42
- data/lib/facet/symbol/to_const.rb +0 -40
- data/lib/facet/symbol/to_proc.rb +0 -45
- data/lib/facet/symbol/to_str.rb +0 -39
- data/lib/facet/symbol/underscore.rb +0 -32
- data/lib/facet/symbol/upcase.rb +0 -37
- data/lib/facet/time.rb +0 -7
- data/lib/facet/time/change.rb +0 -51
- data/lib/facet/time/elapse.rb +0 -41
- data/lib/facet/time/self/days_extrema.rb +0 -22
- data/lib/facet/time/stamp.rb +0 -47
- data/lib/facet/time/to_date.rb +0 -37
- data/lib/facet/time/to_s.rb +0 -33
- data/lib/facet/time/to_time.rb +0 -36
- data/lib/facet/unboundmethod.rb +0 -1
- data/lib/facet/unboundmethod/name.rb +0 -8
- data/lib/facets.rb +0 -200
- data/lib/facets/english/bytes.rb +0 -212
- data/lib/facets/english/multipliers.rb +0 -192
- data/lib/facets/english/ormsupport.rb +0 -233
- data/lib/facets/english/time.rb +0 -327
- data/lib/facets/group/inflect.rb +0 -71
- data/lib/facets/group/nilasemptiness.rb +0 -34
- data/lib/facets/group/random.rb +0 -21
- data/lib/facets/group/stringasarray.rb +0 -16
- data/lib/facets/method/README +0 -1
- data/lib/facets/support/functor.rb +0 -49
- data/setup.rb +0 -1551
- data/test/FIXTURE/create_file +0 -1
- data/test/FIXTURE/filelist/testfile.txt +0 -0
- data/test/FIXTURE/filelist/testfile2.txt +0 -0
- data/test/FIXTURE/ls_r/A.txt +0 -0
- data/test/FIXTURE/ls_r/A/B.txt +0 -0
- data/test/FIXTURE/ls_r/A/B/C.txt +0 -0
- data/test/FIXTURE/open_as_string_file +0 -1
- data/test/FIXTURE/read_list_file +0 -6
- data/test/FIXTURE/test_file.txt +0 -25
- data/test/FIXTURE/test_file2.txt +0 -25
- data/test/lib/facet/array/test_at_rand.rb +0 -34
- data/test/lib/facet/array/test_delete_unless.rb +0 -28
- data/test/lib/facet/array/test_delete_values.rb +0 -28
- data/test/lib/facet/array/test_delete_values_at.rb +0 -31
- data/test/lib/facet/array/test_first.rb +0 -46
- data/test/lib/facet/array/test_head.rb +0 -42
- data/test/lib/facet/array/test_last_index.rb +0 -26
- data/test/lib/facet/array/test_merge.rb +0 -35
- data/test/lib/facet/array/test_mid.rb +0 -33
- data/test/lib/facet/array/test_middle.rb +0 -29
- data/test/lib/facet/array/test_op_fetch.rb +0 -27
- data/test/lib/facet/array/test_op_store.rb +0 -30
- data/test/lib/facet/array/test_pick.rb +0 -40
- data/test/lib/facet/array/test_pos.rb +0 -28
- data/test/lib/facet/array/test_pull.rb +0 -28
- data/test/lib/facet/array/test_rand_index.rb +0 -29
- data/test/lib/facet/array/test_rand_subset.rb +0 -29
- data/test/lib/facet/array/test_range.rb +0 -32
- data/test/lib/facet/array/test_rotate.rb +0 -36
- data/test/lib/facet/array/test_select.rb +0 -28
- data/test/lib/facet/array/test_shuffle.rb +0 -35
- data/test/lib/facet/array/test_slap.rb +0 -28
- data/test/lib/facet/array/test_thru.rb +0 -27
- data/test/lib/facet/array/test_to_b.rb +0 -27
- data/test/lib/facet/array/test_to_h.rb +0 -33
- data/test/lib/facet/array/test_to_hash.rb +0 -27
- data/test/lib/facet/binding/self/test_of_caller.rb +0 -35
- data/test/lib/facet/binding/test___LINE__.rb +0 -43
- data/test/lib/facet/binding/test_call_stack.rb +0 -34
- data/test/lib/facet/binding/test_called.rb +0 -30
- data/test/lib/facet/binding/test_caller.rb +0 -35
- data/test/lib/facet/binding/test_defined.rb +0 -34
- data/test/lib/facet/binding/test_eval.rb +0 -34
- data/test/lib/facet/binding/test_local_variables.rb +0 -34
- data/test/lib/facet/binding/test_method_name.rb +0 -34
- data/test/lib/facet/binding/test_op_fetch.rb +0 -34
- data/test/lib/facet/binding/test_op_store.rb +0 -35
- data/test/lib/facet/binding/test_self.rb +0 -34
- data/test/lib/facet/class/test_descendents.rb +0 -30
- data/test/lib/facet/class/test_remove_descendents.rb +0 -32
- data/test/lib/facet/comparable/test_at_least.rb +0 -34
- data/test/lib/facet/comparable/test_clip.rb +0 -44
- data/test/lib/facet/comparable/test_cmp.rb +0 -28
- data/test/lib/facet/continuation/self/test_create.rb +0 -26
- data/test/lib/facet/date/test_days_in_month.rb +0 -30
- data/test/lib/facet/date/test_days_of_month.rb +0 -30
- data/test/lib/facet/date/test_stamp.rb +0 -38
- data/test/lib/facet/date/test_to_date.rb +0 -30
- data/test/lib/facet/date/test_to_s.rb +0 -30
- data/test/lib/facet/date/test_to_time.rb +0 -30
- data/test/lib/facet/dir/self/test_ancestor.rb +0 -26
- data/test/lib/facet/dir/self/test_ascend.rb +0 -41
- data/test/lib/facet/dir/self/test_ls_r.rb +0 -52
- data/test/lib/facet/enumerable/self/test_combinations.rb +0 -43
- data/test/lib/facet/enumerable/self/test_cross.rb +0 -31
- data/test/lib/facet/enumerable/test_collect_with_index.rb +0 -27
- data/test/lib/facet/enumerable/test_commonality.rb +0 -31
- data/test/lib/facet/enumerable/test_compact_collect.rb +0 -27
- data/test/lib/facet/enumerable/test_cross.rb +0 -30
- data/test/lib/facet/enumerable/test_each_combination.rb +0 -29
- data/test/lib/facet/enumerable/test_each_pair.rb +0 -29
- data/test/lib/facet/enumerable/test_each_slice.rb +0 -74
- data/test/lib/facet/enumerable/test_each_unique_pair.rb +0 -29
- data/test/lib/facet/enumerable/test_entropy.rb +0 -26
- data/test/lib/facet/enumerable/test_every.rb +0 -35
- data/test/lib/facet/enumerable/test_ew.rb +0 -31
- data/test/lib/facet/enumerable/test_filter_collect.rb +0 -31
- data/test/lib/facet/enumerable/test_find_collisions.rb +0 -30
- data/test/lib/facet/enumerable/test_frequency.rb +0 -27
- data/test/lib/facet/enumerable/test_graph.rb +0 -30
- data/test/lib/facet/enumerable/test_ideal_entropy.rb +0 -27
- data/test/lib/facet/enumerable/test_none.rb +0 -33
- data/test/lib/facet/enumerable/test_occur.rb +0 -30
- data/test/lib/facet/enumerable/test_one.rb +0 -35
- data/test/lib/facet/enumerable/test_op_pow.rb +0 -27
- data/test/lib/facet/enumerable/test_partition_by.rb +0 -31
- data/test/lib/facet/enumerable/test_permute.rb +0 -29
- data/test/lib/facet/enumerable/test_probability.rb +0 -27
- data/test/lib/facet/enumerable/test_to_h.rb +0 -27
- data/test/lib/facet/enumerable/test_uniq_by.rb +0 -28
- data/test/lib/facet/file/self/test_create.rb +0 -39
- data/test/lib/facet/file/self/test_open_as_string.rb +0 -40
- data/test/lib/facet/file/self/test_read_list.rb +0 -37
- data/test/lib/facet/file/self/test_sanitize.rb +0 -46
- data/test/lib/facet/file/self/test_split_all.rb +0 -27
- data/test/lib/facet/fileutils/test_slice.rb +0 -96
- data/test/lib/facet/fileutils/test_wc.rb +0 -68
- data/test/lib/facet/fileutils/test_which.rb +0 -61
- data/test/lib/facet/float/test_approx.rb +0 -28
- data/test/lib/facet/float/test_round_at.rb +0 -46
- data/test/lib/facet/float/test_round_to.rb +0 -46
- data/test/lib/facet/hash/self/test_zipnew.rb +0 -28
- data/test/lib/facet/hash/test_alias.rb +0 -31
- data/test/lib/facet/hash/test_assert_has_keys.rb +0 -27
- data/test/lib/facet/hash/test_assert_has_only_keys.rb +0 -27
- data/test/lib/facet/hash/test_at.rb +0 -28
- data/test/lib/facet/hash/test_collate.rb +0 -35
- data/test/lib/facet/hash/test_each.rb +0 -36
- data/test/lib/facet/hash/test_each_with_index.rb +0 -29
- data/test/lib/facet/hash/test_each_with_key.rb +0 -29
- data/test/lib/facet/hash/test_graph.rb +0 -28
- data/test/lib/facet/hash/test_has_keys.rb +0 -27
- data/test/lib/facet/hash/test_has_only_keys.rb +0 -27
- data/test/lib/facet/hash/test_inverse.rb +0 -28
- data/test/lib/facet/hash/test_keys_to_s.rb +0 -34
- data/test/lib/facet/hash/test_keys_to_sym.rb +0 -34
- data/test/lib/facet/hash/test_op_fetch.rb +0 -111
- data/test/lib/facet/hash/test_op_lshift.rb +0 -29
- data/test/lib/facet/hash/test_rand_key.rb +0 -27
- data/test/lib/facet/hash/test_rand_pair.rb +0 -27
- data/test/lib/facet/hash/test_rand_value.rb +0 -27
- data/test/lib/facet/hash/test_replace_each.rb +0 -29
- data/test/lib/facet/hash/test_shuffle.rb +0 -32
- data/test/lib/facet/hash/test_slice.rb +0 -27
- data/test/lib/facet/hash/test_swap.rb +0 -27
- data/test/lib/facet/hash/test_swapkey.rb +0 -29
- data/test/lib/facet/hash/test_to_h.rb +0 -27
- data/test/lib/facet/hash/test_to_ostruct.rb +0 -30
- data/test/lib/facet/hash/test_to_ostruct_recurse.rb +0 -30
- data/test/lib/facet/hash/test_traverse.rb +0 -37
- data/test/lib/facet/hash/test_update_each.rb +0 -29
- data/test/lib/facet/hash/test_update_keys.rb +0 -28
- data/test/lib/facet/hash/test_update_values.rb +0 -28
- data/test/lib/facet/hash/test_weave.rb +0 -29
- data/test/lib/facet/integer/test_factorial.rb +0 -30
- data/test/lib/facet/integer/test_multiple.rb +0 -43
- data/test/lib/facet/integer/test_ordinal.rb +0 -29
- data/test/lib/facet/integer/test_times_collect.rb +0 -28
- data/test/lib/facet/kernel/test___class__.rb +0 -26
- data/test/lib/facet/kernel/test_as.rb +0 -42
- data/test/lib/facet/kernel/test_assign_from.rb +0 -31
- data/test/lib/facet/kernel/test_assign_with.rb +0 -31
- data/test/lib/facet/kernel/test_bool.rb +0 -41
- data/test/lib/facet/kernel/test_bug.rb +0 -26
- data/test/lib/facet/kernel/test_call_stack.rb +0 -26
- data/test/lib/facet/kernel/test_called.rb +0 -26
- data/test/lib/facet/kernel/test_constant.rb +0 -33
- data/test/lib/facet/kernel/test_copy.rb +0 -40
- data/test/lib/facet/kernel/test_deep_copy.rb +0 -40
- data/test/lib/facet/kernel/test_demo.rb +0 -28
- data/test/lib/facet/kernel/test_fn.rb +0 -26
- data/test/lib/facet/kernel/test_generate_method_name.rb +0 -26
- data/test/lib/facet/kernel/test_get_by_id.rb +0 -28
- data/test/lib/facet/kernel/test_here.rb +0 -26
- data/test/lib/facet/kernel/test_in.rb +0 -27
- data/test/lib/facet/kernel/test_maybe.rb +0 -26
- data/test/lib/facet/kernel/test_metaclass.rb +0 -34
- data/test/lib/facet/kernel/test_method.rb +0 -32
- data/test/lib/facet/kernel/test_method_name.rb +0 -31
- data/test/lib/facet/kernel/test_methods.rb +0 -50
- data/test/lib/facet/kernel/test_new.rb +0 -30
- data/test/lib/facet/kernel/test_object_class.rb +0 -26
- data/test/lib/facet/kernel/test_object_hexid.rb +0 -27
- data/test/lib/facet/kernel/test_require_all.rb +0 -26
- data/test/lib/facet/kernel/test_require_esc.rb +0 -27
- data/test/lib/facet/kernel/test_require_facet.rb +0 -27
- data/test/lib/facet/kernel/test_resc.rb +0 -27
- data/test/lib/facet/kernel/test_returning.rb +0 -30
- data/test/lib/facet/kernel/test_send_as.rb +0 -26
- data/test/lib/facet/kernel/test_set_from.rb +0 -33
- data/test/lib/facet/kernel/test_set_with.rb +0 -33
- data/test/lib/facet/kernel/test_silently.rb +0 -28
- data/test/lib/facet/kernel/test_singleton.rb +0 -40
- data/test/lib/facet/kernel/test_superior.rb +0 -30
- data/test/lib/facet/kernel/test_supermethod.rb +0 -33
- data/test/lib/facet/kernel/test_this.rb +0 -26
- data/test/lib/facet/kernel/test_to_b.rb +0 -28
- data/test/lib/facet/kernel/test_to_bool.rb +0 -28
- data/test/lib/facet/kernel/test_uri.rb +0 -30
- data/test/lib/facet/kernel/test_val.rb +0 -43
- data/test/lib/facet/kernel/test_with_accessor.rb +0 -51
- data/test/lib/facet/matchdata/test_match.rb +0 -29
- data/test/lib/facet/matchdata/test_matchtree.rb +0 -32
- data/test/lib/facet/module/test_abstract.rb +0 -36
- data/test/lib/facet/module/test_alias_module_function.rb +0 -34
- data/test/lib/facet/module/test_ancestor.rb +0 -26
- data/test/lib/facet/module/test_basename.rb +0 -26
- data/test/lib/facet/module/test_by_name.rb +0 -29
- data/test/lib/facet/module/test_cattr_accessor.rb +0 -55
- data/test/lib/facet/module/test_clone_using.rb +0 -55
- data/test/lib/facet/module/test_dirname.rb +0 -26
- data/test/lib/facet/module/test_equate_on.rb +0 -37
- data/test/lib/facet/module/test_generate_instance_method_name.rb +0 -33
- data/test/lib/facet/module/test_include_as.rb +0 -35
- data/test/lib/facet/module/test_initializer.rb +0 -32
- data/test/lib/facet/module/test_instance_methods.rb +0 -59
- data/test/lib/facet/module/test_integrate.rb +0 -35
- data/test/lib/facet/module/test_memoize.rb +0 -50
- data/test/lib/facet/module/test_modspace.rb +0 -27
- data/test/lib/facet/module/test_namespace.rb +0 -33
- data/test/lib/facet/module/test_nesting.rb +0 -36
- data/test/lib/facet/module/test_redef.rb +0 -30
- data/test/lib/facet/module/test_redefine_method.rb +0 -30
- data/test/lib/facet/module/test_redirect.rb +0 -30
- data/test/lib/facet/module/test_redirect_method.rb +0 -30
- data/test/lib/facet/module/test_remove.rb +0 -30
- data/test/lib/facet/module/test_rename.rb +0 -31
- data/test/lib/facet/module/test_rename_method.rb +0 -31
- data/test/lib/facet/module/test_revisal.rb +0 -35
- data/test/lib/facet/module/test_shadow_method.rb +0 -30
- data/test/lib/facet/module/test_sort_on.rb +0 -42
- data/test/lib/facet/module/test_undef.rb +0 -30
- data/test/lib/facet/module/test_wrap.rb +0 -30
- data/test/lib/facet/module/test_wrap_method.rb +0 -30
- data/test/lib/facet/nilclass/test_empty.rb +0 -26
- data/test/lib/facet/nilclass/test_include.rb +0 -26
- data/test/lib/facet/nilclass/test_op_fetch.rb +0 -28
- data/test/lib/facet/nilclass/test_size.rb +0 -30
- data/test/lib/facet/nilclass/test_to_f.rb +0 -26
- data/test/lib/facet/nilclass/test_to_h.rb +0 -26
- data/test/lib/facet/numeric/test_ceil_multiple.rb +0 -31
- data/test/lib/facet/numeric/test_succ.rb +0 -40
- data/test/lib/facet/numeric/test_to_b.rb +0 -27
- data/test/lib/facet/ostruct/test___merge__.rb +0 -38
- data/test/lib/facet/ostruct/test___update__.rb +0 -29
- data/test/lib/facet/ostruct/test_op_fetch.rb +0 -27
- data/test/lib/facet/ostruct/test_op_store.rb +0 -28
- data/test/lib/facet/proc/test_compose.rb +0 -36
- data/test/lib/facet/proc/test_to_method.rb +0 -31
- data/test/lib/facet/range/test_to_r.rb +0 -27
- data/test/lib/facet/range/test_to_range.rb +0 -27
- data/test/lib/facet/range/test_umbrella.rb +0 -34
- data/test/lib/facet/range/test_within.rb +0 -29
- data/test/lib/facet/regexp/test_arity.rb +0 -33
- data/test/lib/facet/regexp/test_to_re.rb +0 -27
- data/test/lib/facet/regexp/test_to_regexp.rb +0 -27
- data/test/lib/facet/string/self/test_interpolate.rb +0 -27
- data/test/lib/facet/string/self/test_patterns.rb +0 -28
- data/test/lib/facet/string/self/test_rand_letter.rb +0 -26
- data/test/lib/facet/string/test_align_center.rb +0 -34
- data/test/lib/facet/string/test_at_rand.rb +0 -35
- data/test/lib/facet/string/test_basename.rb +0 -41
- data/test/lib/facet/string/test_blank.rb +0 -27
- data/test/lib/facet/string/test_bracket.rb +0 -49
- data/test/lib/facet/string/test_camelcase.rb +0 -39
- data/test/lib/facet/string/test_camelize.rb +0 -26
- data/test/lib/facet/string/test_capitalized.rb +0 -26
- data/test/lib/facet/string/test_chars.rb +0 -27
- data/test/lib/facet/string/test_cmp.rb +0 -30
- data/test/lib/facet/string/test_demodulize.rb +0 -38
- data/test/lib/facet/string/test_downcase.rb +0 -26
- data/test/lib/facet/string/test_dresner.rb +0 -32
- data/test/lib/facet/string/test_each_char.rb +0 -29
- data/test/lib/facet/string/test_each_word.rb +0 -29
- data/test/lib/facet/string/test_first.rb +0 -43
- data/test/lib/facet/string/test_fold.rb +0 -34
- data/test/lib/facet/string/test_frequency.rb +0 -28
- data/test/lib/facet/string/test_humanize.rb +0 -26
- data/test/lib/facet/string/test_indent.rb +0 -40
- data/test/lib/facet/string/test_index_all.rb +0 -26
- data/test/lib/facet/string/test_last.rb +0 -46
- data/test/lib/facet/string/test_line_wrap.rb +0 -27
- data/test/lib/facet/string/test_lines.rb +0 -26
- data/test/lib/facet/string/test_lowercase.rb +0 -26
- data/test/lib/facet/string/test_margin.rb +0 -117
- data/test/lib/facet/string/test_mscan.rb +0 -30
- data/test/lib/facet/string/test_natcmp.rb +0 -30
- data/test/lib/facet/string/test_nchar.rb +0 -29
- data/test/lib/facet/string/test_pop.rb +0 -47
- data/test/lib/facet/string/test_probability.rb +0 -28
- data/test/lib/facet/string/test_push.rb +0 -40
- data/test/lib/facet/string/test_quote.rb +0 -49
- data/test/lib/facet/string/test_rand_byte.rb +0 -35
- data/test/lib/facet/string/test_rand_index.rb +0 -26
- data/test/lib/facet/string/test_range.rb +0 -27
- data/test/lib/facet/string/test_range_all.rb +0 -27
- data/test/lib/facet/string/test_range_of_line.rb +0 -28
- data/test/lib/facet/string/test_regesc.rb +0 -28
- data/test/lib/facet/string/test_shatter.rb +0 -29
- data/test/lib/facet/string/test_shift.rb +0 -40
- data/test/lib/facet/string/test_shuffle.rb +0 -27
- data/test/lib/facet/string/test_similarity.rb +0 -26
- data/test/lib/facet/string/test_singular.rb +0 -32
- data/test/lib/facet/string/test_slap.rb +0 -40
- data/test/lib/facet/string/test_soundex.rb +0 -41
- data/test/lib/facet/string/test_succ.rb +0 -29
- data/test/lib/facet/string/test_to_a.rb +0 -27
- data/test/lib/facet/string/test_to_arr.rb +0 -26
- data/test/lib/facet/string/test_to_b.rb +0 -41
- data/test/lib/facet/string/test_to_const.rb +0 -28
- data/test/lib/facet/string/test_to_date.rb +0 -30
- data/test/lib/facet/string/test_to_proc.rb +0 -33
- data/test/lib/facet/string/test_to_re.rb +0 -28
- data/test/lib/facet/string/test_to_time.rb +0 -30
- data/test/lib/facet/string/test_unix_crypt.rb +0 -30
- data/test/lib/facet/string/test_unpack.rb +0 -34
- data/test/lib/facet/string/test_unshift.rb +0 -39
- data/test/lib/facet/string/test_upcase.rb +0 -30
- data/test/lib/facet/string/test_whitespace.rb +0 -27
- data/test/lib/facet/string/test_word_filter.rb +0 -34
- data/test/lib/facet/string/test_word_wrap.rb +0 -51
- data/test/lib/facet/string/test_words.rb +0 -37
- data/test/lib/facet/symbol/test_camelcase.rb +0 -26
- data/test/lib/facet/symbol/test_camelize.rb +0 -27
- data/test/lib/facet/symbol/test_capitalize.rb +0 -26
- data/test/lib/facet/symbol/test_capitalized.rb +0 -27
- data/test/lib/facet/symbol/test_downcase.rb +0 -27
- data/test/lib/facet/symbol/test_not.rb +0 -29
- data/test/lib/facet/symbol/test_pad.rb +0 -27
- data/test/lib/facet/symbol/test_succ.rb +0 -28
- data/test/lib/facet/symbol/test_to_const.rb +0 -28
- data/test/lib/facet/symbol/test_to_proc.rb +0 -27
- data/test/lib/facet/symbol/test_to_str.rb +0 -28
- data/test/lib/facet/symbol/test_underscore.rb +0 -26
- data/test/lib/facet/symbol/test_upcase.rb +0 -27
- data/test/lib/facet/time/test_change.rb +0 -33
- data/test/lib/facet/time/test_elapse.rb +0 -27
- data/test/lib/facet/time/test_stamp.rb +0 -31
- data/test/lib/facet/time/test_to_date.rb +0 -31
- data/test/lib/facet/time/test_to_s.rb +0 -31
- data/test/lib/facet/time/test_to_time.rb +0 -31
- data/test/lib/facets/english/test_bytes.rb +0 -84
- data/test/lib/facets/english/test_multipliers.rb +0 -114
- data/test/lib/facets/english/test_time.rb +0 -73
- data/test/testdir.rb +0 -8
@@ -1,76 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Credit goes to Daniel J. Berger, via PTools.
|
3
|
-
#++
|
4
|
-
require 'fileutils'
|
5
|
-
|
6
|
-
module FileUtils
|
7
|
-
|
8
|
-
module_function
|
9
|
-
|
10
|
-
if defined?(Win32Exts)
|
11
|
-
Win32Exts ||= %w{.exe .com .bat}
|
12
|
-
else
|
13
|
-
Win32Exts = %w{.exe .com .bat}
|
14
|
-
end
|
15
|
-
|
16
|
-
# In block form, yields each ((*program*)) within ((*path*)). In non-block
|
17
|
-
# form, returns an array of each ((*program*)) within ((*path*)). Returns
|
18
|
-
# (({nil})) if not found.
|
19
|
-
#
|
20
|
-
# On the MS Windows platform, it looks for executables ending with .exe,
|
21
|
-
# .bat and .com, which you may optionally include in the program name.
|
22
|
-
#
|
23
|
-
# File.whereis("ruby") -> ['/usr/local/bin/ruby','/opt/bin/ruby']
|
24
|
-
#
|
25
|
-
def whereis(prog, path=ENV['PATH']) #:yield:
|
26
|
-
dirs = []
|
27
|
-
path.split(File::PATH_SEPARATOR).each{|dir|
|
28
|
-
# Windows checks against specific extensions
|
29
|
-
if File::ALT_SEPARATOR
|
30
|
-
if prog.include?('.')
|
31
|
-
f = File.join(dir,prog)
|
32
|
-
if File.executable?(f) && !File.directory?(f)
|
33
|
-
if block_given?
|
34
|
-
yield f.gsub(/\//,'\\')
|
35
|
-
else
|
36
|
-
dirs << f.gsub(/\//,'\\')
|
37
|
-
end
|
38
|
-
end
|
39
|
-
else
|
40
|
-
Win32Exts.find_all{|ext|
|
41
|
-
f = File.join(dir,prog+ext)
|
42
|
-
if File.executable?(f) && !File.directory?(f)
|
43
|
-
if block_given?
|
44
|
-
yield f.gsub(/\//,'\\')
|
45
|
-
else
|
46
|
-
dirs << f.gsub(/\//,'\\')
|
47
|
-
end
|
48
|
-
end
|
49
|
-
}
|
50
|
-
end
|
51
|
-
else
|
52
|
-
f = File.join(dir,prog)
|
53
|
-
# Avoid /usr/lib/ruby, for example
|
54
|
-
if File.executable?(f) && !File.directory?(f)
|
55
|
-
if block_given?
|
56
|
-
yield f
|
57
|
-
else
|
58
|
-
dirs << f
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
}
|
63
|
-
dirs.empty? ? nil : dirs
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
# _____ _
|
71
|
-
# |_ _|__ ___| |_
|
72
|
-
# | |/ _ \/ __| __|
|
73
|
-
# | | __/\__ \ |_
|
74
|
-
# |_|\___||___/\__|
|
75
|
-
#
|
76
|
-
# TODO
|
@@ -1,117 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Credit goes to Daniel J. Berger, via PTools.
|
3
|
-
#++
|
4
|
-
|
5
|
-
require 'fileutils'
|
6
|
-
|
7
|
-
module FileUtils
|
8
|
-
|
9
|
-
module_function
|
10
|
-
|
11
|
-
if defined?(Win32Exts)
|
12
|
-
Win32Exts ||= %w{.exe .com .bat}
|
13
|
-
else
|
14
|
-
Win32Exts = %w{.exe .com .bat}
|
15
|
-
end
|
16
|
-
|
17
|
-
# Looks for the first occurrence of _program_ within _path_.
|
18
|
-
#
|
19
|
-
# On the MS Windows platform, it looks for executables ending with .exe,
|
20
|
-
# .bat and .com, which you may optionally include in the program name.
|
21
|
-
# Returns <tt>nil</tt> if not found.
|
22
|
-
#
|
23
|
-
#--
|
24
|
-
# The which() method was adopted from Daniel J. Berger, via PTools
|
25
|
-
# which in in turn was adopted fromt the FileWhich code posted by
|
26
|
-
# Michael Granger on http://www.rubygarden.org.
|
27
|
-
#++
|
28
|
-
def which(prog, path=ENV['PATH'])
|
29
|
-
path.split(File::PATH_SEPARATOR).each {|dir|
|
30
|
-
# Windows checks against specific extensions
|
31
|
-
if File::ALT_SEPARATOR
|
32
|
-
ext = Win32Exts.find{|ext|
|
33
|
-
if prog.include?('.') # Assume extension already included
|
34
|
-
f = File.join(dir,prog)
|
35
|
-
else
|
36
|
-
f = File.join(dir,prog+ext)
|
37
|
-
end
|
38
|
-
File.executable?(f) && !File.directory?(f)
|
39
|
-
}
|
40
|
-
if ext
|
41
|
-
# Use backslashes, not forward slashes
|
42
|
-
if prog.include?('.') # Assume extension already included
|
43
|
-
f = File.join( dir, prog ).gsub(/\//,'\\')
|
44
|
-
else
|
45
|
-
f = File.join( dir, prog + ext ).gsub(/\//,'\\')
|
46
|
-
end
|
47
|
-
return f
|
48
|
-
end
|
49
|
-
else
|
50
|
-
f = File.join(dir,prog)
|
51
|
-
# Avoid /usr/lib/ruby, for example
|
52
|
-
if File.executable?(f) && !File.directory?(f)
|
53
|
-
return File::join( dir, prog )
|
54
|
-
end
|
55
|
-
end
|
56
|
-
}
|
57
|
-
nil
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
# _____ _
|
65
|
-
# |_ _|__ ___| |_
|
66
|
-
# | |/ _ \/ __| __|
|
67
|
-
# | | __/\__ \ |_
|
68
|
-
# |_|\___||___/\__|
|
69
|
-
#
|
70
|
-
=begin test
|
71
|
-
|
72
|
-
require 'test/unit'
|
73
|
-
require 'rbconfig'
|
74
|
-
|
75
|
-
# FIND TEST DIRECTORY
|
76
|
-
paths = File.expand_path(File.dirname(__FILE__)).split('/')
|
77
|
-
paths.size.downto(1) do |i|
|
78
|
-
f = (paths.slice(0..i)+['test']).join('/')
|
79
|
-
$TESTDIR = File.join(f,'FIXTURE') if File.directory?(f)
|
80
|
-
end
|
81
|
-
raise unless $TESTDIR
|
82
|
-
|
83
|
-
class TC_FileUtils_Which < Test::Unit::TestCase
|
84
|
-
include Config
|
85
|
-
|
86
|
-
def setup
|
87
|
-
@workdir = Dir.getwd
|
88
|
-
@thisdir = $TESTDIR
|
89
|
-
|
90
|
-
@expected_ruby_exe = File.join( CONFIG['bindir'], CONFIG['ruby_install_name'] )
|
91
|
-
if File::ALT_SEPARATOR
|
92
|
-
@expected_ruby_exe.gsub!(/\//,'\\')
|
93
|
-
@expected_ruby_exe += ".exe"
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_method
|
98
|
-
assert_respond_to( FileUtils, :which )
|
99
|
-
end
|
100
|
-
|
101
|
-
# which
|
102
|
-
|
103
|
-
def test_which
|
104
|
-
Dir.chdir @thisdir
|
105
|
-
begin
|
106
|
-
ruby_exe = nil
|
107
|
-
assert_nothing_raised { ruby_exe = FileUtils.which(CONFIG['ruby_install_name']) }
|
108
|
-
assert_equal(@expected_ruby_exe, ruby_exe)
|
109
|
-
assert_equal(nil, FileUtils.which("blahblah"))
|
110
|
-
ensure
|
111
|
-
Dir.chdir @workdir
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
end
|
116
|
-
|
117
|
-
=end
|
data/lib/facet/float.rb
DELETED
data/lib/facet/float/approx.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'facet/float/round_to'
|
2
|
-
|
3
|
-
class Float
|
4
|
-
# Determines if another number is approximately equal
|
5
|
-
# within a given _n_th degree. Defaults to 100ths
|
6
|
-
# if the degree is not specified.
|
7
|
-
def approx?( x, n=0.01 )
|
8
|
-
return(self == x) if n == 0
|
9
|
-
self.round_to(n) == x.to_f.round_to(n)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
class Numeric
|
14
|
-
# To properly support Float#approx?,
|
15
|
-
# Numeric must also be augmented.
|
16
|
-
def approx?(*args)
|
17
|
-
self.to_f.approx?(*args)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
# _____ _
|
23
|
-
# |_ _|__ ___| |_
|
24
|
-
# | |/ _ \/ __| __|
|
25
|
-
# | | __/\__ \ |_
|
26
|
-
# |_|\___||___/\__|
|
27
|
-
#
|
28
|
-
=begin test
|
29
|
-
|
30
|
-
require 'test/unit'
|
31
|
-
|
32
|
-
class TCFloat < Test::Unit::TestCase
|
33
|
-
|
34
|
-
def test_approx?
|
35
|
-
f = 10.006
|
36
|
-
assert( f.approx?(10.01) )
|
37
|
-
assert( f.approx?(10, 0.1) )
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
=end
|
data/lib/facet/float/round_at.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
|
2
|
-
class Float
|
3
|
-
alias_method :round_off, :round
|
4
|
-
|
5
|
-
# Rounds to the given decimal position.
|
6
|
-
#
|
7
|
-
# 4.555.round_at(0) #=> 5.0
|
8
|
-
# 4.555.round_at(1) #=> 4.6
|
9
|
-
# 4.555.round_at(2) #=> 4.56
|
10
|
-
# 4.555.round_at(3) #=> 4.555
|
11
|
-
#
|
12
|
-
def round_at( d ) #d=0
|
13
|
-
(self * (10.0 ** d)).round_off.to_f / (10.0 ** d)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class Numeric
|
18
|
-
# To properly support Float's rounding methods,
|
19
|
-
# Numeric must also be augmented.
|
20
|
-
def round_at(*args)
|
21
|
-
self.to_f.round_at(*args)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
class Integer
|
26
|
-
# To properly support Float's rounding methods,
|
27
|
-
# Integer must also be augmented.
|
28
|
-
def round_at(*args)
|
29
|
-
self.to_f.round_at(*args)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
# _____ _
|
35
|
-
# |_ _|__ ___| |_
|
36
|
-
# | |/ _ \/ __| __|
|
37
|
-
# | | __/\__ \ |_
|
38
|
-
# |_|\___||___/\__|
|
39
|
-
#
|
40
|
-
=begin test
|
41
|
-
|
42
|
-
require 'test/unit'
|
43
|
-
|
44
|
-
class TCFloat < Test::Unit::TestCase
|
45
|
-
|
46
|
-
def setup
|
47
|
-
@f0 = [ 0, 10, 15, 105 ]
|
48
|
-
@f1 = [ 10.1, 10.01, 10.9, 10.09, 10.5, 10.05, 10.49 ]
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_round_at_arg1
|
52
|
-
fr = @f0.collect{ |f| f.round_at(1) }
|
53
|
-
assert_equal( [0,10,15,105], fr )
|
54
|
-
fr = @f1.collect { |f| f.round_at(1) }
|
55
|
-
assert_equal( [10.1,10.0,10.9,10.1,10.5,10.1,10.5], fr )
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_round_at_arg2
|
59
|
-
fr = @f0.collect { |f| f.round_at(2) }
|
60
|
-
assert_equal( [0,10,15,105], fr )
|
61
|
-
fr = @f1.collect { |f| f.round_at(2) }
|
62
|
-
assert_equal( [10.1,10.01,10.9,10.09,10.5,10.05,10.49], fr )
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_round_off
|
66
|
-
assert_equal( 1.0, 1.2.round_off )
|
67
|
-
assert_equal( 2.0, 1.8.round_off )
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
|
72
|
-
=end
|
data/lib/facet/float/round_to.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
|
2
|
-
class Float
|
3
|
-
alias_method :round_off, :round
|
4
|
-
|
5
|
-
# Rounds to the nearest _n_th degree.
|
6
|
-
#
|
7
|
-
# 4.555.round_to(1) #=> 5.0
|
8
|
-
# 4.555.round_to(0.1) #=> 4.6
|
9
|
-
# 4.555.round_to(0.01) #=> 4.56
|
10
|
-
# 4.555.round_to(0) #=> 4.555
|
11
|
-
#
|
12
|
-
def round_to( n ) #n=1
|
13
|
-
return self if n == 0
|
14
|
-
(self * (1.0 / n)).round_off.to_f / (1.0 / n)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
class Numeric
|
19
|
-
# To properly support Float's rounding methods,
|
20
|
-
# Numeric must also be augmented.
|
21
|
-
def round_to(*args)
|
22
|
-
self.to_f.round_to(*args)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class Integer
|
27
|
-
# To properly support Float's rounding methods,
|
28
|
-
# Integer must also be augmented.
|
29
|
-
def round_to(*args)
|
30
|
-
self.to_f.round_to(*args)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
# _____ _
|
36
|
-
# |_ _|__ ___| |_
|
37
|
-
# | |/ _ \/ __| __|
|
38
|
-
# | | __/\__ \ |_
|
39
|
-
# |_|\___||___/\__|
|
40
|
-
#
|
41
|
-
=begin test
|
42
|
-
|
43
|
-
require 'test/unit'
|
44
|
-
|
45
|
-
class TCFloat < Test::Unit::TestCase
|
46
|
-
|
47
|
-
def setup
|
48
|
-
@f0 = [ 0, 10, 15, 105 ]
|
49
|
-
@f1 = [ 10.1, 10.01, 10.9, 10.09, 10.5, 10.05, 10.49 ]
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_round_to_arg1
|
53
|
-
fr = @f0.collect { |f| f.round_to(0.1) }
|
54
|
-
assert_equal( [0,10,15,105], fr )
|
55
|
-
fr = @f1.collect { |f| f.round_to(0.1) }
|
56
|
-
assert_equal( [10.1,10.0,10.9,10.1,10.5,10.1,10.5], fr )
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_round_to_arg10
|
60
|
-
fr = @f0.collect { |f| f.round_to(10) }
|
61
|
-
assert_equal( [0,10,20,110], fr )
|
62
|
-
fr = @f1.collect { |f| f.round_to(10) }
|
63
|
-
assert_equal( [10,10,10,10,10,10,10], fr )
|
64
|
-
end
|
65
|
-
|
66
|
-
def test_round_off
|
67
|
-
assert_equal( 1.0, 1.2.round_off )
|
68
|
-
assert_equal( 2.0, 1.8.round_off )
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
=end
|
data/lib/facet/hash.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'nano/hash/alias'
|
2
|
-
require 'nano/hash/assert_has_keys'
|
3
|
-
require 'nano/hash/assert_has_only_keys'
|
4
|
-
require 'nano/hash/at'
|
5
|
-
require 'nano/hash/collate'
|
6
|
-
require 'nano/hash/delete_unless'
|
7
|
-
require 'nano/hash/each'
|
8
|
-
require 'nano/hash/each_with_index'
|
9
|
-
require 'nano/hash/each_with_key'
|
10
|
-
require 'nano/hash/graph'
|
11
|
-
require 'nano/hash/has_keys'
|
12
|
-
require 'nano/hash/has_only_keys'
|
13
|
-
require 'nano/hash/inverse'
|
14
|
-
require 'nano/hash/join'
|
15
|
-
require 'nano/hash/keys_to_iv'
|
16
|
-
require 'nano/hash/keys_to_s'
|
17
|
-
require 'nano/hash/keys_to_sym'
|
18
|
-
require 'nano/hash/op_fetch'
|
19
|
-
require 'nano/hash/op_lshift'
|
20
|
-
require 'nano/hash/op_store'
|
21
|
-
require 'nano/hash/rand_key'
|
22
|
-
require 'nano/hash/rand_pair'
|
23
|
-
require 'nano/hash/rand_value'
|
24
|
-
require 'nano/hash/replace_each'
|
25
|
-
require 'nano/hash/self/zipnew'
|
26
|
-
require 'nano/hash/shuffle'
|
27
|
-
require 'nano/hash/slice'
|
28
|
-
require 'nano/hash/stringify_keys'
|
29
|
-
require 'nano/hash/swap'
|
30
|
-
require 'nano/hash/swapkey'
|
31
|
-
require 'nano/hash/symoblize_keys'
|
32
|
-
require 'nano/hash/to_h'
|
33
|
-
require 'nano/hash/to_ostruct'
|
34
|
-
require 'nano/hash/to_ostruct_recurse'
|
35
|
-
require 'nano/hash/traverse'
|
36
|
-
require 'nano/hash/update_each'
|
37
|
-
require 'nano/hash/update_keys'
|
38
|
-
require 'nano/hash/update_values'
|
39
|
-
require 'nano/hash/variablize_keys'
|
40
|
-
require 'nano/hash/weave'
|
data/lib/facet/hash/alias.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Credit goes to Gavin Sinclair.
|
3
|
-
#++
|
4
|
-
class Hash
|
5
|
-
|
6
|
-
# Modifies the receiving Hash so that the value previously referred to by
|
7
|
-
# _oldkey_ is also referenced by _newkey_; _oldkey_ is retained in the Hash.
|
8
|
-
# If _oldkey_ does not exist as a key in the Hash, no change is effected.
|
9
|
-
#
|
10
|
-
# Returns a reference to the Hash.
|
11
|
-
#
|
12
|
-
# foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
13
|
-
# foo.alias!('name',:name) => { :name=>'Gavin', 'name'=>'Gavin', 'wife'=>:Lisa }
|
14
|
-
#
|
15
|
-
# foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
16
|
-
# foo.alias!('spouse','wife') => { :name=>'Gavin', 'wife'=>:Lisa, 'spouse'=>:Lisa }
|
17
|
-
#
|
18
|
-
# foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
19
|
-
# foo.alias!('bar','foo') => { :name=>'Gavin', 'wife'=>:Lisa }
|
20
|
-
#
|
21
|
-
# Note that if the _oldkey_ is reassigned, the reference will no longer exist,
|
22
|
-
# and the _newkey_ will remain as it was.
|
23
|
-
def alias!( newkey, oldkey )
|
24
|
-
self[newkey] = self[oldkey] if self.has_key?(oldkey)
|
25
|
-
self
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
# _____ _
|
32
|
-
# |_ _|__ ___| |_
|
33
|
-
# | |/ _ \/ __| __|
|
34
|
-
# | | __/\__ \ |_
|
35
|
-
# |_|\___||___/\__|
|
36
|
-
#
|
37
|
-
=begin test
|
38
|
-
|
39
|
-
require 'test/unit'
|
40
|
-
|
41
|
-
class TCHash < Test::Unit::TestCase
|
42
|
-
|
43
|
-
def test_alias!
|
44
|
-
foo = { 'a'=>1, 'b'=>2 }
|
45
|
-
assert_equal( { 'a'=>1, 'b'=>2, 'c'=>2 }, foo.alias!('c','b') )
|
46
|
-
foo = { 'a'=>1, 'b'=>2 }
|
47
|
-
assert_equal( { :a=>1, 'a'=>1, 'b'=>2 }, foo.alias!(:a,'a') )
|
48
|
-
foo = { :a=>1, :b=>2 }
|
49
|
-
assert_equal( { :a=>1, :b=>2 }, foo.alias!('bar','foo') )
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
=end
|