facets 1.8.54 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +65 -0
- data/LICENSE +344 -0
- data/README +132 -176
- data/demo/bench/bench_factorial.rb +31 -0
- data/demo/sample/annotations/annotations1.rb +22 -0
- data/demo/{ansicolor → sample/ansicolor}/cdiff.rb +0 -0
- data/demo/{ansicolor → sample/ansicolor}/example.rb +0 -0
- data/lib/core/facets.rb +46 -0
- data/lib/core/facets/1stclassmethod.rb +113 -0
- data/lib/core/facets/array.rb +10 -0
- data/lib/core/facets/array/conjoin.rb +15 -0
- data/lib/core/facets/array/delete.rb +95 -0
- data/lib/core/facets/array/indexable.rb +206 -0
- data/lib/core/facets/array/merge.rb +62 -0
- data/lib/core/facets/array/pad.rb +87 -0
- data/lib/core/facets/array/rotate.rb +72 -0
- data/lib/core/facets/array/select.rb +39 -0
- data/lib/core/facets/array/splice.rb +16 -0
- data/lib/core/facets/array/stackable.rb +64 -0
- data/lib/core/facets/array/unzip.rb +15 -0
- data/lib/core/facets/binding.rb +3 -0
- data/lib/core/facets/binding/cflow.rb +121 -0
- data/lib/core/facets/binding/eval.rb +83 -0
- data/lib/core/facets/binding/vars.rb +86 -0
- data/lib/core/facets/boolean.rb +233 -0
- data/lib/core/facets/class.rb +2 -0
- data/lib/core/facets/class/descendents.rb +68 -0
- data/lib/core/facets/class/initializer.rb +66 -0
- data/lib/core/facets/comparable.rb +2 -0
- data/lib/core/facets/comparable/bound.rb +120 -0
- data/lib/core/facets/comparable/cmp.rb +172 -0
- data/lib/core/facets/continuation.rb +1 -0
- data/lib/{facets/core/continuation/self → core/facets/continuation}/create.rb +0 -0
- data/lib/core/facets/conversion.rb +699 -0
- data/lib/core/facets/dir.rb +2 -0
- data/lib/core/facets/dir/multiglob.rb +143 -0
- data/lib/core/facets/dir/traverse.rb +148 -0
- data/lib/core/facets/enumerable.rb +9 -0
- data/lib/core/facets/enumerable/cartesian.rb +156 -0
- data/lib/core/facets/enumerable/collate.rb +115 -0
- data/lib/core/facets/enumerable/collect.rb +155 -0
- data/lib/core/facets/enumerable/combination.rb +154 -0
- data/lib/core/facets/enumerable/count.rb +252 -0
- data/lib/core/facets/enumerable/instance_map.rb +0 -0
- data/lib/core/facets/enumerable/partition.rb +285 -0
- data/lib/core/facets/enumerable/permutation.rb +125 -0
- data/lib/core/facets/enumerable/probability.rb +218 -0
- data/lib/core/facets/file.rb +3 -0
- data/lib/core/facets/file/read.rb +84 -0
- data/lib/core/facets/file/topath.rb +153 -0
- data/lib/core/facets/file/write.rb +153 -0
- data/lib/core/facets/filetest.rb +1 -0
- data/lib/core/facets/filetest/root.rb +15 -0
- data/lib/core/facets/float.rb +1 -0
- data/lib/core/facets/float/round.rb +8 -0
- data/lib/core/facets/functor.rb +102 -0
- data/lib/core/facets/hash.rb +14 -0
- data/lib/core/facets/hash/at.rb +44 -0
- data/lib/core/facets/hash/delete.rb +95 -0
- data/lib/core/facets/hash/has_keys.rb +70 -0
- data/lib/core/facets/hash/insert.rb +52 -0
- data/lib/core/facets/hash/inverse.rb +66 -0
- data/lib/core/facets/hash/iterate.rb +69 -0
- data/lib/core/facets/hash/keyize.rb +249 -0
- data/lib/core/facets/hash/merge.rb +63 -0
- data/lib/core/facets/hash/new.rb +74 -0
- data/lib/core/facets/hash/op.rb +154 -0
- data/lib/core/facets/hash/rekey.rb +173 -0
- data/lib/core/facets/hash/traverse.rb +81 -0
- data/lib/core/facets/hash/update.rb +93 -0
- data/lib/core/facets/hash/weave.rb +101 -0
- data/lib/core/facets/indexable.rb +213 -0
- data/lib/core/facets/integer.rb +4 -0
- data/lib/core/facets/integer/bitmask.rb +141 -0
- data/lib/core/facets/integer/factorial.rb +72 -0
- data/lib/core/facets/integer/multiples.rb +82 -0
- data/lib/core/facets/integer/of.rb +49 -0
- data/lib/core/facets/kernel.rb +19 -0
- data/lib/core/facets/kernel/ask.rb +14 -0
- data/lib/core/facets/kernel/callstack.rb +119 -0
- data/lib/core/facets/kernel/constant.rb +60 -0
- data/lib/core/facets/kernel/deepcopy.rb +111 -0
- data/lib/core/facets/kernel/dir.rb +12 -0
- data/lib/core/facets/kernel/instance.rb +245 -0
- data/lib/core/facets/kernel/metaid.rb +198 -0
- data/lib/core/facets/kernel/object.rb +93 -0
- data/lib/core/facets/kernel/op_esc.rb +40 -0
- data/lib/core/facets/kernel/populate.rb +199 -0
- data/lib/core/facets/kernel/report.rb +83 -0
- data/lib/core/facets/kernel/require.rb +69 -0
- data/lib/core/facets/kernel/require_esc.rb +44 -0
- data/lib/core/facets/kernel/respond.rb +13 -0
- data/lib/core/facets/kernel/silence.rb +91 -0
- data/lib/core/facets/kernel/super.rb +222 -0
- data/lib/core/facets/kernel/tap.rb +105 -0
- data/lib/core/facets/kernel/val.rb +65 -0
- data/lib/core/facets/kernel/withattr.rb +111 -0
- data/lib/core/facets/matchdata.rb +1 -0
- data/lib/core/facets/matchdata/matchset.rb +98 -0
- data/lib/core/facets/module.rb +11 -0
- data/lib/core/facets/module/abstract.rb +59 -0
- data/lib/core/facets/module/alias.rb +153 -0
- data/lib/core/facets/module/attr.rb +139 -0
- data/lib/core/facets/module/cattr.rb +178 -0
- data/lib/core/facets/module/clone.rb +101 -0
- data/lib/core/facets/module/include.rb +229 -0
- data/lib/core/facets/module/methods.rb +16 -0
- data/lib/core/facets/module/modify.rb +359 -0
- data/lib/core/facets/module/name.rb +186 -0
- data/lib/core/facets/module/require.rb +62 -0
- data/lib/core/facets/module/traits.rb +110 -0
- data/lib/core/facets/nilclass.rb +2 -0
- data/lib/core/facets/nilclass/ergo.rb +13 -0
- data/lib/{facets/core → core/facets}/nilclass/status.rb +0 -0
- data/lib/core/facets/numeric.rb +1 -0
- data/lib/core/facets/numeric/round.rb +143 -0
- data/lib/core/facets/proc.rb +3 -0
- data/lib/core/facets/proc/bind.rb +107 -0
- data/lib/core/facets/proc/compose.rb +78 -0
- data/lib/core/facets/proc/fn.rb +10 -0
- data/lib/core/facets/range.rb +2 -0
- data/lib/core/facets/range/combine.rb +83 -0
- data/lib/core/facets/range/overlap.rb +130 -0
- data/lib/core/facets/regexp.rb +1 -0
- data/lib/core/facets/regexp/arity.rb +52 -0
- data/lib/core/facets/stackable.rb +46 -0
- data/lib/core/facets/string.rb +18 -0
- data/lib/core/facets/string/align.rb +102 -0
- data/lib/core/facets/string/blank.rb +60 -0
- data/lib/core/facets/string/bracket.rb +176 -0
- data/lib/core/facets/string/case.rb +105 -0
- data/lib/core/facets/string/crypt.rb +59 -0
- data/lib/core/facets/string/filter.rb +102 -0
- data/lib/core/facets/string/format.rb +283 -0
- data/lib/core/facets/string/indexable.rb +248 -0
- data/lib/core/facets/string/interpolate.rb +70 -0
- data/lib/core/facets/string/natcmp.rb +122 -0
- data/lib/core/facets/string/nchar.rb +88 -0
- data/lib/core/facets/string/partitions.rb +139 -0
- data/lib/core/facets/string/range.rb +95 -0
- data/lib/core/facets/string/regesc.rb +63 -0
- data/lib/core/facets/string/scan.rb +100 -0
- data/lib/core/facets/string/splice.rb +29 -0
- data/lib/core/facets/string/stackable.rb +181 -0
- data/lib/core/facets/string/tabs.rb +202 -0
- data/lib/core/facets/symbol.rb +5 -0
- data/lib/core/facets/symbol/chomp.rb +41 -0
- data/lib/core/facets/symbol/generate.rb +59 -0
- data/lib/{facets/core → core/facets}/symbol/not.rb +0 -0
- data/lib/core/facets/symbol/shadow.rb +61 -0
- data/lib/core/facets/symbol/succ.rb +60 -0
- data/lib/core/facets/time.rb +2 -0
- data/lib/core/facets/time/change.rb +61 -0
- data/lib/core/facets/time/elapse.rb +55 -0
- data/lib/core/facets/unboundmethod.rb +2 -0
- data/lib/core/facets/unboundmethod/arguments.rb +21 -0
- data/lib/core/facets/unboundmethod/name.rb +12 -0
- data/lib/methods/facets/array/conjoin.rb +1 -0
- data/lib/methods/facets/array/delete_unless.rb +1 -0
- data/lib/methods/facets/array/delete_values.rb +1 -0
- data/lib/methods/facets/array/delete_values_at.rb +1 -0
- data/lib/methods/facets/array/first.rb +1 -0
- data/lib/methods/facets/array/join_sentence.rb +1 -0
- data/lib/methods/facets/array/last.rb +1 -0
- data/lib/methods/facets/array/merge.rb +1 -0
- data/lib/methods/facets/array/pad.rb +1 -0
- data/lib/methods/facets/array/poke.rb +1 -0
- data/lib/methods/facets/array/pull.rb +1 -0
- data/lib/methods/facets/array/rotate.rb +1 -0
- data/lib/methods/facets/array/select.rb +1 -0
- data/lib/methods/facets/array/splice.rb +1 -0
- data/lib/methods/facets/array/store.rb +1 -0
- data/lib/methods/facets/array/to_b.rb +1 -0
- data/lib/methods/facets/array/to_h.rb +1 -0
- data/lib/methods/facets/array/to_path.rb +1 -0
- data/lib/methods/facets/array/unzip.rb +1 -0
- data/lib/methods/facets/binding/__DIR__.rb +1 -0
- data/lib/methods/facets/binding/__FILE__.rb +1 -0
- data/lib/methods/facets/binding/__LINE__.rb +1 -0
- data/lib/methods/facets/binding/call_stack.rb +1 -0
- data/lib/methods/facets/binding/called.rb +1 -0
- data/lib/methods/facets/binding/caller.rb +1 -0
- data/lib/methods/facets/binding/defined.rb +1 -0
- data/lib/methods/facets/binding/eval.rb +1 -0
- data/lib/methods/facets/binding/included.rb +1 -0
- data/lib/methods/facets/binding/local_variables.rb +1 -0
- data/lib/methods/facets/binding/methodname.rb +1 -0
- data/lib/methods/facets/binding/op_fetch.rb +1 -0
- data/lib/methods/facets/binding/self.rb +1 -0
- data/lib/methods/facets/class/cattr.rb +1 -0
- data/lib/methods/facets/class/cattr_accessor.rb +1 -0
- data/lib/methods/facets/class/cattr_reader.rb +1 -0
- data/lib/methods/facets/class/cattr_writer.rb +1 -0
- data/lib/methods/facets/class/class_load.rb +1 -0
- data/lib/methods/facets/class/class_require.rb +1 -0
- data/lib/methods/facets/class/descendents.rb +1 -0
- data/lib/methods/facets/class/initializer.rb +1 -0
- data/lib/methods/facets/class/mattr.rb +1 -0
- data/lib/methods/facets/class/mattr_accessor.rb +1 -0
- data/lib/methods/facets/class/mattr_reader.rb +1 -0
- data/lib/methods/facets/class/mattr_writer.rb +1 -0
- data/lib/methods/facets/class/remove_descendents.rb +1 -0
- data/lib/methods/facets/class/remove_subclasses.rb +1 -0
- data/lib/methods/facets/class/subclasses.rb +1 -0
- data/lib/methods/facets/class/to_proc.rb +1 -0
- data/lib/methods/facets/comparable/at_least.rb +1 -0
- data/lib/methods/facets/comparable/at_most.rb +1 -0
- data/lib/methods/facets/comparable/bound.rb +1 -0
- data/lib/methods/facets/comparable/cap.rb +1 -0
- data/lib/methods/facets/comparable/clip.rb +1 -0
- data/lib/methods/facets/comparable/cmp.rb +1 -0
- data/lib/methods/facets/dir/ancestor.rb +1 -0
- data/lib/methods/facets/dir/ascend.rb +1 -0
- data/lib/methods/facets/dir/descend.rb +1 -0
- data/lib/methods/facets/dir/ls_r.rb +1 -0
- data/lib/methods/facets/dir/multiglob.rb +1 -0
- data/lib/methods/facets/dir/multiglob_r.rb +1 -0
- data/lib/methods/facets/dir/multiglob_with_default.rb +1 -0
- data/lib/methods/facets/dir/parent.rb +1 -0
- data/lib/methods/facets/dir/recurse.rb +1 -0
- data/lib/methods/facets/enumerable/cart.rb +1 -0
- data/lib/methods/facets/enumerable/cartesian_product.rb +1 -0
- data/lib/methods/facets/enumerable/cluster_by.rb +1 -0
- data/lib/methods/facets/enumerable/collate.rb +1 -0
- data/lib/methods/facets/enumerable/collect_if.rb +1 -0
- data/lib/methods/facets/enumerable/collect_with_counter.rb +1 -0
- data/lib/methods/facets/enumerable/collect_with_index.rb +1 -0
- data/lib/methods/facets/enumerable/combinations.rb +1 -0
- data/lib/methods/facets/enumerable/combos.rb +1 -0
- data/lib/methods/facets/enumerable/commonality.rb +1 -0
- data/lib/methods/facets/enumerable/compact_collect.rb +1 -0
- data/lib/methods/facets/enumerable/compact_map.rb +1 -0
- data/lib/methods/facets/enumerable/count.rb +1 -0
- data/lib/methods/facets/enumerable/divide.rb +1 -0
- data/lib/methods/facets/enumerable/duplicates.rb +1 -0
- data/lib/methods/facets/enumerable/each_by.rb +1 -0
- data/lib/methods/facets/enumerable/each_combination.rb +1 -0
- data/lib/methods/facets/enumerable/each_combo.rb +1 -0
- data/lib/methods/facets/enumerable/each_pair.rb +1 -0
- data/lib/methods/facets/enumerable/each_permutation.rb +1 -0
- data/lib/methods/facets/enumerable/each_unique_pair.rb +1 -0
- data/lib/methods/facets/enumerable/each_with_counter.rb +1 -0
- data/lib/methods/facets/enumerable/eachn.rb +1 -0
- data/lib/methods/facets/enumerable/entropy.rb +1 -0
- data/lib/methods/facets/enumerable/filter_collect.rb +1 -0
- data/lib/methods/facets/enumerable/filter_map.rb +1 -0
- data/lib/methods/facets/enumerable/frequency.rb +1 -0
- data/lib/methods/facets/enumerable/graph.rb +1 -0
- data/lib/methods/facets/enumerable/ideal_entropy.rb +1 -0
- data/lib/methods/facets/enumerable/injecting.rb +1 -0
- data/lib/methods/facets/enumerable/map_if.rb +1 -0
- data/lib/methods/facets/enumerable/map_with_counter.rb +1 -0
- data/lib/methods/facets/enumerable/map_with_index.rb +1 -0
- data/lib/methods/facets/enumerable/mode.rb +1 -0
- data/lib/methods/facets/enumerable/none.rb +1 -0
- data/lib/methods/facets/enumerable/nonuniq.rb +1 -0
- data/lib/methods/facets/enumerable/occur.rb +1 -0
- data/lib/methods/facets/enumerable/one.rb +1 -0
- data/lib/methods/facets/enumerable/op_pow.rb +1 -0
- data/lib/methods/facets/enumerable/partition_by.rb +1 -0
- data/lib/methods/facets/enumerable/permutation.rb +1 -0
- data/lib/methods/facets/enumerable/permutation_number.rb +1 -0
- data/lib/methods/facets/enumerable/permute.rb +1 -0
- data/lib/methods/facets/enumerable/probability.rb +1 -0
- data/lib/methods/facets/enumerable/sum.rb +1 -0
- data/lib/methods/facets/enumerable/to_h.rb +1 -0
- data/lib/methods/facets/enumerable/to_hash.rb +1 -0
- data/lib/methods/facets/enumerable/uniq_by.rb +1 -0
- data/lib/methods/facets/falseclass/to_bool.rb +1 -0
- data/lib/methods/facets/file/append.rb +1 -0
- data/lib/methods/facets/file/create.rb +1 -0
- data/lib/methods/facets/file/null.rb +1 -0
- data/lib/methods/facets/file/read_binary.rb +1 -0
- data/lib/methods/facets/file/read_list.rb +1 -0
- data/lib/methods/facets/file/rewrite.rb +1 -0
- data/lib/methods/facets/file/rootname.rb +1 -0
- data/lib/methods/facets/file/sanitize.rb +1 -0
- data/lib/methods/facets/file/split_all.rb +1 -0
- data/lib/methods/facets/file/write.rb +1 -0
- data/lib/methods/facets/filetest/root.rb +1 -0
- data/lib/methods/facets/float/round_at.rb +1 -0
- data/lib/methods/facets/float/round_off.rb +1 -0
- data/lib/methods/facets/float/round_to.rb +1 -0
- data/lib/methods/facets/hash/alias.rb +1 -0
- data/lib/methods/facets/hash/at.rb +1 -0
- data/lib/methods/facets/hash/autonew.rb +1 -0
- data/lib/methods/facets/hash/collate.rb +1 -0
- data/lib/methods/facets/hash/delete_at.rb +1 -0
- data/lib/methods/facets/hash/delete_unless.rb +1 -0
- data/lib/methods/facets/hash/delete_values.rb +1 -0
- data/lib/methods/facets/hash/delete_values_at.rb +1 -0
- data/lib/methods/facets/hash/diff.rb +1 -0
- data/lib/methods/facets/hash/each_with_index.rb +1 -0
- data/lib/methods/facets/hash/each_with_key.rb +1 -0
- data/lib/methods/facets/hash/graph.rb +1 -0
- data/lib/methods/facets/hash/has_keys.rb +1 -0
- data/lib/methods/facets/hash/has_only_keys.rb +1 -0
- data/lib/methods/facets/hash/insert.rb +1 -0
- data/lib/methods/facets/hash/inverse.rb +1 -0
- data/lib/methods/facets/hash/join.rb +1 -0
- data/lib/methods/facets/hash/keys_to_s.rb +1 -0
- data/lib/methods/facets/hash/keys_to_sym.rb +1 -0
- data/lib/methods/facets/hash/normalize_keys.rb +1 -0
- data/lib/methods/facets/hash/op_and.rb +1 -0
- data/lib/methods/facets/hash/op_div.rb +1 -0
- data/lib/methods/facets/hash/op_lshift.rb +1 -0
- data/lib/methods/facets/hash/op_minus.rb +1 -0
- data/lib/methods/facets/hash/op_mul.rb +1 -0
- data/lib/methods/facets/hash/op_or.rb +1 -0
- data/lib/methods/facets/hash/op_plus.rb +1 -0
- data/lib/methods/facets/hash/pairs_at.rb +1 -0
- data/lib/methods/facets/hash/rekey.rb +1 -0
- data/lib/methods/facets/hash/replace_each.rb +1 -0
- data/lib/methods/facets/hash/reverse_merge.rb +1 -0
- data/lib/methods/facets/hash/reverse_update.rb +1 -0
- data/lib/methods/facets/hash/stringify_keys.rb +1 -0
- data/lib/methods/facets/hash/swap.rb +1 -0
- data/lib/methods/facets/hash/swapkey.rb +1 -0
- data/lib/methods/facets/hash/symbolize_keys.rb +1 -0
- data/lib/methods/facets/hash/to_h.rb +1 -0
- data/lib/methods/facets/hash/to_proc.rb +1 -0
- data/lib/methods/facets/hash/to_proc_with_reponse.rb +1 -0
- data/lib/methods/facets/hash/to_struct.rb +1 -0
- data/lib/methods/facets/hash/traverse.rb +1 -0
- data/lib/methods/facets/hash/update_each.rb +1 -0
- data/lib/methods/facets/hash/update_keys.rb +1 -0
- data/lib/methods/facets/hash/update_values.rb +1 -0
- data/lib/methods/facets/hash/variablize_keys.rb +1 -0
- data/lib/methods/facets/hash/weave.rb +1 -0
- data/lib/methods/facets/hash/zipnew.rb +1 -0
- data/lib/methods/facets/integer/bit.rb +1 -0
- data/lib/methods/facets/integer/bit_set.rb +1 -0
- data/lib/methods/facets/integer/bitmask.rb +1 -0
- data/lib/methods/facets/integer/clear_bit.rb +1 -0
- data/lib/methods/facets/integer/clear_bitmask.rb +1 -0
- data/lib/methods/facets/integer/even.rb +1 -0
- data/lib/methods/facets/integer/fac.rb +1 -0
- data/lib/methods/facets/integer/fact.rb +1 -0
- data/lib/methods/facets/integer/factorial.rb +1 -0
- data/lib/methods/facets/integer/multiple.rb +1 -0
- data/lib/methods/facets/integer/odd.rb +1 -0
- data/lib/methods/facets/integer/of.rb +1 -0
- data/lib/methods/facets/integer/round_at.rb +1 -0
- data/lib/methods/facets/integer/round_to.rb +1 -0
- data/lib/methods/facets/integer/set_bit.rb +1 -0
- data/lib/methods/facets/integer/set_bitmask.rb +1 -0
- data/lib/methods/facets/integer/test_bit.rb +1 -0
- data/lib/methods/facets/integer/test_bitmask.rb +1 -0
- data/lib/methods/facets/integer/times_collect.rb +1 -0
- data/lib/methods/facets/integer/times_map.rb +1 -0
- data/lib/methods/facets/kernel/__DIR__.rb +1 -0
- data/lib/methods/facets/kernel/__assign__.rb +1 -0
- data/lib/methods/facets/kernel/__callee__.rb +1 -0
- data/lib/methods/facets/kernel/__class__.rb +1 -0
- data/lib/methods/facets/kernel/__get__.rb +1 -0
- data/lib/methods/facets/kernel/__method__.rb +1 -0
- data/lib/methods/facets/kernel/__real__.rb +1 -0
- data/lib/methods/facets/kernel/__set__.rb +1 -0
- data/lib/methods/facets/kernel/__singleton_class__.rb +1 -0
- data/lib/methods/facets/kernel/as.rb +1 -0
- data/lib/methods/facets/kernel/ask.rb +1 -0
- data/lib/methods/facets/kernel/assign_from.rb +1 -0
- data/lib/methods/facets/kernel/assign_with.rb +1 -0
- data/lib/methods/facets/kernel/bitmask.rb +1 -0
- data/lib/methods/facets/kernel/bool.rb +1 -0
- data/lib/methods/facets/kernel/call_stack.rb +1 -0
- data/lib/methods/facets/kernel/called.rb +1 -0
- data/lib/methods/facets/kernel/callee.rb +1 -0
- data/lib/methods/facets/kernel/class_def.rb +1 -0
- data/lib/methods/facets/kernel/complete.rb +1 -0
- data/lib/methods/facets/kernel/constant.rb +1 -0
- data/lib/methods/facets/kernel/copy.rb +1 -0
- data/lib/methods/facets/kernel/d.rb +1 -0
- data/lib/methods/facets/kernel/deep_clone.rb +1 -0
- data/lib/methods/facets/kernel/deep_copy.rb +1 -0
- data/lib/methods/facets/kernel/demo.rb +1 -0
- data/lib/methods/facets/kernel/eigenclass.rb +1 -0
- data/lib/methods/facets/kernel/enable_warnings.rb +1 -0
- data/lib/methods/facets/kernel/false.rb +1 -0
- data/lib/methods/facets/kernel/fn.rb +1 -0
- data/lib/methods/facets/kernel/here.rb +1 -0
- data/lib/methods/facets/kernel/in.rb +1 -0
- data/lib/methods/facets/kernel/instance_assign.rb +1 -0
- data/lib/methods/facets/kernel/instance_assume.rb +1 -0
- data/lib/methods/facets/kernel/instance_class.rb +1 -0
- data/lib/methods/facets/kernel/instance_exec.rb +1 -0
- data/lib/methods/facets/kernel/instance_send.rb +1 -0
- data/lib/methods/facets/kernel/instance_values.rb +1 -0
- data/lib/methods/facets/kernel/is.rb +1 -0
- data/lib/methods/facets/kernel/load_local.rb +1 -0
- data/lib/methods/facets/kernel/meta.rb +1 -0
- data/lib/methods/facets/kernel/meta_alias.rb +1 -0
- data/lib/methods/facets/kernel/meta_class.rb +1 -0
- data/lib/methods/facets/kernel/meta_def.rb +1 -0
- data/lib/methods/facets/kernel/meta_eval.rb +1 -0
- data/lib/methods/facets/kernel/metaclass.rb +1 -0
- data/lib/methods/facets/kernel/method.rb +1 -0
- data/lib/methods/facets/kernel/object_class.rb +1 -0
- data/lib/methods/facets/kernel/object_clone.rb +1 -0
- data/lib/methods/facets/kernel/object_dup.rb +1 -0
- data/lib/methods/facets/kernel/object_hexid.rb +1 -0
- data/lib/methods/facets/kernel/object_send.rb +1 -0
- data/lib/methods/facets/kernel/op_esc.rb +1 -0
- data/lib/methods/facets/kernel/p.rb +1 -0
- data/lib/methods/facets/kernel/populate.rb +1 -0
- data/lib/methods/facets/kernel/pp_call_stack.rb +1 -0
- data/lib/methods/facets/kernel/pp_exception.rb +1 -0
- data/lib/methods/facets/kernel/qua_class.rb +1 -0
- data/lib/methods/facets/kernel/require_all.rb +1 -0
- data/lib/methods/facets/kernel/require_esc.rb +1 -0
- data/lib/methods/facets/kernel/require_local.rb +1 -0
- data/lib/methods/facets/kernel/resc.rb +1 -0
- data/lib/methods/facets/kernel/respond.rb +1 -0
- data/lib/methods/facets/kernel/returning.rb +1 -0
- data/lib/methods/facets/kernel/send_as.rb +1 -0
- data/lib/methods/facets/kernel/set_from.rb +1 -0
- data/lib/methods/facets/kernel/set_with.rb +1 -0
- data/lib/methods/facets/kernel/silence_stderr.rb +1 -0
- data/lib/methods/facets/kernel/silence_stream.rb +1 -0
- data/lib/methods/facets/kernel/silence_warnings.rb +1 -0
- data/lib/methods/facets/kernel/singleton.rb +1 -0
- data/lib/methods/facets/kernel/singleton_class.rb +1 -0
- data/lib/methods/facets/kernel/super_at.rb +1 -0
- data/lib/methods/facets/kernel/super_method.rb +1 -0
- data/lib/methods/facets/kernel/superior.rb +1 -0
- data/lib/methods/facets/kernel/supermethod.rb +1 -0
- data/lib/methods/facets/kernel/suppress.rb +1 -0
- data/lib/methods/facets/kernel/tap.rb +1 -0
- data/lib/methods/facets/kernel/this.rb +1 -0
- data/lib/methods/facets/kernel/to_b.rb +1 -0
- data/lib/methods/facets/kernel/true.rb +1 -0
- data/lib/methods/facets/kernel/val.rb +1 -0
- data/lib/methods/facets/kernel/warn_with_line.rb +1 -0
- data/lib/methods/facets/kernel/with.rb +1 -0
- data/lib/methods/facets/matchdata/match.rb +1 -0
- data/lib/methods/facets/matchdata/matchset.rb +1 -0
- data/lib/methods/facets/matchdata/matchtree.rb +1 -0
- data/lib/methods/facets/module/abstract.rb +1 -0
- data/lib/methods/facets/module/alias_accessor.rb +1 -0
- data/lib/methods/facets/module/alias_method_chain.rb +1 -0
- data/lib/methods/facets/module/alias_module_function.rb +1 -0
- data/lib/methods/facets/module/all_instance_methods.rb +1 -0
- data/lib/methods/facets/module/ancestor.rb +1 -0
- data/lib/methods/facets/module/attr_setter.rb +1 -0
- data/lib/methods/facets/module/attr_tester.rb +1 -0
- data/lib/methods/facets/module/attr_toggler.rb +1 -0
- data/lib/methods/facets/module/attr_validator.rb +1 -0
- data/lib/methods/facets/module/basename.rb +1 -0
- data/lib/methods/facets/module/by_name.rb +1 -0
- data/lib/methods/facets/module/can.rb +1 -0
- data/lib/methods/facets/module/class.rb +1 -0
- data/lib/methods/facets/module/clone_removing.rb +1 -0
- data/lib/methods/facets/module/clone_renaming.rb +1 -0
- data/lib/methods/facets/module/clone_using.rb +1 -0
- data/lib/methods/facets/module/dirname.rb +1 -0
- data/lib/methods/facets/module/include_and_extend.rb +1 -0
- data/lib/methods/facets/module/include_as.rb +1 -0
- data/lib/methods/facets/module/include_function_module.rb +1 -0
- data/lib/methods/facets/module/instance_method.rb +1 -0
- data/lib/methods/facets/module/integrate.rb +1 -0
- data/lib/methods/facets/module/is.rb +1 -0
- data/lib/methods/facets/module/modspace.rb +1 -0
- data/lib/methods/facets/module/module_load.rb +1 -0
- data/lib/methods/facets/module/module_method.rb +1 -0
- data/lib/methods/facets/module/module_require.rb +1 -0
- data/lib/methods/facets/module/nesting.rb +1 -0
- data/lib/methods/facets/module/nodef.rb +1 -0
- data/lib/methods/facets/module/on_included.rb +1 -0
- data/lib/methods/facets/module/op_minus.rb +1 -0
- data/lib/methods/facets/module/op_mul.rb +1 -0
- data/lib/methods/facets/module/op_plus.rb +1 -0
- data/lib/methods/facets/module/redef.rb +1 -0
- data/lib/methods/facets/module/redefine_method.rb +1 -0
- data/lib/methods/facets/module/redirect.rb +1 -0
- data/lib/methods/facets/module/redirect_method.rb +1 -0
- data/lib/methods/facets/module/remove.rb +1 -0
- data/lib/methods/facets/module/rename.rb +1 -0
- data/lib/methods/facets/module/rename_method.rb +1 -0
- data/lib/methods/facets/module/revisal.rb +1 -0
- data/lib/methods/facets/module/wrap.rb +1 -0
- data/lib/methods/facets/module/wrap_method.rb +1 -0
- data/lib/methods/facets/nilclass/ergo.rb +1 -0
- data/lib/methods/facets/nilclass/status.rb +1 -0
- data/lib/methods/facets/nilclass/to_bool.rb +1 -0
- data/lib/methods/facets/nilclass/to_f.rb +1 -0
- data/lib/methods/facets/nilclass/to_h.rb +1 -0
- data/lib/methods/facets/numeric/approx.rb +1 -0
- data/lib/methods/facets/numeric/distance.rb +1 -0
- data/lib/methods/facets/numeric/pred.rb +1 -0
- data/lib/methods/facets/numeric/round_at.rb +1 -0
- data/lib/methods/facets/numeric/round_to.rb +1 -0
- data/lib/methods/facets/numeric/succ.rb +1 -0
- data/lib/methods/facets/numeric/to_b.rb +1 -0
- data/lib/methods/facets/object/to_bool.rb +1 -0
- data/lib/methods/facets/object/with_accessor.rb +1 -0
- data/lib/methods/facets/object/with_reader.rb +1 -0
- data/lib/methods/facets/object/with_writer.rb +1 -0
- data/lib/methods/facets/proc/bind.rb +1 -0
- data/lib/methods/facets/proc/compose.rb +1 -0
- data/lib/methods/facets/proc/op_mul.rb +1 -0
- data/lib/methods/facets/proc/to_h.rb +1 -0
- data/lib/methods/facets/proc/to_method.rb +1 -0
- data/lib/methods/facets/proc/update.rb +1 -0
- data/lib/methods/facets/range/combine.rb +1 -0
- data/lib/methods/facets/range/overlap.rb +1 -0
- data/lib/methods/facets/range/to_r.rb +1 -0
- data/lib/methods/facets/range/to_range.rb +1 -0
- data/lib/methods/facets/range/umbrella.rb +1 -0
- data/lib/methods/facets/range/within.rb +1 -0
- data/lib/methods/facets/regexp/arity.rb +1 -0
- data/lib/methods/facets/regexp/to_re.rb +1 -0
- data/lib/methods/facets/regexp/to_regexp.rb +1 -0
- data/lib/methods/facets/string/_crypt.rb +1 -0
- data/lib/methods/facets/string/align_center.rb +1 -0
- data/lib/methods/facets/string/align_left.rb +1 -0
- data/lib/methods/facets/string/align_right.rb +1 -0
- data/lib/methods/facets/string/at.rb +1 -0
- data/lib/methods/facets/string/blank.rb +1 -0
- data/lib/methods/facets/string/bracket.rb +1 -0
- data/lib/methods/facets/string/brief.rb +1 -0
- data/lib/methods/facets/string/bytes.rb +1 -0
- data/lib/methods/facets/string/capitalized.rb +1 -0
- data/lib/methods/facets/string/chars.rb +1 -0
- data/lib/methods/facets/string/cleave.rb +1 -0
- data/lib/methods/facets/string/cmp.rb +1 -0
- data/lib/methods/facets/string/crypt.rb +1 -0
- data/lib/methods/facets/string/dequote.rb +1 -0
- data/lib/methods/facets/string/divide.rb +1 -0
- data/lib/methods/facets/string/downcase.rb +1 -0
- data/lib/methods/facets/string/each_char.rb +1 -0
- data/lib/methods/facets/string/each_character.rb +1 -0
- data/lib/methods/facets/string/each_word.rb +1 -0
- data/lib/methods/facets/string/ends_with.rb +1 -0
- data/lib/methods/facets/string/first.rb +1 -0
- data/lib/methods/facets/string/fold.rb +1 -0
- data/lib/methods/facets/string/format.rb +1 -0
- data/lib/methods/facets/string/indent.rb +1 -0
- data/lib/methods/facets/string/index_all.rb +1 -0
- data/lib/methods/facets/string/interpolate.rb +1 -0
- data/lib/methods/facets/string/last.rb +1 -0
- data/lib/methods/facets/string/lchomp.rb +1 -0
- data/lib/methods/facets/string/line_wrap.rb +1 -0
- data/lib/methods/facets/string/lines.rb +1 -0
- data/lib/methods/facets/string/lowercase.rb +1 -0
- data/lib/methods/facets/string/margin.rb +1 -0
- data/lib/methods/facets/string/mscan.rb +1 -0
- data/lib/methods/facets/string/natcmp.rb +1 -0
- data/lib/methods/facets/string/nchar.rb +1 -0
- data/lib/methods/facets/string/peek.rb +1 -0
- data/lib/methods/facets/string/poke.rb +1 -0
- data/lib/methods/facets/string/pop.rb +1 -0
- data/lib/methods/facets/string/pull.rb +1 -0
- data/lib/methods/facets/string/push.rb +1 -0
- data/lib/methods/facets/string/quote.rb +1 -0
- data/lib/methods/facets/string/range.rb +1 -0
- data/lib/methods/facets/string/range_all.rb +1 -0
- data/lib/methods/facets/string/range_of_line.rb +1 -0
- data/lib/methods/facets/string/regesc.rb +1 -0
- data/lib/methods/facets/string/rewrite.rb +1 -0
- data/lib/methods/facets/string/shatter.rb +1 -0
- data/lib/methods/facets/string/shift.rb +1 -0
- data/lib/methods/facets/string/splice.rb +1 -0
- data/lib/methods/facets/string/sprintf.rb +1 -0
- data/lib/methods/facets/string/starts_with.rb +1 -0
- data/lib/methods/facets/string/store.rb +1 -0
- data/lib/methods/facets/string/succ.rb +1 -0
- data/lib/methods/facets/string/tab.rb +1 -0
- data/lib/methods/facets/string/tabto.rb +1 -0
- data/lib/methods/facets/string/to_b.rb +1 -0
- data/lib/methods/facets/string/to_const.rb +1 -0
- data/lib/methods/facets/string/to_date.rb +1 -0
- data/lib/methods/facets/string/to_proc.rb +1 -0
- data/lib/methods/facets/string/to_re.rb +1 -0
- data/lib/methods/facets/string/to_rx.rb +1 -0
- data/lib/methods/facets/string/to_time.rb +1 -0
- data/lib/methods/facets/string/unbracket.rb +1 -0
- data/lib/methods/facets/string/unshift.rb +1 -0
- data/lib/methods/facets/string/upcase.rb +1 -0
- data/lib/methods/facets/string/uppercase.rb +1 -0
- data/lib/methods/facets/string/whitespace.rb +1 -0
- data/lib/methods/facets/string/word_filter.rb +1 -0
- data/lib/methods/facets/string/word_wrap.rb +1 -0
- data/lib/methods/facets/string/words.rb +1 -0
- data/lib/methods/facets/symbol/chomp.rb +1 -0
- data/lib/methods/facets/symbol/generate.rb +1 -0
- data/lib/methods/facets/symbol/lchomp.rb +1 -0
- data/lib/methods/facets/symbol/not.rb +1 -0
- data/lib/methods/facets/symbol/op_tilde.rb +1 -0
- data/lib/methods/facets/symbol/pad.rb +1 -0
- data/lib/methods/facets/symbol/shadow.rb +1 -0
- data/lib/methods/facets/symbol/succ.rb +1 -0
- data/lib/methods/facets/symbol/to_const.rb +1 -0
- data/lib/methods/facets/symbol/to_proc.rb +1 -0
- data/lib/methods/facets/time/change.rb +1 -0
- data/lib/methods/facets/time/elapse.rb +1 -0
- data/lib/methods/facets/time/stamp.rb +1 -0
- data/lib/methods/facets/time/to_date.rb +1 -0
- data/lib/methods/facets/time/to_s.rb +1 -0
- data/lib/methods/facets/time/to_time.rb +1 -0
- data/lib/methods/facets/trueclass/to_bool.rb +1 -0
- data/lib/methods/facets/unboundmethod/arguments.rb +1 -0
- data/lib/methods/facets/unboundmethod/name.rb +1 -0
- data/lib/more/facets/advice.rb +132 -0
- data/lib/more/facets/annotations.rb +154 -0
- data/lib/more/facets/ansicode.rb +268 -0
- data/lib/more/facets/aop.rb +212 -0
- data/lib/more/facets/arguments.rb +387 -0
- data/lib/more/facets/association.rb +203 -0
- data/lib/more/facets/attributes.rb +168 -0
- data/lib/more/facets/autoarray.rb +87 -0
- data/lib/more/facets/autoreload.rb +150 -0
- data/lib/more/facets/basicobject.rb +296 -0
- data/lib/more/facets/bbcode.rb +376 -0
- data/lib/more/facets/behavior.rb +91 -0
- data/lib/more/facets/binreadable.rb +286 -0
- data/lib/more/facets/buildable.rb +130 -0
- data/lib/more/facets/buildingblock.rb +263 -0
- data/lib/more/facets/bytes.rb +244 -0
- data/lib/more/facets/cachedelegator.rb +90 -0
- data/lib/more/facets/capsule.rb +254 -0
- data/lib/more/facets/class_extension.rb +160 -0
- data/lib/more/facets/classmethods.rb +221 -0
- data/lib/more/facets/cloneable.rb +75 -0
- data/lib/more/facets/command.rb +262 -0
- data/lib/more/facets/command_options.rb +328 -0
- data/lib/more/facets/compare_on.rb +143 -0
- data/lib/more/facets/console.rb +107 -0
- data/lib/more/facets/coroutine.rb +176 -0
- data/lib/more/facets/crypt.rb +214 -0
- data/lib/more/facets/curry.rb +96 -0
- data/lib/more/facets/cut.rb +217 -0
- data/lib/more/facets/daemonize.rb +50 -0
- data/lib/more/facets/date.rb +133 -0
- data/lib/more/facets/dependency.rb +205 -0
- data/lib/more/facets/dictionary.rb +537 -0
- data/lib/more/facets/downloader.rb +279 -0
- data/lib/more/facets/elementor.rb +288 -0
- data/lib/more/facets/enumerablepass.rb +285 -0
- data/lib/more/facets/eventhook.rb +121 -0
- data/lib/more/facets/expirable.rb +89 -0
- data/lib/more/facets/fileable.rb +155 -0
- data/lib/more/facets/filelist.rb +493 -0
- data/lib/more/facets/fileshell.rb +198 -0
- data/lib/more/facets/fileutils.rb +443 -0
- data/lib/more/facets/getoptlong.rb +113 -0
- data/lib/more/facets/hashbuilder.rb +97 -0
- data/lib/more/facets/heap.rb +27 -0
- data/lib/more/facets/infinity.rb +229 -0
- data/lib/more/facets/inheritor.rb +258 -0
- data/lib/more/facets/instantiable.rb +75 -0
- data/lib/more/facets/instantise.rb +126 -0
- data/lib/more/facets/interface.rb +230 -0
- data/lib/more/facets/interval.rb +427 -0
- data/lib/more/facets/ioredirect.rb +133 -0
- data/lib/more/facets/lazy.rb +245 -0
- data/lib/more/facets/let.rb +91 -0
- data/lib/more/facets/linkedlist.rb +256 -0
- data/lib/more/facets/logger.rb +60 -0
- data/lib/more/facets/lrucache.rb +179 -0
- data/lib/more/facets/main.rb +77 -0
- data/lib/more/facets/mapsend.rb +98 -0
- data/lib/more/facets/memoize.rb +155 -0
- data/lib/more/facets/minitar.rb +999 -0
- data/lib/more/facets/multipliers.rb +209 -0
- data/lib/more/facets/multiton.rb +353 -0
- data/lib/more/facets/nackclass.rb +43 -0
- data/lib/more/facets/namespace.rb +161 -0
- data/lib/more/facets/nullclass.rb +79 -0
- data/lib/more/facets/opencascade.rb +162 -0
- data/lib/more/facets/opencollection.rb +46 -0
- data/lib/more/facets/openobject.rb +362 -0
- data/lib/more/facets/orderedhash.rb +42 -0
- data/lib/more/facets/ostruct.rb +314 -0
- data/lib/more/facets/overload.rb +151 -0
- data/lib/more/facets/paramix.rb +245 -0
- data/lib/more/facets/pathlist.rb +106 -0
- data/lib/more/facets/pathname.rb +120 -0
- data/lib/more/facets/pool.rb +97 -0
- data/lib/more/facets/pqueue.rb +468 -0
- data/lib/more/facets/prepend.rb +92 -0
- data/lib/more/facets/progressbar.rb +237 -0
- data/lib/more/facets/prototype.rb +128 -0
- data/lib/more/facets/random.rb +525 -0
- data/lib/more/facets/rbconfig.rb +55 -0
- data/lib/more/facets/rbsystem.rb +190 -0
- data/lib/more/facets/recorder.rb +137 -0
- data/lib/more/facets/recursive.rb +67 -0
- data/lib/more/facets/reference.rb +100 -0
- data/lib/more/facets/reflection.rb +103 -0
- data/lib/more/facets/rwdelegator.rb +79 -0
- data/lib/more/facets/semaphore.rb +97 -0
- data/lib/more/facets/settings.rb +250 -0
- data/lib/more/facets/shellwords.rb +43 -0
- data/lib/more/facets/smtp_tls.rb +134 -0
- data/lib/more/facets/snapshot.rb +206 -0
- data/lib/more/facets/stylize.rb +355 -0
- data/lib/more/facets/syncarray.rb +146 -0
- data/lib/more/facets/synchash.rb +173 -0
- data/lib/more/facets/timer.rb +309 -0
- data/lib/more/facets/times.rb +444 -0
- data/lib/more/facets/tracepoint.rb +194 -0
- data/lib/more/facets/tuple.rb +370 -0
- data/lib/more/facets/typecast.rb +296 -0
- data/lib/more/facets/uninheritable.rb +93 -0
- data/lib/more/facets/uploadutils.rb +441 -0
- data/lib/more/facets/version.rb +127 -0
- data/lib/more/facets/yaml.rb +40 -0
- data/lib/more/facets/ziputils.rb +350 -0
- data/meta/manifest.txt +969 -0
- data/meta/project.yaml +34 -0
- data/meta/version.txt +1 -0
- data/task/clean +17 -0
- data/task/config.yaml +43 -0
- data/task/extest +129 -0
- data/task/groups +23 -0
- data/task/install +92 -0
- data/task/load +39 -0
- data/task/methods +120 -0
- data/task/publish +43 -0
- data/task/rdoc +113 -0
- data/task/rdoc.yaml +478 -0
- data/task/stats +138 -0
- data/task/test +25 -0
- data/test/unit/array/test_delete.rb +45 -0
- data/test/unit/array/test_indexable.rb +136 -0
- data/test/unit/array/test_merge.rb +51 -0
- data/test/unit/array/test_pad.rb +50 -0
- data/test/unit/array/test_rotate.rb +39 -0
- data/test/unit/array/test_select.rb +31 -0
- data/test/unit/array/test_stackable.rb +36 -0
- data/test/unit/binding/test_cflow.rb +62 -0
- data/test/unit/binding/test_eval.rb +45 -0
- data/test/unit/binding/test_vars.rb +46 -0
- data/test/unit/class/test_descendents.rb +38 -0
- data/test/unit/class/test_initializer.rb +34 -0
- data/test/unit/comparable/test_bound.rb +58 -0
- data/test/unit/comparable/test_cmp.rb +78 -0
- data/test/unit/continuation/test_create.rb +28 -0
- data/test/unit/enumerable/test_cartesian.rb +52 -0
- data/test/unit/enumerable/test_collate.rb +55 -0
- data/test/unit/enumerable/test_collect.rb +52 -0
- data/test/unit/enumerable/test_combination.rb +49 -0
- data/test/unit/enumerable/test_count.rb +78 -0
- data/test/unit/enumerable/test_partition.rb +134 -0
- data/test/unit/enumerable/test_permutation.rb +32 -0
- data/test/unit/enumerable/test_probability.rb +57 -0
- data/test/unit/file/test_topath.rb +74 -0
- data/test/unit/hash/test_at.rb +29 -0
- data/test/unit/hash/test_delete.rb +45 -0
- data/test/unit/hash/test_has_keys.rb +36 -0
- data/test/unit/hash/test_insert.rb +29 -0
- data/test/unit/hash/test_inverse.rb +32 -0
- data/test/unit/hash/test_iterate.rb +38 -0
- data/test/unit/hash/test_keyize.rb +60 -0
- data/test/unit/hash/test_merge.rb +31 -0
- data/test/unit/hash/test_new.rb +30 -0
- data/test/unit/hash/test_op.rb +52 -0
- data/test/unit/hash/test_rekey.rb +75 -0
- data/test/unit/hash/test_traverse.rb +39 -0
- data/test/unit/hash/test_update.rb +50 -0
- data/test/unit/hash/test_weave.rb +31 -0
- data/test/unit/integer/test_bitmask.rb +49 -0
- data/test/unit/integer/test_factorial.rb +32 -0
- data/test/unit/integer/test_multiples.rb +45 -0
- data/test/unit/integer/test_of.rb +36 -0
- data/test/unit/kernel/test_callstack.rb +36 -0
- data/test/unit/kernel/test_constant.rb +35 -0
- data/test/unit/kernel/test_deepcopy.rb +45 -0
- data/test/unit/kernel/test_instance.rb +78 -0
- data/test/unit/kernel/test_metaid.rb +62 -0
- data/test/unit/kernel/test_object.rb +37 -0
- data/test/unit/kernel/test_populate.rb +64 -0
- data/test/unit/kernel/test_report.rb +18 -0
- data/test/unit/kernel/test_require_esc.rb +29 -0
- data/test/unit/kernel/test_silence.rb +30 -0
- data/test/unit/kernel/test_super.rb +68 -0
- data/test/unit/kernel/test_tap.rb +45 -0
- data/test/unit/kernel/test_val.rb +50 -0
- data/test/unit/kernel/test_withattr.rb +53 -0
- data/test/unit/matchdata/test_matchset.rb +44 -0
- data/test/unit/module/test_abstract.rb +38 -0
- data/test/unit/module/test_alias.rb +60 -0
- data/test/unit/module/test_cattr.rb +65 -0
- data/test/unit/module/test_clone.rb +57 -0
- data/test/unit/module/test_include.rb +78 -0
- data/test/unit/module/test_modify.rb +189 -0
- data/test/unit/module/test_name.rb +66 -0
- data/test/unit/module/test_traits.rb +52 -0
- data/test/unit/numeric/test_round.rb +74 -0
- data/test/unit/proc/test_bind.rb +53 -0
- data/test/unit/proc/test_compose.rb +43 -0
- data/test/unit/range/test_combine.rb +36 -0
- data/test/unit/range/test_overlap.rb +56 -0
- data/test/unit/regexp/test_arity.rb +35 -0
- data/test/unit/string/test_align.rb +36 -0
- data/test/unit/string/test_blank.rb +33 -0
- data/test/unit/string/test_bracket.rb +79 -0
- data/test/unit/string/test_case.rb +48 -0
- data/test/unit/string/test_crypt.rb +32 -0
- data/test/unit/string/test_filter.rb +42 -0
- data/test/unit/string/test_format.rb +96 -0
- data/test/unit/string/test_indexable.rb +83 -0
- data/test/unit/string/test_interpolate.rb +29 -0
- data/test/unit/string/test_natcmp.rb +32 -0
- data/test/unit/string/test_nchar.rb +29 -0
- data/test/unit/string/test_partitions.rb +67 -0
- data/test/unit/string/test_range.rb +40 -0
- data/test/unit/string/test_regesc.rb +35 -0
- data/test/unit/string/test_scan.rb +46 -0
- data/test/unit/string/test_stackable.rb +113 -0
- data/test/unit/string/test_tabs.rb +135 -0
- data/test/unit/symbol/test_chomp.rb +28 -0
- data/test/unit/symbol/test_generate.rb +28 -0
- data/test/unit/symbol/test_not.rb +31 -0
- data/test/unit/symbol/test_shadow.rb +29 -0
- data/test/unit/symbol/test_succ.rb +30 -0
- data/test/unit/test_1stclassmethod.rb +21 -0
- data/test/unit/test_advice.rb +69 -0
- data/test/unit/test_annotations.rb +97 -0
- data/test/unit/test_ansicode.rb +20 -0
- data/test/unit/test_aop.rb +49 -0
- data/test/unit/test_arguments.rb +71 -0
- data/test/unit/test_association.rb +53 -0
- data/test/unit/test_attributes.rb +41 -0
- data/test/unit/test_autoarray.rb +34 -0
- data/test/unit/test_basicobject.rb +69 -0
- data/test/unit/test_bbcode.rb +36 -0
- data/test/unit/test_binreadable.rb +66 -0
- data/test/unit/test_boolean.rb +105 -0
- data/test/unit/test_buildable.rb +54 -0
- data/test/unit/test_buildingblock.rb +50 -0
- data/test/unit/test_bytes.rb +86 -0
- data/test/unit/test_class_extension.rb +72 -0
- data/test/unit/test_classmethods.rb +71 -0
- data/test/unit/test_command.rb +260 -0
- data/test/unit/test_command_options.rb +29 -0
- data/test/unit/test_compare_on.rb +59 -0
- data/test/unit/test_conversion.rb +236 -0
- data/test/unit/test_coroutine.rb +62 -0
- data/test/unit/test_crypt.rb +48 -0
- data/test/unit/test_curry.rb +43 -0
- data/test/unit/test_cut.rb +37 -0
- data/test/unit/test_date.rb +61 -0
- data/test/unit/test_dependency.rb +84 -0
- data/test/unit/test_dictionary.rb +122 -0
- data/test/unit/test_elementor.rb +75 -0
- data/test/unit/test_enumerablepass.rb +88 -0
- data/test/unit/test_functor.rb +39 -0
- data/test/unit/test_getoptlong.rb +41 -0
- data/test/unit/test_infinity.rb +52 -0
- data/test/unit/test_inheritor.rb +157 -0
- data/test/unit/test_instantiable.rb +39 -0
- data/test/unit/test_instantise.rb +47 -0
- data/test/unit/test_interface.rb +91 -0
- data/test/unit/test_interval.rb +121 -0
- data/test/unit/test_let.rb +33 -0
- data/test/unit/test_linkedlist.rb +55 -0
- data/test/unit/test_lrucache.rb +27 -0
- data/test/unit/test_mapsend.rb +34 -0
- data/test/unit/test_memoize.rb +52 -0
- data/test/unit/test_multipliers.rb +116 -0
- data/test/unit/test_multiton.rb +184 -0
- data/test/unit/test_namespace.rb +67 -0
- data/test/unit/test_opencascade.rb +77 -0
- data/test/unit/test_openobject.rb +128 -0
- data/test/unit/test_ostruct.rb +130 -0
- data/test/unit/test_overload.rb +56 -0
- data/test/unit/test_paramix.rb +98 -0
- data/test/unit/test_prototype.rb +50 -0
- data/test/unit/test_random.rb +161 -0
- data/test/unit/test_recorder.rb +46 -0
- data/test/unit/test_snapshot.rb +36 -0
- data/test/unit/test_stylize.rb +154 -0
- data/test/unit/test_syncarray.rb +30 -0
- data/test/unit/test_synchash.rb +30 -0
- data/test/unit/test_timer.rb +68 -0
- data/test/unit/test_times.rb +105 -0
- data/test/unit/test_tuple.rb +66 -0
- data/test/unit/test_typecast.rb +70 -0
- data/test/unit/test_uninheritable.rb +44 -0
- data/test/unit/time/test_change.rb +32 -0
- data/test/unit/time/test_elapse.rb +31 -0
- metadata +1158 -1418
- data/COPYING +0 -403
- data/PROJECT +0 -65
- data/VERSION +0 -1
- data/data/facets/units/binary/base.yaml +0 -12
- data/data/facets/units/binary/extra.yaml +0 -8
- data/data/facets/units/cex.yaml +0 -7
- data/data/facets/units/currency/base.yaml +0 -268
- data/data/facets/units/default.yaml +0 -22
- data/data/facets/units/dump_yaml.rb +0 -309
- data/data/facets/units/si/base.yaml +0 -36
- data/data/facets/units/si/derived.yaml +0 -133
- data/data/facets/units/si/extra.yaml +0 -107
- data/data/facets/units/standard.yaml +0 -5
- data/data/facets/units/uk.yaml +0 -16
- data/data/facets/units/uk/base.yaml +0 -107
- data/data/facets/units/us.yaml +0 -16
- data/data/facets/units/us/base.yaml +0 -112
- data/data/facets/units/xmethods/cached.yaml +0 -83
- data/data/facets/units/xmethods/mapping.yaml +0 -85
- data/demo/annotation/demo_annotation.rb +0 -22
- data/demo/cuts/benchmark.rb +0 -71
- data/demo/cuts/override.rb +0 -33
- data/demo/io-reactor/chatserver.rb +0 -347
- data/demo/lisp/game.rb +0 -47
- data/demo/tkxml/helloworld.rb +0 -32
- data/demo/tkxml/ui.xml +0 -32
- data/doc/AUTHORS +0 -54
- data/doc/CHANGES +0 -354
- data/doc/HISTORY +0 -337
- data/doc/LATEST +0 -220
- data/doc/misc/history/ANN-0.6.0 +0 -40
- data/doc/misc/history/ANN-0.6.1 +0 -36
- data/doc/misc/history/ANN-0.6.3 +0 -43
- data/doc/misc/history/ANN-0.7.0 +0 -59
- data/doc/misc/history/ANN-0.8.1 +0 -127
- data/doc/misc/history/ANN-1.4 +0 -41
- data/doc/misc/tkxml.txt +0 -555
- data/lib/facet/all.rb +0 -1
- data/lib/facet/ann.rb +0 -1
- data/lib/facet/ann_attr.rb +0 -1
- data/lib/facet/ansicode.rb +0 -1
- data/lib/facet/arguments.rb +0 -1
- data/lib/facet/array/at_rand.rb +0 -1
- data/lib/facet/array/body.rb +0 -1
- data/lib/facet/array/combos.rb +0 -1
- data/lib/facet/array/delete_unless.rb +0 -1
- data/lib/facet/array/delete_values.rb +0 -1
- data/lib/facet/array/delete_values_at.rb +0 -1
- data/lib/facet/array/each_combo.rb +0 -1
- data/lib/facet/array/each_with_key.rb +0 -1
- data/lib/facet/array/first.rb +0 -1
- data/lib/facet/array/foot.rb +0 -1
- data/lib/facet/array/head.rb +0 -1
- data/lib/facet/array/index.rb +0 -1
- data/lib/facet/array/join_sentence.rb +0 -1
- data/lib/facet/array/last.rb +0 -1
- data/lib/facet/array/last_index.rb +0 -1
- data/lib/facet/array/merge.rb +0 -1
- data/lib/facet/array/mid.rb +0 -1
- data/lib/facet/array/middle.rb +0 -1
- data/lib/facet/array/op_div.rb +0 -1
- data/lib/facet/array/op_fetch.rb +0 -1
- data/lib/facet/array/op_mod.rb +0 -1
- data/lib/facet/array/op_store.rb +0 -1
- data/lib/facet/array/pad.rb +0 -1
- data/lib/facet/array/pick.rb +0 -1
- data/lib/facet/array/pos.rb +0 -1
- data/lib/facet/array/pot.rb +0 -1
- data/lib/facet/array/pull.rb +0 -1
- data/lib/facet/array/rand_index.rb +0 -1
- data/lib/facet/array/rand_subset.rb +0 -1
- data/lib/facet/array/range.rb +0 -1
- data/lib/facet/array/rotate.rb +0 -1
- data/lib/facet/array/select.rb +0 -1
- data/lib/facet/array/shuffle.rb +0 -1
- data/lib/facet/array/store.rb +0 -1
- data/lib/facet/array/tail.rb +0 -1
- data/lib/facet/array/thru.rb +0 -1
- data/lib/facet/array/to_b.rb +0 -1
- data/lib/facet/array/to_h.rb +0 -1
- data/lib/facet/array/to_hash.rb +0 -1
- data/lib/facet/array/to_path.rb +0 -1
- data/lib/facet/array/unzip.rb +0 -1
- data/lib/facet/aspects.rb +0 -1
- data/lib/facet/association.rb +0 -1
- data/lib/facet/autoarray.rb +0 -1
- data/lib/facet/autoscript.rb +0 -1
- data/lib/facet/autovivify.rb +0 -1
- data/lib/facet/basicobject.rb +0 -1
- data/lib/facet/bbcode.rb +0 -1
- data/lib/facet/behavior.rb +0 -1
- data/lib/facet/binaryreader.rb +0 -1
- data/lib/facet/binding.rb +0 -1
- data/lib/facet/binding/__DIR__.rb +0 -1
- data/lib/facet/binding/__FILE__.rb +0 -1
- data/lib/facet/binding/__LINE__.rb +0 -1
- data/lib/facet/binding/call_stack.rb +0 -1
- data/lib/facet/binding/called.rb +0 -1
- data/lib/facet/binding/caller.rb +0 -1
- data/lib/facet/binding/defined.rb +0 -1
- data/lib/facet/binding/eval.rb +0 -1
- data/lib/facet/binding/local_variables.rb +0 -1
- data/lib/facet/binding/method_name.rb +0 -1
- data/lib/facet/binding/op_fetch.rb +0 -1
- data/lib/facet/binding/op_store.rb +0 -1
- data/lib/facet/binding/self.rb +0 -1
- data/lib/facet/binding/self/of_caller.rb +0 -1
- data/lib/facet/bitmask.rb +0 -1
- data/lib/facet/buildingblock.rb +0 -1
- data/lib/facet/bytes.rb +0 -1
- data/lib/facet/cache.rb +0 -1
- data/lib/facet/class/by_name.rb +0 -1
- data/lib/facet/class/cattr.rb +0 -1
- data/lib/facet/class/cattr_accessor.rb +0 -1
- data/lib/facet/class/cattr_reader.rb +0 -1
- data/lib/facet/class/cattr_writer.rb +0 -1
- data/lib/facet/class/class_load.rb +0 -1
- data/lib/facet/class/class_require.rb +0 -1
- data/lib/facet/class/descendents.rb +0 -1
- data/lib/facet/class/method_name.rb +0 -1
- data/lib/facet/class/remove_descendents.rb +0 -1
- data/lib/facet/class/remove_subclasses.rb +0 -1
- data/lib/facet/class/subclasses.rb +0 -1
- data/lib/facet/class/to_proc.rb +0 -1
- data/lib/facet/class/unix_path.rb +0 -1
- data/lib/facet/classmethods.rb +0 -1
- data/lib/facet/cloneable.rb +0 -1
- data/lib/facet/command.rb +0 -1
- data/lib/facet/comparable/at_least.rb +0 -1
- data/lib/facet/comparable/at_most.rb +0 -1
- data/lib/facet/comparable/cap.rb +0 -1
- data/lib/facet/comparable/clip.rb +0 -1
- data/lib/facet/comparable/cmp.rb +0 -1
- data/lib/facet/config/datadir.rb +0 -1
- data/lib/facet/config/inspect.rb +0 -1
- data/lib/facet/consoleutils.rb +0 -1
- data/lib/facet/continuation/self/create.rb +0 -1
- data/lib/facet/cookie.rb +0 -1
- data/lib/facet/coroutine.rb +0 -1
- data/lib/facet/crypt.rb +0 -1
- data/lib/facet/cut.rb +0 -1
- data/lib/facet/date/days_in_month.rb +0 -1
- data/lib/facet/date/days_of_month.rb +0 -1
- data/lib/facet/date/stamp.rb +0 -1
- data/lib/facet/date/to_date.rb +0 -1
- data/lib/facet/date/to_s.rb +0 -1
- data/lib/facet/date/to_time.rb +0 -1
- data/lib/facet/dependency.rb +0 -1
- data/lib/facet/dictionary.rb +0 -1
- data/lib/facet/dir/self/ancestor.rb +0 -1
- data/lib/facet/dir/self/ascend.rb +0 -1
- data/lib/facet/dir/self/descend.rb +0 -1
- data/lib/facet/dir/self/ls_r.rb +0 -1
- data/lib/facet/dir/self/multiglob.rb +0 -1
- data/lib/facet/dir/self/multiglob_r.rb +0 -1
- data/lib/facet/dir/self/multiglob_with_default.rb +0 -1
- data/lib/facet/dir/self/recurse.rb +0 -1
- data/lib/facet/doublemetaphone.rb +0 -1
- data/lib/facet/downloader.rb +0 -1
- data/lib/facet/elementor.rb +0 -1
- data/lib/facet/enumerable/accumulate.rb +0 -1
- data/lib/facet/enumerable/cart.rb +0 -1
- data/lib/facet/enumerable/cartesian_product.rb +0 -1
- data/lib/facet/enumerable/cascade.rb +0 -1
- data/lib/facet/enumerable/collect_if.rb +0 -1
- data/lib/facet/enumerable/collect_with_counter.rb +0 -1
- data/lib/facet/enumerable/collect_with_index.rb +0 -1
- data/lib/facet/enumerable/commonality.rb +0 -1
- data/lib/facet/enumerable/compact_collect.rb +0 -1
- data/lib/facet/enumerable/compact_map.rb +0 -1
- data/lib/facet/enumerable/count.rb +0 -1
- data/lib/facet/enumerable/divide.rb +0 -1
- data/lib/facet/enumerable/each_by.rb +0 -1
- data/lib/facet/enumerable/each_combination.rb +0 -1
- data/lib/facet/enumerable/each_pair.rb +0 -1
- data/lib/facet/enumerable/each_permutation.rb +0 -1
- data/lib/facet/enumerable/each_slice.rb +0 -1
- data/lib/facet/enumerable/each_unique_pair.rb +0 -1
- data/lib/facet/enumerable/each_with_counter.rb +0 -1
- data/lib/facet/enumerable/eachn.rb +0 -1
- data/lib/facet/enumerable/elementwise.rb +0 -1
- data/lib/facet/enumerable/entropy.rb +0 -1
- data/lib/facet/enumerable/every.rb +0 -1
- data/lib/facet/enumerable/ew.rb +0 -1
- data/lib/facet/enumerable/filter_collect.rb +0 -1
- data/lib/facet/enumerable/filter_map.rb +0 -1
- data/lib/facet/enumerable/find_collisions.rb +0 -1
- data/lib/facet/enumerable/frequency.rb +0 -1
- data/lib/facet/enumerable/graph.rb +0 -1
- data/lib/facet/enumerable/ideal_entropy.rb +0 -1
- data/lib/facet/enumerable/injecting.rb +0 -1
- data/lib/facet/enumerable/map_if.rb +0 -1
- data/lib/facet/enumerable/map_send.rb +0 -1
- data/lib/facet/enumerable/map_with_counter.rb +0 -1
- data/lib/facet/enumerable/map_with_index.rb +0 -1
- data/lib/facet/enumerable/mode.rb +0 -1
- data/lib/facet/enumerable/none.rb +0 -1
- data/lib/facet/enumerable/nonuniq.rb +0 -1
- data/lib/facet/enumerable/occur.rb +0 -1
- data/lib/facet/enumerable/one.rb +0 -1
- data/lib/facet/enumerable/op_pow.rb +0 -1
- data/lib/facet/enumerable/op_tilde_self.rb +0 -1
- data/lib/facet/enumerable/partition_by.rb +0 -1
- data/lib/facet/enumerable/permutation.rb +0 -1
- data/lib/facet/enumerable/probability.rb +0 -1
- data/lib/facet/enumerable/project.rb +0 -1
- data/lib/facet/enumerable/self/cart.rb +0 -1
- data/lib/facet/enumerable/self/cartesian_product.rb +0 -1
- data/lib/facet/enumerable/self/combinations.rb +0 -1
- data/lib/facet/enumerable/sum.rb +0 -1
- data/lib/facet/enumerable/thread_map.rb +0 -1
- data/lib/facet/enumerable/thread_map_send.rb +0 -1
- data/lib/facet/enumerable/to_h.rb +0 -1
- data/lib/facet/enumerable/uniq_by.rb +0 -1
- data/lib/facet/enumerable/where.rb +0 -1
- data/lib/facet/enumerablepass.rb +0 -1
- data/lib/facet/eventhook.rb +0 -1
- data/lib/facet/expirable.rb +0 -1
- data/lib/facet/file/self/append.rb +0 -1
- data/lib/facet/file/self/create.rb +0 -1
- data/lib/facet/file/self/null.rb +0 -1
- data/lib/facet/file/self/open_as_string.rb +0 -1
- data/lib/facet/file/self/read_binary.rb +0 -1
- data/lib/facet/file/self/read_list.rb +0 -1
- data/lib/facet/file/self/rootname.rb +0 -1
- data/lib/facet/file/self/sanitize.rb +0 -1
- data/lib/facet/file/self/split_all.rb +0 -1
- data/lib/facet/file/self/write.rb +0 -1
- data/lib/facet/file/self/yaml.rb +0 -1
- data/lib/facet/filelist.rb +0 -1
- data/lib/facet/filesystem.rb +0 -1
- data/lib/facet/filetest/self/root.rb +0 -1
- data/lib/facet/fileutils/compress.rb +0 -1
- data/lib/facet/fileutils/head.rb +0 -1
- data/lib/facet/fileutils/safe_ln.rb +0 -1
- data/lib/facet/fileutils/slice.rb +0 -1
- data/lib/facet/fileutils/split_all.rb +0 -1
- data/lib/facet/fileutils/stage.rb +0 -1
- data/lib/facet/fileutils/staged.rb +0 -1
- data/lib/facet/fileutils/tail.rb +0 -1
- data/lib/facet/fileutils/wc.rb +0 -1
- data/lib/facet/fileutils/whereis.rb +0 -1
- data/lib/facet/fileutils/which.rb +0 -1
- data/lib/facet/float/approx.rb +0 -1
- data/lib/facet/float/round_at.rb +0 -1
- data/lib/facet/float/round_off.rb +0 -1
- data/lib/facet/float/round_to.rb +0 -1
- data/lib/facet/floatstring.rb +0 -1
- data/lib/facet/functor.rb +0 -1
- data/lib/facet/gem/self/active.rb +0 -1
- data/lib/facet/gem/self/gempath.rb +0 -1
- data/lib/facet/gem/self/gemspec.rb +0 -1
- data/lib/facet/hash/alias.rb +0 -1
- data/lib/facet/hash/assert_has_keys.rb +0 -1
- data/lib/facet/hash/assert_has_only_keys.rb +0 -1
- data/lib/facet/hash/at.rb +0 -1
- data/lib/facet/hash/collate.rb +0 -1
- data/lib/facet/hash/delete_at.rb +0 -1
- data/lib/facet/hash/delete_unless.rb +0 -1
- data/lib/facet/hash/delete_values.rb +0 -1
- data/lib/facet/hash/delete_values_at.rb +0 -1
- data/lib/facet/hash/diff.rb +0 -1
- data/lib/facet/hash/each_with_index.rb +0 -1
- data/lib/facet/hash/each_with_key.rb +0 -1
- data/lib/facet/hash/graph.rb +0 -1
- data/lib/facet/hash/has_keys.rb +0 -1
- data/lib/facet/hash/has_only_keys.rb +0 -1
- data/lib/facet/hash/having_aquisition.rb +0 -1
- data/lib/facet/hash/having_fallback.rb +0 -1
- data/lib/facet/hash/insert.rb +0 -1
- data/lib/facet/hash/inverse.rb +0 -1
- data/lib/facet/hash/join.rb +0 -1
- data/lib/facet/hash/keys_to_s.rb +0 -1
- data/lib/facet/hash/keys_to_sym.rb +0 -1
- data/lib/facet/hash/normalize_keys.rb +0 -1
- data/lib/facet/hash/op_add.rb +0 -1
- data/lib/facet/hash/op_and.rb +0 -1
- data/lib/facet/hash/op_div.rb +0 -1
- data/lib/facet/hash/op_fetch.rb +0 -1
- data/lib/facet/hash/op_lshift.rb +0 -1
- data/lib/facet/hash/op_mul.rb +0 -1
- data/lib/facet/hash/op_or.rb +0 -1
- data/lib/facet/hash/op_store.rb +0 -1
- data/lib/facet/hash/op_sub.rb +0 -1
- data/lib/facet/hash/pairs_at.rb +0 -1
- data/lib/facet/hash/rand_key.rb +0 -1
- data/lib/facet/hash/rand_pair.rb +0 -1
- data/lib/facet/hash/rand_value.rb +0 -1
- data/lib/facet/hash/rekey.rb +0 -1
- data/lib/facet/hash/replace_each.rb +0 -1
- data/lib/facet/hash/reverse_merge.rb +0 -1
- data/lib/facet/hash/reverse_update.rb +0 -1
- data/lib/facet/hash/self/auto.rb +0 -1
- data/lib/facet/hash/self/zipnew.rb +0 -1
- data/lib/facet/hash/shuffle.rb +0 -1
- data/lib/facet/hash/slice.rb +0 -1
- data/lib/facet/hash/stringify_keys.rb +0 -1
- data/lib/facet/hash/swap.rb +0 -1
- data/lib/facet/hash/swapkey.rb +0 -1
- data/lib/facet/hash/symbolize_keys.rb +0 -1
- data/lib/facet/hash/to_h.rb +0 -1
- data/lib/facet/hash/to_ostruct.rb +0 -1
- data/lib/facet/hash/to_ostruct_recurse.rb +0 -1
- data/lib/facet/hash/to_proc.rb +0 -1
- data/lib/facet/hash/to_struct.rb +0 -1
- data/lib/facet/hash/traverse.rb +0 -1
- data/lib/facet/hash/update_each.rb +0 -1
- data/lib/facet/hash/update_keys.rb +0 -1
- data/lib/facet/hash/update_values.rb +0 -1
- data/lib/facet/hash/variablize_keys.rb +0 -1
- data/lib/facet/hash/weave.rb +0 -1
- data/lib/facet/hashbuilder.rb +0 -1
- data/lib/facet/heap.rb +0 -1
- data/lib/facet/htmlbuilder.rb +0 -1
- data/lib/facet/htmlfilter.rb +0 -1
- data/lib/facet/htmlhelper.rb +0 -1
- data/lib/facet/http.rb +0 -1
- data/lib/facet/httpaccess.rb +0 -1
- data/lib/facet/infinity.rb +0 -1
- data/lib/facet/inflect.rb +0 -1
- data/lib/facet/inheritor.rb +0 -1
- data/lib/facet/instance_intercept.rb +0 -1
- data/lib/facet/integer/each.rb +0 -1
- data/lib/facet/integer/even.rb +0 -1
- data/lib/facet/integer/fac.rb +0 -1
- data/lib/facet/integer/fact.rb +0 -1
- data/lib/facet/integer/factorial.rb +0 -1
- data/lib/facet/integer/multiple.rb +0 -1
- data/lib/facet/integer/odd.rb +0 -1
- data/lib/facet/integer/of.rb +0 -1
- data/lib/facet/integer/ordinal.rb +0 -1
- data/lib/facet/integer/times_collect.rb +0 -1
- data/lib/facet/integer/times_map.rb +0 -1
- data/lib/facet/integer/to_roman.rb +0 -1
- data/lib/facet/interval.rb +0 -1
- data/lib/facet/ioredirect.rb +0 -1
- data/lib/facet/json.rb +0 -1
- data/lib/facet/kernel/__DIR__.rb +0 -1
- data/lib/facet/kernel/__callee__.rb +0 -1
- data/lib/facet/kernel/__class__.rb +0 -1
- data/lib/facet/kernel/__get__.rb +0 -1
- data/lib/facet/kernel/__method__.rb +0 -1
- data/lib/facet/kernel/__self__.rb +0 -1
- data/lib/facet/kernel/__set__.rb +0 -1
- data/lib/facet/kernel/as.rb +0 -1
- data/lib/facet/kernel/ask.rb +0 -1
- data/lib/facet/kernel/assign_from.rb +0 -1
- data/lib/facet/kernel/assign_with.rb +0 -1
- data/lib/facet/kernel/autoreload.rb +0 -1
- data/lib/facet/kernel/autoreload_files.rb +0 -1
- data/lib/facet/kernel/autoreload_glob.rb +0 -1
- data/lib/facet/kernel/bool.rb +0 -1
- data/lib/facet/kernel/bug.rb +0 -1
- data/lib/facet/kernel/cache.rb +0 -1
- data/lib/facet/kernel/call_stack.rb +0 -1
- data/lib/facet/kernel/called.rb +0 -1
- data/lib/facet/kernel/callee.rb +0 -1
- data/lib/facet/kernel/class_def.rb +0 -1
- data/lib/facet/kernel/complete.rb +0 -1
- data/lib/facet/kernel/constant.rb +0 -1
- data/lib/facet/kernel/copy.rb +0 -1
- data/lib/facet/kernel/daemonize.rb +0 -1
- data/lib/facet/kernel/deep_clone.rb +0 -1
- data/lib/facet/kernel/deep_copy.rb +0 -1
- data/lib/facet/kernel/demo.rb +0 -1
- data/lib/facet/kernel/eigenclass.rb +0 -1
- data/lib/facet/kernel/enable_warnings.rb +0 -1
- data/lib/facet/kernel/false.rb +0 -1
- data/lib/facet/kernel/fn.rb +0 -1
- data/lib/facet/kernel/get_by_id.rb +0 -1
- data/lib/facet/kernel/here.rb +0 -1
- data/lib/facet/kernel/in.rb +0 -1
- data/lib/facet/kernel/instance_assign.rb +0 -1
- data/lib/facet/kernel/instance_class.rb +0 -1
- data/lib/facet/kernel/instance_exec.rb +0 -1
- data/lib/facet/kernel/instance_values.rb +0 -1
- data/lib/facet/kernel/instvar.rb +0 -1
- data/lib/facet/kernel/is.rb +0 -1
- data/lib/facet/kernel/load_local.rb +0 -1
- data/lib/facet/kernel/maybe.rb +0 -1
- data/lib/facet/kernel/meta.rb +0 -1
- data/lib/facet/kernel/meta_alias.rb +0 -1
- data/lib/facet/kernel/meta_class.rb +0 -1
- data/lib/facet/kernel/meta_def.rb +0 -1
- data/lib/facet/kernel/meta_eval.rb +0 -1
- data/lib/facet/kernel/metaclass.rb +0 -1
- data/lib/facet/kernel/method.rb +0 -1
- data/lib/facet/kernel/methods.rb +0 -1
- data/lib/facet/kernel/nack.rb +0 -1
- data/lib/facet/kernel/new.rb +0 -1
- data/lib/facet/kernel/object_class.rb +0 -1
- data/lib/facet/kernel/object_clone.rb +0 -1
- data/lib/facet/kernel/object_dup.rb +0 -1
- data/lib/facet/kernel/object_hexid.rb +0 -1
- data/lib/facet/kernel/object_send.rb +0 -1
- data/lib/facet/kernel/op_esc.rb +0 -1
- data/lib/facet/kernel/p.rb +0 -1
- data/lib/facet/kernel/populate.rb +0 -1
- data/lib/facet/kernel/pp_exception.rb +0 -1
- data/lib/facet/kernel/qua_class.rb +0 -1
- data/lib/facet/kernel/require_all.rb +0 -1
- data/lib/facet/kernel/require_esc.rb +0 -1
- data/lib/facet/kernel/require_local.rb +0 -1
- data/lib/facet/kernel/resc.rb +0 -1
- data/lib/facet/kernel/respond.rb +0 -1
- data/lib/facet/kernel/returning.rb +0 -1
- data/lib/facet/kernel/send_as.rb +0 -1
- data/lib/facet/kernel/set_from.rb +0 -1
- data/lib/facet/kernel/set_with.rb +0 -1
- data/lib/facet/kernel/silence_stream.rb +0 -1
- data/lib/facet/kernel/silence_warnings.rb +0 -1
- data/lib/facet/kernel/silently.rb +0 -1
- data/lib/facet/kernel/singleton.rb +0 -1
- data/lib/facet/kernel/singleton_class.rb +0 -1
- data/lib/facet/kernel/super_at.rb +0 -1
- data/lib/facet/kernel/supermethod.rb +0 -1
- data/lib/facet/kernel/supress.rb +0 -1
- data/lib/facet/kernel/tap.rb +0 -1
- data/lib/facet/kernel/this.rb +0 -1
- data/lib/facet/kernel/to_b.rb +0 -1
- data/lib/facet/kernel/to_bool.rb +0 -1
- data/lib/facet/kernel/to_data.rb +0 -1
- data/lib/facet/kernel/true.rb +0 -1
- data/lib/facet/kernel/unuri.rb +0 -1
- data/lib/facet/kernel/uri.rb +0 -1
- data/lib/facet/kernel/val.rb +0 -1
- data/lib/facet/kernel/warn_with_line.rb +0 -1
- data/lib/facet/kernel/with.rb +0 -1
- data/lib/facet/kernel/with_accessor.rb +0 -1
- data/lib/facet/kernel/with_reader.rb +0 -1
- data/lib/facet/kernel/with_writer.rb +0 -1
- data/lib/facet/kernel/yaml.rb +0 -1
- data/lib/facet/lazy.rb +0 -1
- data/lib/facet/linkedlist.rb +0 -1
- data/lib/facet/lisp.rb +0 -1
- data/lib/facet/lisp_format.rb +0 -1
- data/lib/facet/logger/format.rb +0 -1
- data/lib/facet/logger/format_message.rb +0 -1
- data/lib/facet/lrucache.rb +0 -1
- data/lib/facet/main_as_module.rb +0 -1
- data/lib/facet/matchdata/match.rb +0 -1
- data/lib/facet/matchdata/matchset.rb +0 -1
- data/lib/facet/matchdata/matchtree.rb +0 -1
- data/lib/facet/mathconstants.rb +0 -1
- data/lib/facet/methodfilter.rb +0 -1
- data/lib/facet/methodprobe.rb +0 -1
- data/lib/facet/minitar.rb +0 -1
- data/lib/facet/mock.rb +0 -1
- data/lib/facet/module/abstract.rb +0 -1
- data/lib/facet/module/alias_accessor.rb +0 -1
- data/lib/facet/module/alias_method_chain.rb +0 -1
- data/lib/facet/module/alias_module_function.rb +0 -1
- data/lib/facet/module/ancestor.rb +0 -1
- data/lib/facet/module/attr.rb +0 -1
- data/lib/facet/module/attr_query.rb +0 -1
- data/lib/facet/module/attr_setter.rb +0 -1
- data/lib/facet/module/attr_tester.rb +0 -1
- data/lib/facet/module/attr_validator.rb +0 -1
- data/lib/facet/module/basename.rb +0 -1
- data/lib/facet/module/by_name.rb +0 -1
- data/lib/facet/module/class.rb +0 -1
- data/lib/facet/module/class_extension.rb +0 -1
- data/lib/facet/module/clone_removing.rb +0 -1
- data/lib/facet/module/clone_renaming.rb +0 -1
- data/lib/facet/module/clone_using.rb +0 -1
- data/lib/facet/module/dirname.rb +0 -1
- data/lib/facet/module/equate_on.rb +0 -1
- data/lib/facet/module/include_and_extend.rb +0 -1
- data/lib/facet/module/include_as.rb +0 -1
- data/lib/facet/module/include_function_module.rb +0 -1
- data/lib/facet/module/initializer.rb +0 -1
- data/lib/facet/module/instance_methods.rb +0 -1
- data/lib/facet/module/integrate.rb +0 -1
- data/lib/facet/module/is.rb +0 -1
- data/lib/facet/module/memoize.rb +0 -1
- data/lib/facet/module/modspace.rb +0 -1
- data/lib/facet/module/module_load.rb +0 -1
- data/lib/facet/module/module_method.rb +0 -1
- data/lib/facet/module/module_require.rb +0 -1
- data/lib/facet/module/namespace.rb +0 -1
- data/lib/facet/module/nesting.rb +0 -1
- data/lib/facet/module/new.rb +0 -1
- data/lib/facet/module/nodef.rb +0 -1
- data/lib/facet/module/on_included.rb +0 -1
- data/lib/facet/module/prepend.rb +0 -1
- data/lib/facet/module/redef.rb +0 -1
- data/lib/facet/module/redefine_method.rb +0 -1
- data/lib/facet/module/redirect.rb +0 -1
- data/lib/facet/module/redirect_method.rb +0 -1
- data/lib/facet/module/remove.rb +0 -1
- data/lib/facet/module/rename.rb +0 -1
- data/lib/facet/module/rename_method.rb +0 -1
- data/lib/facet/module/revisal.rb +0 -1
- data/lib/facet/module/self/op_add.rb +0 -1
- data/lib/facet/module/self/op_sub.rb +0 -1
- data/lib/facet/module/shadow_all.rb +0 -1
- data/lib/facet/module/shadow_method.rb +0 -1
- data/lib/facet/module/sort_on.rb +0 -1
- data/lib/facet/module/this.rb +0 -1
- data/lib/facet/module/wrap.rb +0 -1
- data/lib/facet/module/wrap_method.rb +0 -1
- data/lib/facet/multipliers.rb +0 -1
- data/lib/facet/multiton.rb +0 -1
- data/lib/facet/nackclass.rb +0 -1
- data/lib/facet/nil_as_emptiness.rb +0 -1
- data/lib/facet/nilclass/blank.rb +0 -1
- data/lib/facet/nilclass/empty.rb +0 -1
- data/lib/facet/nilclass/include.rb +0 -1
- data/lib/facet/nilclass/length.rb +0 -1
- data/lib/facet/nilclass/op_cmp.rb +0 -1
- data/lib/facet/nilclass/op_fetch.rb +0 -1
- data/lib/facet/nilclass/size.rb +0 -1
- data/lib/facet/nilclass/status.rb +0 -1
- data/lib/facet/nilclass/succ.rb +0 -1
- data/lib/facet/nilclass/to_h.rb +0 -1
- data/lib/facet/nilclass/to_path.rb +0 -1
- data/lib/facet/nilcomparable.rb +0 -1
- data/lib/facet/nullclass.rb +0 -1
- data/lib/facet/numeric/approx.rb +0 -1
- data/lib/facet/numeric/ceil_multiple.rb +0 -1
- data/lib/facet/numeric/distance.rb +0 -1
- data/lib/facet/numeric/pred.rb +0 -1
- data/lib/facet/numeric/succ.rb +0 -1
- data/lib/facet/numeric/to_b.rb +0 -1
- data/lib/facet/opencascade.rb +0 -1
- data/lib/facet/openobject.rb +0 -1
- data/lib/facet/orderedhash.rb +0 -1
- data/lib/facet/ormsupport.rb +0 -1
- data/lib/facet/ostruct.rb +0 -1
- data/lib/facet/ostruct/__merge__.rb +0 -1
- data/lib/facet/ostruct/__table__.rb +0 -1
- data/lib/facet/ostruct/__update__.rb +0 -1
- data/lib/facet/ostruct/instance_delegate.rb +0 -1
- data/lib/facet/ostruct/op_fetch.rb +0 -1
- data/lib/facet/ostruct/op_store.rb +0 -1
- data/lib/facet/ostruct/to_h.rb +0 -1
- data/lib/facet/overload.rb +0 -1
- data/lib/facet/paramix.rb +0 -1
- data/lib/facet/pathlist.rb +0 -1
- data/lib/facet/pathname/ascend.rb +0 -1
- data/lib/facet/pathname/descend.rb +0 -1
- data/lib/facet/pathname/op_div.rb +0 -1
- data/lib/facet/pool.rb +0 -1
- data/lib/facet/populate.rb +0 -1
- data/lib/facet/pqueue.rb +0 -1
- data/lib/facet/preinitialize.rb +0 -1
- data/lib/facet/proc/bind.rb +0 -1
- data/lib/facet/proc/compose.rb +0 -1
- data/lib/facet/proc/op_mul.rb +0 -1
- data/lib/facet/proc/to_h.rb +0 -1
- data/lib/facet/proc/to_method.rb +0 -1
- data/lib/facet/proc/update.rb +0 -1
- data/lib/facet/progressbar.rb +0 -1
- data/lib/facet/promoteself.rb +0 -1
- data/lib/facet/quaternion.rb +0 -1
- data/lib/facet/random.rb +0 -1
- data/lib/facet/range/combine.rb +0 -1
- data/lib/facet/range/overlap.rb +0 -1
- data/lib/facet/range/to_r.rb +0 -1
- data/lib/facet/range/to_range.rb +0 -1
- data/lib/facet/range/umbrella.rb +0 -1
- data/lib/facet/range/within.rb +0 -1
- data/lib/facet/recorder.rb +0 -1
- data/lib/facet/reference.rb +0 -1
- data/lib/facet/regexp/arity.rb +0 -1
- data/lib/facet/regexp/to_re.rb +0 -1
- data/lib/facet/regexp/to_regexp.rb +0 -1
- data/lib/facet/rexmlbuilder.rb +0 -1
- data/lib/facet/rtals.rb +0 -1
- data/lib/facet/rwdelegator.rb +0 -1
- data/lib/facet/script.rb +0 -1
- data/lib/facet/semaphore.rb +0 -1
- data/lib/facet/settings.rb +0 -1
- data/lib/facet/smtp_tls.rb +0 -1
- data/lib/facet/snapshot.rb +0 -1
- data/lib/facet/stateparser.rb +0 -1
- data/lib/facet/statichash.rb +0 -1
- data/lib/facet/string/align_center.rb +0 -1
- data/lib/facet/string/align_left.rb +0 -1
- data/lib/facet/string/align_right.rb +0 -1
- data/lib/facet/string/at.rb +0 -1
- data/lib/facet/string/at_rand.rb +0 -1
- data/lib/facet/string/basename.rb +0 -1
- data/lib/facet/string/blank.rb +0 -1
- data/lib/facet/string/bracket.rb +0 -1
- data/lib/facet/string/brief.rb +0 -1
- data/lib/facet/string/bytes.rb +0 -1
- data/lib/facet/string/camelcase.rb +0 -1
- data/lib/facet/string/camelize.rb +0 -1
- data/lib/facet/string/capitalize_all.rb +0 -1
- data/lib/facet/string/capitalized.rb +0 -1
- data/lib/facet/string/chars.rb +0 -1
- data/lib/facet/string/cleave.rb +0 -1
- data/lib/facet/string/cmp.rb +0 -1
- data/lib/facet/string/demodulize.rb +0 -1
- data/lib/facet/string/dequote.rb +0 -1
- data/lib/facet/string/divide.rb +0 -1
- data/lib/facet/string/downcase.rb +0 -1
- data/lib/facet/string/dresner.rb +0 -1
- data/lib/facet/string/each_char.rb +0 -1
- data/lib/facet/string/each_word.rb +0 -1
- data/lib/facet/string/ends_with.rb +0 -1
- data/lib/facet/string/first.rb +0 -1
- data/lib/facet/string/first_char.rb +0 -1
- data/lib/facet/string/fold.rb +0 -1
- data/lib/facet/string/format.rb +0 -1
- data/lib/facet/string/humanize.rb +0 -1
- data/lib/facet/string/indent.rb +0 -1
- data/lib/facet/string/index_all.rb +0 -1
- data/lib/facet/string/last.rb +0 -1
- data/lib/facet/string/last_char.rb +0 -1
- data/lib/facet/string/line_wrap.rb +0 -1
- data/lib/facet/string/lines.rb +0 -1
- data/lib/facet/string/lowercase.rb +0 -1
- data/lib/facet/string/margin.rb +0 -1
- data/lib/facet/string/methodize.rb +0 -1
- data/lib/facet/string/modulize.rb +0 -1
- data/lib/facet/string/mscan.rb +0 -1
- data/lib/facet/string/natcmp.rb +0 -1
- data/lib/facet/string/nchar.rb +0 -1
- data/lib/facet/string/ordinal.rb +0 -1
- data/lib/facet/string/pathize.rb +0 -1
- data/lib/facet/string/plural.rb +0 -1
- data/lib/facet/string/pop.rb +0 -1
- data/lib/facet/string/pot.rb +0 -1
- data/lib/facet/string/pull.rb +0 -1
- data/lib/facet/string/push.rb +0 -1
- data/lib/facet/string/quote.rb +0 -1
- data/lib/facet/string/rand_byte.rb +0 -1
- data/lib/facet/string/rand_index.rb +0 -1
- data/lib/facet/string/range.rb +0 -1
- data/lib/facet/string/range_all.rb +0 -1
- data/lib/facet/string/range_of_line.rb +0 -1
- data/lib/facet/string/regesc.rb +0 -1
- data/lib/facet/string/rewrite.rb +0 -1
- data/lib/facet/string/self/format.rb +0 -1
- data/lib/facet/string/self/interpolate.rb +0 -1
- data/lib/facet/string/self/patterns.rb +0 -1
- data/lib/facet/string/self/rand_letter.rb +0 -1
- data/lib/facet/string/self/random.rb +0 -1
- data/lib/facet/string/shatter.rb +0 -1
- data/lib/facet/string/shell_escape.rb +0 -1
- data/lib/facet/string/shift.rb +0 -1
- data/lib/facet/string/shuffle.rb +0 -1
- data/lib/facet/string/similarity.rb +0 -1
- data/lib/facet/string/singular.rb +0 -1
- data/lib/facet/string/soundex.rb +0 -1
- data/lib/facet/string/starts_with.rb +0 -1
- data/lib/facet/string/succ.rb +0 -1
- data/lib/facet/string/tab.rb +0 -1
- data/lib/facet/string/tabto.rb +0 -1
- data/lib/facet/string/to_a.rb +0 -1
- data/lib/facet/string/to_b.rb +0 -1
- data/lib/facet/string/to_const.rb +0 -1
- data/lib/facet/string/to_date.rb +0 -1
- data/lib/facet/string/to_proc.rb +0 -1
- data/lib/facet/string/to_re.rb +0 -1
- data/lib/facet/string/to_rx.rb +0 -1
- data/lib/facet/string/to_time.rb +0 -1
- data/lib/facet/string/unbracket.rb +0 -1
- data/lib/facet/string/underscore.rb +0 -1
- data/lib/facet/string/unix_crypt.rb +0 -1
- data/lib/facet/string/unpack.rb +0 -1
- data/lib/facet/string/unshift.rb +0 -1
- data/lib/facet/string/upcase.rb +0 -1
- data/lib/facet/string/uppercase.rb +0 -1
- data/lib/facet/string/whitespace.rb +0 -1
- data/lib/facet/string/word_filter.rb +0 -1
- data/lib/facet/string/word_wrap.rb +0 -1
- data/lib/facet/string/words.rb +0 -1
- data/lib/facet/string_as_array.rb +0 -1
- data/lib/facet/symbol/camelcase.rb +0 -1
- data/lib/facet/symbol/camelize.rb +0 -1
- data/lib/facet/symbol/capitalize.rb +0 -1
- data/lib/facet/symbol/capitalized.rb +0 -1
- data/lib/facet/symbol/chomp.rb +0 -1
- data/lib/facet/symbol/downcase.rb +0 -1
- data/lib/facet/symbol/not.rb +0 -1
- data/lib/facet/symbol/pad.rb +0 -1
- data/lib/facet/symbol/self/generate.rb +0 -1
- data/lib/facet/symbol/succ.rb +0 -1
- data/lib/facet/symbol/to_const.rb +0 -1
- data/lib/facet/symbol/to_proc.rb +0 -1
- data/lib/facet/symbol/to_s.rb +0 -1
- data/lib/facet/symbol/to_str.rb +0 -1
- data/lib/facet/symbol/underscore.rb +0 -1
- data/lib/facet/symbol/upcase.rb +0 -1
- data/lib/facet/syncarray.rb +0 -1
- data/lib/facet/synchash.rb +0 -1
- data/lib/facet/system.rb +0 -1
- data/lib/facet/tagiterator.rb +0 -1
- data/lib/facet/time/change.rb +0 -1
- data/lib/facet/time/elapse.rb +0 -1
- data/lib/facet/time/self/days_extrema.rb +0 -1
- data/lib/facet/time/self/stamp.rb +0 -1
- data/lib/facet/time/stamp.rb +0 -1
- data/lib/facet/time/to_date.rb +0 -1
- data/lib/facet/time/to_s.rb +0 -1
- data/lib/facet/time/to_time.rb +0 -1
- data/lib/facet/timer.rb +0 -1
- data/lib/facet/times.rb +0 -1
- data/lib/facet/tkxml.rb +0 -1
- data/lib/facet/tracepoint.rb +0 -1
- data/lib/facet/tuple.rb +0 -1
- data/lib/facet/typecast.rb +0 -1
- data/lib/facet/unboundmethod/name.rb +0 -1
- data/lib/facet/uninheritable.rb +0 -1
- data/lib/facet/units.rb +0 -1
- data/lib/facet/uploadutils.rb +0 -1
- data/lib/facet/version_number.rb +0 -1
- data/lib/facet/xmlbuilder.rb +0 -1
- data/lib/facet/xmlhelper.rb +0 -1
- data/lib/facet/xoxo.rb +0 -1
- data/lib/facet/yamlstruct.rb +0 -1
- data/lib/facets.rb +0 -92
- data/lib/facets/automatic.rb +0 -29
- data/lib/facets/core/all.rb +0 -5
- data/lib/facets/core/array/at_rand.rb +0 -52
- data/lib/facets/core/array/body.rb +0 -2
- data/lib/facets/core/array/combos.rb +0 -3
- data/lib/facets/core/array/delete_unless.rb +0 -35
- data/lib/facets/core/array/delete_values.rb +0 -38
- data/lib/facets/core/array/delete_values_at.rb +0 -59
- data/lib/facets/core/array/each_combo.rb +0 -48
- data/lib/facets/core/array/each_with_key.rb +0 -9
- data/lib/facets/core/array/first.rb +0 -84
- data/lib/facets/core/array/foot.rb +0 -2
- data/lib/facets/core/array/head.rb +0 -80
- data/lib/facets/core/array/index.rb +0 -15
- data/lib/facets/core/array/join_sentence.rb +0 -12
- data/lib/facets/core/array/last.rb +0 -2
- data/lib/facets/core/array/last_index.rb +0 -35
- data/lib/facets/core/array/merge.rb +0 -40
- data/lib/facets/core/array/mid.rb +0 -50
- data/lib/facets/core/array/middle.rb +0 -45
- data/lib/facets/core/array/op_div.rb +0 -29
- data/lib/facets/core/array/op_fetch.rb +0 -67
- data/lib/facets/core/array/op_mod.rb +0 -16
- data/lib/facets/core/array/op_store.rb +0 -2
- data/lib/facets/core/array/pad.rb +0 -76
- data/lib/facets/core/array/pick.rb +0 -68
- data/lib/facets/core/array/pos.rb +0 -39
- data/lib/facets/core/array/pot.rb +0 -38
- data/lib/facets/core/array/pull.rb +0 -37
- data/lib/facets/core/array/rand_index.rb +0 -30
- data/lib/facets/core/array/rand_subset.rb +0 -56
- data/lib/facets/core/array/range.rb +0 -47
- data/lib/facets/core/array/rotate.rb +0 -67
- data/lib/facets/core/array/select.rb +0 -37
- data/lib/facets/core/array/shuffle.rb +0 -66
- data/lib/facets/core/array/store.rb +0 -7
- data/lib/facets/core/array/tail.rb +0 -2
- data/lib/facets/core/array/thru.rb +0 -38
- data/lib/facets/core/array/to_b.rb +0 -31
- data/lib/facets/core/array/to_h.rb +0 -57
- data/lib/facets/core/array/to_hash.rb +0 -46
- data/lib/facets/core/array/to_path.rb +0 -11
- data/lib/facets/core/array/unzip.rb +0 -20
- data/lib/facets/core/binding.rb +0 -14
- data/lib/facets/core/binding/__DIR__.rb +0 -2
- data/lib/facets/core/binding/__FILE__.rb +0 -2
- data/lib/facets/core/binding/__LINE__.rb +0 -58
- data/lib/facets/core/binding/call_stack.rb +0 -42
- data/lib/facets/core/binding/called.rb +0 -42
- data/lib/facets/core/binding/caller.rb +0 -42
- data/lib/facets/core/binding/defined.rb +0 -41
- data/lib/facets/core/binding/eval.rb +0 -42
- data/lib/facets/core/binding/local_variables.rb +0 -45
- data/lib/facets/core/binding/method_name.rb +0 -48
- data/lib/facets/core/binding/op_fetch.rb +0 -45
- data/lib/facets/core/binding/op_store.rb +0 -46
- data/lib/facets/core/binding/self.rb +0 -41
- data/lib/facets/core/binding/self/of_caller.rb +0 -122
- data/lib/facets/core/class/by_name.rb +0 -1
- data/lib/facets/core/class/cattr.rb +0 -161
- data/lib/facets/core/class/cattr_accessor.rb +0 -2
- data/lib/facets/core/class/cattr_reader.rb +0 -3
- data/lib/facets/core/class/cattr_writer.rb +0 -2
- data/lib/facets/core/class/class_load.rb +0 -3
- data/lib/facets/core/class/class_require.rb +0 -3
- data/lib/facets/core/class/descendents.rb +0 -44
- data/lib/facets/core/class/method_name.rb +0 -35
- data/lib/facets/core/class/remove_descendents.rb +0 -46
- data/lib/facets/core/class/remove_subclasses.rb +0 -2
- data/lib/facets/core/class/subclasses.rb +0 -2
- data/lib/facets/core/class/to_proc.rb +0 -25
- data/lib/facets/core/class/unix_path.rb +0 -34
- data/lib/facets/core/comparable/at_least.rb +0 -53
- data/lib/facets/core/comparable/at_most.rb +0 -2
- data/lib/facets/core/comparable/cap.rb +0 -2
- data/lib/facets/core/comparable/clip.rb +0 -72
- data/lib/facets/core/comparable/cmp.rb +0 -38
- data/lib/facets/core/config/datadir.rb +0 -20
- data/lib/facets/core/config/inspect.rb +0 -9
- data/lib/facets/core/date/days_in_month.rb +0 -42
- data/lib/facets/core/date/days_of_month.rb +0 -34
- data/lib/facets/core/date/stamp.rb +0 -52
- data/lib/facets/core/date/to_date.rb +0 -36
- data/lib/facets/core/date/to_s.rb +0 -33
- data/lib/facets/core/date/to_time.rb +0 -36
- data/lib/facets/core/dir/self/ancestor.rb +0 -33
- data/lib/facets/core/dir/self/ascend.rb +0 -57
- data/lib/facets/core/dir/self/descend.rb +0 -11
- data/lib/facets/core/dir/self/ls_r.rb +0 -70
- data/lib/facets/core/dir/self/multiglob.rb +0 -110
- data/lib/facets/core/dir/self/multiglob_r.rb +0 -5
- data/lib/facets/core/dir/self/multiglob_with_default.rb +0 -3
- data/lib/facets/core/dir/self/recurse.rb +0 -2
- data/lib/facets/core/enumerable/accumulate.rb +0 -23
- data/lib/facets/core/enumerable/cart.rb +0 -94
- data/lib/facets/core/enumerable/cartesian_product.rb +0 -8
- data/lib/facets/core/enumerable/cascade.rb +0 -16
- data/lib/facets/core/enumerable/collect_if.rb +0 -15
- data/lib/facets/core/enumerable/collect_with_counter.rb +0 -2
- data/lib/facets/core/enumerable/collect_with_index.rb +0 -51
- data/lib/facets/core/enumerable/commonality.rb +0 -63
- data/lib/facets/core/enumerable/compact_collect.rb +0 -50
- data/lib/facets/core/enumerable/compact_map.rb +0 -2
- data/lib/facets/core/enumerable/count.rb +0 -54
- data/lib/facets/core/enumerable/divide.rb +0 -20
- data/lib/facets/core/enumerable/each_by.rb +0 -91
- data/lib/facets/core/enumerable/each_combination.rb +0 -59
- data/lib/facets/core/enumerable/each_pair.rb +0 -50
- data/lib/facets/core/enumerable/each_permutation.rb +0 -2
- data/lib/facets/core/enumerable/each_slice.rb +0 -120
- data/lib/facets/core/enumerable/each_unique_pair.rb +0 -66
- data/lib/facets/core/enumerable/each_with_counter.rb +0 -8
- data/lib/facets/core/enumerable/eachn.rb +0 -41
- data/lib/facets/core/enumerable/elementwise.rb +0 -75
- data/lib/facets/core/enumerable/entropy.rb +0 -52
- data/lib/facets/core/enumerable/every.rb +0 -61
- data/lib/facets/core/enumerable/ew.rb +0 -2
- data/lib/facets/core/enumerable/filter_collect.rb +0 -58
- data/lib/facets/core/enumerable/filter_map.rb +0 -2
- data/lib/facets/core/enumerable/find_collisions.rb +0 -41
- data/lib/facets/core/enumerable/frequency.rb +0 -39
- data/lib/facets/core/enumerable/graph.rb +0 -60
- data/lib/facets/core/enumerable/ideal_entropy.rb +0 -49
- data/lib/facets/core/enumerable/injecting.rb +0 -22
- data/lib/facets/core/enumerable/map_if.rb +0 -3
- data/lib/facets/core/enumerable/map_send.rb +0 -12
- data/lib/facets/core/enumerable/map_with_counter.rb +0 -2
- data/lib/facets/core/enumerable/map_with_index.rb +0 -2
- data/lib/facets/core/enumerable/mode.rb +0 -13
- data/lib/facets/core/enumerable/none.rb +0 -56
- data/lib/facets/core/enumerable/nonuniq.rb +0 -39
- data/lib/facets/core/enumerable/occur.rb +0 -62
- data/lib/facets/core/enumerable/one.rb +0 -65
- data/lib/facets/core/enumerable/op_pow.rb +0 -38
- data/lib/facets/core/enumerable/op_tilde_self.rb +0 -46
- data/lib/facets/core/enumerable/partition_by.rb +0 -57
- data/lib/facets/core/enumerable/permutation.rb +0 -142
- data/lib/facets/core/enumerable/probability.rb +0 -59
- data/lib/facets/core/enumerable/project.rb +0 -11
- data/lib/facets/core/enumerable/self/cart.rb +0 -8
- data/lib/facets/core/enumerable/self/cartesian_product.rb +0 -8
- data/lib/facets/core/enumerable/self/combinations.rb +0 -73
- data/lib/facets/core/enumerable/sum.rb +0 -19
- data/lib/facets/core/enumerable/thread_map.rb +0 -21
- data/lib/facets/core/enumerable/thread_map_send.rb +0 -3
- data/lib/facets/core/enumerable/to_h.rb +0 -50
- data/lib/facets/core/enumerable/uniq_by.rb +0 -39
- data/lib/facets/core/enumerable/where.rb +0 -12
- data/lib/facets/core/file/self/append.rb +0 -8
- data/lib/facets/core/file/self/create.rb +0 -56
- data/lib/facets/core/file/self/null.rb +0 -17
- data/lib/facets/core/file/self/open_as_string.rb +0 -99
- data/lib/facets/core/file/self/read_binary.rb +0 -8
- data/lib/facets/core/file/self/read_list.rb +0 -51
- data/lib/facets/core/file/self/rootname.rb +0 -22
- data/lib/facets/core/file/self/sanitize.rb +0 -50
- data/lib/facets/core/file/self/split_all.rb +0 -36
- data/lib/facets/core/file/self/write.rb +0 -8
- data/lib/facets/core/file/self/yaml.rb +0 -16
- data/lib/facets/core/filetest/self/root.rb +0 -13
- data/lib/facets/core/fileutils/compress.rb +0 -154
- data/lib/facets/core/fileutils/head.rb +0 -2
- data/lib/facets/core/fileutils/safe_ln.rb +0 -38
- data/lib/facets/core/fileutils/slice.rb +0 -152
- data/lib/facets/core/fileutils/split_all.rb +0 -29
- data/lib/facets/core/fileutils/stage.rb +0 -230
- data/lib/facets/core/fileutils/staged.rb +0 -3
- data/lib/facets/core/fileutils/tail.rb +0 -2
- data/lib/facets/core/fileutils/wc.rb +0 -123
- data/lib/facets/core/fileutils/whereis.rb +0 -76
- data/lib/facets/core/fileutils/which.rb +0 -112
- data/lib/facets/core/float/approx.rb +0 -2
- data/lib/facets/core/float/round_at.rb +0 -73
- data/lib/facets/core/float/round_off.rb +0 -8
- data/lib/facets/core/float/round_to.rb +0 -74
- data/lib/facets/core/gem/self/active.rb +0 -9
- data/lib/facets/core/gem/self/gempath.rb +0 -16
- data/lib/facets/core/gem/self/gemspec.rb +0 -10
- data/lib/facets/core/hash/alias.rb +0 -54
- data/lib/facets/core/hash/assert_has_keys.rb +0 -38
- data/lib/facets/core/hash/assert_has_only_keys.rb +0 -38
- data/lib/facets/core/hash/at.rb +0 -26
- data/lib/facets/core/hash/collate.rb +0 -53
- data/lib/facets/core/hash/delete_at.rb +0 -10
- data/lib/facets/core/hash/delete_unless.rb +0 -15
- data/lib/facets/core/hash/delete_values.rb +0 -20
- data/lib/facets/core/hash/delete_values_at.rb +0 -24
- data/lib/facets/core/hash/diff.rb +0 -8
- data/lib/facets/core/hash/each_with_index.rb +0 -35
- data/lib/facets/core/hash/each_with_key.rb +0 -32
- data/lib/facets/core/hash/graph.rb +0 -31
- data/lib/facets/core/hash/has_keys.rb +0 -37
- data/lib/facets/core/hash/has_only_keys.rb +0 -37
- data/lib/facets/core/hash/having_aquisition.rb +0 -37
- data/lib/facets/core/hash/having_fallback.rb +0 -28
- data/lib/facets/core/hash/insert.rb +0 -20
- data/lib/facets/core/hash/inverse.rb +0 -53
- data/lib/facets/core/hash/join.rb +0 -19
- data/lib/facets/core/hash/keys_to_s.rb +0 -2
- data/lib/facets/core/hash/keys_to_sym.rb +0 -2
- data/lib/facets/core/hash/normalize_keys.rb +0 -65
- data/lib/facets/core/hash/op_add.rb +0 -29
- data/lib/facets/core/hash/op_and.rb +0 -37
- data/lib/facets/core/hash/op_div.rb +0 -8
- data/lib/facets/core/hash/op_fetch.rb +0 -146
- data/lib/facets/core/hash/op_lshift.rb +0 -28
- data/lib/facets/core/hash/op_mul.rb +0 -17
- data/lib/facets/core/hash/op_or.rb +0 -2
- data/lib/facets/core/hash/op_store.rb +0 -2
- data/lib/facets/core/hash/op_sub.rb +0 -2
- data/lib/facets/core/hash/pairs_at.rb +0 -17
- data/lib/facets/core/hash/rand_key.rb +0 -47
- data/lib/facets/core/hash/rand_pair.rb +0 -50
- data/lib/facets/core/hash/rand_value.rb +0 -60
- data/lib/facets/core/hash/rekey.rb +0 -85
- data/lib/facets/core/hash/replace_each.rb +0 -33
- data/lib/facets/core/hash/reverse_merge.rb +0 -25
- data/lib/facets/core/hash/reverse_update.rb +0 -3
- data/lib/facets/core/hash/self/auto.rb +0 -28
- data/lib/facets/core/hash/self/zipnew.rb +0 -37
- data/lib/facets/core/hash/shuffle.rb +0 -53
- data/lib/facets/core/hash/slice.rb +0 -33
- data/lib/facets/core/hash/stringify_keys.rb +0 -74
- data/lib/facets/core/hash/swap.rb +0 -36
- data/lib/facets/core/hash/swapkey.rb +0 -44
- data/lib/facets/core/hash/symbolize_keys.rb +0 -87
- data/lib/facets/core/hash/to_h.rb +0 -35
- data/lib/facets/core/hash/to_ostruct.rb +0 -40
- data/lib/facets/core/hash/to_ostruct_recurse.rb +0 -76
- data/lib/facets/core/hash/to_proc.rb +0 -34
- data/lib/facets/core/hash/to_struct.rb +0 -16
- data/lib/facets/core/hash/traverse.rb +0 -68
- data/lib/facets/core/hash/update_each.rb +0 -43
- data/lib/facets/core/hash/update_keys.rb +0 -31
- data/lib/facets/core/hash/update_values.rb +0 -32
- data/lib/facets/core/hash/variablize_keys.rb +0 -54
- data/lib/facets/core/hash/weave.rb +0 -88
- data/lib/facets/core/inflect.rb +0 -64
- data/lib/facets/core/integer/each.rb +0 -9
- data/lib/facets/core/integer/even.rb +0 -2
- data/lib/facets/core/integer/fac.rb +0 -2
- data/lib/facets/core/integer/fact.rb +0 -2
- data/lib/facets/core/integer/factorial.rb +0 -61
- data/lib/facets/core/integer/multiple.rb +0 -69
- data/lib/facets/core/integer/odd.rb +0 -2
- data/lib/facets/core/integer/of.rb +0 -37
- data/lib/facets/core/integer/ordinal.rb +0 -41
- data/lib/facets/core/integer/times_collect.rb +0 -39
- data/lib/facets/core/integer/times_map.rb +0 -2
- data/lib/facets/core/integer/to_roman.rb +0 -20
- data/lib/facets/core/kernel/__DIR__.rb +0 -11
- data/lib/facets/core/kernel/__callee__.rb +0 -2
- data/lib/facets/core/kernel/__class__.rb +0 -31
- data/lib/facets/core/kernel/__get__.rb +0 -5
- data/lib/facets/core/kernel/__method__.rb +0 -2
- data/lib/facets/core/kernel/__self__.rb +0 -32
- data/lib/facets/core/kernel/__set__.rb +0 -2
- data/lib/facets/core/kernel/as.rb +0 -106
- data/lib/facets/core/kernel/ask.rb +0 -14
- data/lib/facets/core/kernel/assign_from.rb +0 -82
- data/lib/facets/core/kernel/assign_with.rb +0 -85
- data/lib/facets/core/kernel/autoreload.rb +0 -122
- data/lib/facets/core/kernel/autoreload_files.rb +0 -2
- data/lib/facets/core/kernel/autoreload_glob.rb +0 -3
- data/lib/facets/core/kernel/bool.rb +0 -77
- data/lib/facets/core/kernel/bug.rb +0 -39
- data/lib/facets/core/kernel/cache.rb +0 -31
- data/lib/facets/core/kernel/call_stack.rb +0 -59
- data/lib/facets/core/kernel/called.rb +0 -40
- data/lib/facets/core/kernel/callee.rb +0 -46
- data/lib/facets/core/kernel/class_def.rb +0 -10
- data/lib/facets/core/kernel/complete.rb +0 -6
- data/lib/facets/core/kernel/constant.rb +0 -52
- data/lib/facets/core/kernel/copy.rb +0 -48
- data/lib/facets/core/kernel/daemonize.rb +0 -21
- data/lib/facets/core/kernel/deep_clone.rb +0 -50
- data/lib/facets/core/kernel/deep_copy.rb +0 -49
- data/lib/facets/core/kernel/demo.rb +0 -50
- data/lib/facets/core/kernel/eigenclass.rb +0 -17
- data/lib/facets/core/kernel/enable_warnings.rb +0 -14
- data/lib/facets/core/kernel/false.rb +0 -2
- data/lib/facets/core/kernel/fn.rb +0 -33
- data/lib/facets/core/kernel/get_by_id.rb +0 -34
- data/lib/facets/core/kernel/here.rb +0 -34
- data/lib/facets/core/kernel/in.rb +0 -35
- data/lib/facets/core/kernel/instance_assign.rb +0 -24
- data/lib/facets/core/kernel/instance_class.rb +0 -40
- data/lib/facets/core/kernel/instance_exec.rb +0 -60
- data/lib/facets/core/kernel/instance_values.rb +0 -12
- data/lib/facets/core/kernel/instvar.rb +0 -13
- data/lib/facets/core/kernel/is.rb +0 -7
- data/lib/facets/core/kernel/load_local.rb +0 -26
- data/lib/facets/core/kernel/maybe.rb +0 -41
- data/lib/facets/core/kernel/meta.rb +0 -21
- data/lib/facets/core/kernel/meta_alias.rb +0 -14
- data/lib/facets/core/kernel/meta_class.rb +0 -38
- data/lib/facets/core/kernel/meta_def.rb +0 -14
- data/lib/facets/core/kernel/meta_eval.rb +0 -16
- data/lib/facets/core/kernel/metaclass.rb +0 -38
- data/lib/facets/core/kernel/method.rb +0 -94
- data/lib/facets/core/kernel/methods.rb +0 -79
- data/lib/facets/core/kernel/nack.rb +0 -12
- data/lib/facets/core/kernel/new.rb +0 -40
- data/lib/facets/core/kernel/object_class.rb +0 -31
- data/lib/facets/core/kernel/object_clone.rb +0 -4
- data/lib/facets/core/kernel/object_dup.rb +0 -2
- data/lib/facets/core/kernel/object_hexid.rb +0 -35
- data/lib/facets/core/kernel/object_send.rb +0 -21
- data/lib/facets/core/kernel/op_esc.rb +0 -37
- data/lib/facets/core/kernel/p.rb +0 -12
- data/lib/facets/core/kernel/populate.rb +0 -39
- data/lib/facets/core/kernel/pp_exception.rb +0 -17
- data/lib/facets/core/kernel/qua_class.rb +0 -41
- data/lib/facets/core/kernel/require_all.rb +0 -46
- data/lib/facets/core/kernel/require_esc.rb +0 -44
- data/lib/facets/core/kernel/require_local.rb +0 -26
- data/lib/facets/core/kernel/resc.rb +0 -32
- data/lib/facets/core/kernel/respond.rb +0 -14
- data/lib/facets/core/kernel/returning.rb +0 -9
- data/lib/facets/core/kernel/send_as.rb +0 -40
- data/lib/facets/core/kernel/set_from.rb +0 -69
- data/lib/facets/core/kernel/set_with.rb +0 -92
- data/lib/facets/core/kernel/silence_stream.rb +0 -22
- data/lib/facets/core/kernel/silence_warnings.rb +0 -2
- data/lib/facets/core/kernel/silently.rb +0 -41
- data/lib/facets/core/kernel/singleton.rb +0 -48
- data/lib/facets/core/kernel/singleton_class.rb +0 -36
- data/lib/facets/core/kernel/super_at.rb +0 -56
- data/lib/facets/core/kernel/supermethod.rb +0 -44
- data/lib/facets/core/kernel/supress.rb +0 -15
- data/lib/facets/core/kernel/tap.rb +0 -42
- data/lib/facets/core/kernel/this.rb +0 -33
- data/lib/facets/core/kernel/to_b.rb +0 -41
- data/lib/facets/core/kernel/to_bool.rb +0 -47
- data/lib/facets/core/kernel/to_data.rb +0 -116
- data/lib/facets/core/kernel/true.rb +0 -2
- data/lib/facets/core/kernel/unuri.rb +0 -2
- data/lib/facets/core/kernel/uri.rb +0 -38
- data/lib/facets/core/kernel/val.rb +0 -52
- data/lib/facets/core/kernel/warn_with_line.rb +0 -30
- data/lib/facets/core/kernel/with.rb +0 -57
- data/lib/facets/core/kernel/with_accessor.rb +0 -94
- data/lib/facets/core/kernel/with_reader.rb +0 -2
- data/lib/facets/core/kernel/with_writer.rb +0 -2
- data/lib/facets/core/kernel/yaml.rb +0 -7
- data/lib/facets/core/logger/format.rb +0 -28
- data/lib/facets/core/logger/format_message.rb +0 -1
- data/lib/facets/core/matchdata/match.rb +0 -37
- data/lib/facets/core/matchdata/matchset.rb +0 -2
- data/lib/facets/core/matchdata/matchtree.rb +0 -72
- data/lib/facets/core/module/abstract.rb +0 -50
- data/lib/facets/core/module/alias_accessor.rb +0 -19
- data/lib/facets/core/module/alias_method_chain.rb +0 -72
- data/lib/facets/core/module/alias_module_function.rb +0 -57
- data/lib/facets/core/module/ancestor.rb +0 -38
- data/lib/facets/core/module/attr.rb +0 -26
- data/lib/facets/core/module/attr_query.rb +0 -56
- data/lib/facets/core/module/attr_setter.rb +0 -48
- data/lib/facets/core/module/attr_tester.rb +0 -84
- data/lib/facets/core/module/attr_validator.rb +0 -18
- data/lib/facets/core/module/basename.rb +0 -50
- data/lib/facets/core/module/by_name.rb +0 -68
- data/lib/facets/core/module/class.rb +0 -3
- data/lib/facets/core/module/class_extension.rb +0 -153
- data/lib/facets/core/module/clone_removing.rb +0 -2
- data/lib/facets/core/module/clone_renaming.rb +0 -2
- data/lib/facets/core/module/clone_using.rb +0 -87
- data/lib/facets/core/module/dirname.rb +0 -42
- data/lib/facets/core/module/equate_on.rb +0 -70
- data/lib/facets/core/module/include_and_extend.rb +0 -10
- data/lib/facets/core/module/include_as.rb +0 -103
- data/lib/facets/core/module/include_function_module.rb +0 -13
- data/lib/facets/core/module/initializer.rb +0 -65
- data/lib/facets/core/module/instance_methods.rb +0 -186
- data/lib/facets/core/module/integrate.rb +0 -78
- data/lib/facets/core/module/is.rb +0 -35
- data/lib/facets/core/module/memoize.rb +0 -96
- data/lib/facets/core/module/modspace.rb +0 -43
- data/lib/facets/core/module/module_load.rb +0 -51
- data/lib/facets/core/module/module_method.rb +0 -13
- data/lib/facets/core/module/module_require.rb +0 -3
- data/lib/facets/core/module/namespace.rb +0 -122
- data/lib/facets/core/module/nesting.rb +0 -45
- data/lib/facets/core/module/new.rb +0 -37
- data/lib/facets/core/module/nodef.rb +0 -34
- data/lib/facets/core/module/on_included.rb +0 -48
- data/lib/facets/core/module/prepend.rb +0 -63
- data/lib/facets/core/module/redef.rb +0 -31
- data/lib/facets/core/module/redefine_method.rb +0 -57
- data/lib/facets/core/module/redirect.rb +0 -30
- data/lib/facets/core/module/redirect_method.rb +0 -64
- data/lib/facets/core/module/remove.rb +0 -29
- data/lib/facets/core/module/rename.rb +0 -31
- data/lib/facets/core/module/rename_method.rb +0 -38
- data/lib/facets/core/module/revisal.rb +0 -49
- data/lib/facets/core/module/self/op_add.rb +0 -99
- data/lib/facets/core/module/self/op_sub.rb +0 -3
- data/lib/facets/core/module/shadow_all.rb +0 -17
- data/lib/facets/core/module/shadow_method.rb +0 -42
- data/lib/facets/core/module/sort_on.rb +0 -73
- data/lib/facets/core/module/this.rb +0 -64
- data/lib/facets/core/module/wrap.rb +0 -30
- data/lib/facets/core/module/wrap_method.rb +0 -53
- data/lib/facets/core/nil_as_emptiness.rb +0 -34
- data/lib/facets/core/nilclass/blank.rb +0 -32
- data/lib/facets/core/nilclass/empty.rb +0 -32
- data/lib/facets/core/nilclass/include.rb +0 -32
- data/lib/facets/core/nilclass/length.rb +0 -2
- data/lib/facets/core/nilclass/op_cmp.rb +0 -12
- data/lib/facets/core/nilclass/op_fetch.rb +0 -37
- data/lib/facets/core/nilclass/size.rb +0 -44
- data/lib/facets/core/nilclass/succ.rb +0 -5
- data/lib/facets/core/nilclass/to_h.rb +0 -33
- data/lib/facets/core/nilclass/to_path.rb +0 -18
- data/lib/facets/core/numeric/approx.rb +0 -34
- data/lib/facets/core/numeric/ceil_multiple.rb +0 -40
- data/lib/facets/core/numeric/distance.rb +0 -37
- data/lib/facets/core/numeric/pred.rb +0 -2
- data/lib/facets/core/numeric/succ.rb +0 -69
- data/lib/facets/core/numeric/to_b.rb +0 -38
- data/lib/facets/core/ostruct.rb +0 -36
- data/lib/facets/core/ostruct/__merge__.rb +0 -5
- data/lib/facets/core/ostruct/__table__.rb +0 -10
- data/lib/facets/core/ostruct/__update__.rb +0 -75
- data/lib/facets/core/ostruct/instance_delegate.rb +0 -60
- data/lib/facets/core/ostruct/op_fetch.rb +0 -58
- data/lib/facets/core/ostruct/op_store.rb +0 -5
- data/lib/facets/core/ostruct/to_h.rb +0 -8
- data/lib/facets/core/pathname/ascend.rb +0 -22
- data/lib/facets/core/pathname/descend.rb +0 -20
- data/lib/facets/core/pathname/op_div.rb +0 -4
- data/lib/facets/core/proc/bind.rb +0 -35
- data/lib/facets/core/proc/compose.rb +0 -44
- data/lib/facets/core/proc/op_mul.rb +0 -51
- data/lib/facets/core/proc/to_h.rb +0 -27
- data/lib/facets/core/proc/to_method.rb +0 -61
- data/lib/facets/core/proc/update.rb +0 -11
- data/lib/facets/core/random.rb +0 -21
- data/lib/facets/core/range/combine.rb +0 -62
- data/lib/facets/core/range/overlap.rb +0 -10
- data/lib/facets/core/range/to_r.rb +0 -32
- data/lib/facets/core/range/to_range.rb +0 -36
- data/lib/facets/core/range/umbrella.rb +0 -67
- data/lib/facets/core/range/within.rb +0 -44
- data/lib/facets/core/regexp/arity.rb +0 -41
- data/lib/facets/core/regexp/to_re.rb +0 -38
- data/lib/facets/core/regexp/to_regexp.rb +0 -36
- data/lib/facets/core/string/align_center.rb +0 -87
- data/lib/facets/core/string/align_left.rb +0 -2
- data/lib/facets/core/string/align_right.rb +0 -2
- data/lib/facets/core/string/at.rb +0 -8
- data/lib/facets/core/string/at_rand.rb +0 -65
- data/lib/facets/core/string/basename.rb +0 -48
- data/lib/facets/core/string/blank.rb +0 -36
- data/lib/facets/core/string/bracket.rb +0 -70
- data/lib/facets/core/string/brief.rb +0 -33
- data/lib/facets/core/string/bytes.rb +0 -31
- data/lib/facets/core/string/camelcase.rb +0 -58
- data/lib/facets/core/string/camelize.rb +0 -35
- data/lib/facets/core/string/capitalize_all.rb +0 -30
- data/lib/facets/core/string/capitalized.rb +0 -36
- data/lib/facets/core/string/chars.rb +0 -34
- data/lib/facets/core/string/cleave.rb +0 -66
- data/lib/facets/core/string/cmp.rb +0 -43
- data/lib/facets/core/string/demodulize.rb +0 -40
- data/lib/facets/core/string/dequote.rb +0 -29
- data/lib/facets/core/string/divide.rb +0 -43
- data/lib/facets/core/string/downcase.rb +0 -37
- data/lib/facets/core/string/dresner.rb +0 -49
- data/lib/facets/core/string/each_char.rb +0 -35
- data/lib/facets/core/string/each_word.rb +0 -50
- data/lib/facets/core/string/ends_with.rb +0 -2
- data/lib/facets/core/string/first.rb +0 -94
- data/lib/facets/core/string/first_char.rb +0 -20
- data/lib/facets/core/string/fold.rb +0 -67
- data/lib/facets/core/string/format.rb +0 -17
- data/lib/facets/core/string/humanize.rb +0 -31
- data/lib/facets/core/string/indent.rb +0 -68
- data/lib/facets/core/string/index_all.rb +0 -40
- data/lib/facets/core/string/last.rb +0 -94
- data/lib/facets/core/string/last_char.rb +0 -22
- data/lib/facets/core/string/line_wrap.rb +0 -77
- data/lib/facets/core/string/lines.rb +0 -33
- data/lib/facets/core/string/lowercase.rb +0 -32
- data/lib/facets/core/string/margin.rb +0 -138
- data/lib/facets/core/string/methodize.rb +0 -45
- data/lib/facets/core/string/modulize.rb +0 -44
- data/lib/facets/core/string/mscan.rb +0 -42
- data/lib/facets/core/string/natcmp.rb +0 -108
- data/lib/facets/core/string/nchar.rb +0 -45
- data/lib/facets/core/string/ordinal.rb +0 -16
- data/lib/facets/core/string/pathize.rb +0 -46
- data/lib/facets/core/string/plural.rb +0 -2
- data/lib/facets/core/string/pop.rb +0 -54
- data/lib/facets/core/string/pot.rb +0 -45
- data/lib/facets/core/string/pull.rb +0 -17
- data/lib/facets/core/string/push.rb +0 -44
- data/lib/facets/core/string/quote.rb +0 -68
- data/lib/facets/core/string/rand_byte.rb +0 -55
- data/lib/facets/core/string/rand_index.rb +0 -29
- data/lib/facets/core/string/range.rb +0 -37
- data/lib/facets/core/string/range_all.rb +0 -48
- data/lib/facets/core/string/range_of_line.rb +0 -42
- data/lib/facets/core/string/regesc.rb +0 -32
- data/lib/facets/core/string/rewrite.rb +0 -34
- data/lib/facets/core/string/self/format.rb +0 -17
- data/lib/facets/core/string/self/interpolate.rb +0 -31
- data/lib/facets/core/string/self/patterns.rb +0 -51
- data/lib/facets/core/string/self/rand_letter.rb +0 -34
- data/lib/facets/core/string/self/random.rb +0 -37
- data/lib/facets/core/string/shatter.rb +0 -45
- data/lib/facets/core/string/shell_escape.rb +0 -11
- data/lib/facets/core/string/shift.rb +0 -42
- data/lib/facets/core/string/shuffle.rb +0 -42
- data/lib/facets/core/string/similarity.rb +0 -108
- data/lib/facets/core/string/singular.rb +0 -202
- data/lib/facets/core/string/soundex.rb +0 -102
- data/lib/facets/core/string/starts_with.rb +0 -24
- data/lib/facets/core/string/succ.rb +0 -38
- data/lib/facets/core/string/tab.rb +0 -2
- data/lib/facets/core/string/tabto.rb +0 -2
- data/lib/facets/core/string/to_a.rb +0 -41
- data/lib/facets/core/string/to_b.rb +0 -64
- data/lib/facets/core/string/to_const.rb +0 -39
- data/lib/facets/core/string/to_date.rb +0 -35
- data/lib/facets/core/string/to_proc.rb +0 -54
- data/lib/facets/core/string/to_re.rb +0 -46
- data/lib/facets/core/string/to_rx.rb +0 -2
- data/lib/facets/core/string/to_time.rb +0 -34
- data/lib/facets/core/string/unbracket.rb +0 -46
- data/lib/facets/core/string/underscore.rb +0 -18
- data/lib/facets/core/string/unix_crypt.rb +0 -41
- data/lib/facets/core/string/unpack.rb +0 -45
- data/lib/facets/core/string/unshift.rb +0 -42
- data/lib/facets/core/string/upcase.rb +0 -45
- data/lib/facets/core/string/uppercase.rb +0 -2
- data/lib/facets/core/string/whitespace.rb +0 -27
- data/lib/facets/core/string/word_filter.rb +0 -61
- data/lib/facets/core/string/word_wrap.rb +0 -90
- data/lib/facets/core/string/words.rb +0 -45
- data/lib/facets/core/string_as_array.rb +0 -17
- data/lib/facets/core/symbol/camelcase.rb +0 -42
- data/lib/facets/core/symbol/camelize.rb +0 -33
- data/lib/facets/core/symbol/capitalize.rb +0 -31
- data/lib/facets/core/symbol/capitalized.rb +0 -33
- data/lib/facets/core/symbol/chomp.rb +0 -9
- data/lib/facets/core/symbol/downcase.rb +0 -36
- data/lib/facets/core/symbol/pad.rb +0 -43
- data/lib/facets/core/symbol/self/generate.rb +0 -19
- data/lib/facets/core/symbol/succ.rb +0 -42
- data/lib/facets/core/symbol/to_const.rb +0 -40
- data/lib/facets/core/symbol/to_proc.rb +0 -54
- data/lib/facets/core/symbol/to_s.rb +0 -12
- data/lib/facets/core/symbol/to_str.rb +0 -39
- data/lib/facets/core/symbol/underscore.rb +0 -32
- data/lib/facets/core/symbol/upcase.rb +0 -37
- data/lib/facets/core/time/change.rb +0 -51
- data/lib/facets/core/time/elapse.rb +0 -41
- data/lib/facets/core/time/self/days_extrema.rb +0 -22
- data/lib/facets/core/time/self/stamp.rb +0 -2
- data/lib/facets/core/time/stamp.rb +0 -67
- data/lib/facets/core/time/to_date.rb +0 -37
- data/lib/facets/core/time/to_s.rb +0 -33
- data/lib/facets/core/time/to_time.rb +0 -36
- data/lib/facets/core/unboundmethod/name.rb +0 -8
- data/lib/facets/more/ann.rb +0 -250
- data/lib/facets/more/ann_attr.rb +0 -161
- data/lib/facets/more/ansicode.rb +0 -300
- data/lib/facets/more/arguments.rb +0 -497
- data/lib/facets/more/aspects.rb +0 -246
- data/lib/facets/more/association.rb +0 -197
- data/lib/facets/more/autoarray.rb +0 -82
- data/lib/facets/more/autoscript.rb +0 -34
- data/lib/facets/more/autovivify.rb +0 -16
- data/lib/facets/more/basicobject.rb +0 -291
- data/lib/facets/more/bbcode.rb +0 -375
- data/lib/facets/more/behavior.rb +0 -59
- data/lib/facets/more/binaryreader.rb +0 -275
- data/lib/facets/more/bitmask.rb +0 -112
- data/lib/facets/more/buildingblock.rb +0 -208
- data/lib/facets/more/bytes.rb +0 -231
- data/lib/facets/more/cache.rb +0 -81
- data/lib/facets/more/classmethods.rb +0 -206
- data/lib/facets/more/cloneable.rb +0 -67
- data/lib/facets/more/command.rb +0 -748
- data/lib/facets/more/consoleutils.rb +0 -45
- data/lib/facets/more/cookie.rb +0 -559
- data/lib/facets/more/coroutine.rb +0 -168
- data/lib/facets/more/crypt.rb +0 -205
- data/lib/facets/more/cut.rb +0 -507
- data/lib/facets/more/dependency.rb +0 -199
- data/lib/facets/more/dictionary.rb +0 -497
- data/lib/facets/more/doublemetaphone.rb +0 -371
- data/lib/facets/more/downloader.rb +0 -279
- data/lib/facets/more/elementor.rb +0 -136
- data/lib/facets/more/enumerablepass.rb +0 -277
- data/lib/facets/more/eventhook.rb +0 -113
- data/lib/facets/more/expirable.rb +0 -82
- data/lib/facets/more/filelist.rb +0 -487
- data/lib/facets/more/filesystem.rb +0 -43
- data/lib/facets/more/floatstring.rb +0 -170
- data/lib/facets/more/functor.rb +0 -132
- data/lib/facets/more/hashbuilder.rb +0 -80
- data/lib/facets/more/heap.rb +0 -3
- data/lib/facets/more/htmlbuilder.rb +0 -71
- data/lib/facets/more/htmlfilter.rb +0 -566
- data/lib/facets/more/htmlhelper.rb +0 -92
- data/lib/facets/more/http.rb +0 -569
- data/lib/facets/more/httpaccess.rb +0 -1608
- data/lib/facets/more/infinity.rb +0 -221
- data/lib/facets/more/inheritor.rb +0 -251
- data/lib/facets/more/instance_intercept.rb +0 -131
- data/lib/facets/more/interval.rb +0 -420
- data/lib/facets/more/ioredirect.rb +0 -126
- data/lib/facets/more/json.rb +0 -917
- data/lib/facets/more/lazy.rb +0 -238
- data/lib/facets/more/linkedlist.rb +0 -254
- data/lib/facets/more/lisp.rb +0 -384
- data/lib/facets/more/lisp_format.rb +0 -1851
- data/lib/facets/more/lrucache.rb +0 -173
- data/lib/facets/more/main_as_module.rb +0 -44
- data/lib/facets/more/mathconstants.rb +0 -302
- data/lib/facets/more/methodfilter.rb +0 -122
- data/lib/facets/more/methodprobe.rb +0 -210
- data/lib/facets/more/minitar.rb +0 -981
- data/lib/facets/more/mock.rb +0 -240
- data/lib/facets/more/multipliers.rb +0 -195
- data/lib/facets/more/multiton.rb +0 -377
- data/lib/facets/more/nackclass.rb +0 -158
- data/lib/facets/more/nilcomparable.rb +0 -174
- data/lib/facets/more/nullclass.rb +0 -69
- data/lib/facets/more/opencascade.rb +0 -156
- data/lib/facets/more/openobject.rb +0 -354
- data/lib/facets/more/orderedhash.rb +0 -14
- data/lib/facets/more/ormsupport.rb +0 -224
- data/lib/facets/more/overload.rb +0 -146
- data/lib/facets/more/paramix.rb +0 -239
- data/lib/facets/more/pathlist.rb +0 -99
- data/lib/facets/more/pool.rb +0 -90
- data/lib/facets/more/populate.rb +0 -37
- data/lib/facets/more/pqueue.rb +0 -456
- data/lib/facets/more/preinitialize.rb +0 -151
- data/lib/facets/more/progressbar.rb +0 -237
- data/lib/facets/more/promoteself.rb +0 -100
- data/lib/facets/more/quaternion.rb +0 -560
- data/lib/facets/more/recorder.rb +0 -126
- data/lib/facets/more/reference.rb +0 -91
- data/lib/facets/more/rexmlbuilder.rb +0 -280
- data/lib/facets/more/rtals.rb +0 -212
- data/lib/facets/more/rwdelegator.rb +0 -51
- data/lib/facets/more/script.rb +0 -157
- data/lib/facets/more/semaphore.rb +0 -90
- data/lib/facets/more/settings.rb +0 -219
- data/lib/facets/more/smtp_tls.rb +0 -65
- data/lib/facets/more/snapshot.rb +0 -196
- data/lib/facets/more/stateparser.rb +0 -569
- data/lib/facets/more/statichash.rb +0 -95
- data/lib/facets/more/syncarray.rb +0 -136
- data/lib/facets/more/synchash.rb +0 -164
- data/lib/facets/more/system.rb +0 -177
- data/lib/facets/more/tagiterator.rb +0 -363
- data/lib/facets/more/timer.rb +0 -303
- data/lib/facets/more/times.rb +0 -413
- data/lib/facets/more/tkxml.rb +0 -171
- data/lib/facets/more/tracepoint.rb +0 -185
- data/lib/facets/more/tuple.rb +0 -366
- data/lib/facets/more/typecast.rb +0 -288
- data/lib/facets/more/uninheritable.rb +0 -83
- data/lib/facets/more/units.rb +0 -939
- data/lib/facets/more/uploadutils.rb +0 -410
- data/lib/facets/more/version_number.rb +0 -98
- data/lib/facets/more/xmlbuilder.rb +0 -86
- data/lib/facets/more/xmlhelper.rb +0 -168
- data/lib/facets/more/xoxo.rb +0 -541
- data/lib/facets/more/yamlstruct.rb +0 -93
- data/lib/facets/sys.rb +0 -213
- data/lib/facets/yore/annattr.rb +0 -148
- data/lib/facets/yore/annotation.rb +0 -558
- data/lib/facets/yore/builderobject.rb +0 -222
- data/lib/facets/yore/enumerable/cross.rb +0 -117
- data/lib/facets/yore/kernel/own.rb +0 -17
- data/lib/facets/yore/kernel/require_facet.rb +0 -43
- data/lib/facets/yore/module/inject.rb +0 -9
- data/lib/facets/yore/module/namespace.rb +0 -62
- data/rakefile.rb +0 -150
- data/setup.rb +0 -1587
- data/test/special/main_as_module.rb +0 -14
@@ -0,0 +1,77 @@
|
|
1
|
+
# TITLE:
|
2
|
+
#
|
3
|
+
# ReMain, or Main as Module
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
#
|
7
|
+
# Main, ie. the top-level object, is not fully in-sync with
|
8
|
+
# Module. So, certain methods like #define_method do not work.
|
9
|
+
# This library fixes this.
|
10
|
+
#
|
11
|
+
# Techinally it is this authors opinion that the top-level object
|
12
|
+
# most likely be better-off as a self-extended module, and
|
13
|
+
# method defined in it do not automatically get added to the
|
14
|
+
# Object class.
|
15
|
+
#
|
16
|
+
# COPYRIGHT:
|
17
|
+
#
|
18
|
+
# Copyright (c) 2006 Thomas Sawyer
|
19
|
+
#
|
20
|
+
# LICENSE:
|
21
|
+
#
|
22
|
+
# Ruby License
|
23
|
+
#
|
24
|
+
# This module is free software. You may use, modify, and/or redistribute this
|
25
|
+
# software under the same terms as Ruby.
|
26
|
+
#
|
27
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
28
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
29
|
+
# FOR A PARTICULAR PURPOSE.
|
30
|
+
#
|
31
|
+
# AUTHORS:
|
32
|
+
#
|
33
|
+
# - Thomas Sawyer
|
34
|
+
|
35
|
+
|
36
|
+
public
|
37
|
+
|
38
|
+
(Module.public_instance_methods - public_methods).each do |m|
|
39
|
+
next if m == "initialize"
|
40
|
+
next if m =~ /^\W+$/
|
41
|
+
eval <<-END
|
42
|
+
def self.#{m}( *args, &block )
|
43
|
+
Object.class_eval do
|
44
|
+
#{m}( *args, &block )
|
45
|
+
end
|
46
|
+
end
|
47
|
+
END
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
(Module.private_instance_methods - private_methods).each do |m|
|
53
|
+
next if m == "initialize"
|
54
|
+
next if m =~ /^\W+$/
|
55
|
+
eval <<-END
|
56
|
+
def self.#{m}( *args, &block )
|
57
|
+
Object.class_eval do
|
58
|
+
#{m}( *args, &block )
|
59
|
+
end
|
60
|
+
end
|
61
|
+
END
|
62
|
+
end
|
63
|
+
|
64
|
+
protected
|
65
|
+
|
66
|
+
(Module.protected_instance_methods - protected_methods).each do |m|
|
67
|
+
next if m == "initialize"
|
68
|
+
next if m =~ /^\W+$/
|
69
|
+
eval <<-END
|
70
|
+
def self.#{m}( *args, &block )
|
71
|
+
Object.class_eval do
|
72
|
+
#{m}( *args, &block )
|
73
|
+
end
|
74
|
+
end
|
75
|
+
END
|
76
|
+
end
|
77
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# TITLE:
|
2
|
+
# Map Send and Threaded Map Send
|
3
|
+
#
|
4
|
+
# SUMMARY:
|
5
|
+
# Extensions for Enumerable to send a message to each member
|
6
|
+
# and collect the results.
|
7
|
+
#
|
8
|
+
# AUTHORS:
|
9
|
+
# - Sean O'Halpin
|
10
|
+
#
|
11
|
+
# LOG:
|
12
|
+
# - Depreacated instance_map and instance_select.
|
13
|
+
#
|
14
|
+
# TODOs:
|
15
|
+
# - Better names for these methods.
|
16
|
+
#
|
17
|
+
# COPYRIGHT:
|
18
|
+
# Copyright (c) 2006 Sean O'Halpin
|
19
|
+
#
|
20
|
+
# LICENSE:
|
21
|
+
# Ruby License
|
22
|
+
#
|
23
|
+
# This module is free software. You may use, modify, and/or redistribute this
|
24
|
+
# software under the same terms as Ruby.
|
25
|
+
#
|
26
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
27
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
28
|
+
# FOR A PARTICULAR PURPOSE.
|
29
|
+
|
30
|
+
#
|
31
|
+
module Enumerable
|
32
|
+
|
33
|
+
#
|
34
|
+
# Send a message to each element and collect the result.
|
35
|
+
#
|
36
|
+
def map_send(meth, *args) #:yield:
|
37
|
+
if block_given?
|
38
|
+
map{|e| yield(e.send(meth, *args))}
|
39
|
+
else
|
40
|
+
map{|e| e.send(meth, *args)}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
#
|
46
|
+
#
|
47
|
+
def threaded_map #:yield:
|
48
|
+
require 'thread'
|
49
|
+
|
50
|
+
map{|e| Thread.new(e){|t| yield t}}.map_send(:value)
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
#
|
55
|
+
#
|
56
|
+
def threaded_map_send(meth, *args) #:yield:
|
57
|
+
require 'thread'
|
58
|
+
|
59
|
+
if block_given?
|
60
|
+
map{|e| Thread.new(e){|t| yield t.send(meth, *args)}}.map_send(:value)
|
61
|
+
else
|
62
|
+
map{|e| Thread.new(e){|t| t.send(meth, *args)}}.map_send(:value)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
# # Cascade actions on each enumerated element.
|
68
|
+
# #
|
69
|
+
# # [9, 19, 29].cascade :succ, :to_s, :reverse
|
70
|
+
# # => ["01", "02", "03"]
|
71
|
+
# #
|
72
|
+
# # See ruby-talk:199877.
|
73
|
+
# def cascade(*methods)
|
74
|
+
# methods.inject(self){ |ary, method| ary.map{ |x| x.send(method)}}
|
75
|
+
# end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
=begin test
|
81
|
+
|
82
|
+
require 'test/unit'
|
83
|
+
|
84
|
+
class TestThreadedMapSend < Test::Unit::TestCase
|
85
|
+
|
86
|
+
def test_map_send
|
87
|
+
r = [1,2,3].map_send(:+, 1)
|
88
|
+
assert_equal(r, [2,3,4])
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_map_send_with_block
|
92
|
+
r = [1,2,3].map_send(:+,1){ |x| x + 1 }
|
93
|
+
assert_equal(r, [3,4,5])
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
=end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
# TITLE:
|
2
|
+
#
|
3
|
+
# Memoize
|
4
|
+
#
|
5
|
+
# SUMMARY:
|
6
|
+
#
|
7
|
+
# Directive for making your functions faster by trading
|
8
|
+
# space for time. When you "memoize" a method/function
|
9
|
+
# its results are cached so that later calls with the
|
10
|
+
# same arguments returns results in the cache instead
|
11
|
+
# of recalculating them.
|
12
|
+
#
|
13
|
+
# COPYRIGHT:
|
14
|
+
#
|
15
|
+
# Copyright (c) 2005 Robert Feldt
|
16
|
+
#
|
17
|
+
# LICENSE:
|
18
|
+
#
|
19
|
+
# Ruby License
|
20
|
+
#
|
21
|
+
# This module is free software. You may use, modify, and/or redistribute this
|
22
|
+
# software under the same terms as Ruby.
|
23
|
+
#
|
24
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
25
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
26
|
+
# FOR A PARTICULAR PURPOSE.
|
27
|
+
#
|
28
|
+
# AUTHORS:
|
29
|
+
#
|
30
|
+
# - Robert Feldt
|
31
|
+
|
32
|
+
|
33
|
+
#
|
34
|
+
class Module
|
35
|
+
|
36
|
+
# Directive for making your functions faster by trading
|
37
|
+
# space for time. When you "memoize" a method/function
|
38
|
+
# its results are cached so that later calls with the
|
39
|
+
# same arguments returns results in the cache instead
|
40
|
+
# of recalculating them.
|
41
|
+
#
|
42
|
+
# class T
|
43
|
+
# def initialize(a)
|
44
|
+
# @a = a
|
45
|
+
# end
|
46
|
+
# def a
|
47
|
+
# "#{@a ^ 3 + 4}"
|
48
|
+
# end
|
49
|
+
# memoize :a
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# t = T.new
|
53
|
+
# t.a.__id__ == t.a.__id__ #=> true
|
54
|
+
#
|
55
|
+
def memoize(*meths)
|
56
|
+
@_MEMOIZE_CACHE ||= Hash.new
|
57
|
+
meths.each do |meth|
|
58
|
+
mc = @_MEMOIZE_CACHE[meth] = Hash.new
|
59
|
+
old = instance_method(meth)
|
60
|
+
new = proc do |*args|
|
61
|
+
if mc.has_key? args
|
62
|
+
mc[args]
|
63
|
+
else
|
64
|
+
mc[args] = old.bind(self).call(*args)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
send(:define_method, meth, &new)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
# This allows memoize to work in main and instance scope too.
|
74
|
+
#--
|
75
|
+
# Would this be good to have? Will need to modify for instance level, if so.
|
76
|
+
#++
|
77
|
+
|
78
|
+
def memoize(*args)
|
79
|
+
Object.memoize(*args)
|
80
|
+
end
|
81
|
+
|
82
|
+
#
|
83
|
+
module Kernel
|
84
|
+
|
85
|
+
# Object#cache is essentially like Module#memoize except
|
86
|
+
# it can also be used on singleton/eigen methods.
|
87
|
+
# OTOH, memoize's implementation is arguably better for it's
|
88
|
+
# use of #bind instead of #alias. Eventually the two implmenations
|
89
|
+
# will be reconciled with a single implmentation.
|
90
|
+
|
91
|
+
def cache m = nil
|
92
|
+
if m
|
93
|
+
(Module === self ? self : (class << self; self; end)).module_eval <<-code
|
94
|
+
alias_method '__#{ m }__', '#{ m }'
|
95
|
+
def #{ m }(*__a__,&__b__)
|
96
|
+
c = cache['#{ m }']
|
97
|
+
k = [__a__,__b__]
|
98
|
+
if c.has_key? k
|
99
|
+
c[k]
|
100
|
+
else
|
101
|
+
c[k] = __#{ m }__(*__a__,&__b__)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
code
|
105
|
+
end
|
106
|
+
@cache ||= Hash::new{|h,k| h[k]={}}
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
# _____ _
|
114
|
+
# |_ _|__ ___| |_
|
115
|
+
# | |/ _ \/ __| __|
|
116
|
+
# | | __/\__ \ |_
|
117
|
+
# |_|\___||___/\__|
|
118
|
+
#
|
119
|
+
=begin test
|
120
|
+
|
121
|
+
require 'test/unit'
|
122
|
+
|
123
|
+
class T
|
124
|
+
def initialize(a)
|
125
|
+
@a = a
|
126
|
+
end
|
127
|
+
def a
|
128
|
+
"#{@a ^ 3 + 4}"
|
129
|
+
end
|
130
|
+
memoize :a
|
131
|
+
end
|
132
|
+
|
133
|
+
# test
|
134
|
+
|
135
|
+
class TC_Memoize < Test::Unit::TestCase
|
136
|
+
|
137
|
+
def setup
|
138
|
+
@t = T.new(2)
|
139
|
+
end
|
140
|
+
|
141
|
+
def test_memoize_01
|
142
|
+
assert_equal( @t.a, @t.a )
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_memoize_02
|
146
|
+
assert_equal( @t.a.__id__, @t.a.__id__ )
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_memoize_03
|
150
|
+
assert_equal( @t.a.__id__, @t.a.__id__ )
|
151
|
+
end
|
152
|
+
|
153
|
+
end
|
154
|
+
|
155
|
+
=end
|
@@ -0,0 +1,999 @@
|
|
1
|
+
# TITLE:
|
2
|
+
#
|
3
|
+
# Archive::Tar::Minitar 0.5.1
|
4
|
+
#
|
5
|
+
# SUMMARY:
|
6
|
+
#
|
7
|
+
# Implementation Tar archival file format.
|
8
|
+
#
|
9
|
+
# VERSION:
|
10
|
+
#
|
11
|
+
# 0.5.1
|
12
|
+
#
|
13
|
+
# COPYRIGHT:
|
14
|
+
#
|
15
|
+
# Copyright 2004 Mauricio Julio Fern�dez Pradier and Austin Ziegler
|
16
|
+
#
|
17
|
+
# LICENSE:
|
18
|
+
#
|
19
|
+
# It is licensed under the GNU General Public Licence or Ruby's licence.
|
20
|
+
#
|
21
|
+
# HISTORY:
|
22
|
+
#
|
23
|
+
# This program is based on and incorporates parts of RPA::Package from
|
24
|
+
# rpa-base (lib/rpa/package.rb and lib/rpa/util.rb) by Mauricio and has been
|
25
|
+
# adapted to be more generic by Austin.
|
26
|
+
#
|
27
|
+
# AUTHORS:
|
28
|
+
#
|
29
|
+
# - Mauricio Julio Fern�dez Pradier
|
30
|
+
# - Austin Ziegler
|
31
|
+
|
32
|
+
#
|
33
|
+
module Archive; end
|
34
|
+
module Archive::Tar; end
|
35
|
+
|
36
|
+
# = Archive::Tar::PosixHeader
|
37
|
+
# Implements the POSIX tar header as a Ruby class. The structure of
|
38
|
+
# the POSIX tar header is:
|
39
|
+
#
|
40
|
+
# struct tarfile_entry_posix
|
41
|
+
# { // pack/unpack
|
42
|
+
# char name[100]; // ASCII (+ Z unless filled) a100/Z100
|
43
|
+
# char mode[8]; // 0 padded, octal, null a8 /A8
|
44
|
+
# char uid[8]; // ditto a8 /A8
|
45
|
+
# char gid[8]; // ditto a8 /A8
|
46
|
+
# char size[12]; // 0 padded, octal, null a12 /A12
|
47
|
+
# char mtime[12]; // 0 padded, octal, null a12 /A12
|
48
|
+
# char checksum[8]; // 0 padded, octal, null, space a8 /A8
|
49
|
+
# char typeflag[1]; // see below a /a
|
50
|
+
# char linkname[100]; // ASCII + (Z unless filled) a100/Z100
|
51
|
+
# char magic[6]; // "ustar\0" a6 /A6
|
52
|
+
# char version[2]; // "00" a2 /A2
|
53
|
+
# char uname[32]; // ASCIIZ a32 /Z32
|
54
|
+
# char gname[32]; // ASCIIZ a32 /Z32
|
55
|
+
# char devmajor[8]; // 0 padded, octal, null a8 /A8
|
56
|
+
# char devminor[8]; // 0 padded, octal, null a8 /A8
|
57
|
+
# char prefix[155]; // ASCII (+ Z unless filled) a155/Z155
|
58
|
+
# };
|
59
|
+
#
|
60
|
+
# The +typeflag+ may be one of the following known values:
|
61
|
+
#
|
62
|
+
# <tt>"0"</tt>:: Regular file. NULL should be treated as a synonym, for
|
63
|
+
# compatibility purposes.
|
64
|
+
# <tt>"1"</tt>:: Hard link.
|
65
|
+
# <tt>"2"</tt>:: Symbolic link.
|
66
|
+
# <tt>"3"</tt>:: Character device node.
|
67
|
+
# <tt>"4"</tt>:: Block device node.
|
68
|
+
# <tt>"5"</tt>:: Directory.
|
69
|
+
# <tt>"6"</tt>:: FIFO node.
|
70
|
+
# <tt>"7"</tt>:: Reserved.
|
71
|
+
#
|
72
|
+
# POSIX indicates that "A POSIX-compliant implementation must treat any
|
73
|
+
# unrecognized typeflag value as a regular file."
|
74
|
+
class Archive::Tar::PosixHeader
|
75
|
+
FIELDS = %w(name mode uid gid size mtime checksum typeflag linkname) +
|
76
|
+
%w(magic version uname gname devmajor devminor prefix)
|
77
|
+
|
78
|
+
FIELDS.each { |field| attr_reader field.intern }
|
79
|
+
|
80
|
+
HEADER_PACK_FORMAT = "a100a8a8a8a12a12a7aaa100a6a2a32a32a8a8a155"
|
81
|
+
HEADER_UNPACK_FORMAT = "Z100A8A8A8A12A12A8aZ100A6A2Z32Z32A8A8Z155"
|
82
|
+
|
83
|
+
# Creates a new PosixHeader from a data stream.
|
84
|
+
def self.new_from_stream(stream)
|
85
|
+
data = stream.read(512)
|
86
|
+
fields = data.unpack(HEADER_UNPACK_FORMAT)
|
87
|
+
name = fields.shift
|
88
|
+
mode = fields.shift.oct
|
89
|
+
uid = fields.shift.oct
|
90
|
+
gid = fields.shift.oct
|
91
|
+
size = fields.shift.oct
|
92
|
+
mtime = fields.shift.oct
|
93
|
+
checksum = fields.shift.oct
|
94
|
+
typeflag = fields.shift
|
95
|
+
linkname = fields.shift
|
96
|
+
magic = fields.shift
|
97
|
+
version = fields.shift.oct
|
98
|
+
uname = fields.shift
|
99
|
+
gname = fields.shift
|
100
|
+
devmajor = fields.shift.oct
|
101
|
+
devminor = fields.shift.oct
|
102
|
+
prefix = fields.shift
|
103
|
+
|
104
|
+
empty = (data == "\0" * 512)
|
105
|
+
|
106
|
+
new(:name => name, :mode => mode, :uid => uid, :gid => gid,
|
107
|
+
:size => size, :mtime => mtime, :checksum => checksum,
|
108
|
+
:typeflag => typeflag, :magic => magic, :version => version,
|
109
|
+
:uname => uname, :gname => gname, :devmajor => devmajor,
|
110
|
+
:devminor => devminor, :prefix => prefix, :empty => empty)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Creates a new PosixHeader. A PosixHeader cannot be created unless the
|
114
|
+
# #name, #size, #prefix, and #mode are provided.
|
115
|
+
def initialize(vals)
|
116
|
+
unless vals[:name] && vals[:size] && vals[:prefix] && vals[:mode]
|
117
|
+
raise ArgumentError
|
118
|
+
end
|
119
|
+
|
120
|
+
vals[:mtime] ||= 0
|
121
|
+
vals[:checksum] ||= ""
|
122
|
+
vals[:typeflag] ||= "0"
|
123
|
+
vals[:magic] ||= "ustar"
|
124
|
+
vals[:version] ||= "00"
|
125
|
+
|
126
|
+
FIELDS.each do |field|
|
127
|
+
instance_variable_set("@#{field}", vals[field.intern])
|
128
|
+
end
|
129
|
+
@empty = vals[:empty]
|
130
|
+
end
|
131
|
+
|
132
|
+
def empty?
|
133
|
+
@empty
|
134
|
+
end
|
135
|
+
|
136
|
+
def to_s
|
137
|
+
update_checksum
|
138
|
+
header(@checksum)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Update the checksum field.
|
142
|
+
def update_checksum
|
143
|
+
hh = header(" " * 8)
|
144
|
+
@checksum = oct(calculate_checksum(hh), 6)
|
145
|
+
end
|
146
|
+
|
147
|
+
private
|
148
|
+
def oct(num, len)
|
149
|
+
if num.nil?
|
150
|
+
"\0" * (len + 1)
|
151
|
+
else
|
152
|
+
"%0#{len}o" % num
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def calculate_checksum(hdr)
|
157
|
+
hdr.unpack("C*").inject { |aa, bb| aa + bb }
|
158
|
+
end
|
159
|
+
|
160
|
+
def header(chksum)
|
161
|
+
arr = [name, oct(mode, 7), oct(uid, 7), oct(gid, 7), oct(size, 11),
|
162
|
+
oct(mtime, 11), chksum, " ", typeflag, linkname, magic, version,
|
163
|
+
uname, gname, oct(devmajor, 7), oct(devminor, 7), prefix]
|
164
|
+
str = arr.pack(HEADER_PACK_FORMAT)
|
165
|
+
str + "\0" * ((512 - str.size) % 512)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
require 'fileutils'
|
170
|
+
require 'find'
|
171
|
+
|
172
|
+
# = Archive::Tar::Minitar 0.5.1
|
173
|
+
# Archive::Tar::Minitar is a pure-Ruby library and command-line
|
174
|
+
# utility that provides the ability to deal with POSIX tar(1) archive
|
175
|
+
# files. The implementation is based heavily on Mauricio Fern�dez's
|
176
|
+
# implementation in rpa-base, but has been reorganised to promote
|
177
|
+
# reuse in other projects.
|
178
|
+
#
|
179
|
+
# This tar class performs a subset of all tar (POSIX tape archive)
|
180
|
+
# operations. We can only deal with typeflags 0, 1, 2, and 5 (see
|
181
|
+
# Archive::Tar::PosixHeader). All other typeflags will be treated as
|
182
|
+
# normal files.
|
183
|
+
#
|
184
|
+
# NOTE::: support for typeflags 1 and 2 is not yet implemented in this
|
185
|
+
# version.
|
186
|
+
#
|
187
|
+
# This release is version 0.5.1. The library can only handle files and
|
188
|
+
# directories at this point. A future version will be expanded to
|
189
|
+
# handle symbolic links and hard links in a portable manner. The
|
190
|
+
# command line utility, minitar, can only create archives, extract
|
191
|
+
# from archives, and list archive contents.
|
192
|
+
#
|
193
|
+
# == Synopsis
|
194
|
+
# Using this library is easy. The simplest case is:
|
195
|
+
#
|
196
|
+
# require 'zlib'
|
197
|
+
# require 'archive/tar/minitar'
|
198
|
+
# include Archive::Tar
|
199
|
+
#
|
200
|
+
# # Packs everything that matches Find.find('tests')
|
201
|
+
# File.open('test.tar', 'wb') { |tar| Minitar.pack('tests', tar) }
|
202
|
+
# # Unpacks 'test.tar' to 'x', creating 'x' if necessary.
|
203
|
+
# Minitar.unpack('test.tar', 'x')
|
204
|
+
#
|
205
|
+
# A gzipped tar can be written with:
|
206
|
+
#
|
207
|
+
# tgz = Zlib::GzipWriter.new(File.open('test.tgz', 'wb'))
|
208
|
+
# # Warning: tgz will be closed!
|
209
|
+
# Minitar.pack('tests', tgz)
|
210
|
+
#
|
211
|
+
# tgz = Zlib::GzipReader.new(File.open('test.tgz', 'rb'))
|
212
|
+
# # Warning: tgz will be closed!
|
213
|
+
# Minitar.unpack(tgz, 'x')
|
214
|
+
#
|
215
|
+
# As the case above shows, one need not write to a file. However, it
|
216
|
+
# will sometimes require that one dive a little deeper into the API,
|
217
|
+
# as in the case of StringIO objects. Note that I'm not providing a
|
218
|
+
# block with Minitar::Output, as Minitar::Output#close automatically
|
219
|
+
# closes both the Output object and the wrapped data stream object.
|
220
|
+
#
|
221
|
+
# begin
|
222
|
+
# sgz = Zlib::GzipWriter.new(StringIO.new(""))
|
223
|
+
# tar = Output.new(sgz)
|
224
|
+
# Find.find('tests') do |entry|
|
225
|
+
# Minitar.pack_file(entry, tar)
|
226
|
+
# end
|
227
|
+
# ensure
|
228
|
+
# # Closes both tar and sgz.
|
229
|
+
# tar.close
|
230
|
+
# end
|
231
|
+
#
|
232
|
+
# == Copyright
|
233
|
+
# Copyright 2004 Mauricio Julio Fern�dez Pradier and Austin Ziegler
|
234
|
+
#
|
235
|
+
# This program is based on and incorporates parts of RPA::Package from
|
236
|
+
# rpa-base (lib/rpa/package.rb and lib/rpa/util.rb) by Mauricio and
|
237
|
+
# has been adapted to be more generic by Austin.
|
238
|
+
#
|
239
|
+
# 'minitar' contains an adaptation of Ruby/ProgressBar by Satoru
|
240
|
+
# Takabayashi <satoru@namazu.org>, copyright 2001 - 2004.
|
241
|
+
#
|
242
|
+
# This program is free software. It may be redistributed and/or
|
243
|
+
# modified under the terms of the GPL version 2 (or later) or Ruby's
|
244
|
+
# licence.
|
245
|
+
module Archive::Tar::Minitar
|
246
|
+
VERSION = "0.5.1"
|
247
|
+
|
248
|
+
# The exception raised when a wrapped data stream class is expected to
|
249
|
+
# respond to #rewind or #pos but does not.
|
250
|
+
class NonSeekableStream < StandardError; end
|
251
|
+
# The exception raised when a block is required for proper operation of
|
252
|
+
# the method.
|
253
|
+
class BlockRequired < ArgumentError; end
|
254
|
+
# The exception raised when operations are performed on a stream that has
|
255
|
+
# previously been closed.
|
256
|
+
class ClosedStream < StandardError; end
|
257
|
+
# The exception raised when a filename exceeds 256 bytes in length,
|
258
|
+
# the maximum supported by the standard Tar format.
|
259
|
+
class FileNameTooLong < StandardError; end
|
260
|
+
# The exception raised when a data stream ends before the amount of data
|
261
|
+
# expected in the archive's PosixHeader.
|
262
|
+
class UnexpectedEOF < StandardError; end
|
263
|
+
|
264
|
+
# The class that writes a tar format archive to a data stream.
|
265
|
+
class Writer
|
266
|
+
# A stream wrapper that can only be written to. Any attempt to read
|
267
|
+
# from this restricted stream will result in a NameError being thrown.
|
268
|
+
class RestrictedStream
|
269
|
+
def initialize(anIO)
|
270
|
+
@io = anIO
|
271
|
+
end
|
272
|
+
|
273
|
+
def write(data)
|
274
|
+
@io.write(data)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# A RestrictedStream that also has a size limit.
|
279
|
+
class BoundedStream < Archive::Tar::Minitar::Writer::RestrictedStream
|
280
|
+
# The exception raised when the user attempts to write more data to
|
281
|
+
# a BoundedStream than has been allocated.
|
282
|
+
class FileOverflow < RuntimeError; end
|
283
|
+
|
284
|
+
# The maximum number of bytes that may be written to this data
|
285
|
+
# stream.
|
286
|
+
attr_reader :limit
|
287
|
+
# The current total number of bytes written to this data stream.
|
288
|
+
attr_reader :written
|
289
|
+
|
290
|
+
def initialize(io, limit)
|
291
|
+
@io = io
|
292
|
+
@limit = limit
|
293
|
+
@written = 0
|
294
|
+
end
|
295
|
+
|
296
|
+
def write(data)
|
297
|
+
raise FileOverflow if (data.size + @written) > @limit
|
298
|
+
@io.write(data)
|
299
|
+
@written += data.size
|
300
|
+
data.size
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# With no associated block, +Writer::open+ is a synonym for
|
305
|
+
# +Writer::new+. If the optional code block is given, it will be
|
306
|
+
# passed the new _writer_ as an argument and the Writer object will
|
307
|
+
# automatically be closed when the block terminates. In this instance,
|
308
|
+
# +Writer::open+ returns the value of the block.
|
309
|
+
def self.open(anIO)
|
310
|
+
writer = Writer.new(anIO)
|
311
|
+
|
312
|
+
return writer unless block_given?
|
313
|
+
|
314
|
+
begin
|
315
|
+
res = yield writer
|
316
|
+
ensure
|
317
|
+
writer.close
|
318
|
+
end
|
319
|
+
|
320
|
+
res
|
321
|
+
end
|
322
|
+
|
323
|
+
# Creates and returns a new Writer object.
|
324
|
+
def initialize(anIO)
|
325
|
+
@io = anIO
|
326
|
+
@closed = false
|
327
|
+
end
|
328
|
+
|
329
|
+
# Adds a file to the archive as +name+. +opts+ must contain the
|
330
|
+
# following values:
|
331
|
+
#
|
332
|
+
# <tt>:mode</tt>:: The Unix file permissions mode value.
|
333
|
+
# <tt>:size</tt>:: The size, in bytes.
|
334
|
+
#
|
335
|
+
# +opts+ may contain the following values:
|
336
|
+
#
|
337
|
+
# <tt>:uid</tt>: The Unix file owner user ID number.
|
338
|
+
# <tt>:gid</tt>: The Unix file owner group ID number.
|
339
|
+
# <tt>:mtime</tt>:: The *integer* modification time value.
|
340
|
+
#
|
341
|
+
# It will not be possible to add more than <tt>opts[:size]</tt> bytes
|
342
|
+
# to the file.
|
343
|
+
def add_file_simple(name, opts = {}) # :yields BoundedStream:
|
344
|
+
raise Archive::Tar::Minitar::BlockRequired unless block_given?
|
345
|
+
raise Archive::Tar::ClosedStream if @closed
|
346
|
+
|
347
|
+
name, prefix = split_name(name)
|
348
|
+
|
349
|
+
header = { :name => name, :mode => opts[:mode], :mtime => opts[:mtime],
|
350
|
+
:size => opts[:size], :gid => opts[:gid], :uid => opts[:uid],
|
351
|
+
:prefix => prefix }
|
352
|
+
header = Archive::Tar::PosixHeader.new(header).to_s
|
353
|
+
@io.write(header)
|
354
|
+
|
355
|
+
os = BoundedStream.new(@io, opts[:size])
|
356
|
+
yield os
|
357
|
+
# FIXME: what if an exception is raised in the block?
|
358
|
+
|
359
|
+
min_padding = opts[:size] - os.written
|
360
|
+
@io.write("\0" * min_padding)
|
361
|
+
remainder = (512 - (opts[:size] % 512)) % 512
|
362
|
+
@io.write("\0" * remainder)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Adds a file to the archive as +name+. +opts+ must contain the
|
366
|
+
# following value:
|
367
|
+
#
|
368
|
+
# <tt>:mode</tt>:: The Unix file permissions mode value.
|
369
|
+
#
|
370
|
+
# +opts+ may contain the following values:
|
371
|
+
#
|
372
|
+
# <tt>:uid</tt>: The Unix file owner user ID number.
|
373
|
+
# <tt>:gid</tt>: The Unix file owner group ID number.
|
374
|
+
# <tt>:mtime</tt>:: The *integer* modification time value.
|
375
|
+
#
|
376
|
+
# The file's size will be determined from the amount of data written
|
377
|
+
# to the stream.
|
378
|
+
#
|
379
|
+
# For #add_file to be used, the Archive::Tar::Minitar::Writer must be
|
380
|
+
# wrapping a stream object that is seekable (e.g., it responds to
|
381
|
+
# #pos=). Otherwise, #add_file_simple must be used.
|
382
|
+
#
|
383
|
+
# +opts+ may be modified during the writing to the stream.
|
384
|
+
def add_file(name, opts = {}) # :yields RestrictedStream, +opts+:
|
385
|
+
raise Archive::Tar::Minitar::BlockRequired unless block_given?
|
386
|
+
raise Archive::Tar::Minitar::ClosedStream if @closed
|
387
|
+
raise Archive::Tar::Minitar::NonSeekableStream unless @io.respond_to?(:pos=)
|
388
|
+
|
389
|
+
name, prefix = split_name(name)
|
390
|
+
init_pos = @io.pos
|
391
|
+
@io.write("\0" * 512) # placeholder for the header
|
392
|
+
|
393
|
+
yield RestrictedStream.new(@io), opts
|
394
|
+
# FIXME: what if an exception is raised in the block?
|
395
|
+
|
396
|
+
size = @io.pos - (init_pos + 512)
|
397
|
+
remainder = (512 - (size % 512)) % 512
|
398
|
+
@io.write("\0" * remainder)
|
399
|
+
|
400
|
+
final_pos = @io.pos
|
401
|
+
@io.pos = init_pos
|
402
|
+
|
403
|
+
header = { :name => name, :mode => opts[:mode], :mtime => opts[:mtime],
|
404
|
+
:size => size, :gid => opts[:gid], :uid => opts[:uid],
|
405
|
+
:prefix => prefix }
|
406
|
+
header = Archive::Tar::PosixHeader.new(header).to_s
|
407
|
+
@io.write(header)
|
408
|
+
@io.pos = final_pos
|
409
|
+
end
|
410
|
+
|
411
|
+
# Creates a directory in the tar.
|
412
|
+
def mkdir(name, opts = {})
|
413
|
+
raise ClosedStream if @closed
|
414
|
+
name, prefix = split_name(name)
|
415
|
+
header = { :name => name, :mode => opts[:mode], :typeflag => "5",
|
416
|
+
:size => 0, :gid => opts[:gid], :uid => opts[:uid],
|
417
|
+
:mtime => opts[:mtime], :prefix => prefix }
|
418
|
+
header = Archive::Tar::PosixHeader.new(header).to_s
|
419
|
+
@io.write(header)
|
420
|
+
nil
|
421
|
+
end
|
422
|
+
|
423
|
+
# Passes the #flush method to the wrapped stream, used for buffered
|
424
|
+
# streams.
|
425
|
+
def flush
|
426
|
+
raise ClosedStream if @closed
|
427
|
+
@io.flush if @io.respond_to?(:flush)
|
428
|
+
end
|
429
|
+
|
430
|
+
# Closes the Writer.
|
431
|
+
def close
|
432
|
+
return if @closed
|
433
|
+
@io.write("\0" * 1024)
|
434
|
+
@closed = true
|
435
|
+
end
|
436
|
+
|
437
|
+
private
|
438
|
+
def split_name(name)
|
439
|
+
raise FileNameTooLong if name.size > 256
|
440
|
+
if name.size <= 100
|
441
|
+
prefix = ""
|
442
|
+
else
|
443
|
+
parts = name.split(/\//)
|
444
|
+
newname = parts.pop
|
445
|
+
|
446
|
+
nxt = ""
|
447
|
+
|
448
|
+
loop do
|
449
|
+
nxt = parts.pop
|
450
|
+
break if newname.size + 1 + nxt.size > 100
|
451
|
+
newname = "#{nxt}/#{newname}"
|
452
|
+
end
|
453
|
+
|
454
|
+
prefix = (parts + [nxt]).join("/")
|
455
|
+
|
456
|
+
name = newname
|
457
|
+
|
458
|
+
raise FileNameTooLong if name.size > 100 || prefix.size > 155
|
459
|
+
end
|
460
|
+
return name, prefix
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
# The class that reads a tar format archive from a data stream. The data
|
465
|
+
# stream may be sequential or random access, but certain features only work
|
466
|
+
# with random access data streams.
|
467
|
+
class Reader
|
468
|
+
# This marks the EntryStream closed for reading without closing the
|
469
|
+
# actual data stream.
|
470
|
+
module InvalidEntryStream
|
471
|
+
def read(len = nil); raise ClosedStream; end
|
472
|
+
def getc; raise ClosedStream; end
|
473
|
+
def rewind; raise ClosedStream; end
|
474
|
+
end
|
475
|
+
|
476
|
+
# EntryStreams are pseudo-streams on top of the main data stream.
|
477
|
+
class EntryStream
|
478
|
+
Archive::Tar::PosixHeader::FIELDS.each do |field|
|
479
|
+
attr_reader field.intern
|
480
|
+
end
|
481
|
+
|
482
|
+
def initialize(header, anIO)
|
483
|
+
@io = anIO
|
484
|
+
@name = header.name
|
485
|
+
@mode = header.mode
|
486
|
+
@uid = header.uid
|
487
|
+
@gid = header.gid
|
488
|
+
@size = header.size
|
489
|
+
@mtime = header.mtime
|
490
|
+
@checksum = header.checksum
|
491
|
+
@typeflag = header.typeflag
|
492
|
+
@linkname = header.linkname
|
493
|
+
@magic = header.magic
|
494
|
+
@version = header.version
|
495
|
+
@uname = header.uname
|
496
|
+
@gname = header.gname
|
497
|
+
@devmajor = header.devmajor
|
498
|
+
@devminor = header.devminor
|
499
|
+
@prefix = header.prefix
|
500
|
+
@read = 0
|
501
|
+
@orig_pos = @io.pos
|
502
|
+
end
|
503
|
+
|
504
|
+
# Reads +len+ bytes (or all remaining data) from the entry. Returns
|
505
|
+
# +nil+ if there is no more data to read.
|
506
|
+
def read(len = nil)
|
507
|
+
return nil if @read >= @size
|
508
|
+
len ||= @size - @read
|
509
|
+
max_read = [len, @size - @read].min
|
510
|
+
ret = @io.read(max_read)
|
511
|
+
@read += ret.size
|
512
|
+
ret
|
513
|
+
end
|
514
|
+
|
515
|
+
# Reads one byte from the entry. Returns +nil+ if there is no more data
|
516
|
+
# to read.
|
517
|
+
def getc
|
518
|
+
return nil if @read >= @size
|
519
|
+
ret = @io.getc
|
520
|
+
@read += 1 if ret
|
521
|
+
ret
|
522
|
+
end
|
523
|
+
|
524
|
+
# Returns +true+ if the entry represents a directory.
|
525
|
+
def directory?
|
526
|
+
@typeflag == "5"
|
527
|
+
end
|
528
|
+
alias_method :directory, :directory?
|
529
|
+
|
530
|
+
# Returns +true+ if the entry represents a plain file.
|
531
|
+
def file?
|
532
|
+
@typeflag == "0"
|
533
|
+
end
|
534
|
+
alias_method :file, :file?
|
535
|
+
|
536
|
+
# Returns +true+ if the current read pointer is at the end of the
|
537
|
+
# EntryStream data.
|
538
|
+
def eof?
|
539
|
+
@read >= @size
|
540
|
+
end
|
541
|
+
|
542
|
+
# Returns the current read pointer in the EntryStream.
|
543
|
+
def pos
|
544
|
+
@read
|
545
|
+
end
|
546
|
+
|
547
|
+
# Sets the current read pointer to the beginning of the EntryStream.
|
548
|
+
def rewind
|
549
|
+
raise NonSeekableStream unless @io.respond_to?(:pos=)
|
550
|
+
@io.pos = @orig_pos
|
551
|
+
@read = 0
|
552
|
+
end
|
553
|
+
|
554
|
+
def bytes_read
|
555
|
+
@read
|
556
|
+
end
|
557
|
+
|
558
|
+
# Returns the full and proper name of the entry.
|
559
|
+
def full_name
|
560
|
+
if @prefix != ""
|
561
|
+
File.join(@prefix, @name)
|
562
|
+
else
|
563
|
+
@name
|
564
|
+
end
|
565
|
+
end
|
566
|
+
|
567
|
+
# Closes the entry.
|
568
|
+
def close
|
569
|
+
invalidate
|
570
|
+
end
|
571
|
+
|
572
|
+
private
|
573
|
+
def invalidate
|
574
|
+
extend InvalidEntryStream
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|
578
|
+
# With no associated block, +Reader::open+ is a synonym for
|
579
|
+
# +Reader::new+. If the optional code block is given, it will be passed
|
580
|
+
# the new _writer_ as an argument and the Reader object will
|
581
|
+
# automatically be closed when the block terminates. In this instance,
|
582
|
+
# +Reader::open+ returns the value of the block.
|
583
|
+
def self.open(anIO)
|
584
|
+
reader = Reader.new(anIO)
|
585
|
+
|
586
|
+
return reader unless block_given?
|
587
|
+
|
588
|
+
begin
|
589
|
+
res = yield reader
|
590
|
+
ensure
|
591
|
+
reader.close
|
592
|
+
end
|
593
|
+
|
594
|
+
res
|
595
|
+
end
|
596
|
+
|
597
|
+
# Creates and returns a new Reader object.
|
598
|
+
def initialize(anIO)
|
599
|
+
@io = anIO
|
600
|
+
@init_pos = anIO.pos
|
601
|
+
end
|
602
|
+
|
603
|
+
# Iterates through each entry in the data stream.
|
604
|
+
def each(&block)
|
605
|
+
each_entry(&block)
|
606
|
+
end
|
607
|
+
|
608
|
+
# Resets the read pointer to the beginning of data stream. Do not call
|
609
|
+
# this during a #each or #each_entry iteration. This only works with
|
610
|
+
# random access data streams that respond to #rewind and #pos.
|
611
|
+
def rewind
|
612
|
+
if @init_pos == 0
|
613
|
+
raise NonSeekableStream unless @io.respond_to?(:rewind)
|
614
|
+
@io.rewind
|
615
|
+
else
|
616
|
+
raise NonSeekableStream unless @io.respond_to?(:pos=)
|
617
|
+
@io.pos = @init_pos
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
# Iterates through each entry in the data stream.
|
622
|
+
def each_entry
|
623
|
+
loop do
|
624
|
+
return if @io.eof?
|
625
|
+
|
626
|
+
header = Archive::Tar::PosixHeader.new_from_stream(@io)
|
627
|
+
return if header.empty?
|
628
|
+
|
629
|
+
entry = EntryStream.new(header, @io)
|
630
|
+
size = entry.size
|
631
|
+
|
632
|
+
yield entry
|
633
|
+
|
634
|
+
skip = (512 - (size % 512)) % 512
|
635
|
+
|
636
|
+
if @io.respond_to?(:seek)
|
637
|
+
# avoid reading...
|
638
|
+
@io.seek(size - entry.bytes_read, IO::SEEK_CUR)
|
639
|
+
else
|
640
|
+
pending = size - entry.bytes_read
|
641
|
+
while pending > 0
|
642
|
+
bread = @io.read([pending, 4096].min).size
|
643
|
+
raise UnexpectedEOF if @io.eof?
|
644
|
+
pending -= bread
|
645
|
+
end
|
646
|
+
end
|
647
|
+
@io.read(skip) # discard trailing zeros
|
648
|
+
# make sure nobody can use #read, #getc or #rewind anymore
|
649
|
+
entry.close
|
650
|
+
end
|
651
|
+
end
|
652
|
+
|
653
|
+
def close
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
# Wraps a Archive::Tar::Minitar::Reader with convenience methods and
|
658
|
+
# wrapped stream management; Input only works with random access data
|
659
|
+
# streams. See Input::new for details.
|
660
|
+
class Input
|
661
|
+
include Enumerable
|
662
|
+
|
663
|
+
# With no associated block, +Input::open+ is a synonym for
|
664
|
+
# +Input::new+. If the optional code block is given, it will be passed
|
665
|
+
# the new _writer_ as an argument and the Input object will
|
666
|
+
# automatically be closed when the block terminates. In this instance,
|
667
|
+
# +Input::open+ returns the value of the block.
|
668
|
+
def self.open(input)
|
669
|
+
stream = Input.new(input)
|
670
|
+
return stream unless block_given?
|
671
|
+
|
672
|
+
begin
|
673
|
+
res = yield stream
|
674
|
+
ensure
|
675
|
+
stream.close
|
676
|
+
end
|
677
|
+
|
678
|
+
res
|
679
|
+
end
|
680
|
+
|
681
|
+
# Creates a new Input object. If +input+ is a stream object that responds
|
682
|
+
# to #read), then it will simply be wrapped. Otherwise, one will be
|
683
|
+
# created and opened using Kernel#open. When Input#close is called, the
|
684
|
+
# stream object wrapped will be closed.
|
685
|
+
def initialize(input)
|
686
|
+
if input.respond_to?(:read)
|
687
|
+
@io = input
|
688
|
+
else
|
689
|
+
@io = open(input, "rb")
|
690
|
+
end
|
691
|
+
@tarreader = Archive::Tar::Minitar::Reader.new(@io)
|
692
|
+
end
|
693
|
+
|
694
|
+
# Iterates through each entry and rewinds to the beginning of the stream
|
695
|
+
# when finished.
|
696
|
+
def each(&block)
|
697
|
+
@tarreader.each { |entry| yield entry }
|
698
|
+
ensure
|
699
|
+
@tarreader.rewind
|
700
|
+
end
|
701
|
+
|
702
|
+
# Extracts the current +entry+ to +destdir+. If a block is provided, it
|
703
|
+
# yields an +action+ Symbol, the full name of the file being extracted
|
704
|
+
# (+name+), and a Hash of statistical information (+stats+).
|
705
|
+
#
|
706
|
+
# The +action+ will be one of:
|
707
|
+
# <tt>:dir</tt>:: The +entry+ is a directory.
|
708
|
+
# <tt>:file_start</tt>:: The +entry+ is a file; the extract of the
|
709
|
+
# file is just beginning.
|
710
|
+
# <tt>:file_progress</tt>:: Yielded every 4096 bytes during the extract
|
711
|
+
# of the +entry+.
|
712
|
+
# <tt>:file_done</tt>:: Yielded when the +entry+ is completed.
|
713
|
+
#
|
714
|
+
# The +stats+ hash contains the following keys:
|
715
|
+
# <tt>:current</tt>:: The current total number of bytes read in the
|
716
|
+
# +entry+.
|
717
|
+
# <tt>:currinc</tt>:: The current number of bytes read in this read
|
718
|
+
# cycle.
|
719
|
+
# <tt>:entry</tt>:: The entry being extracted; this is a
|
720
|
+
# Reader::EntryStream, with all methods thereof.
|
721
|
+
def extract_entry(destdir, entry) # :yields action, name, stats:
|
722
|
+
stats = {
|
723
|
+
:current => 0,
|
724
|
+
:currinc => 0,
|
725
|
+
:entry => entry
|
726
|
+
}
|
727
|
+
|
728
|
+
if entry.directory?
|
729
|
+
dest = File.join(destdir, entry.full_name)
|
730
|
+
|
731
|
+
yield :dir, entry.full_name, stats if block_given?
|
732
|
+
|
733
|
+
if Archive::Tar::Minitar.dir?(dest)
|
734
|
+
begin
|
735
|
+
FileUtils.chmod(entry.mode, dest)
|
736
|
+
rescue Exception
|
737
|
+
nil
|
738
|
+
end
|
739
|
+
else
|
740
|
+
FileUtils.mkdir_p(dest, :mode => entry.mode)
|
741
|
+
FileUtils.chmod(entry.mode, dest)
|
742
|
+
end
|
743
|
+
|
744
|
+
fsync_dir(dest)
|
745
|
+
fsync_dir(File.join(dest, ".."))
|
746
|
+
return
|
747
|
+
else # it's a file
|
748
|
+
destdir = File.join(destdir, File.dirname(entry.full_name))
|
749
|
+
FileUtils.mkdir_p(destdir, :mode => 0755)
|
750
|
+
|
751
|
+
destfile = File.join(destdir, File.basename(entry.full_name))
|
752
|
+
FileUtils.chmod(0600, destfile) rescue nil # Errno::ENOENT
|
753
|
+
|
754
|
+
yield :file_start, entry.full_name, stats if block_given?
|
755
|
+
|
756
|
+
File.open(destfile, "wb", entry.mode) do |os|
|
757
|
+
loop do
|
758
|
+
data = entry.read(4096)
|
759
|
+
break unless data
|
760
|
+
|
761
|
+
stats[:currinc] = os.write(data)
|
762
|
+
stats[:current] += stats[:currinc]
|
763
|
+
|
764
|
+
yield :file_progress, entry.full_name, stats if block_given?
|
765
|
+
end
|
766
|
+
os.fsync
|
767
|
+
end
|
768
|
+
|
769
|
+
FileUtils.chmod(entry.mode, destfile)
|
770
|
+
fsync_dir(File.dirname(destfile))
|
771
|
+
fsync_dir(File.join(File.dirname(destfile), ".."))
|
772
|
+
|
773
|
+
yield :file_done, entry.full_name, stats if block_given?
|
774
|
+
end
|
775
|
+
end
|
776
|
+
|
777
|
+
# Returns the Reader object for direct access.
|
778
|
+
def tar
|
779
|
+
@tarreader
|
780
|
+
end
|
781
|
+
|
782
|
+
# Closes the Reader object and the wrapped data stream.
|
783
|
+
def close
|
784
|
+
@io.close
|
785
|
+
@tarreader.close
|
786
|
+
end
|
787
|
+
|
788
|
+
private
|
789
|
+
def fsync_dir(dirname)
|
790
|
+
# make sure this hits the disc
|
791
|
+
dir = open(dirname, 'rb')
|
792
|
+
dir.fsync
|
793
|
+
rescue # ignore IOError if it's an unpatched (old) Ruby
|
794
|
+
nil
|
795
|
+
ensure
|
796
|
+
dir.close if dir rescue nil
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
# Wraps a Archive::Tar::Minitar::Writer with convenience methods and
|
801
|
+
# wrapped stream management; Output only works with random access data
|
802
|
+
# streams. See Output::new for details.
|
803
|
+
class Output
|
804
|
+
# With no associated block, +Output::open+ is a synonym for
|
805
|
+
# +Output::new+. If the optional code block is given, it will be passed
|
806
|
+
# the new _writer_ as an argument and the Output object will
|
807
|
+
# automatically be closed when the block terminates. In this instance,
|
808
|
+
# +Output::open+ returns the value of the block.
|
809
|
+
def self.open(output)
|
810
|
+
stream = Output.new(output)
|
811
|
+
return stream unless block_given?
|
812
|
+
|
813
|
+
begin
|
814
|
+
res = yield stream
|
815
|
+
ensure
|
816
|
+
stream.close
|
817
|
+
end
|
818
|
+
|
819
|
+
res
|
820
|
+
end
|
821
|
+
|
822
|
+
# Creates a new Output object. If +output+ is a stream object that
|
823
|
+
# responds to #read), then it will simply be wrapped. Otherwise, one will
|
824
|
+
# be created and opened using Kernel#open. When Output#close is called,
|
825
|
+
# the stream object wrapped will be closed.
|
826
|
+
def initialize(output)
|
827
|
+
if output.respond_to?(:write)
|
828
|
+
@io = output
|
829
|
+
else
|
830
|
+
@io = ::File.open(output, "wb")
|
831
|
+
end
|
832
|
+
@tarwriter = Archive::Tar::Minitar::Writer.new(@io)
|
833
|
+
end
|
834
|
+
|
835
|
+
# Returns the Writer object for direct access.
|
836
|
+
def tar
|
837
|
+
@tarwriter
|
838
|
+
end
|
839
|
+
|
840
|
+
# Closes the Writer object and the wrapped data stream.
|
841
|
+
def close
|
842
|
+
@tarwriter.close
|
843
|
+
@io.close
|
844
|
+
end
|
845
|
+
end
|
846
|
+
|
847
|
+
class << self
|
848
|
+
# Tests if +path+ refers to a directory. Fixes an apparently
|
849
|
+
# corrupted <tt>stat()</tt> call on Windows.
|
850
|
+
def dir?(path)
|
851
|
+
File.directory?((path[-1] == ?/) ? path : "#{path}/")
|
852
|
+
end
|
853
|
+
|
854
|
+
# A convenience method for wrapping Archive::Tar::Minitar::Input.open
|
855
|
+
# (mode +r+) and Archive::Tar::Minitar::Output.open (mode +w+). No other
|
856
|
+
# modes are currently supported.
|
857
|
+
def open(dest, mode = "r", &block)
|
858
|
+
case mode
|
859
|
+
when "r"
|
860
|
+
Input.open(dest, &block)
|
861
|
+
when "w"
|
862
|
+
Output.open(dest, &block)
|
863
|
+
else
|
864
|
+
raise "Unknown open mode for Archive::Tar::Minitar.open."
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
# A convenience method to packs the file provided. +entry+ may either be
|
869
|
+
# a filename (in which case various values for the file (see below) will
|
870
|
+
# be obtained from <tt>File#stat(entry)</tt> or a Hash with the fields:
|
871
|
+
#
|
872
|
+
# <tt>:name</tt>:: The filename to be packed into the tarchive.
|
873
|
+
# *REQUIRED*.
|
874
|
+
# <tt>:mode</tt>:: The mode to be applied.
|
875
|
+
# <tt>:uid</tt>:: The user owner of the file. (Ignored on Windows.)
|
876
|
+
# <tt>:gid</tt>:: The group owner of the file. (Ignored on Windows.)
|
877
|
+
# <tt>:mtime</tt>:: The modification Time of the file.
|
878
|
+
#
|
879
|
+
# During packing, if a block is provided, #pack_file yields an +action+
|
880
|
+
# Symol, the full name of the file being packed, and a Hash of
|
881
|
+
# statistical information, just as with
|
882
|
+
# Archive::Tar::Minitar::Input#extract_entry.
|
883
|
+
#
|
884
|
+
# The +action+ will be one of:
|
885
|
+
# <tt>:dir</tt>:: The +entry+ is a directory.
|
886
|
+
# <tt>:file_start</tt>:: The +entry+ is a file; the extract of the
|
887
|
+
# file is just beginning.
|
888
|
+
# <tt>:file_progress</tt>:: Yielded every 4096 bytes during the extract
|
889
|
+
# of the +entry+.
|
890
|
+
# <tt>:file_done</tt>:: Yielded when the +entry+ is completed.
|
891
|
+
#
|
892
|
+
# The +stats+ hash contains the following keys:
|
893
|
+
# <tt>:current</tt>:: The current total number of bytes read in the
|
894
|
+
# +entry+.
|
895
|
+
# <tt>:currinc</tt>:: The current number of bytes read in this read
|
896
|
+
# cycle.
|
897
|
+
# <tt>:name</tt>:: The filename to be packed into the tarchive.
|
898
|
+
# *REQUIRED*.
|
899
|
+
# <tt>:mode</tt>:: The mode to be applied.
|
900
|
+
# <tt>:uid</tt>:: The user owner of the file. (+nil+ on Windows.)
|
901
|
+
# <tt>:gid</tt>:: The group owner of the file. (+nil+ on Windows.)
|
902
|
+
# <tt>:mtime</tt>:: The modification Time of the file.
|
903
|
+
def pack_file(entry, outputter) #:yields action, name, stats:
|
904
|
+
outputter = outputter.tar if outputter.kind_of?(Archive::Tar::Minitar::Output)
|
905
|
+
|
906
|
+
stats = {}
|
907
|
+
|
908
|
+
if entry.kind_of?(Hash)
|
909
|
+
name = entry[:name]
|
910
|
+
|
911
|
+
entry.each { |kk, vv| stats[kk] = vv unless vv.nil? }
|
912
|
+
else
|
913
|
+
name = entry
|
914
|
+
end
|
915
|
+
|
916
|
+
name = name.sub(%r{\./}, '')
|
917
|
+
stat = File.stat(name)
|
918
|
+
stats[:mode] ||= stat.mode
|
919
|
+
stats[:mtime] ||= stat.mtime
|
920
|
+
stats[:size] = stat.size
|
921
|
+
|
922
|
+
if RUBY_PLATFORM =~ /win32/
|
923
|
+
stats[:uid] = nil
|
924
|
+
stats[:gid] = nil
|
925
|
+
else
|
926
|
+
stats[:uid] ||= stat.uid
|
927
|
+
stats[:gid] ||= stat.gid
|
928
|
+
end
|
929
|
+
|
930
|
+
case
|
931
|
+
when File.file?(name)
|
932
|
+
outputter.add_file_simple(name, stats) do |os|
|
933
|
+
stats[:current] = 0
|
934
|
+
yield :file_start, name, stats if block_given?
|
935
|
+
File.open(name, "rb") do |ff|
|
936
|
+
until ff.eof?
|
937
|
+
stats[:currinc] = os.write(ff.read(4096))
|
938
|
+
stats[:current] += stats[:currinc]
|
939
|
+
yield :file_progress, name, stats if block_given?
|
940
|
+
end
|
941
|
+
end
|
942
|
+
yield :file_done, name, stats if block_given?
|
943
|
+
end
|
944
|
+
when dir?(name)
|
945
|
+
yield :dir, name, stats if block_given?
|
946
|
+
outputter.mkdir(name, stats)
|
947
|
+
else
|
948
|
+
raise "Don't yet know how to pack this type of file."
|
949
|
+
end
|
950
|
+
end
|
951
|
+
|
952
|
+
# A convenience method to pack files specified by +src+ into +dest+. If
|
953
|
+
# +src+ is an Array, then each file detailed therein will be packed into
|
954
|
+
# the resulting Archive::Tar::Minitar::Output stream; if +recurse_dirs+
|
955
|
+
# is true, then directories will be recursed.
|
956
|
+
#
|
957
|
+
# If +src+ is an Array, it will be treated as the argument to Find.find;
|
958
|
+
# all files matching will be packed.
|
959
|
+
def pack(src, dest, recurse_dirs = true, &block)
|
960
|
+
Output.open(dest) do |outp|
|
961
|
+
if src.kind_of?(Array)
|
962
|
+
src.each do |entry|
|
963
|
+
pack_file(entry, outp, &block)
|
964
|
+
if dir?(entry) and recurse_dirs
|
965
|
+
Dir["#{entry}/**/**"].each do |ee|
|
966
|
+
pack_file(ee, outp, &block)
|
967
|
+
end
|
968
|
+
end
|
969
|
+
end
|
970
|
+
else
|
971
|
+
Find.find(src) do |entry|
|
972
|
+
pack_file(entry, outp, &block)
|
973
|
+
end
|
974
|
+
end
|
975
|
+
end
|
976
|
+
end
|
977
|
+
|
978
|
+
# A convenience method to unpack files from +src+ into the directory
|
979
|
+
# specified by +dest+. Only those files named explicitly in +files+
|
980
|
+
# will be extracted.
|
981
|
+
def unpack(src, dest, files = [], &block)
|
982
|
+
Input.open(src) do |inp|
|
983
|
+
if File.exist?(dest) and (not dir?(dest))
|
984
|
+
raise "Can't unpack to a non-directory."
|
985
|
+
elsif not File.exist?(dest)
|
986
|
+
FileUtils.mkdir_p(dest)
|
987
|
+
end
|
988
|
+
|
989
|
+
inp.each do |entry|
|
990
|
+
if files.empty? or files.include?(entry.full_name)
|
991
|
+
inp.extract_entry(dest, entry, &block)
|
992
|
+
end
|
993
|
+
end
|
994
|
+
end
|
995
|
+
end
|
996
|
+
end
|
997
|
+
end
|
998
|
+
|
999
|
+
|