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
@@ -1,1608 +0,0 @@
|
|
1
|
-
# = httpaccess.rb
|
2
|
-
#
|
3
|
-
# == Copyright (C) 2000 NAKAMURA, Hiroshi
|
4
|
-
#
|
5
|
-
# Ruby License
|
6
|
-
#
|
7
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
8
|
-
# software under the same terms as Ruby.
|
9
|
-
#
|
10
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
11
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
12
|
-
# FOR A PARTICULAR PURPOSE.
|
13
|
-
#
|
14
|
-
# == Author(s)
|
15
|
-
#
|
16
|
-
# * Hiroshi Nakamura <nakahiro@sarion.co.jp>
|
17
|
-
# * Maehashi
|
18
|
-
#
|
19
|
-
# == Developer Notes
|
20
|
-
#
|
21
|
-
# NOTE httpaccess.rb is based on http-access2.rb which is based on
|
22
|
-
# http-access/0.0.4. Some part of code in http-access.rb was recycled
|
23
|
-
# in http-access2.rb. Those parts are copyrighted by Maehashi-san.
|
24
|
-
|
25
|
-
# Author:: Hiroshi Nakamura and Maehashi
|
26
|
-
# Copyright:: Copyright (c) 2000 Hiroshi Nakamura and Maehashi
|
27
|
-
# License:: Ruby License
|
28
|
-
|
29
|
-
# Ruby standard library
|
30
|
-
require 'timeout'
|
31
|
-
require 'uri'
|
32
|
-
require 'socket'
|
33
|
-
require 'thread'
|
34
|
-
|
35
|
-
# Extra library
|
36
|
-
require 'facets/more/http'
|
37
|
-
require 'facets/more/cookie'
|
38
|
-
|
39
|
-
# = HTTP Accessing Library
|
40
|
-
#
|
41
|
-
# Provides an easy to use HTTP interface. Easily retrive web pages
|
42
|
-
# programmtically submit forms.
|
43
|
-
|
44
|
-
module HTTPAccess
|
45
|
-
|
46
|
-
VERSION = '2.0.6'
|
47
|
-
RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
48
|
-
s = %w$Id: http-access2.rb 114 2005-09-13 03:20:38Z nahi $
|
49
|
-
RCS_FILE, RCS_REVISION = s[1][/.*(?=,v$)/], s[2]
|
50
|
-
|
51
|
-
SSLEnabled = begin
|
52
|
-
require 'openssl'
|
53
|
-
true
|
54
|
-
rescue LoadError
|
55
|
-
false
|
56
|
-
end
|
57
|
-
|
58
|
-
DEBUG_SSL = true
|
59
|
-
|
60
|
-
# DESCRIPTION
|
61
|
-
# HTTPAccess::Client -- Client to retrieve web resources via HTTP.
|
62
|
-
#
|
63
|
-
# How to create your client.
|
64
|
-
# 1. Create simple client.
|
65
|
-
# clnt = HTTPAccess::Client.new
|
66
|
-
#
|
67
|
-
# 2. Accessing resources through HTTP proxy.
|
68
|
-
# clnt = HTTPAccess::Client.new("http://myproxy:8080")
|
69
|
-
#
|
70
|
-
# 3. Set User-Agent and From in HTTP request header.(nil means "No proxy")
|
71
|
-
# clnt = HTTPAccess::Client.new(nil, "MyAgent", "nahi@keynauts.com")
|
72
|
-
#
|
73
|
-
# How to retrieve web resources.
|
74
|
-
# 1. Get content of specified URL.
|
75
|
-
# puts clnt.get_content("http://www.ruby-lang.org/en/")
|
76
|
-
#
|
77
|
-
# 2. Do HEAD request.
|
78
|
-
# res = clnt.head(uri)
|
79
|
-
#
|
80
|
-
# 3. Do GET request with query.
|
81
|
-
# res = clnt.get(uri)
|
82
|
-
#
|
83
|
-
# 4. Do POST request.
|
84
|
-
# res = clnt.post(uri)
|
85
|
-
# res = clnt.get|post|head(uri, proxy)
|
86
|
-
#
|
87
|
-
class Client
|
88
|
-
attr_reader :agent_name
|
89
|
-
attr_reader :from
|
90
|
-
attr_reader :ssl_config
|
91
|
-
attr_accessor :cookie_manager
|
92
|
-
attr_reader :test_loopback_response
|
93
|
-
|
94
|
-
class << self
|
95
|
-
%w(get_content head get post put delete options trace).each do |name|
|
96
|
-
eval <<-EOD
|
97
|
-
def #{name}(*arg)
|
98
|
-
new.#{name}(*arg)
|
99
|
-
end
|
100
|
-
EOD
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
# SYNOPSIS
|
105
|
-
# Client.new(proxy = nil, agent_name = nil, from = nil)
|
106
|
-
#
|
107
|
-
# ARGS
|
108
|
-
# proxy A String of HTTP proxy URL. ex. "http://proxy:8080".
|
109
|
-
# agent_name A String for "User-Agent" HTTP request header.
|
110
|
-
# from A String for "From" HTTP request header.
|
111
|
-
#
|
112
|
-
# DESCRIPTION
|
113
|
-
# Create an instance.
|
114
|
-
# SSLConfig cannot be re-initialized. Create new client.
|
115
|
-
#
|
116
|
-
def initialize(proxy = nil, agent_name = nil, from = nil)
|
117
|
-
@proxy = nil # assigned later.
|
118
|
-
@no_proxy = nil
|
119
|
-
@agent_name = agent_name
|
120
|
-
@from = from
|
121
|
-
@basic_auth = BasicAuth.new(self)
|
122
|
-
@debug_dev = nil
|
123
|
-
@ssl_config = SSLConfig.new(self)
|
124
|
-
@redirect_uri_callback = method(:default_redirect_uri_callback)
|
125
|
-
@test_loopback_response = []
|
126
|
-
@session_manager = SessionManager.new
|
127
|
-
@session_manager.agent_name = @agent_name
|
128
|
-
@session_manager.from = @from
|
129
|
-
@session_manager.ssl_config = @ssl_config
|
130
|
-
@cookie_manager = Web::CookieManager.new
|
131
|
-
self.proxy = proxy
|
132
|
-
end
|
133
|
-
|
134
|
-
def debug_dev
|
135
|
-
@debug_dev
|
136
|
-
end
|
137
|
-
|
138
|
-
def debug_dev=(dev)
|
139
|
-
@debug_dev = dev
|
140
|
-
reset_all
|
141
|
-
@session_manager.debug_dev = dev
|
142
|
-
end
|
143
|
-
|
144
|
-
def protocol_version
|
145
|
-
@session_manager.protocol_version
|
146
|
-
end
|
147
|
-
|
148
|
-
def protocol_version=(protocol_version)
|
149
|
-
reset_all
|
150
|
-
@session_manager.protocol_version = protocol_version
|
151
|
-
end
|
152
|
-
|
153
|
-
def connect_timeout
|
154
|
-
@session_manager.connect_timeout
|
155
|
-
end
|
156
|
-
|
157
|
-
def connect_timeout=(connect_timeout)
|
158
|
-
reset_all
|
159
|
-
@session_manager.connect_timeout = connect_timeout
|
160
|
-
end
|
161
|
-
|
162
|
-
def send_timeout
|
163
|
-
@session_manager.send_timeout
|
164
|
-
end
|
165
|
-
|
166
|
-
def send_timeout=(send_timeout)
|
167
|
-
reset_all
|
168
|
-
@session_manager.send_timeout = send_timeout
|
169
|
-
end
|
170
|
-
|
171
|
-
def receive_timeout
|
172
|
-
@session_manager.receive_timeout
|
173
|
-
end
|
174
|
-
|
175
|
-
def receive_timeout=(receive_timeout)
|
176
|
-
reset_all
|
177
|
-
@session_manager.receive_timeout = receive_timeout
|
178
|
-
end
|
179
|
-
|
180
|
-
def proxy
|
181
|
-
@proxy
|
182
|
-
end
|
183
|
-
|
184
|
-
def proxy=(proxy)
|
185
|
-
if proxy.nil?
|
186
|
-
@proxy = nil
|
187
|
-
else
|
188
|
-
if proxy.is_a?(URI)
|
189
|
-
@proxy = proxy
|
190
|
-
else
|
191
|
-
@proxy = URI.parse(proxy)
|
192
|
-
end
|
193
|
-
if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or
|
194
|
-
@proxy.host == nil or @proxy.port == nil
|
195
|
-
raise ArgumentError.new("unsupported proxy `#{proxy}'")
|
196
|
-
end
|
197
|
-
end
|
198
|
-
reset_all
|
199
|
-
@proxy
|
200
|
-
end
|
201
|
-
|
202
|
-
def no_proxy
|
203
|
-
@no_proxy
|
204
|
-
end
|
205
|
-
|
206
|
-
def no_proxy=(no_proxy)
|
207
|
-
@no_proxy = no_proxy
|
208
|
-
reset_all
|
209
|
-
end
|
210
|
-
|
211
|
-
# if your ruby is older than 2005-09-06, do not set socket_sync = false to
|
212
|
-
# avoid an SSL socket blocking bug in openssl/buffering.rb.
|
213
|
-
def socket_sync=(socket_sync)
|
214
|
-
@session_manager.socket_sync = socket_sync
|
215
|
-
end
|
216
|
-
|
217
|
-
def set_basic_auth(uri, user_id, passwd)
|
218
|
-
unless uri.is_a?(URI)
|
219
|
-
uri = URI.parse(uri)
|
220
|
-
end
|
221
|
-
@basic_auth.set(uri, user_id, passwd)
|
222
|
-
end
|
223
|
-
|
224
|
-
def set_cookie_store(filename)
|
225
|
-
if @cookie_manager.cookies_file
|
226
|
-
raise RuntimeError.new("overriding cookie file location")
|
227
|
-
end
|
228
|
-
@cookie_manager.cookies_file = filename
|
229
|
-
@cookie_manager.load_cookies if filename
|
230
|
-
end
|
231
|
-
|
232
|
-
def save_cookie_store
|
233
|
-
@cookie_manager.save_cookies
|
234
|
-
end
|
235
|
-
|
236
|
-
def redirect_uri_callback=(redirect_uri_callback)
|
237
|
-
@redirect_uri_callback = redirect_uri_callback
|
238
|
-
end
|
239
|
-
|
240
|
-
# SYNOPSIS
|
241
|
-
# Client#get_content(uri, query = nil, extheader = {}, &block = nil)
|
242
|
-
#
|
243
|
-
# ARGS
|
244
|
-
# uri an_URI or a_string of uri to connect.
|
245
|
-
# query a_hash or an_array of query part. e.g. { "a" => "b" }.
|
246
|
-
# Give an array to pass multiple value like
|
247
|
-
# [["a" => "b"], ["a" => "c"]].
|
248
|
-
# extheader
|
249
|
-
# a_hash of extra headers like { "SOAPAction" => "urn:foo" }.
|
250
|
-
# &block Give a block to get chunked message-body of response like
|
251
|
-
# get_content(uri) { |chunked_body| ... }
|
252
|
-
# Size of each chunk may not be the same.
|
253
|
-
#
|
254
|
-
# DESCRIPTION
|
255
|
-
# Get a_sring of message-body of response.
|
256
|
-
#
|
257
|
-
def get_content(uri, query = nil, extheader = {}, &block)
|
258
|
-
retry_connect(uri, query) do |uri, query|
|
259
|
-
get(uri, query, extheader, &block)
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
def post_content(uri, body = nil, extheader = {}, &block)
|
264
|
-
retry_connect(uri, nil) do |uri, query|
|
265
|
-
post(uri, body, extheader, &block)
|
266
|
-
end
|
267
|
-
end
|
268
|
-
|
269
|
-
def default_redirect_uri_callback(res)
|
270
|
-
uri = res.header['location'][0]
|
271
|
-
puts "Redirect to: #{uri}" if $DEBUG
|
272
|
-
uri
|
273
|
-
end
|
274
|
-
|
275
|
-
def head(uri, query = nil, extheader = {})
|
276
|
-
request('HEAD', uri, query, nil, extheader)
|
277
|
-
end
|
278
|
-
|
279
|
-
def get(uri, query = nil, extheader = {}, &block)
|
280
|
-
request('GET', uri, query, nil, extheader, &block)
|
281
|
-
end
|
282
|
-
|
283
|
-
def post(uri, body = nil, extheader = {}, &block)
|
284
|
-
request('POST', uri, nil, body, extheader, &block)
|
285
|
-
end
|
286
|
-
|
287
|
-
def put(uri, body = nil, extheader = {}, &block)
|
288
|
-
request('PUT', uri, nil, body, extheader, &block)
|
289
|
-
end
|
290
|
-
|
291
|
-
def delete(uri, extheader = {}, &block)
|
292
|
-
request('DELETE', uri, nil, nil, extheader, &block)
|
293
|
-
end
|
294
|
-
|
295
|
-
def options(uri, extheader = {}, &block)
|
296
|
-
request('OPTIONS', uri, nil, nil, extheader, &block)
|
297
|
-
end
|
298
|
-
|
299
|
-
def trace(uri, query = nil, body = nil, extheader = {}, &block)
|
300
|
-
request('TRACE', uri, query, body, extheader, &block)
|
301
|
-
end
|
302
|
-
|
303
|
-
def request(method, uri, query = nil, body = nil, extheader = {}, &block)
|
304
|
-
conn = Connection.new
|
305
|
-
conn_request(conn, method, uri, query, body, extheader, &block)
|
306
|
-
conn.pop
|
307
|
-
end
|
308
|
-
|
309
|
-
# Async interface.
|
310
|
-
|
311
|
-
def head_async(uri, query = nil, extheader = {})
|
312
|
-
request_async('HEAD', uri, query, nil, extheader)
|
313
|
-
end
|
314
|
-
|
315
|
-
def get_async(uri, query = nil, extheader = {})
|
316
|
-
request_async('GET', uri, query, nil, extheader)
|
317
|
-
end
|
318
|
-
|
319
|
-
def post_async(uri, body = nil, extheader = {})
|
320
|
-
request_async('POST', uri, nil, body, extheader)
|
321
|
-
end
|
322
|
-
|
323
|
-
def put_async(uri, body = nil, extheader = {})
|
324
|
-
request_async('PUT', uri, nil, body, extheader)
|
325
|
-
end
|
326
|
-
|
327
|
-
def delete_async(uri, extheader = {})
|
328
|
-
request_async('DELETE', uri, nil, nil, extheader)
|
329
|
-
end
|
330
|
-
|
331
|
-
def options_async(uri, extheader = {})
|
332
|
-
request_async('OPTIONS', uri, nil, nil, extheader)
|
333
|
-
end
|
334
|
-
|
335
|
-
def trace_async(uri, query = nil, body = nil, extheader = {})
|
336
|
-
request_async('TRACE', uri, query, body, extheader)
|
337
|
-
end
|
338
|
-
|
339
|
-
def request_async(method, uri, query = nil, body = nil, extheader = {})
|
340
|
-
conn = Connection.new
|
341
|
-
t = Thread.new(conn) { |tconn|
|
342
|
-
conn_request(tconn, method, uri, query, body, extheader)
|
343
|
-
}
|
344
|
-
conn.async_thread = t
|
345
|
-
conn
|
346
|
-
end
|
347
|
-
|
348
|
-
##
|
349
|
-
# Multiple call interface.
|
350
|
-
|
351
|
-
# ???
|
352
|
-
|
353
|
-
##
|
354
|
-
# Management interface.
|
355
|
-
|
356
|
-
def reset(uri)
|
357
|
-
@session_manager.reset(uri)
|
358
|
-
end
|
359
|
-
|
360
|
-
def reset_all
|
361
|
-
@session_manager.reset_all
|
362
|
-
end
|
363
|
-
|
364
|
-
private
|
365
|
-
|
366
|
-
def retry_connect(uri, query = nil)
|
367
|
-
retry_number = 0
|
368
|
-
while retry_number < 10
|
369
|
-
res = yield(uri, query)
|
370
|
-
if res.status == HTTP::Status::OK
|
371
|
-
return res.content
|
372
|
-
elsif HTTP::Status.redirect?(res.status)
|
373
|
-
uri = @redirect_uri_callback.call(res)
|
374
|
-
query = nil
|
375
|
-
retry_number += 1
|
376
|
-
else
|
377
|
-
raise RuntimeError.new("Unexpected response: #{res.header.inspect}")
|
378
|
-
end
|
379
|
-
end
|
380
|
-
raise RuntimeError.new("Retry count exceeded.")
|
381
|
-
end
|
382
|
-
|
383
|
-
def conn_request(conn, method, uri, query, body, extheader, &block)
|
384
|
-
unless uri.is_a?(URI)
|
385
|
-
uri = URI.parse(uri)
|
386
|
-
end
|
387
|
-
proxy = no_proxy?(uri) ? nil : @proxy
|
388
|
-
begin
|
389
|
-
req = create_request(method, uri, query, body, extheader, !proxy.nil?)
|
390
|
-
do_get_block(req, proxy, conn, &block)
|
391
|
-
rescue Session::KeepAliveDisconnected
|
392
|
-
req = create_request(method, uri, query, body, extheader, !proxy.nil?)
|
393
|
-
do_get_block(req, proxy, conn, &block)
|
394
|
-
end
|
395
|
-
end
|
396
|
-
|
397
|
-
def create_request(method, uri, query, body, extheader, proxy)
|
398
|
-
if extheader.is_a?(Hash)
|
399
|
-
extheader = extheader.to_a
|
400
|
-
end
|
401
|
-
cred = @basic_auth.get(uri)
|
402
|
-
if cred
|
403
|
-
extheader << ['Authorization', "Basic " << cred]
|
404
|
-
end
|
405
|
-
if cookies = @cookie_manager.find(uri)
|
406
|
-
extheader << ['Cookie', cookies]
|
407
|
-
end
|
408
|
-
boundary = nil
|
409
|
-
content_type = extheader.find { |key, value|
|
410
|
-
key.downcase == 'content-type'
|
411
|
-
}
|
412
|
-
if content_type && content_type[1] =~ /boundary=(.+)\z/
|
413
|
-
boundary = $1
|
414
|
-
end
|
415
|
-
req = HTTP::Message.new_request(method, uri, query, body, proxy, boundary)
|
416
|
-
extheader.each do |key, value|
|
417
|
-
req.header.set(key, value)
|
418
|
-
end
|
419
|
-
if content_type.nil? and !body.nil?
|
420
|
-
req.header.set('content-type', 'application/x-www-form-urlencoded')
|
421
|
-
end
|
422
|
-
req
|
423
|
-
end
|
424
|
-
|
425
|
-
NO_PROXY_HOSTS = ['localhost']
|
426
|
-
|
427
|
-
def no_proxy?(uri)
|
428
|
-
if !@proxy or NO_PROXY_HOSTS.include?(uri.host)
|
429
|
-
return true
|
430
|
-
end
|
431
|
-
unless @no_proxy
|
432
|
-
return false
|
433
|
-
end
|
434
|
-
@no_proxy.scan(/([^:,]+)(?::(\d+))?/) do |host, port|
|
435
|
-
if /(\A|\.)#{Regexp.quote(host)}\z/i =~ uri.host &&
|
436
|
-
(!port || uri.port == port.to_i)
|
437
|
-
return true
|
438
|
-
end
|
439
|
-
end
|
440
|
-
false
|
441
|
-
end
|
442
|
-
|
443
|
-
# !! CAUTION !!
|
444
|
-
# Method 'do_get*' runs under MT conditon. Be careful to change.
|
445
|
-
def do_get_block(req, proxy, conn, &block)
|
446
|
-
if str = @test_loopback_response.shift
|
447
|
-
dump_dummy_request_response(req.body.dump, str) if @debug_dev
|
448
|
-
conn.push(HTTP::Message.new_response(str))
|
449
|
-
return
|
450
|
-
end
|
451
|
-
content = ''
|
452
|
-
res = HTTP::Message.new_response(content)
|
453
|
-
@debug_dev << "= Request\n\n" if @debug_dev
|
454
|
-
sess = @session_manager.query(req, proxy)
|
455
|
-
@debug_dev << "\n\n= Response\n\n" if @debug_dev
|
456
|
-
do_get_header(req, res, sess)
|
457
|
-
conn.push(res)
|
458
|
-
sess.get_data() do |str|
|
459
|
-
block.call(str) if block
|
460
|
-
content << str
|
461
|
-
end
|
462
|
-
@session_manager.keep(sess) unless sess.closed?
|
463
|
-
end
|
464
|
-
|
465
|
-
def do_get_stream(req, proxy, conn)
|
466
|
-
if str = @test_loopback_response.shift
|
467
|
-
dump_dummy_request_response(req.body.dump, str) if @debug_dev
|
468
|
-
conn.push(HTTP::Message.new_response(str))
|
469
|
-
return
|
470
|
-
end
|
471
|
-
piper, pipew = IO.pipe
|
472
|
-
res = HTTP::Message.new_response(piper)
|
473
|
-
@debug_dev << "= Request\n\n" if @debug_dev
|
474
|
-
sess = @session_manager.query(req, proxy)
|
475
|
-
@debug_dev << "\n\n= Response\n\n" if @debug_dev
|
476
|
-
do_get_header(req, res, sess)
|
477
|
-
conn.push(res)
|
478
|
-
sess.get_data() do |str|
|
479
|
-
pipew.syswrite(str)
|
480
|
-
end
|
481
|
-
pipew.close
|
482
|
-
@session_manager.keep(sess) unless sess.closed?
|
483
|
-
end
|
484
|
-
|
485
|
-
def do_get_header(req, res, sess)
|
486
|
-
res.version, res.status, res.reason = sess.get_status
|
487
|
-
sess.get_header().each do |line|
|
488
|
-
unless /^([^:]+)\s*:\s*(.*)$/ =~ line
|
489
|
-
raise RuntimeError.new("Unparsable header: '#{line}'.") if $DEBUG
|
490
|
-
end
|
491
|
-
res.header.set($1, $2)
|
492
|
-
end
|
493
|
-
if res.header['set-cookie']
|
494
|
-
res.header['set-cookie'].each do |cookie|
|
495
|
-
@cookie_manager.parse(cookie, req.header.request_uri)
|
496
|
-
end
|
497
|
-
end
|
498
|
-
end
|
499
|
-
|
500
|
-
def dump_dummy_request_response(req, res)
|
501
|
-
@debug_dev << "= Dummy Request\n\n"
|
502
|
-
@debug_dev << req
|
503
|
-
@debug_dev << "\n\n= Dummy Response\n\n"
|
504
|
-
@debug_dev << res
|
505
|
-
end
|
506
|
-
end
|
507
|
-
|
508
|
-
|
509
|
-
# HTTPAccess::SSLConfig -- SSL configuration of a client.
|
510
|
-
#
|
511
|
-
class SSLConfig # :nodoc:
|
512
|
-
attr_reader :client_cert
|
513
|
-
attr_reader :client_key
|
514
|
-
attr_reader :client_ca
|
515
|
-
|
516
|
-
attr_reader :verify_mode
|
517
|
-
attr_reader :verify_depth
|
518
|
-
attr_reader :verify_callback
|
519
|
-
|
520
|
-
attr_reader :timeout
|
521
|
-
attr_reader :options
|
522
|
-
attr_reader :ciphers
|
523
|
-
|
524
|
-
attr_reader :cert_store # don't use if you don't know what it is.
|
525
|
-
|
526
|
-
def initialize(client)
|
527
|
-
return unless SSLEnabled
|
528
|
-
@client = client
|
529
|
-
@cert_store = OpenSSL::X509::Store.new
|
530
|
-
@client_cert = @client_key = @client_ca = nil
|
531
|
-
@verify_mode = OpenSSL::SSL::VERIFY_PEER |
|
532
|
-
OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
|
533
|
-
@verify_depth = nil
|
534
|
-
@verify_callback = nil
|
535
|
-
@dest = nil
|
536
|
-
@timeout = nil
|
537
|
-
@options = defined?(OpenSSL::SSL::OP_ALL) ?
|
538
|
-
OpenSSL::SSL::OP_ALL | OpenSSL::SSL::OP_NO_SSLv2 : nil
|
539
|
-
@ciphers = "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
|
540
|
-
end
|
541
|
-
|
542
|
-
def set_client_cert_file(cert_file, key_file)
|
543
|
-
@client_cert = OpenSSL::X509::Certificate.new(File.open(cert_file).read)
|
544
|
-
@client_key = OpenSSL::PKey::RSA.new(File.open(key_file).read)
|
545
|
-
change_notify
|
546
|
-
end
|
547
|
-
|
548
|
-
def set_trust_ca(trust_ca_file_or_hashed_dir)
|
549
|
-
if FileTest.directory?(trust_ca_file_or_hashed_dir)
|
550
|
-
@cert_store.add_path(trust_ca_file_or_hashed_dir)
|
551
|
-
else
|
552
|
-
@cert_store.add_file(trust_ca_file_or_hashed_dir)
|
553
|
-
end
|
554
|
-
change_notify
|
555
|
-
end
|
556
|
-
|
557
|
-
def set_crl(crl_file)
|
558
|
-
crl = OpenSSL::X509::CRL.new(File.open(crl_file).read)
|
559
|
-
@cert_store.add_crl(crl)
|
560
|
-
@cert_store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK | OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
|
561
|
-
change_notify
|
562
|
-
end
|
563
|
-
|
564
|
-
def client_cert=(client_cert)
|
565
|
-
@client_cert = client_cert
|
566
|
-
change_notify
|
567
|
-
end
|
568
|
-
|
569
|
-
def client_key=(client_key)
|
570
|
-
@client_key = client_key
|
571
|
-
change_notify
|
572
|
-
end
|
573
|
-
|
574
|
-
def client_ca=(client_ca)
|
575
|
-
@client_ca = client_ca
|
576
|
-
change_notify
|
577
|
-
end
|
578
|
-
|
579
|
-
def verify_mode=(verify_mode)
|
580
|
-
@verify_mode = verify_mode
|
581
|
-
change_notify
|
582
|
-
end
|
583
|
-
|
584
|
-
def verify_depth=(verify_depth)
|
585
|
-
@verify_depth = verify_depth
|
586
|
-
change_notify
|
587
|
-
end
|
588
|
-
|
589
|
-
def verify_callback=(verify_callback)
|
590
|
-
@verify_callback = verify_callback
|
591
|
-
change_notify
|
592
|
-
end
|
593
|
-
|
594
|
-
def timeout=(timeout)
|
595
|
-
@timeout = timeout
|
596
|
-
change_notify
|
597
|
-
end
|
598
|
-
|
599
|
-
def options=(options)
|
600
|
-
@options = options
|
601
|
-
change_notify
|
602
|
-
end
|
603
|
-
|
604
|
-
def ciphers=(ciphers)
|
605
|
-
@ciphers = ciphers
|
606
|
-
change_notify
|
607
|
-
end
|
608
|
-
|
609
|
-
# don't use if you don't know what it is.
|
610
|
-
def cert_store=(cert_store)
|
611
|
-
@cert_store = cert_store
|
612
|
-
change_notify
|
613
|
-
end
|
614
|
-
|
615
|
-
# interfaces for SSLSocketWrap.
|
616
|
-
|
617
|
-
def set_context(ctx)
|
618
|
-
# Verification: Use Store#verify_callback instead of SSLContext#verify*?
|
619
|
-
ctx.cert_store = @cert_store
|
620
|
-
ctx.verify_mode = @verify_mode
|
621
|
-
ctx.verify_depth = @verify_depth if @verify_depth
|
622
|
-
ctx.verify_callback = @verify_callback || method(:default_verify_callback)
|
623
|
-
# SSL config
|
624
|
-
ctx.cert = @client_cert
|
625
|
-
ctx.key = @client_key
|
626
|
-
ctx.client_ca = @client_ca
|
627
|
-
ctx.timeout = @timeout
|
628
|
-
ctx.options = @options
|
629
|
-
ctx.ciphers = @ciphers
|
630
|
-
end
|
631
|
-
|
632
|
-
# this definition must match with the one in ext/openssl/lib/openssl/ssl.rb
|
633
|
-
def post_connection_check(peer_cert, hostname)
|
634
|
-
check_common_name = true
|
635
|
-
cert = peer_cert
|
636
|
-
cert.extensions.each{|ext|
|
637
|
-
next if ext.oid != "subjectAltName"
|
638
|
-
ext.value.split(/,\s+/).each{|general_name|
|
639
|
-
if /\ADNS:(.*)/ =~ general_name
|
640
|
-
check_common_name = false
|
641
|
-
reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+")
|
642
|
-
return true if /\A#{reg}\z/i =~ hostname
|
643
|
-
elsif /\AIP Address:(.*)/ =~ general_name
|
644
|
-
check_common_name = false
|
645
|
-
return true if $1 == hostname
|
646
|
-
end
|
647
|
-
}
|
648
|
-
}
|
649
|
-
if check_common_name
|
650
|
-
cert.subject.to_a.each{|oid, value|
|
651
|
-
if oid == "CN" && value.casecmp(hostname) == 0
|
652
|
-
return true
|
653
|
-
end
|
654
|
-
}
|
655
|
-
end
|
656
|
-
raise OpenSSL::SSL::SSLError, "hostname not match"
|
657
|
-
end
|
658
|
-
|
659
|
-
# Default callback for verification: only dumps error.
|
660
|
-
def default_verify_callback(is_ok, ctx)
|
661
|
-
if $DEBUG
|
662
|
-
puts "#{ is_ok ? 'ok' : 'ng' }: #{ctx.current_cert.subject}"
|
663
|
-
end
|
664
|
-
if !is_ok
|
665
|
-
depth = ctx.error_depth
|
666
|
-
code = ctx.error
|
667
|
-
msg = ctx.error_string
|
668
|
-
STDERR.puts "at depth #{depth} - #{code}: #{msg}"
|
669
|
-
end
|
670
|
-
is_ok
|
671
|
-
end
|
672
|
-
|
673
|
-
# Sample callback method: CAUTION: does not check CRL/ARL.
|
674
|
-
def sample_verify_callback(is_ok, ctx)
|
675
|
-
unless is_ok
|
676
|
-
depth = ctx.error_depth
|
677
|
-
code = ctx.error
|
678
|
-
msg = ctx.error_string
|
679
|
-
STDERR.puts "at depth #{depth} - #{code}: #{msg}" if $DEBUG
|
680
|
-
return false
|
681
|
-
end
|
682
|
-
|
683
|
-
cert = ctx.current_cert
|
684
|
-
self_signed = false
|
685
|
-
ca = false
|
686
|
-
pathlen = nil
|
687
|
-
server_auth = true
|
688
|
-
self_signed = (cert.subject.cmp(cert.issuer) == 0)
|
689
|
-
|
690
|
-
# Check extensions whatever its criticality is. (sample)
|
691
|
-
cert.extensions.each do |ex|
|
692
|
-
case ex.oid
|
693
|
-
when 'basicConstraints'
|
694
|
-
/CA:(TRUE|FALSE), pathlen:(\d+)/ =~ ex.value
|
695
|
-
ca = ($1 == 'TRUE')
|
696
|
-
pathlen = $2.to_i
|
697
|
-
when 'keyUsage'
|
698
|
-
usage = ex.value.split(/\s*,\s*/)
|
699
|
-
ca = usage.include?('Certificate Sign')
|
700
|
-
server_auth = usage.include?('Key Encipherment')
|
701
|
-
when 'extendedKeyUsage'
|
702
|
-
usage = ex.value.split(/\s*,\s*/)
|
703
|
-
server_auth = usage.include?('Netscape Server Gated Crypto')
|
704
|
-
when 'nsCertType'
|
705
|
-
usage = ex.value.split(/\s*,\s*/)
|
706
|
-
ca = usage.include?('SSL CA')
|
707
|
-
server_auth = usage.include?('SSL Server')
|
708
|
-
end
|
709
|
-
end
|
710
|
-
|
711
|
-
if self_signed
|
712
|
-
STDERR.puts 'self signing CA' if $DEBUG
|
713
|
-
return true
|
714
|
-
elsif ca
|
715
|
-
STDERR.puts 'middle level CA' if $DEBUG
|
716
|
-
return true
|
717
|
-
elsif server_auth
|
718
|
-
STDERR.puts 'for server authentication' if $DEBUG
|
719
|
-
return true
|
720
|
-
end
|
721
|
-
|
722
|
-
return false
|
723
|
-
end
|
724
|
-
|
725
|
-
private
|
726
|
-
|
727
|
-
def change_notify
|
728
|
-
@client.reset_all
|
729
|
-
end
|
730
|
-
end
|
731
|
-
|
732
|
-
|
733
|
-
# HTTPAccess::BasicAuth -- BasicAuth repository.
|
734
|
-
#
|
735
|
-
class BasicAuth # :nodoc:
|
736
|
-
def initialize(client)
|
737
|
-
@client = client
|
738
|
-
@auth = {}
|
739
|
-
end
|
740
|
-
|
741
|
-
def set(uri, user_id, passwd)
|
742
|
-
uri = uri.clone
|
743
|
-
uri.path = uri.path.sub(/\/[^\/]*$/, '/')
|
744
|
-
@auth[uri] = ["#{user_id}:#{passwd}"].pack('m').strip
|
745
|
-
@client.reset_all
|
746
|
-
end
|
747
|
-
|
748
|
-
def get(uri)
|
749
|
-
@auth.each do |realm_uri, cred|
|
750
|
-
if ((realm_uri.host == uri.host) and
|
751
|
-
(realm_uri.scheme == uri.scheme) and
|
752
|
-
(realm_uri.port == uri.port) and
|
753
|
-
uri.path.upcase.index(realm_uri.path.upcase) == 0)
|
754
|
-
return cred
|
755
|
-
end
|
756
|
-
end
|
757
|
-
nil
|
758
|
-
end
|
759
|
-
end
|
760
|
-
|
761
|
-
|
762
|
-
# HTTPAccess::Site -- manage a site(host and port)
|
763
|
-
#
|
764
|
-
class Site # :nodoc:
|
765
|
-
attr_accessor :scheme
|
766
|
-
attr_accessor :host
|
767
|
-
attr_reader :port
|
768
|
-
|
769
|
-
def initialize(uri = nil)
|
770
|
-
if uri
|
771
|
-
@scheme = uri.scheme
|
772
|
-
@host = uri.host
|
773
|
-
@port = uri.port.to_i
|
774
|
-
else
|
775
|
-
@scheme = 'tcp'
|
776
|
-
@host = '0.0.0.0'
|
777
|
-
@port = 0
|
778
|
-
end
|
779
|
-
end
|
780
|
-
|
781
|
-
def addr
|
782
|
-
"#{@scheme}://#{@host}:#{@port.to_s}"
|
783
|
-
end
|
784
|
-
|
785
|
-
def port=(port)
|
786
|
-
@port = port.to_i
|
787
|
-
end
|
788
|
-
|
789
|
-
def ==(rhs)
|
790
|
-
if rhs.is_a?(Site)
|
791
|
-
((@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port))
|
792
|
-
else
|
793
|
-
false
|
794
|
-
end
|
795
|
-
end
|
796
|
-
|
797
|
-
def to_s
|
798
|
-
addr
|
799
|
-
end
|
800
|
-
|
801
|
-
def inspect
|
802
|
-
sprintf("#<%s:0x%x %s>", self.class.name, __id__, addr)
|
803
|
-
end
|
804
|
-
end
|
805
|
-
|
806
|
-
|
807
|
-
# HTTPAccess::Connection -- magage a connection(one request and response to it).
|
808
|
-
#
|
809
|
-
class Connection # :nodoc:
|
810
|
-
attr_accessor :async_thread
|
811
|
-
|
812
|
-
def initialize(header_queue = [], body_queue = [])
|
813
|
-
@headers = header_queue
|
814
|
-
@body = body_queue
|
815
|
-
@async_thread = nil
|
816
|
-
@queue = Queue.new
|
817
|
-
end
|
818
|
-
|
819
|
-
def finished?
|
820
|
-
if !@async_thread
|
821
|
-
# Not in async mode.
|
822
|
-
true
|
823
|
-
elsif @async_thread.alive?
|
824
|
-
# Working...
|
825
|
-
false
|
826
|
-
else
|
827
|
-
# Async thread have been finished.
|
828
|
-
@async_thread.join
|
829
|
-
true
|
830
|
-
end
|
831
|
-
end
|
832
|
-
|
833
|
-
def pop
|
834
|
-
@queue.pop
|
835
|
-
end
|
836
|
-
|
837
|
-
def push(result)
|
838
|
-
@queue.push(result)
|
839
|
-
end
|
840
|
-
|
841
|
-
def join
|
842
|
-
unless @async_thread
|
843
|
-
false
|
844
|
-
else
|
845
|
-
@async_thread.join
|
846
|
-
end
|
847
|
-
end
|
848
|
-
end
|
849
|
-
|
850
|
-
|
851
|
-
# HTTPAccess::SessionManager -- manage several sessions.
|
852
|
-
#
|
853
|
-
class SessionManager # :nodoc:
|
854
|
-
attr_accessor :agent_name # Name of this client.
|
855
|
-
attr_accessor :from # Owner of this client.
|
856
|
-
|
857
|
-
attr_accessor :protocol_version # Requested protocol version
|
858
|
-
attr_accessor :chunk_size # Chunk size for chunked request
|
859
|
-
attr_accessor :debug_dev # Device for dumping log for debugging
|
860
|
-
attr_accessor :socket_sync # Boolean value for Socket#sync
|
861
|
-
|
862
|
-
# These parameters are not used now...
|
863
|
-
attr_accessor :connect_timeout
|
864
|
-
attr_accessor :connect_retry # Maximum retry count. 0 for infinite.
|
865
|
-
attr_accessor :send_timeout
|
866
|
-
attr_accessor :receive_timeout
|
867
|
-
attr_accessor :read_block_size
|
868
|
-
|
869
|
-
attr_accessor :ssl_config
|
870
|
-
|
871
|
-
def initialize
|
872
|
-
@proxy = nil
|
873
|
-
|
874
|
-
@agent_name = nil
|
875
|
-
@from = nil
|
876
|
-
|
877
|
-
@protocol_version = nil
|
878
|
-
@debug_dev = nil
|
879
|
-
@socket_sync = true
|
880
|
-
@chunk_size = 4096
|
881
|
-
|
882
|
-
@connect_timeout = 60
|
883
|
-
@connect_retry = 1
|
884
|
-
@send_timeout = 120
|
885
|
-
@receive_timeout = 60 # For each read_block_size bytes
|
886
|
-
@read_block_size = 8192
|
887
|
-
|
888
|
-
@ssl_config = nil
|
889
|
-
|
890
|
-
@sess_pool = []
|
891
|
-
@sess_pool_mutex = Mutex.new
|
892
|
-
end
|
893
|
-
|
894
|
-
def proxy=(proxy)
|
895
|
-
if proxy.nil?
|
896
|
-
@proxy = nil
|
897
|
-
else
|
898
|
-
@proxy = Site.new(proxy)
|
899
|
-
end
|
900
|
-
end
|
901
|
-
|
902
|
-
def query(req, proxy)
|
903
|
-
req.body.chunk_size = @chunk_size
|
904
|
-
dest_site = Site.new(req.header.request_uri)
|
905
|
-
proxy_site = if proxy
|
906
|
-
Site.new(proxy)
|
907
|
-
else
|
908
|
-
@proxy
|
909
|
-
end
|
910
|
-
sess = open(dest_site, proxy_site)
|
911
|
-
begin
|
912
|
-
sess.query(req)
|
913
|
-
rescue
|
914
|
-
sess.close
|
915
|
-
raise
|
916
|
-
end
|
917
|
-
sess
|
918
|
-
end
|
919
|
-
|
920
|
-
def reset(uri)
|
921
|
-
unless uri.is_a?(URI)
|
922
|
-
uri = URI.parse(uri.to_s)
|
923
|
-
end
|
924
|
-
site = Site.new(uri)
|
925
|
-
close(site)
|
926
|
-
end
|
927
|
-
|
928
|
-
def reset_all
|
929
|
-
close_all
|
930
|
-
end
|
931
|
-
|
932
|
-
def keep(sess)
|
933
|
-
add_cached_session(sess)
|
934
|
-
end
|
935
|
-
|
936
|
-
private
|
937
|
-
|
938
|
-
def open(dest, proxy = nil)
|
939
|
-
sess = nil
|
940
|
-
if cached = get_cached_session(dest)
|
941
|
-
sess = cached
|
942
|
-
else
|
943
|
-
sess = Session.new(dest, @agent_name, @from)
|
944
|
-
sess.proxy = proxy
|
945
|
-
sess.socket_sync = @socket_sync
|
946
|
-
sess.requested_version = @protocol_version if @protocol_version
|
947
|
-
sess.connect_timeout = @connect_timeout
|
948
|
-
sess.connect_retry = @connect_retry
|
949
|
-
sess.send_timeout = @send_timeout
|
950
|
-
sess.receive_timeout = @receive_timeout
|
951
|
-
sess.read_block_size = @read_block_size
|
952
|
-
sess.ssl_config = @ssl_config
|
953
|
-
sess.debug_dev = @debug_dev
|
954
|
-
end
|
955
|
-
sess
|
956
|
-
end
|
957
|
-
|
958
|
-
def close_all
|
959
|
-
each_sess do |sess|
|
960
|
-
sess.close
|
961
|
-
end
|
962
|
-
@sess_pool.clear
|
963
|
-
end
|
964
|
-
|
965
|
-
def close(dest)
|
966
|
-
if cached = get_cached_session(dest)
|
967
|
-
cached.close
|
968
|
-
true
|
969
|
-
else
|
970
|
-
false
|
971
|
-
end
|
972
|
-
end
|
973
|
-
|
974
|
-
def get_cached_session(dest)
|
975
|
-
cached = nil
|
976
|
-
@sess_pool_mutex.synchronize do
|
977
|
-
new_pool = []
|
978
|
-
@sess_pool.each do |s|
|
979
|
-
if s.dest == dest
|
980
|
-
cached = s
|
981
|
-
else
|
982
|
-
new_pool << s
|
983
|
-
end
|
984
|
-
end
|
985
|
-
@sess_pool = new_pool
|
986
|
-
end
|
987
|
-
cached
|
988
|
-
end
|
989
|
-
|
990
|
-
def add_cached_session(sess)
|
991
|
-
@sess_pool_mutex.synchronize do
|
992
|
-
@sess_pool << sess
|
993
|
-
end
|
994
|
-
end
|
995
|
-
|
996
|
-
def each_sess
|
997
|
-
@sess_pool_mutex.synchronize do
|
998
|
-
@sess_pool.each do |sess|
|
999
|
-
yield(sess)
|
1000
|
-
end
|
1001
|
-
end
|
1002
|
-
end
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
|
1006
|
-
# HTTPAccess::SSLSocketWrap
|
1007
|
-
#
|
1008
|
-
class SSLSocketWrap
|
1009
|
-
def initialize(socket, context, debug_dev = nil)
|
1010
|
-
unless SSLEnabled
|
1011
|
-
raise RuntimeError.new(
|
1012
|
-
"Ruby/OpenSSL module is required for https access.")
|
1013
|
-
end
|
1014
|
-
@context = context
|
1015
|
-
@socket = socket
|
1016
|
-
@ssl_socket = create_ssl_socket(@socket)
|
1017
|
-
@debug_dev = debug_dev
|
1018
|
-
end
|
1019
|
-
|
1020
|
-
def ssl_connect
|
1021
|
-
@ssl_socket.connect
|
1022
|
-
end
|
1023
|
-
|
1024
|
-
def post_connection_check(host)
|
1025
|
-
verify_mode = @context.verify_mode || OpenSSL::SSL::VERIFY_NONE
|
1026
|
-
if verify_mode == OpenSSL::SSL::VERIFY_NONE
|
1027
|
-
return
|
1028
|
-
elsif @ssl_socket.peer_cert.nil? and
|
1029
|
-
check_mask(verify_mode, OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT)
|
1030
|
-
raise OpenSSL::SSL::SSLError, "no peer cert"
|
1031
|
-
end
|
1032
|
-
hostname = host.host
|
1033
|
-
if @ssl_socket.respond_to?(:post_connection_check)
|
1034
|
-
@ssl_socket.post_connection_check(hostname)
|
1035
|
-
end
|
1036
|
-
@context.post_connection_check(@ssl_socket.peer_cert, hostname)
|
1037
|
-
end
|
1038
|
-
|
1039
|
-
def peer_cert
|
1040
|
-
@ssl_socket.peer_cert
|
1041
|
-
end
|
1042
|
-
|
1043
|
-
def addr
|
1044
|
-
@socket.addr
|
1045
|
-
end
|
1046
|
-
|
1047
|
-
def close
|
1048
|
-
@ssl_socket.close
|
1049
|
-
@socket.close
|
1050
|
-
end
|
1051
|
-
|
1052
|
-
def closed?
|
1053
|
-
@socket.closed?
|
1054
|
-
end
|
1055
|
-
|
1056
|
-
def eof?
|
1057
|
-
@ssl_socket.eof?
|
1058
|
-
end
|
1059
|
-
|
1060
|
-
def gets(*args)
|
1061
|
-
str = @ssl_socket.gets(*args)
|
1062
|
-
@debug_dev << str if @debug_dev
|
1063
|
-
str
|
1064
|
-
end
|
1065
|
-
|
1066
|
-
def read(*args)
|
1067
|
-
str = @ssl_socket.read(*args)
|
1068
|
-
@debug_dev << str if @debug_dev
|
1069
|
-
str
|
1070
|
-
end
|
1071
|
-
|
1072
|
-
def <<(str)
|
1073
|
-
rv = @ssl_socket.write(str)
|
1074
|
-
@debug_dev << str if @debug_dev
|
1075
|
-
rv
|
1076
|
-
end
|
1077
|
-
|
1078
|
-
def flush
|
1079
|
-
@ssl_socket.flush
|
1080
|
-
end
|
1081
|
-
|
1082
|
-
def sync
|
1083
|
-
@ssl_socket.sync
|
1084
|
-
end
|
1085
|
-
|
1086
|
-
def sync=(sync)
|
1087
|
-
@ssl_socket.sync = sync
|
1088
|
-
end
|
1089
|
-
|
1090
|
-
private
|
1091
|
-
|
1092
|
-
def check_mask(value, mask)
|
1093
|
-
value & mask == mask
|
1094
|
-
end
|
1095
|
-
|
1096
|
-
def create_ssl_socket(socket)
|
1097
|
-
ssl_socket = nil
|
1098
|
-
if OpenSSL::SSL.const_defined?("SSLContext")
|
1099
|
-
ctx = OpenSSL::SSL::SSLContext.new
|
1100
|
-
@context.set_context(ctx)
|
1101
|
-
ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ctx)
|
1102
|
-
else
|
1103
|
-
ssl_socket = OpenSSL::SSL::SSLSocket.new(socket)
|
1104
|
-
@context.set_context(ssl_socket)
|
1105
|
-
end
|
1106
|
-
ssl_socket
|
1107
|
-
end
|
1108
|
-
end
|
1109
|
-
|
1110
|
-
|
1111
|
-
# HTTPAccess::DebugSocket -- debugging support
|
1112
|
-
#
|
1113
|
-
class DebugSocket < TCPSocket
|
1114
|
-
attr_accessor :debug_dev # Device for logging.
|
1115
|
-
|
1116
|
-
class << self
|
1117
|
-
def create_socket(host, port, debug_dev)
|
1118
|
-
debug_dev << "! CONNECT TO #{host}:#{port}\n"
|
1119
|
-
socket = new(host, port)
|
1120
|
-
socket.debug_dev = debug_dev
|
1121
|
-
socket.log_connect
|
1122
|
-
socket
|
1123
|
-
end
|
1124
|
-
|
1125
|
-
private :new
|
1126
|
-
end
|
1127
|
-
|
1128
|
-
def initialize(*args)
|
1129
|
-
super
|
1130
|
-
@debug_dev = nil
|
1131
|
-
end
|
1132
|
-
|
1133
|
-
def log_connect
|
1134
|
-
@debug_dev << '! CONNECTION ESTABLISHED' << "\n"
|
1135
|
-
end
|
1136
|
-
|
1137
|
-
def close
|
1138
|
-
super
|
1139
|
-
@debug_dev << '! CONNECTION CLOSED' << "\n"
|
1140
|
-
end
|
1141
|
-
|
1142
|
-
def gets(*args)
|
1143
|
-
str = super
|
1144
|
-
@debug_dev << str if str
|
1145
|
-
str
|
1146
|
-
end
|
1147
|
-
|
1148
|
-
def read(*args)
|
1149
|
-
str = super
|
1150
|
-
@debug_dev << str if str
|
1151
|
-
str
|
1152
|
-
end
|
1153
|
-
|
1154
|
-
def <<(str)
|
1155
|
-
super
|
1156
|
-
@debug_dev << str
|
1157
|
-
end
|
1158
|
-
end
|
1159
|
-
|
1160
|
-
|
1161
|
-
# HTTPAccess::Session -- manage http session with one site.
|
1162
|
-
# One or more TCP sessions with the site may be created.
|
1163
|
-
# Only 1 TCP session is live at the same time.
|
1164
|
-
#
|
1165
|
-
class Session # :nodoc:
|
1166
|
-
|
1167
|
-
class Error < StandardError # :nodoc:
|
1168
|
-
end
|
1169
|
-
|
1170
|
-
class InvalidState < Error # :nodoc:
|
1171
|
-
end
|
1172
|
-
|
1173
|
-
class BadResponse < Error # :nodoc:
|
1174
|
-
end
|
1175
|
-
|
1176
|
-
class KeepAliveDisconnected < Error # :nodoc:
|
1177
|
-
end
|
1178
|
-
|
1179
|
-
attr_reader :dest # Destination site
|
1180
|
-
attr_reader :src # Source site
|
1181
|
-
attr_accessor :proxy # Proxy site
|
1182
|
-
attr_accessor :socket_sync # Boolean value for Socket#sync
|
1183
|
-
|
1184
|
-
attr_accessor :requested_version # Requested protocol version
|
1185
|
-
|
1186
|
-
attr_accessor :debug_dev # Device for dumping log for debugging
|
1187
|
-
|
1188
|
-
# These session parameters are not used now...
|
1189
|
-
attr_accessor :connect_timeout
|
1190
|
-
attr_accessor :connect_retry
|
1191
|
-
attr_accessor :send_timeout
|
1192
|
-
attr_accessor :receive_timeout
|
1193
|
-
attr_accessor :read_block_size
|
1194
|
-
|
1195
|
-
attr_accessor :ssl_config
|
1196
|
-
|
1197
|
-
def initialize(dest, user_agent, from)
|
1198
|
-
@dest = dest
|
1199
|
-
@src = Site.new
|
1200
|
-
@proxy = nil
|
1201
|
-
@socket_sync = true
|
1202
|
-
@requested_version = nil
|
1203
|
-
|
1204
|
-
@debug_dev = nil
|
1205
|
-
|
1206
|
-
@connect_timeout = nil
|
1207
|
-
@connect_retry = 1
|
1208
|
-
@send_timeout = nil
|
1209
|
-
@receive_timeout = nil
|
1210
|
-
@read_block_size = nil
|
1211
|
-
|
1212
|
-
@ssl_config = nil
|
1213
|
-
|
1214
|
-
@user_agent = user_agent
|
1215
|
-
@from = from
|
1216
|
-
@state = :INIT
|
1217
|
-
|
1218
|
-
@requests = []
|
1219
|
-
|
1220
|
-
@status = nil
|
1221
|
-
@reason = nil
|
1222
|
-
@headers = []
|
1223
|
-
|
1224
|
-
@socket = nil
|
1225
|
-
end
|
1226
|
-
|
1227
|
-
# Send a request to the server
|
1228
|
-
def query(req)
|
1229
|
-
connect() if @state == :INIT
|
1230
|
-
begin
|
1231
|
-
timeout(@send_timeout) do
|
1232
|
-
set_header(req)
|
1233
|
-
req.dump(@socket)
|
1234
|
-
# flush the IO stream as IO::sync mode is false
|
1235
|
-
@socket.flush unless @socket_sync
|
1236
|
-
end
|
1237
|
-
rescue Errno::ECONNABORTED
|
1238
|
-
close
|
1239
|
-
raise KeepAliveDisconnected.new
|
1240
|
-
rescue
|
1241
|
-
if SSLEnabled and $!.is_a?(OpenSSL::SSL::SSLError)
|
1242
|
-
raise KeepAliveDisconnected.new
|
1243
|
-
elsif $!.is_a?(TimeoutError)
|
1244
|
-
close
|
1245
|
-
raise
|
1246
|
-
else
|
1247
|
-
raise
|
1248
|
-
end
|
1249
|
-
end
|
1250
|
-
|
1251
|
-
@state = :META if @state == :WAIT
|
1252
|
-
@next_connection = nil
|
1253
|
-
@requests.push(req)
|
1254
|
-
end
|
1255
|
-
|
1256
|
-
def close
|
1257
|
-
unless @socket.nil?
|
1258
|
-
@socket.flush
|
1259
|
-
@socket.close unless @socket.closed?
|
1260
|
-
end
|
1261
|
-
@state = :INIT
|
1262
|
-
end
|
1263
|
-
|
1264
|
-
def closed?
|
1265
|
-
@state == :INIT
|
1266
|
-
end
|
1267
|
-
|
1268
|
-
def get_status
|
1269
|
-
version = status = reason = nil
|
1270
|
-
begin
|
1271
|
-
if @state != :META
|
1272
|
-
raise RuntimeError.new("get_status must be called at the beginning of a session.")
|
1273
|
-
end
|
1274
|
-
version, status, reason = read_header()
|
1275
|
-
rescue
|
1276
|
-
close
|
1277
|
-
raise
|
1278
|
-
end
|
1279
|
-
return version, status, reason
|
1280
|
-
end
|
1281
|
-
|
1282
|
-
def get_header(&block)
|
1283
|
-
begin
|
1284
|
-
read_header() if @state == :META
|
1285
|
-
rescue
|
1286
|
-
close
|
1287
|
-
raise
|
1288
|
-
end
|
1289
|
-
if block
|
1290
|
-
@headers.each do |line|
|
1291
|
-
block.call(line)
|
1292
|
-
end
|
1293
|
-
else
|
1294
|
-
@headers
|
1295
|
-
end
|
1296
|
-
end
|
1297
|
-
|
1298
|
-
def eof?
|
1299
|
-
if @content_length == 0
|
1300
|
-
true
|
1301
|
-
elsif @readbuf.length > 0
|
1302
|
-
false
|
1303
|
-
else
|
1304
|
-
@socket.closed? or @socket.eof?
|
1305
|
-
end
|
1306
|
-
end
|
1307
|
-
|
1308
|
-
def get_data(&block)
|
1309
|
-
begin
|
1310
|
-
read_header() if @state == :META
|
1311
|
-
return nil if @state != :DATA
|
1312
|
-
unless @state == :DATA
|
1313
|
-
raise InvalidState.new('state != DATA')
|
1314
|
-
end
|
1315
|
-
data = nil
|
1316
|
-
if block
|
1317
|
-
until eof?
|
1318
|
-
begin
|
1319
|
-
timeout(@receive_timeout) do
|
1320
|
-
data = read_body()
|
1321
|
-
end
|
1322
|
-
rescue TimeoutError
|
1323
|
-
raise
|
1324
|
-
end
|
1325
|
-
block.call(data) if data
|
1326
|
-
end
|
1327
|
-
data = nil # Calling with block returns nil.
|
1328
|
-
else
|
1329
|
-
begin
|
1330
|
-
timeout(@receive_timeout) do
|
1331
|
-
data = read_body()
|
1332
|
-
end
|
1333
|
-
rescue TimeoutError
|
1334
|
-
raise
|
1335
|
-
end
|
1336
|
-
end
|
1337
|
-
rescue
|
1338
|
-
close
|
1339
|
-
raise
|
1340
|
-
end
|
1341
|
-
if eof?
|
1342
|
-
if @next_connection
|
1343
|
-
@state = :WAIT
|
1344
|
-
else
|
1345
|
-
close
|
1346
|
-
end
|
1347
|
-
end
|
1348
|
-
data
|
1349
|
-
end
|
1350
|
-
|
1351
|
-
private
|
1352
|
-
|
1353
|
-
LibNames = "(#{RCS_FILE}/#{RCS_REVISION}, #{RUBY_VERSION_STRING})"
|
1354
|
-
|
1355
|
-
def set_header(req)
|
1356
|
-
req.version = @requested_version if @requested_version
|
1357
|
-
if @user_agent
|
1358
|
-
req.header.set('User-Agent', "#{@user_agent} #{LibNames}")
|
1359
|
-
end
|
1360
|
-
if @from
|
1361
|
-
req.header.set('From', @from)
|
1362
|
-
end
|
1363
|
-
req.header.set('Date', Time.now)
|
1364
|
-
end
|
1365
|
-
|
1366
|
-
# Connect to the server
|
1367
|
-
def connect
|
1368
|
-
site = @proxy || @dest
|
1369
|
-
begin
|
1370
|
-
retry_number = 0
|
1371
|
-
timeout(@connect_timeout) do
|
1372
|
-
@socket = create_socket(site)
|
1373
|
-
begin
|
1374
|
-
@src.host = @socket.addr[3]
|
1375
|
-
@src.port = @socket.addr[1]
|
1376
|
-
rescue SocketError
|
1377
|
-
# to avoid IPSocket#addr problem on Mac OS X 10.3 + ruby-1.8.1.
|
1378
|
-
# cf. [ruby-talk:84909], [ruby-talk:95827]
|
1379
|
-
end
|
1380
|
-
if @dest.scheme == 'https'
|
1381
|
-
@socket = create_ssl_socket(@socket)
|
1382
|
-
connect_ssl_proxy(@socket) if @proxy
|
1383
|
-
@socket.ssl_connect
|
1384
|
-
@socket.post_connection_check(@dest)
|
1385
|
-
end
|
1386
|
-
# Use Ruby internal buffering instead of passing data immediatly
|
1387
|
-
# to the underlying layer
|
1388
|
-
# => we need to to call explicitely flush on the socket
|
1389
|
-
@socket.sync = @socket_sync
|
1390
|
-
end
|
1391
|
-
rescue TimeoutError
|
1392
|
-
if @connect_retry == 0
|
1393
|
-
retry
|
1394
|
-
else
|
1395
|
-
retry_number += 1
|
1396
|
-
retry if retry_number < @connect_retry
|
1397
|
-
end
|
1398
|
-
close
|
1399
|
-
raise
|
1400
|
-
end
|
1401
|
-
|
1402
|
-
@state = :WAIT
|
1403
|
-
@readbuf = ''
|
1404
|
-
end
|
1405
|
-
|
1406
|
-
def create_socket(site)
|
1407
|
-
begin
|
1408
|
-
if @debug_dev
|
1409
|
-
DebugSocket.create_socket(site.host, site.port, @debug_dev)
|
1410
|
-
else
|
1411
|
-
TCPSocket.new(site.host, site.port)
|
1412
|
-
end
|
1413
|
-
rescue SystemCallError => e
|
1414
|
-
e.message << " (#{site.host}, ##{site.port})"
|
1415
|
-
raise
|
1416
|
-
end
|
1417
|
-
end
|
1418
|
-
|
1419
|
-
# wrap socket with OpenSSL.
|
1420
|
-
def create_ssl_socket(raw_socket)
|
1421
|
-
SSLSocketWrap.new(raw_socket, @ssl_config, (DEBUG_SSL ? @debug_dev : nil))
|
1422
|
-
end
|
1423
|
-
|
1424
|
-
def connect_ssl_proxy(socket)
|
1425
|
-
socket << sprintf("CONNECT %s:%s HTTP/1.1\r\n\r\n", @dest.host, @dest.port)
|
1426
|
-
parse_header(socket)
|
1427
|
-
unless @status == 200
|
1428
|
-
raise BadResponse.new(
|
1429
|
-
"connect to ssl proxy failed with status #{@status} #{@reason}")
|
1430
|
-
end
|
1431
|
-
end
|
1432
|
-
|
1433
|
-
# Read status block.
|
1434
|
-
def read_header
|
1435
|
-
if @state == :DATA
|
1436
|
-
get_data {}
|
1437
|
-
check_state()
|
1438
|
-
end
|
1439
|
-
unless @state == :META
|
1440
|
-
raise InvalidState, 'state != :META'
|
1441
|
-
end
|
1442
|
-
parse_header(@socket)
|
1443
|
-
@content_length = nil
|
1444
|
-
@chunked = false
|
1445
|
-
@headers.each do |line|
|
1446
|
-
case line
|
1447
|
-
when /^Content-Length:\s+(\d+)/i
|
1448
|
-
@content_length = $1.to_i
|
1449
|
-
when /^Transfer-Encoding:\s+chunked/i
|
1450
|
-
@chunked = true
|
1451
|
-
@content_length = true # how?
|
1452
|
-
@chunk_length = 0
|
1453
|
-
when /^Connection:\s+([\-\w]+)/i, /^Proxy-Connection:\s+([\-\w]+)/i
|
1454
|
-
case $1
|
1455
|
-
when /^Keep-Alive$/i
|
1456
|
-
@next_connection = true
|
1457
|
-
when /^close$/i
|
1458
|
-
@next_connection = false
|
1459
|
-
end
|
1460
|
-
else
|
1461
|
-
# Nothing to parse.
|
1462
|
-
end
|
1463
|
-
end
|
1464
|
-
|
1465
|
-
# Head of the request has been parsed.
|
1466
|
-
@state = :DATA
|
1467
|
-
req = @requests.shift
|
1468
|
-
|
1469
|
-
if req.header.request_method == 'HEAD'
|
1470
|
-
@content_length = 0
|
1471
|
-
if @next_connection
|
1472
|
-
@state = :WAIT
|
1473
|
-
else
|
1474
|
-
close
|
1475
|
-
end
|
1476
|
-
end
|
1477
|
-
@next_connection = false unless @content_length
|
1478
|
-
return [@version, @status, @reason]
|
1479
|
-
end
|
1480
|
-
|
1481
|
-
StatusParseRegexp = %r(\AHTTP/(\d+\.\d+)\s+(\d+)(?:\s+(.*))?\r?\n\z)
|
1482
|
-
def parse_header(socket)
|
1483
|
-
begin
|
1484
|
-
timeout(@receive_timeout) do
|
1485
|
-
begin
|
1486
|
-
initial_line = socket.gets("\n")
|
1487
|
-
if initial_line.nil?
|
1488
|
-
raise KeepAliveDisconnected.new
|
1489
|
-
end
|
1490
|
-
if StatusParseRegexp =~ initial_line
|
1491
|
-
@version, @status, @reason = $1, $2.to_i, $3
|
1492
|
-
@next_connection = HTTP.keep_alive_enabled?(@version)
|
1493
|
-
else
|
1494
|
-
@version = '0.9'
|
1495
|
-
@status = nil
|
1496
|
-
@reason = nil
|
1497
|
-
@next_connection = false
|
1498
|
-
@readbuf = initial_line
|
1499
|
-
break
|
1500
|
-
end
|
1501
|
-
@headers = []
|
1502
|
-
while true
|
1503
|
-
line = socket.gets("\n")
|
1504
|
-
unless line
|
1505
|
-
raise BadResponse.new('Unexpected EOF.')
|
1506
|
-
end
|
1507
|
-
line.sub!(/\r?\n\z/, '')
|
1508
|
-
break if line.empty?
|
1509
|
-
if line.sub!(/^\t/, '')
|
1510
|
-
@headers[-1] << line
|
1511
|
-
else
|
1512
|
-
@headers.push(line)
|
1513
|
-
end
|
1514
|
-
end
|
1515
|
-
end while (@version == '1.1' && @status == 100)
|
1516
|
-
end
|
1517
|
-
rescue TimeoutError
|
1518
|
-
raise
|
1519
|
-
end
|
1520
|
-
end
|
1521
|
-
|
1522
|
-
def read_body
|
1523
|
-
if @chunked
|
1524
|
-
return read_body_chunked()
|
1525
|
-
elsif @content_length == 0
|
1526
|
-
return nil
|
1527
|
-
elsif @content_length
|
1528
|
-
return read_body_length()
|
1529
|
-
else
|
1530
|
-
if @readbuf.length > 0
|
1531
|
-
data = @readbuf
|
1532
|
-
@readbuf = ''
|
1533
|
-
return data
|
1534
|
-
else
|
1535
|
-
data = @socket.read(@read_block_size)
|
1536
|
-
data = nil if data.empty? # Absorbing interface mismatch.
|
1537
|
-
return data
|
1538
|
-
end
|
1539
|
-
end
|
1540
|
-
end
|
1541
|
-
|
1542
|
-
def read_body_length
|
1543
|
-
maxbytes = @read_block_size
|
1544
|
-
if @readbuf.length > 0
|
1545
|
-
data = @readbuf[0, @content_length]
|
1546
|
-
@readbuf[0, @content_length] = ''
|
1547
|
-
@content_length -= data.length
|
1548
|
-
return data
|
1549
|
-
end
|
1550
|
-
maxbytes = @content_length if maxbytes > @content_length
|
1551
|
-
data = @socket.read(maxbytes)
|
1552
|
-
if data
|
1553
|
-
@content_length -= data.length
|
1554
|
-
else
|
1555
|
-
@content_length = 0
|
1556
|
-
end
|
1557
|
-
return data
|
1558
|
-
end
|
1559
|
-
|
1560
|
-
RS = "\r\n"
|
1561
|
-
ChunkDelimiter = "0#{RS}"
|
1562
|
-
ChunkTrailer = "0#{RS}#{RS}"
|
1563
|
-
def read_body_chunked
|
1564
|
-
if @chunk_length == 0
|
1565
|
-
until (i = @readbuf.index(RS))
|
1566
|
-
@readbuf << @socket.gets(RS)
|
1567
|
-
end
|
1568
|
-
i += 2
|
1569
|
-
if @readbuf[0, i] == ChunkDelimiter
|
1570
|
-
@content_length = 0
|
1571
|
-
unless @readbuf[0, 5] == ChunkTrailer
|
1572
|
-
@readbuf << @socket.gets(RS)
|
1573
|
-
end
|
1574
|
-
@readbuf[0, 5] = ''
|
1575
|
-
return nil
|
1576
|
-
end
|
1577
|
-
@chunk_length = @readbuf[0, i].hex
|
1578
|
-
@readbuf[0, i] = ''
|
1579
|
-
end
|
1580
|
-
while @readbuf.length < @chunk_length + 2
|
1581
|
-
@readbuf << @socket.read(@chunk_length + 2 - @readbuf.length)
|
1582
|
-
end
|
1583
|
-
data = @readbuf[0, @chunk_length]
|
1584
|
-
@readbuf[0, @chunk_length + 2] = ''
|
1585
|
-
@chunk_length = 0
|
1586
|
-
return data
|
1587
|
-
end
|
1588
|
-
|
1589
|
-
def check_state
|
1590
|
-
if @state == :DATA
|
1591
|
-
if eof?
|
1592
|
-
if @next_connection
|
1593
|
-
if @requests.empty?
|
1594
|
-
@state = :WAIT
|
1595
|
-
else
|
1596
|
-
@state = :META
|
1597
|
-
end
|
1598
|
-
end
|
1599
|
-
end
|
1600
|
-
end
|
1601
|
-
end
|
1602
|
-
end
|
1603
|
-
|
1604
|
-
|
1605
|
-
end
|
1606
|
-
|
1607
|
-
|
1608
|
-
HTTPClient = HTTPAccess::Client
|