facets 2.9.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.index +76 -0
- data/CONTRIBUTE.md +78 -0
- data/HISTORY.md +2459 -0
- data/{RUBY.txt → LICENSE.txt} +0 -0
- data/README.rdoc +29 -7
- data/demo/applique/assertion_framework.rb +1 -0
- data/{qed → demo}/applique/file_helpers.rb +0 -0
- data/{qed → demo}/core/array/combination.rdoc +0 -0
- data/{qed → demo}/core/array/delete.rdoc +0 -0
- data/{qed → demo}/core/array/index.rdoc +0 -0
- data/{qed → demo}/core/array/merge.rdoc +0 -0
- data/{qed → demo}/core/array/only.rdoc +0 -0
- data/{qed → demo}/core/array/pad.rdoc +0 -0
- data/{qed → demo}/core/array/permutation.rdoc +0 -0
- data/{qed → demo}/core/array/product.rdoc +0 -0
- data/{qed → demo}/core/array/recursively.rdoc +0 -0
- data/{qed → demo}/core/array/rotate.rdoc +0 -0
- data/{qed → demo}/core/array/select.rdoc +0 -0
- data/{qed → demo}/core/array/uniq_by.rdoc +0 -0
- data/{qed → demo}/core/binding/caller.rdoc +0 -0
- data/{qed → demo}/core/binding/defined.rdoc +0 -0
- data/{qed → demo}/core/binding/eval.rdoc +0 -0
- data/{qed → demo}/core/binding/local_variables.rdoc +0 -0
- data/{qed → demo}/core/binding/opvars.rdoc +0 -0
- data/{qed → demo}/core/binding/self.rdoc +0 -0
- data/{qed → demo}/core/class/descendants.rdoc +0 -0
- data/{qed → demo}/core/class/to_proc.rdoc +0 -0
- data/{qed → demo}/core/comparable/cap.rdoc +0 -0
- data/{qed → demo}/core/comparable/clip.rdoc +0 -0
- data/{qed → demo}/core/comparable/cmp.rdoc +0 -0
- data/{qed → demo}/core/comparable/op_get.rdoc +0 -0
- data/{qed → demo}/core/dir/ascend.rdoc +0 -0
- data/{qed → demo}/core/dir/descend.rdoc +0 -0
- data/{qed → demo}/core/dir/multiglob.rdoc +0 -0
- data/{qed → demo}/core/dir/parent.rdoc +0 -0
- data/{qed → demo}/core/dir/recurse.rdoc +0 -0
- data/{qed → demo}/core/exception/detail.rdoc +0 -0
- data/{qed → demo}/core/facets.rdoc +0 -0
- data/{qed → demo}/core/filetest/root.rdoc +0 -0
- data/{qed → demo}/core/hash/recursively.rdoc +0 -0
- data/{qed → demo}/core/indexable.rdoc +0 -0
- data/{qed → demo}/core/integer/bitmask.rdoc +0 -0
- data/{qed → demo}/core/integer/even.rdoc +0 -0
- data/{qed → demo}/core/integer/factorial.rdoc +0 -0
- data/{qed → demo}/core/integer/length.rdoc +0 -0
- data/{qed → demo}/core/integer/multiple.rdoc +0 -0
- data/{qed → demo}/core/integer/odd.rdoc +0 -0
- data/{qed → demo}/core/integer/of.rdoc +0 -0
- data/{qed → demo}/core/integer/ordinal.rdoc +0 -0
- data/{qed → demo}/core/matchdata/match.rdoc +0 -0
- data/{qed → demo}/core/matchdata/matchset.rdoc +0 -0
- data/{qed → demo}/core/module/cattr.rdoc +0 -0
- data/{qed → demo}/core/module/class_extend.rdoc +0 -0
- data/{qed → demo}/core/module/class_inheritor.rdoc +0 -0
- data/{qed → demo}/core/module/copy_inheritor.rdoc +0 -0
- data/{qed → demo}/core/module/method_space.rdoc +0 -0
- data/{qed → demo}/core/string/align.rdoc +0 -0
- data/{qed → demo}/core/string/bracket.rdoc +0 -0
- data/{qed → demo}/core/string/bytes.rdoc +0 -0
- data/{qed → demo}/core/string/camelcase.rdoc +0 -0
- data/{qed → demo}/core/string/capitalized.rdoc +0 -0
- data/{qed → demo}/core/string/characters.rdoc +0 -0
- data/{qed → demo}/core/string/cleanlines.rdoc +0 -0
- data/{qed → demo}/core/string/cleave.rdoc +0 -0
- data/{qed → demo}/core/string/divide.rdoc +0 -0
- data/{qed → demo}/core/string/each_char.rdoc +0 -0
- data/{qed → demo}/core/string/each_word.rdoc +0 -0
- data/{qed → demo}/core/string/end_with.rdoc +0 -0
- data/{qed → demo}/core/string/expand_tabs.rdoc +0 -0
- data/{qed → demo}/core/string/fold.rdoc +0 -0
- data/{qed → demo}/core/string/indent.rdoc +0 -0
- data/{qed → demo}/core/string/interpolate.rdoc +0 -0
- data/{qed → demo}/core/string/lchomp.rdoc +0 -0
- data/{qed → demo}/core/string/line_wrap.rdoc +0 -0
- data/{qed → demo}/core/string/lines.rdoc +0 -0
- data/{qed → demo}/core/string/margin.rdoc +0 -0
- data/{qed → demo}/core/string/methodize.rdoc +0 -0
- data/{qed → demo}/core/string/modulize.rdoc +0 -0
- data/{qed → demo}/core/string/mscan.rdoc +0 -0
- data/{qed → demo}/core/string/natcmp.rdoc +0 -0
- data/{qed → demo}/core/string/nchar.rdoc +0 -0
- data/{qed → demo}/core/string/newlines.rdoc +0 -0
- data/{qed → demo}/core/string/op_sub.rdoc +0 -0
- data/{qed → demo}/core/string/pathize.rdoc +0 -0
- data/{qed → demo}/core/string/quote.rdoc +0 -0
- data/{qed → demo}/core/string/range.rdoc +0 -0
- data/{qed → demo}/core/string/rewrite.rdoc +0 -0
- data/{qed → demo}/core/string/shatter.rdoc +0 -0
- data/{qed → demo}/core/string/snakecase.rdoc +0 -0
- data/{qed → demo}/core/string/splice.rdoc +0 -0
- data/{qed → demo}/core/string/start_with.rdoc +0 -0
- data/{qed → demo}/core/string/subtract.rdoc +0 -0
- data/{qed → demo}/core/string/tab.rdoc +0 -0
- data/{qed → demo}/core/string/tabto.rdoc +0 -0
- data/{qed → demo}/core/string/titlecase.rdoc +0 -0
- data/{qed → demo}/core/string/to_re.rdoc +0 -0
- data/{qed → demo}/core/string/unfold.rdoc +0 -0
- data/{qed → demo}/core/string/unindent.rdoc +0 -0
- data/{qed → demo}/core/string/unquote.rdoc +0 -0
- data/{qed → demo}/core/string/variablize.rdoc +0 -0
- data/{qed → demo}/core/string/word_wrap.rdoc +0 -0
- data/{qed → demo}/core/string/words.rdoc +0 -0
- data/{qed → demo}/core/string/xor.rdoc +0 -0
- data/{qed → demo}/standard/02_cloneable.rdoc +0 -0
- data/{qed → demo}/standard/03_enumargs.rdoc +0 -0
- data/{qed → demo}/standard/04_equitable.rdoc +0 -0
- data/{qed → demo}/standard/05_instantiable.rdoc +0 -0
- data/{qed → demo}/standard/basic_object.rdoc +0 -0
- data/{qed → demo}/standard/memoizable.rdoc +0 -0
- data/{qed → demo}/standard/mulititon.rdoc +0 -0
- data/lib/core/facets.rb +1 -2
- data/lib/core/facets.yml +61 -42
- data/lib/core/facets/array.rb +8 -28
- data/lib/core/facets/array/arrange.rb +42 -0
- data/lib/core/facets/array/before.rb +2 -0
- data/lib/core/facets/array/collapse.rb +2 -0
- data/lib/core/facets/array/commonality.rb +24 -12
- data/lib/core/facets/array/duplicates.rb +22 -1
- data/lib/core/facets/array/each_overlap.rb +25 -0
- data/lib/core/facets/array/intersection.rb +25 -0
- data/lib/core/facets/array/missing.rb +29 -0
- data/lib/core/facets/array/nonuniq.rb +7 -53
- data/lib/core/facets/array/occur.rb +38 -0
- data/lib/core/facets/array/occurrence.rb +28 -0
- data/lib/core/facets/array/only.rb +12 -1
- data/lib/core/facets/array/recursively.rb +11 -5
- data/lib/core/facets/array/reject_values.rb +21 -0
- data/lib/core/facets/array/splice.rb +5 -1
- data/lib/core/facets/array/split.rb +5 -2
- data/lib/core/facets/array/squeeze.rb +23 -0
- data/lib/core/facets/array/step.rb +31 -0
- data/lib/core/facets/array/store.rb +4 -0
- data/lib/core/facets/array/to_h.rb +22 -0
- data/lib/core/facets/array/traverse.rb +11 -5
- data/lib/core/facets/array/uniq_by.rb +5 -1
- data/lib/core/facets/array/unique_permutation.rb +29 -0
- data/lib/core/facets/array/zip.rb +21 -0
- data/lib/core/facets/binding.rb +0 -3
- data/lib/core/facets/binding/call_stack.rb +1 -1
- data/lib/core/facets/binding/caller.rb +1 -3
- data/lib/core/facets/binding/callstack.rb +1 -1
- data/lib/core/facets/binding/defined.rb +0 -2
- data/lib/core/facets/binding/local_variables.rb +0 -2
- data/lib/core/facets/binding/op_get.rb +0 -2
- data/lib/core/facets/binding/self.rb +1 -3
- data/lib/core/facets/cattr.rb +1 -0
- data/lib/core/facets/class.rb +0 -2
- data/lib/core/facets/class/cattr.rb +1 -0
- data/lib/core/facets/class/singleton.rb +1 -13
- data/lib/core/facets/class/singleton_class.rb +16 -0
- data/lib/core/facets/comparable.rb +0 -2
- data/lib/core/facets/dir.rb +0 -2
- data/lib/core/facets/dir/ascend.rb +2 -2
- data/lib/core/facets/dir/lookup.rb +20 -0
- data/lib/core/facets/enumerable.rb +10 -9
- data/lib/core/facets/enumerable/accumulate.rb +18 -16
- data/lib/core/facets/enumerable/apply.rb +20 -0
- data/lib/core/facets/enumerable/associate.rb +6 -0
- data/lib/core/facets/enumerable/cluster.rb +24 -0
- data/lib/core/facets/enumerable/every.rb +1 -1
- data/lib/core/facets/enumerable/ewise.rb +2 -0
- data/lib/core/facets/enumerable/graph.rb +0 -3
- data/lib/core/facets/enumerable/hashify.rb +222 -19
- data/lib/core/facets/enumerable/hinge.rb +18 -0
- data/lib/core/facets/enumerable/key_by.rb +27 -0
- data/lib/core/facets/enumerable/map_to.rb +13 -0
- data/lib/core/facets/enumerable/mash.rb +34 -1
- data/lib/core/facets/enumerable/occur.rb +12 -9
- data/lib/core/facets/enumerable/only.rb +56 -0
- data/lib/core/facets/enumerable/{cluster_by.rb → organize_by.rb} +5 -4
- data/lib/core/facets/enumerable/pair.rb +20 -0
- data/lib/core/facets/enumerable/per.rb +27 -35
- data/lib/core/facets/enumerable/recursively.rb +3 -3
- data/lib/core/facets/enumerable/squeeze.rb +36 -0
- data/lib/core/facets/enumerable/sum.rb +18 -6
- data/lib/core/facets/enumerable/unassociate.rb +23 -0
- data/lib/core/facets/enumerable/value_by.rb +25 -0
- data/lib/core/facets/enumerator/fx.rb +16 -25
- data/lib/core/facets/enumerator/lazy/squeeze.rb +33 -0
- data/lib/core/facets/essentials.rb +65 -0
- data/lib/core/facets/exception.rb +0 -2
- data/lib/core/facets/exception/set_message.rb +10 -0
- data/lib/core/facets/file.rb +1 -2
- data/lib/core/facets/file/common_path.rb +17 -0
- data/lib/core/facets/file/rootname.rb +1 -1
- data/lib/core/facets/filetest.rb +0 -2
- data/lib/core/facets/filetest/relative.rb +1 -1
- data/lib/core/facets/filetest/safe.rb +14 -10
- data/lib/core/facets/float.rb +1 -3
- data/lib/core/facets/float/round_to.rb +1 -0
- data/lib/core/facets/functor.rb +8 -10
- data/lib/core/facets/hash.rb +2 -5
- data/lib/core/facets/hash/collate.rb +22 -8
- data/lib/core/facets/hash/count.rb +8 -4
- data/lib/core/facets/hash/data.rb +5 -2
- data/lib/core/facets/hash/dearray_values.rb +1 -1
- data/lib/core/facets/hash/deep_rekey.rb +54 -0
- data/lib/core/facets/hash/each_with_key.rb +12 -0
- data/lib/core/facets/hash/fetch_nested.rb +20 -0
- data/lib/core/facets/hash/keys.rb +4 -13
- data/lib/core/facets/hash/only_keys.rb +1 -0
- data/lib/core/facets/hash/op_push.rb +9 -1
- data/lib/core/facets/hash/op_sub.rb +1 -1
- data/lib/core/facets/hash/recursively.rb +6 -6
- data/lib/core/facets/hash/rekey.rb +26 -34
- data/lib/core/facets/hash/revalue.rb +61 -0
- data/lib/core/facets/hash/slice.rb +16 -3
- data/lib/core/facets/hash/subset.rb +11 -8
- data/lib/core/facets/hash/update_each.rb +1 -1
- data/lib/core/facets/hash/weave.rb +1 -1
- data/lib/core/facets/indexable.rb +6 -6
- data/lib/core/facets/integer.rb +0 -4
- data/lib/core/facets/kernel.rb +4 -7
- data/lib/core/facets/kernel/__dir__.rb +2 -0
- data/lib/core/facets/kernel/as.rb +2 -1
- data/lib/core/facets/kernel/call_stack.rb +1 -56
- data/lib/core/facets/kernel/callstack.rb +56 -1
- data/lib/core/facets/kernel/constant.rb +2 -0
- data/lib/core/facets/kernel/deep_clone.rb +27 -1
- data/lib/core/facets/kernel/deep_copy.rb +0 -24
- data/lib/core/facets/kernel/eigen.rb +2 -33
- data/lib/core/facets/kernel/eigenclass.rb +1 -1
- data/lib/core/facets/kernel/ergo.rb +1 -1
- data/lib/core/facets/kernel/extend.rb +4 -6
- data/lib/core/facets/kernel/instance_assign.rb +8 -6
- data/lib/core/facets/kernel/instance_extract.rb +22 -0
- data/lib/core/facets/kernel/instance_replace.rb +40 -0
- data/lib/core/facets/kernel/{equate.rb → like.rb} +7 -4
- data/lib/core/facets/kernel/load_relative.rb +25 -1
- data/lib/core/facets/kernel/meta.rb +35 -0
- data/lib/core/facets/kernel/meta_def.rb +4 -0
- data/lib/core/facets/kernel/object_send.rb +11 -14
- data/lib/core/facets/kernel/respond.rb +3 -13
- data/lib/core/facets/kernel/tap.rb +27 -39
- data/lib/core/facets/load_path.rb +1 -0
- data/lib/core/facets/load_path/search.rb +16 -0
- data/lib/core/facets/matchdata.rb +0 -2
- data/lib/core/facets/method.rb +0 -2
- data/lib/core/facets/method/composition.rb +32 -16
- data/lib/core/facets/method/curry.rb +13 -0
- data/lib/core/facets/method/partial.rb +10 -0
- data/lib/core/facets/method/public.rb +33 -0
- data/lib/core/facets/module.rb +0 -2
- data/lib/core/facets/module/alias_class_method.rb +11 -0
- data/lib/core/facets/module/basename.rb +1 -31
- data/lib/core/facets/module/cattr.rb +1 -0
- data/lib/core/facets/module/lastname.rb +30 -0
- data/lib/core/facets/module/mattr.rb +4 -4
- data/lib/core/facets/nilclass.rb +0 -3
- data/lib/core/facets/numeric.rb +0 -4
- data/lib/core/facets/numeric/approx.rb +3 -2
- data/lib/core/facets/numeric/range.rb +12 -0
- data/lib/core/facets/numeric/round_to.rb +32 -1
- data/lib/core/facets/object.rb +2 -3
- data/lib/core/facets/object/itself.rb +16 -0
- data/lib/core/facets/objectspace.rb +0 -3
- data/lib/core/facets/proc.rb +0 -3
- data/lib/core/facets/proc/bind_to.rb +3 -3
- data/lib/core/facets/proc/wrap.rb +17 -0
- data/lib/core/facets/process.rb +0 -2
- data/lib/core/facets/range.rb +4 -4
- data/lib/core/facets/range/op_add.rb +15 -0
- data/lib/core/facets/range/op_sub.rb +45 -0
- data/lib/core/facets/range/{to_r.rb → to_rng.rb} +1 -1
- data/lib/core/facets/regexp.rb +0 -2
- data/lib/core/facets/regexp/to_proc.rb +13 -0
- data/lib/core/facets/string.rb +8 -9
- data/lib/core/facets/string/ascii_only.rb +52 -0
- data/lib/core/facets/string/each_match.rb +1 -0
- data/lib/core/facets/string/ends_with.rb +1 -0
- data/lib/core/facets/string/file.rb +6 -20
- data/lib/core/facets/string/fold.rb +5 -5
- data/lib/core/facets/string/indent.rb +37 -20
- data/lib/core/facets/string/indexable.rb +7 -0
- data/lib/core/facets/string/interpolate.rb +6 -2
- data/lib/core/facets/string/linear.rb +19 -0
- data/lib/core/facets/string/margin.rb +47 -19
- data/lib/core/facets/string/mscan.rb +3 -0
- data/lib/core/facets/string/number.rb +14 -0
- data/lib/core/facets/string/op_sub.rb +1 -14
- data/lib/core/facets/string/random.rb +34 -0
- data/lib/core/facets/string/remove.rb +30 -0
- data/lib/core/facets/string/rotate.rb +24 -0
- data/lib/core/facets/string/similarity.rb +2 -2
- data/lib/core/facets/string/starts_with.rb +5 -0
- data/lib/core/facets/string/tab.rb +2 -17
- data/lib/core/facets/string/tabto.rb +2 -19
- data/lib/core/facets/string/to_rx.rb +1 -0
- data/lib/core/facets/string/trim.rb +45 -0
- data/lib/core/facets/string/unfold.rb +7 -2
- data/lib/core/facets/struct.rb +1 -2
- data/lib/core/facets/struct/replace.rb +8 -0
- data/lib/core/facets/symbol.rb +1 -3
- data/lib/core/facets/symbol/as_s.rb +3 -1
- data/lib/core/facets/symbol/call.rb +29 -0
- data/lib/core/facets/symbol/thrown.rb +9 -5
- data/lib/core/facets/time.rb +0 -2
- data/lib/core/facets/time/future.rb +6 -4
- data/lib/core/facets/unboundmethod.rb +0 -3
- data/lib/core/facets/version.rb +5 -5
- data/lib/standard/facets/against.rb +53 -0
- data/lib/standard/facets/binding/block_exec.rb +44 -0
- data/lib/standard/facets/cgi.rb +2 -40
- data/lib/standard/facets/cgi/esc.rb +11 -0
- data/lib/standard/facets/cgi/escape_html.rb +63 -0
- data/lib/standard/facets/cgi/marshal.rb +20 -0
- data/lib/standard/facets/cli.rb +54 -0
- data/lib/standard/facets/cloneable.rb +12 -9
- data/lib/standard/facets/enumargs.rb +159 -168
- data/lib/standard/facets/find.rb +1 -15
- data/lib/standard/facets/find/select.rb +16 -0
- data/lib/standard/facets/gem/search.rb +18 -0
- data/lib/standard/facets/gem/specification/current_specs.rb +21 -0
- data/lib/standard/facets/gem/specification/find_requireable_file.rb +21 -0
- data/lib/standard/facets/hash_builder.rb +46 -0
- data/lib/standard/facets/load_monitor.rb +26 -0
- data/lib/standard/facets/math.rb +57 -57
- data/lib/standard/facets/math/acosec.rb +1 -0
- data/lib/standard/facets/math/acsc.rb +6 -1
- data/lib/standard/facets/math/beta.rb +8 -3
- data/lib/standard/facets/math/cosec.rb +1 -0
- data/lib/standard/facets/math/cosech.rb +1 -0
- data/lib/standard/facets/math/csc.rb +6 -1
- data/lib/standard/facets/math/csch.rb +6 -1
- data/lib/standard/facets/math/distance.rb +19 -0
- data/lib/standard/facets/math/ec.rb +5 -0
- data/lib/standard/facets/math/lgamma.rb +21 -21
- data/lib/standard/facets/math/lngamma.rb +18 -0
- data/lib/standard/facets/math/pow.rb +6 -1
- data/lib/standard/facets/math/root.rb +1 -1
- data/lib/standard/facets/math/sign.rb +15 -4
- data/lib/standard/facets/math/tau.rb +5 -0
- data/lib/standard/facets/math/tgamma.rb +1 -1
- data/lib/standard/facets/memoizer.rb +63 -0
- data/lib/standard/facets/ostruct.rb +37 -156
- data/lib/standard/facets/ostruct/each.rb +11 -0
- data/lib/standard/facets/ostruct/initialize.rb +48 -0
- data/lib/standard/facets/ostruct/merge.rb +21 -0
- data/lib/standard/facets/ostruct/op_fetch.rb +29 -0
- data/lib/standard/facets/ostruct/op_store.rb +1 -0
- data/lib/standard/facets/ostruct/to_h.rb +10 -0
- data/lib/standard/facets/ostruct/to_ostruct.rb +65 -0
- data/lib/standard/facets/pathname.rb +18 -215
- data/lib/standard/facets/pathname/chdir.rb +15 -0
- data/lib/standard/facets/pathname/empty.rb +10 -0
- data/lib/standard/facets/pathname/exists.rb +6 -0
- data/lib/standard/facets/pathname/glob.rb +57 -0
- data/lib/standard/facets/pathname/home.rb +12 -0
- data/lib/standard/facets/pathname/null.rb +20 -0
- data/lib/standard/facets/pathname/op_div.rb +15 -0
- data/lib/standard/facets/pathname/op_fetch.rb +13 -0
- data/lib/standard/facets/pathname/outofdate.rb +13 -0
- data/lib/standard/facets/pathname/readline.rb +13 -0
- data/lib/standard/facets/pathname/root.rb +10 -0
- data/lib/standard/facets/pathname/rootname.rb +10 -0
- data/lib/standard/facets/pathname/safe.rb +15 -0
- data/lib/standard/facets/pathname/split_root.rb +9 -0
- data/lib/standard/facets/pathname/to_path.rb +28 -0
- data/lib/standard/facets/pathname/to_str.rb +8 -0
- data/lib/standard/facets/pathname/uptodate.rb +11 -0
- data/lib/standard/facets/pathname/visit.rb +38 -0
- data/lib/standard/facets/pathname/work.rb +10 -0
- data/lib/standard/facets/platform.rb +2 -2
- data/lib/standard/facets/random.rb +32 -2
- data/lib/standard/facets/shellwords.rb +5 -2
- data/lib/standard/facets/thread.rb +2 -2
- data/lib/standard/facets/uri.rb +7 -178
- data/lib/standard/facets/uri/cgi_escape.rb +46 -0
- data/lib/standard/facets/uri/cgi_parse.rb +1 -0
- data/lib/standard/facets/uri/cgi_unescape.rb +1 -0
- data/lib/standard/facets/uri/decode.rb +32 -0
- data/lib/standard/facets/uri/parameters.rb +63 -0
- data/lib/standard/facets/uri/query.rb +148 -0
- data/lib/standard/facets/yaml.rb +3 -56
- data/lib/standard/facets/yaml/file.rb +41 -0
- data/lib/standard/facets/yaml/kernel.rb +29 -0
- data/lib/standard/facets/yaml/read.rb +12 -0
- data/test/core/array/test_arrange.rb +37 -0
- data/test/core/array/test_each_overlap.rb +31 -0
- data/test/core/array/test_intersection.rb +19 -0
- data/test/core/array/test_missing.rb +12 -0
- data/test/core/array/test_occur.rb +52 -0
- data/test/core/array/test_occurrence.rb +20 -0
- data/test/core/array/test_reject_values.rb +17 -0
- data/test/core/array/test_squeeze.rb +22 -0
- data/test/core/array/test_step.rb +28 -0
- data/test/core/array/test_unique_permutation.rb +23 -0
- data/test/core/enumerable/test_key_by.rb +22 -0
- data/test/core/enumerable/test_occur.rb +18 -5
- data/test/core/enumerable/test_only.rb +40 -0
- data/test/core/enumerable/test_squeeze.rb +35 -0
- data/test/core/enumerable/test_sum.rb +8 -3
- data/test/core/enumerator/lazy/test_squeeze.rb +33 -0
- data/test/core/hash/test_count.rb +10 -1
- data/test/core/hash/test_deep_rekey.rb +131 -0
- data/test/core/hash/test_each_with_key.rb +16 -0
- data/test/core/hash/test_fetch_nested.rb +24 -0
- data/test/core/hash/test_keys.rb +0 -11
- data/test/core/hash/test_rekey.rb +41 -1
- data/test/core/hash/test_revalue.rb +98 -0
- data/test/core/hash/test_slice.rb +12 -1
- data/test/core/kernel/test_deep_clone.rb +31 -0
- data/test/core/kernel/test_deep_copy.rb +2 -28
- data/test/core/kernel/test_instance_extract.rb +28 -0
- data/test/core/method/test_composition.rb +42 -0
- data/test/core/range/test_op_add.rb +24 -0
- data/test/core/range/test_op_sub.rb +34 -0
- data/test/core/string/test_ascii_only.rb +30 -0
- data/test/core/string/test_margin.rb +4 -104
- data/test/core/string/test_number.rb +44 -0
- data/test/core/string/test_remove.rb +36 -0
- data/test/core/string/test_rotate.rb +31 -0
- data/test/core/string/test_trim.rb +116 -0
- data/test/core/symbol/test_thrown.rb +22 -0
- data/test/standard/binding/test_block_exec.rb +21 -0
- data/test/standard/math/test_acot.rb +23 -0
- data/test/standard/math/test_acoth.rb +22 -0
- data/test/standard/math/test_beta.rb +19 -0
- data/test/standard/math/test_ceil.rb +22 -0
- data/test/standard/math/test_cosec.rb +19 -0
- data/test/standard/math/test_cosech.rb +19 -0
- data/test/standard/math/test_cot.rb +13 -0
- data/test/standard/math/test_coth.rb +13 -0
- data/test/standard/math/test_distance.rb +16 -0
- data/test/standard/math/test_exp10.rb +14 -0
- data/test/standard/math/test_exp2.rb +14 -0
- data/test/standard/math/test_factorial.rb +13 -0
- data/test/standard/math/test_floor.rb +23 -0
- data/test/standard/math/test_gcd.rb +18 -0
- data/test/standard/math/test_lcm.rb +13 -0
- data/test/standard/math/test_pow.rb +30 -0
- data/test/standard/math/test_root.rb +15 -0
- data/test/standard/math/test_sec.rb +19 -0
- data/test/standard/math/test_sech.rb +19 -0
- data/test/standard/math/test_sign.rb +6 -0
- data/test/standard/math/test_sinc.rb +15 -0
- data/test/standard/math/test_srq.rb +20 -0
- data/test/standard/pathname/test_chdir.rb +16 -0
- data/test/standard/pathname/test_readline.rb +23 -0
- data/test/standard/test_enumargs.rb +1 -1
- data/test/standard/test_math.rb +3 -0
- data/test/standard/test_ostruct.rb +26 -21
- data/test/standard/test_uri.rb +9 -0
- metadata +802 -183
- data/.ruby +0 -54
- data/HISTORY.rdoc +0 -2386
- data/lib/core/facets/array/combination.rb +0 -43
- data/lib/core/facets/array/index.rb +0 -23
- data/lib/core/facets/array/occurent.rb +0 -1
- data/lib/core/facets/array/permutation.rb +0 -32
- data/lib/core/facets/array/product.rb +0 -30
- data/lib/core/facets/array/rotate.rb +0 -48
- data/lib/core/facets/array/select.rb +0 -20
- data/lib/core/facets/binding/eval.rb +0 -14
- data/lib/core/facets/enumerable/count.rb +0 -53
- data/lib/core/facets/enumerable/each_with_object.rb +0 -38
- data/lib/core/facets/enumerable/group_by.rb +0 -33
- data/lib/core/facets/enumerable/none.rb +0 -32
- data/lib/core/facets/enumerable/one.rb +0 -39
- data/lib/core/facets/enumerable/take.rb +0 -16
- data/lib/core/facets/float/round.rb +0 -2
- data/lib/core/facets/hash/select.rb +0 -17
- data/lib/core/facets/hash/to_h.rb +0 -1
- data/lib/core/facets/hash/url_params.rb +0 -21
- data/lib/core/facets/instance.rb +0 -157
- data/lib/core/facets/integer/even.rb +0 -1
- data/lib/core/facets/integer/odd.rb +0 -37
- data/lib/core/facets/kernel/__callee__.rb +0 -1
- data/lib/core/facets/kernel/__method__.rb +0 -48
- data/lib/core/facets/kernel/require_relative.rb +0 -52
- data/lib/core/facets/kernel/source_location.rb +0 -13
- data/lib/core/facets/nilclass/to_f.rb +0 -17
- data/lib/core/facets/numeric/round.rb +0 -69
- data/lib/core/facets/numeric/round_at.rb +0 -1
- data/lib/core/facets/object/replace.rb +0 -43
- data/lib/core/facets/objectspace/reflect.rb +0 -62
- data/lib/core/facets/proc/curry.rb +0 -32
- data/lib/core/facets/string/bytes.rb +0 -21
- data/lib/core/facets/string/each_char.rb +0 -31
- data/lib/core/facets/string/end_with.rb +0 -1
- data/lib/core/facets/string/lines.rb +0 -19
- data/lib/core/facets/string/random_binary.rb +0 -10
- data/lib/core/facets/string/start_with.rb +0 -60
- data/lib/core/facets/symbol/to_proc.rb +0 -33
- data/lib/core/facets/to_hash.rb +0 -336
- data/lib/core/facets/unboundmethod/name.rb +0 -28
- data/lib/standard/facets/math/gamma.rb +0 -12
- data/test/core/array/test_occurent.rb +0 -33
- data/test/core/kernel/test_source_location.rb +0 -25
- data/test/core/string/test_tabto.rb +0 -16
@@ -0,0 +1,13 @@
|
|
1
|
+
class Pathname
|
2
|
+
# Reads the first line of the file
|
3
|
+
#
|
4
|
+
# Captures the best practice from this post at stack overflow:
|
5
|
+
# https://stackoverflow.com/questions/1490138/reading-the-first-line-of-a-file-in-ruby
|
6
|
+
#
|
7
|
+
# Credit: Ryan Duryea
|
8
|
+
def readline(*args)
|
9
|
+
open { |f| f.readline(*args) }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Unfortunately NilClass#to_path causes FileUtils to bomb when testing
|
2
|
+
# for symlinks. See issue #77. It would be better if Ruby could be changed
|
3
|
+
# so this would work. But until then we have no choice but to deprecate
|
4
|
+
# this method.
|
5
|
+
|
6
|
+
#class NilClass
|
7
|
+
# # Provide platform dependent null path.
|
8
|
+
# #
|
9
|
+
# # @standard
|
10
|
+
# # require 'facets/pathname'
|
11
|
+
# #
|
12
|
+
# # @author Daniel Burger
|
13
|
+
# def to_path
|
14
|
+
# Pathname.null
|
15
|
+
# end
|
16
|
+
#end
|
17
|
+
|
18
|
+
class Array
|
19
|
+
# Convert array to Pathname instance.
|
20
|
+
#
|
21
|
+
# @standard
|
22
|
+
# require 'facets/pathname'
|
23
|
+
#
|
24
|
+
def to_path
|
25
|
+
Pathname.new(join('/'))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class Pathname
|
2
|
+
|
3
|
+
# Recursively visit a directory located by its path, yielding each resource
|
4
|
+
# as its full matching pathname object. If called on a file, yield the file.
|
5
|
+
#
|
6
|
+
# call-seq:
|
7
|
+
# visit => yield each file
|
8
|
+
# visit(all: true) => yield visited directories as well
|
9
|
+
# visit(hidden: true) => yield hidden files and directories as well
|
10
|
+
#
|
11
|
+
# Examples
|
12
|
+
#
|
13
|
+
# # Locate any file but *.haml within app/**/*
|
14
|
+
# Pathname.new("app").visit do |f|
|
15
|
+
# next unless f.to_s =~ /\.haml$/
|
16
|
+
# f
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# TODO: Use #map instead of #each?
|
20
|
+
#
|
21
|
+
# CREDIT: Jean-Denis Vauguet
|
22
|
+
|
23
|
+
def visit(options = {:all => false, :hidden => false})
|
24
|
+
if self.directory?
|
25
|
+
children.each do |entry|
|
26
|
+
next if entry.basename.to_s[0] == "." && !options[:hidden]
|
27
|
+
yield(entry) unless entry.directory? && !options[:all]
|
28
|
+
##entry.visit(:all => options[:all]) { |sub_entry| yield sub_entry } if entry.directory?
|
29
|
+
entry.visit(:all => options[:all], :hidden => options[:hidden]) do |sub_entry|
|
30
|
+
yield(sub_entry)
|
31
|
+
end if entry.directory?
|
32
|
+
end
|
33
|
+
else
|
34
|
+
yield self
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -56,7 +56,7 @@ class Platform
|
|
56
56
|
|
57
57
|
#
|
58
58
|
def self.local
|
59
|
-
arch =
|
59
|
+
arch = RbConfig::CONFIG['arch']
|
60
60
|
arch = "#{arch}_60" if arch =~ /mswin32$/
|
61
61
|
@local ||= new(arch)
|
62
62
|
end
|
@@ -141,7 +141,7 @@ class Platform
|
|
141
141
|
|
142
142
|
#
|
143
143
|
def inspect
|
144
|
-
"
|
144
|
+
"#<%s:0x%x @cpu=%p, @os=%p, @version=%p>" % [self.class, object_id, *to_a]
|
145
145
|
end
|
146
146
|
|
147
147
|
#
|
@@ -51,6 +51,7 @@ class Random
|
|
51
51
|
(Random.number(26) + (Random.number(2) == 0 ? 65 : 97) ).chr
|
52
52
|
end
|
53
53
|
|
54
|
+
# Random extensions for Range class.
|
54
55
|
#
|
55
56
|
module RangeExtensions
|
56
57
|
# Return a random element from the range.
|
@@ -96,6 +97,7 @@ class Random
|
|
96
97
|
end
|
97
98
|
end
|
98
99
|
|
100
|
+
# Random extensions fo Integer class.
|
99
101
|
#
|
100
102
|
module IntegerExtensions
|
101
103
|
#
|
@@ -107,6 +109,7 @@ class Random
|
|
107
109
|
end
|
108
110
|
end
|
109
111
|
|
112
|
+
# Random extensions for Numeric class.
|
110
113
|
#
|
111
114
|
module NumericExtensions
|
112
115
|
#
|
@@ -118,6 +121,7 @@ class Random
|
|
118
121
|
end
|
119
122
|
end
|
120
123
|
|
124
|
+
# Random extensions for Array class.
|
121
125
|
#
|
122
126
|
module ArrayExtensions
|
123
127
|
# Return a random element from the array.
|
@@ -193,7 +197,7 @@ class Random
|
|
193
197
|
# [1, 2, 3, 4].rand_subset #~> [1, 3, 4]
|
194
198
|
# [1, 2, 3, 4].rand_subset #~> [2, 3]
|
195
199
|
#
|
196
|
-
def rand_subset(
|
200
|
+
def rand_subset(number=nil, exclusive=true)
|
197
201
|
number = Random.number(size) unless number
|
198
202
|
number = number.to_int
|
199
203
|
#return self.dup if (number >= size and exlusive)
|
@@ -202,6 +206,23 @@ class Random
|
|
202
206
|
return values_at(*ri)
|
203
207
|
end
|
204
208
|
|
209
|
+
# Generates random subarrays. Uses random numbers and bit-
|
210
|
+
# fiddling to assure performant uniform distributions even
|
211
|
+
# for large arrays.
|
212
|
+
#
|
213
|
+
# a = *1..5
|
214
|
+
# a.rand_subarrays(2) #=> [[3, 4, 5], []]
|
215
|
+
# a.rand_subarrays(3) #=> [[1], [1, 4, 5], [2, 3]]
|
216
|
+
#
|
217
|
+
# CREDIT: Michael Kohl
|
218
|
+
def rand_subarrays(n=1)
|
219
|
+
raise ArgumentError, "negative argument" if n < 0
|
220
|
+
(1..n).map do
|
221
|
+
r = rand(2**self.size)
|
222
|
+
self.select.with_index { |_, i| r[i] == 1 }
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
205
226
|
# Randomize the order of an array.
|
206
227
|
#
|
207
228
|
# [1,2,3,4].shuffle #~> [2,4,1,3]
|
@@ -234,6 +255,7 @@ class Random
|
|
234
255
|
|
235
256
|
end
|
236
257
|
|
258
|
+
# Random extensions for Hash class.
|
237
259
|
#
|
238
260
|
module HashExtensions
|
239
261
|
# Returns a random key.
|
@@ -330,6 +352,7 @@ class Random
|
|
330
352
|
|
331
353
|
end
|
332
354
|
|
355
|
+
# Random extensions for String class.
|
333
356
|
#
|
334
357
|
module StringExtensions
|
335
358
|
|
@@ -351,7 +374,7 @@ class Random
|
|
351
374
|
# TODO: This is not very efficient. Better way?
|
352
375
|
#++
|
353
376
|
def random(max_length = 8, char_re = /[\w\d]/)
|
354
|
-
raise ArgumentError.new('
|
377
|
+
raise ArgumentError.new('second argument must be a regular expression') unless char_re.is_a?(Regexp)
|
355
378
|
string = ""
|
356
379
|
while string.length < max_length
|
357
380
|
ch = Random.number(255).chr
|
@@ -359,6 +382,13 @@ class Random
|
|
359
382
|
end
|
360
383
|
return string
|
361
384
|
end
|
385
|
+
|
386
|
+
# Generate a random binary string of +n_bytes+ size.
|
387
|
+
#
|
388
|
+
# CREDIT: Guido De Rosa
|
389
|
+
def random_binary(n_bytes)
|
390
|
+
( Array.new(n_bytes){ rand(0x100) } ).pack('c*')
|
391
|
+
end
|
362
392
|
end
|
363
393
|
|
364
394
|
# Return a random separation of the string.
|
@@ -15,7 +15,7 @@ module Shellwords
|
|
15
15
|
|
16
16
|
unless method_defined?(:escape)
|
17
17
|
def escape(cmdline)
|
18
|
-
cmdline.gsub(/([\\\t\| &`<>)('"])
|
18
|
+
cmdline.gsub(/([\\\t\| &`<>)('"])\$/) { |s| '\\' << s }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -34,7 +34,7 @@ module Shellwords
|
|
34
34
|
# The coolest little arguments parser in all of Rubyland.
|
35
35
|
#
|
36
36
|
# CREDIT: Michel Martens
|
37
|
-
def
|
37
|
+
def parse(argv, opts)
|
38
38
|
argv = (String === argv ? shellwords(argv) : argv.to_a.dup)
|
39
39
|
args = []
|
40
40
|
while argv.any?
|
@@ -60,6 +60,9 @@ module Shellwords
|
|
60
60
|
args
|
61
61
|
end
|
62
62
|
|
63
|
+
# Original name for Shellwords#parse.
|
64
|
+
alias_method :run, :parse
|
65
|
+
|
63
66
|
end
|
64
67
|
|
65
68
|
class Array
|
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
require 'thread'
|
6
6
|
|
7
|
-
require 'facets/binding/eval'
|
8
|
-
require 'facets/kernel/__method__'
|
7
|
+
#require 'facets/binding/eval'
|
8
|
+
#require 'facets/kernel/__method__'
|
9
9
|
|
10
10
|
# This is the non-threaded form of #threaded_map_send.
|
11
11
|
require 'facets/enumerable/map_send'
|
data/lib/standard/facets/uri.rb
CHANGED
@@ -1,184 +1,13 @@
|
|
1
1
|
require 'uri'
|
2
|
-
#require 'cgi'
|
3
|
-
require 'facets/kernel/blank'
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def decode(uri)
|
12
|
-
## gmosx: hmm is this needed?
|
13
|
-
## guard against invalid filenames for example pictures with
|
14
|
-
## spaces uploaded by users
|
15
|
-
escaped_uri = uri.gsub(/ /, "+")
|
16
|
-
|
17
|
-
if md = URI::REGEXP::REL_URI.match(escaped_uri)
|
18
|
-
path = "#{md[5]}#{md[6]}"
|
19
|
-
type = File.extname(path)
|
20
|
-
query_string = md[7]
|
21
|
-
|
22
|
-
## real_path = "#{$root_dir}/#{path}"
|
23
|
-
|
24
|
-
parameters = URI.query_to_hash(query_string)
|
25
|
-
path.gsub!(/\+/, " ")
|
26
|
-
|
27
|
-
return [path, type, parameters, query_string]
|
28
|
-
end
|
29
|
-
|
30
|
-
## this is usefull for uncovering bugs!
|
31
|
-
raise ArgumentError.new("the parameter '#{uri}' is not a valid uri")
|
32
|
-
end
|
33
|
-
|
34
|
-
# Extend the basic query string parser provided by the cgi module.
|
35
|
-
# converts single valued params (the most common case) to
|
36
|
-
# objects instead of arrays
|
37
|
-
#
|
38
|
-
# Returns hash of parameters, contains arrays for multivalued parameters
|
39
|
-
# (multiselect, checkboxes , etc).
|
40
|
-
#
|
41
|
-
# If no query string is provided (nil or "") returns an empty hash.
|
42
|
-
def query_to_hash(query_string)
|
43
|
-
return {} unless query_string
|
44
|
-
|
45
|
-
query_parameters = cgi_parse(query_string)
|
46
|
-
|
47
|
-
query_parameters.each { |key, val|
|
48
|
-
## replace the array with an object
|
49
|
-
query_parameters[key] = val[0] if 1 == val.length
|
50
|
-
}
|
51
|
-
|
52
|
-
## set default value to nil! cgi sets this to []
|
53
|
-
query_parameters.default = nil
|
54
|
-
|
55
|
-
return query_parameters
|
56
|
-
end
|
57
|
-
|
58
|
-
alias_method :query_string_to_hash, :query_to_hash
|
59
|
-
|
60
|
-
#
|
61
|
-
KEY_VALUE_SEPARATOR = ";" # "&"
|
62
|
-
|
63
|
-
# Given a hash with parameter/value pairs construct a
|
64
|
-
# standard query string.
|
65
|
-
#
|
66
|
-
# URI.hash_to_query(:a => 1, :b => 2)
|
67
|
-
# #=> "a=1;b=2"
|
68
|
-
#
|
69
|
-
def hash_to_query(parameters)
|
70
|
-
return '' unless parameters
|
71
|
-
pairs = []
|
72
|
-
parameters.each do |param, value|
|
73
|
-
pairs << "#{param}=#{cgi_escape(value.to_s)}"
|
74
|
-
end
|
75
|
-
return pairs.join(KEY_VALUE_SEPARATOR)
|
76
|
-
end
|
77
|
-
|
78
|
-
alias_method :hash_to_query_string, :hash_to_query
|
79
|
-
|
80
|
-
# CGI escape
|
81
|
-
#
|
82
|
-
# TODO: How does this compare to URI.escape?
|
83
|
-
def cgi_escape(string)
|
84
|
-
string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
|
85
|
-
'%' + $1.unpack('H2' * $1.size).join('%').upcase
|
86
|
-
end.tr(' ', '+')
|
87
|
-
end
|
88
|
-
|
89
|
-
#
|
90
|
-
def cgi_unescape(string)
|
91
|
-
string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
|
92
|
-
[$1.delete('%')].pack('H*')
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
#
|
97
|
-
def cgi_parse(query)
|
98
|
-
params = Hash.new([].freeze)
|
99
|
-
|
100
|
-
query.split(/[&;]/n).each do |pairs|
|
101
|
-
key, value = pairs.split('=',2).collect{|v| cgi_unescape(v) }
|
102
|
-
if params.has_key?(key)
|
103
|
-
params[key].push(value)
|
104
|
-
else
|
105
|
-
params[key] = [value]
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
params
|
110
|
-
end
|
111
|
-
|
112
|
-
# This method returns the query string of a uri
|
113
|
-
#
|
114
|
-
# Input:
|
115
|
-
# the uri
|
116
|
-
#
|
117
|
-
# Output:
|
118
|
-
# the query string.
|
119
|
-
# returns nil if no query string
|
120
|
-
def get_query_string(uri)
|
121
|
-
return nil unless uri
|
122
|
-
# gmosx: INVESTIGATE ruby's URI seems to differently handle
|
123
|
-
# abs and rel uris.
|
124
|
-
if md = URI::REGEXP::ABS_URI.match(uri)
|
125
|
-
return md[8]
|
126
|
-
elsif md = URI::REGEXP::REL_URI.match(uri)
|
127
|
-
return md[7]
|
128
|
-
end
|
129
|
-
return nil
|
130
|
-
end
|
3
|
+
require 'facets/uri/cgi_escape.rb'
|
4
|
+
require 'facets/uri/cgi_unescape.rb'
|
5
|
+
require 'facets/uri/cgi_parse.rb'
|
6
|
+
require 'facets/uri/decode.rb'
|
7
|
+
require 'facets/uri/parameters.rb'
|
8
|
+
require 'facets/uri/query.rb'
|
131
9
|
|
132
|
-
|
133
|
-
#
|
134
|
-
# Returns the chomped uri.
|
135
|
-
def chomp_query_string(uri)
|
136
|
-
return nil unless uri
|
137
|
-
query_string = self.get_query_string(uri)
|
138
|
-
return uri.dup.chomp("?#{query_string}")
|
139
|
-
end
|
140
|
-
|
141
|
-
# Get a uri and a hash of parameters. Inject the hash values
|
142
|
-
# as parameters in the query sting path. Returns the full uri.
|
143
|
-
#
|
144
|
-
# uri - the uri to filter (String)
|
145
|
-
# parameter - hash of parameters to update
|
146
|
-
#
|
147
|
-
# Returns the full updated query string.
|
148
|
-
#
|
149
|
-
# TODO: optimize
|
150
|
-
def update_query_string(uri, parameters)
|
151
|
-
query_string = self.get_query_string(uri)
|
152
|
-
rest = uri.dup.gsub(/\?#{query_string}/, "")
|
153
|
-
|
154
|
-
hash = self.query_string_to_hash(query_string)
|
155
|
-
hash.update(parameters)
|
156
|
-
query_string = self.hash_to_query_string(hash)
|
157
|
-
|
158
|
-
unless query_string.blank?
|
159
|
-
return "#{rest}?#{query_string}"
|
160
|
-
else
|
161
|
-
return rest
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
# Gets the request uri, injects extra parameters in the query string
|
166
|
-
# and returns a new uri. The request object is not modified.
|
167
|
-
# There is always a qs string so an extra test is skipped.
|
168
|
-
#
|
169
|
-
# TODO: find a better name?
|
170
|
-
def update_request_uri(request, parameters)
|
171
|
-
hash = request.parameters.dup()
|
172
|
-
hash.update(parameters)
|
173
|
-
|
174
|
-
## use this in hash_to_querystring.
|
175
|
-
query_string = hash.collect { |k, v|
|
176
|
-
"#{k}=#{v}"
|
177
|
-
}.join(";")
|
178
|
-
|
179
|
-
## return "#{request.translated_uri}?#{query_string}"
|
180
|
-
return "#{request.path}?#{query_string}"
|
181
|
-
end
|
10
|
+
module URI
|
182
11
|
|
183
12
|
module Kernel
|
184
13
|
#
|