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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 04425cff670267fec297484f50e19edbb8a22fc8
|
4
|
+
data.tar.gz: 19b9480ec202b072704267dc8760209cb6648338
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e36beb518158636837793bcab25e5c004cfd904d8e78f865099ff5b904ee562f04078d3d6ff5e10a7ab02b225de49d3ba51365fdc3538d50725855b0a5830baf
|
7
|
+
data.tar.gz: 13b826e5a84e8c7b91562c2df850eb16972a843dc6f6546f7f0aaf34a548d9db2c3d27935ea39a98573700d65cfe3bbdac183f8df2cdb1b66b68ee4faa9d8e54
|
data/.index
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
revision: 2013
|
3
|
+
type: ruby
|
4
|
+
sources:
|
5
|
+
- Indexfile
|
6
|
+
- Gemfile
|
7
|
+
authors:
|
8
|
+
- name: Thomas Sawyer
|
9
|
+
email: transfire@gmail.com
|
10
|
+
organizations:
|
11
|
+
- name: Rubyworks
|
12
|
+
requirements:
|
13
|
+
- groups:
|
14
|
+
- test
|
15
|
+
version: '>= 0'
|
16
|
+
name: lemon
|
17
|
+
- groups:
|
18
|
+
- test
|
19
|
+
version: '>= 0'
|
20
|
+
name: qed
|
21
|
+
- groups:
|
22
|
+
- test
|
23
|
+
version: '>= 0'
|
24
|
+
name: rubytest-cli
|
25
|
+
- groups:
|
26
|
+
- test
|
27
|
+
version: '>= 0'
|
28
|
+
name: rake
|
29
|
+
- groups:
|
30
|
+
- test
|
31
|
+
version: '>= 0'
|
32
|
+
name: simplecov
|
33
|
+
conflicts: []
|
34
|
+
alternatives: []
|
35
|
+
resources:
|
36
|
+
- type: home
|
37
|
+
uri: http://rubyworks.github.com/facets
|
38
|
+
label: Homepage
|
39
|
+
- type: code
|
40
|
+
uri: http://github.com/rubyworks/facets
|
41
|
+
label: Source Code
|
42
|
+
- type: docs
|
43
|
+
uri: http://rubyworks.github.com/facets/learn.html
|
44
|
+
label: Documentation
|
45
|
+
- type: wiki
|
46
|
+
uri: http://wiki.github.com/rubyworks/facets
|
47
|
+
label: User Guide
|
48
|
+
- type: talk
|
49
|
+
uri: http://groups.google.com/group/facets-universal
|
50
|
+
repositories:
|
51
|
+
- name: upstream
|
52
|
+
scm: git
|
53
|
+
uri: git@github.com:rubyworks/facets.git
|
54
|
+
categories: []
|
55
|
+
copyrights:
|
56
|
+
- holder: Rubyworks
|
57
|
+
year: '2004'
|
58
|
+
license: BSD-2-Clause
|
59
|
+
customs: []
|
60
|
+
paths:
|
61
|
+
load:
|
62
|
+
- lib/core
|
63
|
+
- lib/standard
|
64
|
+
name: facets
|
65
|
+
title: Ruby Facets
|
66
|
+
version: 3.0.0
|
67
|
+
summary: The orginal well curated collection of extension methods for Ruby.
|
68
|
+
slogan: ALL YOUR BASE ARE BELONG TO RUBY!
|
69
|
+
description: Facets is the premier collection of extension methods for the Ruby programming
|
70
|
+
language. Facets extensions are unique by virtue of thier atomicity. They are stored
|
71
|
+
in individual files allowing for highly granular control of requirements. In addition,
|
72
|
+
Facets includes a few additional classes and mixins suitable to wide variety of
|
73
|
+
applications.
|
74
|
+
scm_uri: https://github.com/rubyworks/facets/tree/master
|
75
|
+
created: '2004-12-16'
|
76
|
+
date: '2014-12-20'
|
data/CONTRIBUTE.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# CONTRIBUTING TO FACETS
|
2
|
+
|
3
|
+
* Facets methods must have no external dependencies. (The only possible
|
4
|
+
exception to this is if the functor gets spun-off as a separate gem along
|
5
|
+
with related methods, but for now that's not happening.)
|
6
|
+
|
7
|
+
* Each method must be in it's own file of the same name. If the method ends
|
8
|
+
with `=` or `?` just leave it off the file name.
|
9
|
+
|
10
|
+
* On rare occasion two or more methods can be very tightly related. In these
|
11
|
+
cases the methods can all go in a single file under the name of the method
|
12
|
+
considered most significant. Usually files for the other methods should
|
13
|
+
still be created that simply require the main file.
|
14
|
+
|
15
|
+
* Methods must be tested either via a Lemon unit test or a QED demo,
|
16
|
+
preferably both. The Lemon unit tests are for testing a method in
|
17
|
+
detail whereas the QED demos are for demonstrating usage.
|
18
|
+
|
19
|
+
* Facets is divided into two parts, *core* and *standard* libraries.
|
20
|
+
All of the core library is loaded by default when using `require 'facets'`
|
21
|
+
(actually, almost all). The standard library (sometimes called the *more*
|
22
|
+
library) must be required per-script.
|
23
|
+
|
24
|
+
* Some core methods are included on a *trial* basis, and these are not
|
25
|
+
necessary loaded automatically with `require 'facets'`.
|
26
|
+
|
27
|
+
* Standard libraries that are not extensions of existing standard libraries
|
28
|
+
do not have to be divvied up into individual method files. But note that
|
29
|
+
full classes and/or modules are less likely to make it into Facets, as
|
30
|
+
these sorts of additions to Facets are only for very basic sorts of things.
|
31
|
+
Otherwise they'd deserve their own gem.
|
32
|
+
|
33
|
+
* When submitting new methods for consideration, it is best if each method
|
34
|
+
(or *tightly related* set of methods) is in it's own pull request. If you
|
35
|
+
have only one method to submit then a simple commit will do the tirck. If
|
36
|
+
you have more than one it best to use separate branches. Let me emphasizes
|
37
|
+
this point because it makes it *much more likely* that your pull request
|
38
|
+
will be merged. If you submit a bunch of methods in a single pull request,
|
39
|
+
it is very likely that it will not be merged even if methods you submitted
|
40
|
+
are accepted!!!
|
41
|
+
|
42
|
+
* Don't be discouraged when you get feedback about a method that isn't
|
43
|
+
all sunshine and roses. Facets has been around long enough now that
|
44
|
+
it needs to maintain a certain degree of quality control, and that means
|
45
|
+
serious discernment about what goes into the library. That includes
|
46
|
+
having in depth discussions the merits of methods, even about the best
|
47
|
+
name for a method --even if the functionality has been accepted the name
|
48
|
+
may not!
|
49
|
+
|
50
|
+
* When making a commit, if the commit is only a documentation change, then
|
51
|
+
and `[doc]` to the end of the first line of commit message. If it is only
|
52
|
+
a change to tests then add `[test]`. If the change only effects build files
|
53
|
+
then add `[admin]`. For actual code changes, if the change is not somethng
|
54
|
+
anyone would notice, use `[tweak]` or `[minor]` (minor being slightly more
|
55
|
+
improtant than tweak). For typical code changes no comment tag is necessary.
|
56
|
+
If the change fixes a bug that was reported via the issue system be sure to
|
57
|
+
reference the issue id in the message using `#` and add `[bug]`. If a change
|
58
|
+
is a significant change to the API, then end the message with `[major]`.
|
59
|
+
These are all rules of thumb, and no expects them to be applied perfectly.
|
60
|
+
|
61
|
+
## Documentation
|
62
|
+
|
63
|
+
Facets started when the only choice for API documentation was RDoc. So originally
|
64
|
+
that's how methods were documented. Since then both YARD and Tomdoc have come
|
65
|
+
along. And some of these documentation styles have creeped into a number of
|
66
|
+
methods. So right now, things are a bit messy. But going forward it looks like we
|
67
|
+
are going to settle on Tomdoc as the official documentation style (but using
|
68
|
+
the tomparse gem's extensions). Using Tomdoc will give us reasonable
|
69
|
+
interoperabiltiy with both RDoc and YARD, both of which now have support for
|
70
|
+
Tomdoc (albeit support is not 100% the same, but hopefully it's close enough).
|
71
|
+
|
72
|
+
Offically we publish documentation via rubydoc.info, which is the YARD server,
|
73
|
+
and via the Facets website in Shomen JSON format.
|
74
|
+
|
75
|
+
When writting documentation for a method it is best to give a simple summary
|
76
|
+
explaination, followed by some basic examples. Follow that up with deeper
|
77
|
+
explaination if needed, including *when* and *why* the method could be useful.
|
78
|
+
|
data/HISTORY.md
ADDED
@@ -0,0 +1,2459 @@
|
|
1
|
+
# Facets Release History
|
2
|
+
|
3
|
+
## 3.0.0 / 2014-11-11
|
4
|
+
|
5
|
+
This major release has been a long time in coming --too long in fact. As with
|
6
|
+
any "Point Oh" release, please expect a few hiccups and report them so we can
|
7
|
+
get a solid 3.1 release out as soon as possible.
|
8
|
+
|
9
|
+
This release is tailored for Ruby 2.0 and above. Ruby 1.9.x and older is no
|
10
|
+
longer supported. If you still need to use Facets with Ruby 1.9.x or older
|
11
|
+
then the excellent Backports project can be used to fill in the gaps.
|
12
|
+
|
13
|
+
Changes:
|
14
|
+
|
15
|
+
* New Features
|
16
|
+
|
17
|
+
* Add Array#arrange
|
18
|
+
* Add Array#intersection
|
19
|
+
* Add Array#missing
|
20
|
+
* Add Array#uniqe_permutation
|
21
|
+
* Add Dir.lookup method
|
22
|
+
* Add Enumerator::Lazy#squeeze
|
23
|
+
* Add Hash#fetch_nested
|
24
|
+
* Add Kernel#instance_extract
|
25
|
+
* Add Math#EC for Euler's constant
|
26
|
+
* Add Pathname#chdir
|
27
|
+
* Add Pathname#readline
|
28
|
+
* Add Proc.wrap (may become `Kernel#Proc()`)
|
29
|
+
* Add Range#- and Range#+
|
30
|
+
* Add Regexp#to_proc
|
31
|
+
* Add String#each_match as alias for #mscan
|
32
|
+
* Add Time.current
|
33
|
+
|
34
|
+
* Improved Features
|
35
|
+
|
36
|
+
* Enumerable#sum argument is initial value.
|
37
|
+
* Hash#collate can take multiple arguments.
|
38
|
+
* Hash#collate no longer flattens automatically.
|
39
|
+
* Time#past? and #future? use Time.current.
|
40
|
+
* Better ActiveSupport compatibility.
|
41
|
+
|
42
|
+
* Renamed Features
|
43
|
+
|
44
|
+
* Rename Object#replace to Object#instance_replace.
|
45
|
+
* Rename Range#to_r to Range#to_rng, since #to_r is now for Rational.
|
46
|
+
|
47
|
+
* Bug Fixes
|
48
|
+
|
49
|
+
* Fix Platform#inspect.
|
50
|
+
|
51
|
+
* Deprecated Features Now in Ruby
|
52
|
+
|
53
|
+
* Deprecate Array#combination (now in Ruby).
|
54
|
+
* Deprecate Array#index (now in Ruby).
|
55
|
+
* Deprecate Array#permutation (now in Ruby).
|
56
|
+
* Deprecate Array#product (now in Ruby).
|
57
|
+
* Deprecate Array#rotate (now in Ruby).
|
58
|
+
* Deprecate Array#rotate! (now in Ruby).
|
59
|
+
* Deprecate Array#select! (now in Ruby).
|
60
|
+
* Deprecate Binding#eval (now in Ruby).
|
61
|
+
* Deprecate Float#round_at (now in Ruby as #round).
|
62
|
+
* Deprecate Hash#select! (now in Ruby).
|
63
|
+
* Deprecate Integer#even? (now in Ruby).
|
64
|
+
* Deprecate Integer#odd? (now in Ruby).
|
65
|
+
* Deprecate Kernel#__callee__ (now in Ruby).
|
66
|
+
* Deprecate Kernel#__method__ (now in Ruby).
|
67
|
+
* Deprecate Kernel#source_location (now in Ruby).
|
68
|
+
* Deprecate NilClass#to_f (now in Ruby).
|
69
|
+
* Deprecate NilClass#to_h (now in Ruby).
|
70
|
+
* Deprecate Numeric#round_at (now in Ruby as #round).
|
71
|
+
* Deprecate Proc#curry (now in Ruby).
|
72
|
+
* Deprecate String#bytes (now in Ruby).
|
73
|
+
* Deprecate String#each_char (now in Ruby).
|
74
|
+
* Deprecate String#end_with (now in Ruby).
|
75
|
+
* Deprecate String#lines (now in Ruby).
|
76
|
+
* Deprecate String#start_with (now in Ruby).
|
77
|
+
* Deprecate Symbol#to_proc (now in Ruby).
|
78
|
+
* Deprecate UnboundMethod#name (now in Ruby).
|
79
|
+
|
80
|
+
|
81
|
+
## 2.9.3 / 2011-12-31
|
82
|
+
|
83
|
+
Happy New Year! Ruby Facets kicks off the year with a 2.9.x release.
|
84
|
+
This release adds a number of new methods, a few general improvements
|
85
|
+
and bug fixes, a couple of deprecations and finally settles the
|
86
|
+
project down to a two-part core/standard project organization.
|
87
|
+
|
88
|
+
Changes:
|
89
|
+
|
90
|
+
* New Features
|
91
|
+
|
92
|
+
* Add Hash#url_params. (Matt Kirk)
|
93
|
+
* Add Enumerable#hashify. (Ronen Barzel)
|
94
|
+
* Add String#briefcase, similar to #titlecase.
|
95
|
+
* Add Kernel#hierarchical_send (better replacement for preinitialize.rb).
|
96
|
+
* Add Class#hierarchically, which supports #hierarchical_send.
|
97
|
+
* Add Array#median, to get the sorted middle of an array.
|
98
|
+
* Add Math#percentile and Math#median.
|
99
|
+
* Add Instantiable mixin (returns from Mixers spin-off project).
|
100
|
+
* Add Equitable mixin (returns from Mixers spin-off project).
|
101
|
+
* Add Cloneable mixin (returns from Mixers spin-off project).
|
102
|
+
* Add Array#each_pair and #each_value.
|
103
|
+
* Add Numeric#positive? and #numeric?.
|
104
|
+
* Add Method#* and #^ composition methods. (Mike Burns)
|
105
|
+
* Add back Fixnum::MAX and MIN constants.
|
106
|
+
* Add Binding#with.
|
107
|
+
|
108
|
+
* Improved Features
|
109
|
+
|
110
|
+
* Improve FileUtils#amass to be more robust.
|
111
|
+
* Improve String#snakecase to convert spaces to underscores.
|
112
|
+
* Improve String#camelcase to convert spaces to "camels".
|
113
|
+
* Improve String#snakecase to not handle path names (use #pathize).
|
114
|
+
* Improve String#camelcase to not handle module names (ise #modulize).
|
115
|
+
* Improve Numeric#approx? bu using ratio.
|
116
|
+
|
117
|
+
* Renamed Features
|
118
|
+
|
119
|
+
* Rename Enumerable#has? to #incase?.
|
120
|
+
|
121
|
+
* Bug Fixes
|
122
|
+
|
123
|
+
* Fix Hash#rekey to keep default_proc.
|
124
|
+
* Fix Binding#self to not be defined for Rubinius.
|
125
|
+
|
126
|
+
* Deprecations
|
127
|
+
|
128
|
+
* Deprecate Preinitializable mixin.
|
129
|
+
* Deprecate main.rb, spun-off to `main_like_module` gem.
|
130
|
+
|
131
|
+
* Implementation Details
|
132
|
+
|
133
|
+
* Reconsolidated library into just two parts, `core` and `standard`.
|
134
|
+
* The term "more" is just a synonym for "standard" now.
|
135
|
+
* Relative requires are being used more extensively.
|
136
|
+
* Collection scripts, e.g. `require 'facets'`, are static.
|
137
|
+
|
138
|
+
|
139
|
+
## 2.9.2 / 2011-08-23
|
140
|
+
|
141
|
+
The main purpose of this release is a fix for Module#redefine_method,
|
142
|
+
so it will not conflict with ActiveSupport. Beyond that a handful of new
|
143
|
+
methods have been added. This release also marks the start of using
|
144
|
+
a src/ directory to generate the lib/ directory.
|
145
|
+
|
146
|
+
Changes:
|
147
|
+
|
148
|
+
* New Features
|
149
|
+
|
150
|
+
* Add Enumerable#map_with and alias #zip_map.
|
151
|
+
* Hash#delete_values returns removed keys (#12).
|
152
|
+
* Add clap-like command-line parser to Shellwords.
|
153
|
+
* Add Module#let, akin to RSpec's method.
|
154
|
+
* Add uncommon Module#method_clash method.
|
155
|
+
* Add uncommon Class#singleton? method.
|
156
|
+
|
157
|
+
* Bug Fixes
|
158
|
+
|
159
|
+
* Fix Module#redefine_method to use #remove_method.
|
160
|
+
* Fix Kernel#object_hexid, or at least try to do so again.
|
161
|
+
* Fix Exception#detail to not return backtrace if nil.
|
162
|
+
|
163
|
+
|
164
|
+
## 2.9.1 / 2011-01-30
|
165
|
+
|
166
|
+
Primarily this release fixes a couple of small issues. But also a handful of
|
167
|
+
new methods have been added.
|
168
|
+
|
169
|
+
Changes:
|
170
|
+
|
171
|
+
* New Features:
|
172
|
+
|
173
|
+
* Add FileTest#absolute? and #relative?
|
174
|
+
* Add FileTest#contains?
|
175
|
+
* Add FileTest#safe?
|
176
|
+
* Add FileUtils#amass
|
177
|
+
* Add FileUtils#outofdate
|
178
|
+
* Add FileUtils#stage
|
179
|
+
* Add Kernel#yes? and Kernel#no?
|
180
|
+
* Add Enumerable#has? (TOUR library)
|
181
|
+
* Add Digest#salted_digest, etc.
|
182
|
+
* Add Digest#base64digest (1.9.2 method)
|
183
|
+
* Add String#random_binary
|
184
|
+
|
185
|
+
* Improved Features
|
186
|
+
|
187
|
+
* Better OS detection in Platform class and RBConfig module
|
188
|
+
* Moved CPU byte order methods from RBConfig to Platform class
|
189
|
+
* General improvements to Platform class API
|
190
|
+
|
191
|
+
* Bug Fixes
|
192
|
+
|
193
|
+
* Module#redefine_method need not check pre-existence of method
|
194
|
+
* Fix string/unquote.rb recursive require
|
195
|
+
* Kernel#object_hexid varies on CPU arch, not Ruby version.
|
196
|
+
|
197
|
+
|
198
|
+
## 2.9.0 / 2010-09-01
|
199
|
+
|
200
|
+
This release is fairly extensive as it was originally intended to be v3.0.
|
201
|
+
After further consideration it was decided to reserve v3.0 for the
|
202
|
+
polish of real world feedback and more progressive changes. The primary
|
203
|
+
focus of this release has been the completion of migrating Facets into a true
|
204
|
+
extensions library. With this release almost all add-on classes and mixins
|
205
|
+
have now been spun-off to other projects. Only the most general purposes
|
206
|
+
add-on classes and mixins remain.
|
207
|
+
|
208
|
+
A new TOUR library division has also been added to complement CORE and MORE.
|
209
|
+
This division houses purely optional extensions. The new division serves
|
210
|
+
a couple of useful purposes. In particular, it helps separates the standard
|
211
|
+
library extensions from optional core extension in the RDocs and thus makes
|
212
|
+
the perfect place to vet new extension ideas.
|
213
|
+
|
214
|
+
One important change that will effect anyone using Facets along side
|
215
|
+
ActiveSupport is that Facets no longer tries to conditionally avoid
|
216
|
+
method overlaps with ActiveSupport. This is fine for the upcoming
|
217
|
+
ActiveSupport 3.0 library which extends core classes directly instead of
|
218
|
+
using mixins. One need only require 'facets' in the Rails config/preinitializer.rb
|
219
|
+
file and ActiveSupport will take precedence over Facets. For older versions
|
220
|
+
of ActiveSupport, the best approach is to cherry pick from Facets just the
|
221
|
+
extensions you want, thus avoiding any conflicts. There are actually only a
|
222
|
+
dozen or so overlaps and all are intended to compatible, but it doesn't hurt
|
223
|
+
to be sure.
|
224
|
+
|
225
|
+
Lastly, it is worth mentioning that this release has been more thuroughly
|
226
|
+
tested than any version of Facets to date. Thanks to RVM this release runs
|
227
|
+
green on Ruby 1.8.6, 1.8.7 and 1.9.2.
|
228
|
+
|
229
|
+
Changes:
|
230
|
+
|
231
|
+
* New Features
|
232
|
+
|
233
|
+
* Add Kernel#temporarily, set variables temporarily and eval block
|
234
|
+
* Add Kernel#deep_clone, a better alternative to #deep_copy
|
235
|
+
* Add Kernel#present? and Kernel#presence
|
236
|
+
* Add Kernel#not and #not?
|
237
|
+
* Add Array#extract_options!, for pulling options off argument list
|
238
|
+
* Add Regexp#|, operator for Regexp#union
|
239
|
+
* Add Array#percentile and Array#median
|
240
|
+
* Add Module#memo, for instance level memoization
|
241
|
+
* Add YAML.read method
|
242
|
+
* Add Pathname#include?
|
243
|
+
* Add Module#anonymous?
|
244
|
+
* Add Module#copy_inheritor
|
245
|
+
* Add Indexable#from and Indexable#upto
|
246
|
+
* Add Array#from and Array#thru
|
247
|
+
* Add NA class via na.rb
|
248
|
+
* Add Memoizable in memoizable.rb for a more robust memoization system
|
249
|
+
* Add Module#safe_memo in thread.rb for thread safe memoization
|
250
|
+
* Add Kernel#sandbox in thread.rb for threaded $SAFE=4 evaluation
|
251
|
+
* Add Hash#subset
|
252
|
+
* Add Kernel#Y to tour library
|
253
|
+
* Add numerous Math extensions
|
254
|
+
|
255
|
+
* Deprecations
|
256
|
+
|
257
|
+
* Deprecate Module#attr_toggler as a YAGNI
|
258
|
+
* Deprecate Kernel#class_eval b/c of it's confusing behavior
|
259
|
+
* Deprecate Module#once is no longer an alias for #memoize
|
260
|
+
* Deprecate Integer#succ(n) (for compatibility reasons)
|
261
|
+
* Deprecate Stackable, it's method were moved to CORE
|
262
|
+
* Deprecate Kernel#populate and #set_from (use #assign and #assign_from)
|
263
|
+
* Deprecate Kernel#non_nil? since #not_nil? is enough
|
264
|
+
* Deprecate #__HERE__ b/c implementation was unreliable
|
265
|
+
* Deprecate Time#since, use #less instead
|
266
|
+
* Deprecate Time#advance, use #shift instead
|
267
|
+
* Deprecate Kernel#super_as (no good way to get callers method name)
|
268
|
+
* Deprecate Integer#clear_bit, use #bit_clear instead
|
269
|
+
* Deprecate Kernel#resc, use String#to_re or #to_rx instead
|
270
|
+
* Deprecate Module#modspace
|
271
|
+
* Deprecate Kernel#__ and class X for Proc#partial, use NA instead
|
272
|
+
* Deprecate autoreload.rb has been spun-off to a separate project
|
273
|
+
* Deprecate Module#nesting, b/c redundant and overlap with Module.nesting
|
274
|
+
|
275
|
+
* Renamed Features
|
276
|
+
|
277
|
+
* Rename Module#parent to Module#enclosure
|
278
|
+
* Rename Module#parents to Module#enclosures
|
279
|
+
* Rename Module#parent_name to Module#modname
|
280
|
+
* Rename Array#recurisvely to Array#recurse
|
281
|
+
* Rename Hash#recurisvely to Hash#recurse
|
282
|
+
* Rename Enumerable#recursive to Enumerable#recursively
|
283
|
+
* Rename Array#recursive to Array#recursively
|
284
|
+
* Rename Hash#recursive to Hash#recursively
|
285
|
+
* Rename Kernel#silence_warnings to Kernel#disable_warnings
|
286
|
+
* Rename Hash#recursive_merge to Hash#deep_merge
|
287
|
+
* Rename Class#prepend to Class#preallocate
|
288
|
+
* Rename File#atomic_write to FileUtils#atomic_write
|
289
|
+
* Rename Module#conflict to Module#method_clash
|
290
|
+
* Rename Class#inheritor to Module#class_inheritor
|
291
|
+
* Rename Symbol#re_s to Symbol#as_s
|
292
|
+
* Rename String#chars to String#characters
|
293
|
+
* Rename String#outdent to String#unindent
|
294
|
+
* Rename Time#round to Time#round_to
|
295
|
+
* Rename Time#hence to Time#shift (but keep aliases)
|
296
|
+
* Rename Hash#zipnew to Hash#zip
|
297
|
+
|
298
|
+
* Moved Libraries
|
299
|
+
|
300
|
+
* Move roman.rb to integer/roman and string/roman.rb
|
301
|
+
* Move blank.rb to kernel/blank.rb
|
302
|
+
* Move facets-live.rb to facets/auto_core.rb
|
303
|
+
* Move cattr.rb to MORE library
|
304
|
+
* Move duplicable.rb to kernel/dup.rb
|
305
|
+
* Move bitmask.rb to integer/bitmask.rb
|
306
|
+
* Move enumerable/divide.rb to array/divide.rb
|
307
|
+
* Move enumerable/split.rb to array/split.rb
|
308
|
+
* Move enumerable/entropy.rb to array/entropy.rb
|
309
|
+
* Move enumerable/probability.rb to array/probability.rb
|
310
|
+
* Move enumerable/duplicates.rb array/duplicates.rb
|
311
|
+
* Move module/enclosure.rb to optional TOUR libs
|
312
|
+
* Move kernel/instance_exec to option TOUR libs
|
313
|
+
|
314
|
+
* Bug Fixes
|
315
|
+
|
316
|
+
* Fix Fixed Hash#rekey! from clobbering previous keys
|
317
|
+
* Fix Exception#raised? is a class method
|
318
|
+
* Fix Enumerator#fx should use #map instead of #each
|
319
|
+
* Fix String#splice needs String#store
|
320
|
+
* Fix Kernel#blank? empty condition was faulty
|
321
|
+
* Fix Comparable#bound needs clip.rb, not cap.rb
|
322
|
+
* Fix String#file needs to pass block
|
323
|
+
* Fix String#edit_distance use new encodings for Ruby 1.9
|
324
|
+
|
325
|
+
* Improved Features
|
326
|
+
|
327
|
+
* New lib/tour division of libraries
|
328
|
+
* Module#class_extend dynamically creates append_features method
|
329
|
+
* Kernel#require_all is only for relative requires
|
330
|
+
* __DIR__ can take subdirectory arguments
|
331
|
+
* Hash#join has more sensible default separator (' ')
|
332
|
+
* Some OpEsc escapes have been renamed
|
333
|
+
* Kernel#assign does not accept a block
|
334
|
+
* Kernel#try is now like ActiveSupport's
|
335
|
+
* Improved #respond (which is like old #try)
|
336
|
+
* Remove all `if defined?(ActiveSupport)` conditions
|
337
|
+
* Use #random_range to support specialized Range#at_rand functionality
|
338
|
+
* Use Comparable.[] instead of Comparable()
|
339
|
+
* Array#rotate rotates in opposite direction than before (b/c or Ruby 1.9)
|
340
|
+
|
341
|
+
|
342
|
+
## 2.8.4 / 2010-04-27
|
343
|
+
|
344
|
+
A minor point release just to get a few improvements out there before
|
345
|
+
endeavering into more extensive work for the next major release.
|
346
|
+
|
347
|
+
* New Features
|
348
|
+
|
349
|
+
* Added #glob_relative to Pathname
|
350
|
+
|
351
|
+
* Deprecations
|
352
|
+
|
353
|
+
* Deprecated BlankSlate (use BasicObject)
|
354
|
+
* Deprecate hashbuilder.rb
|
355
|
+
* Removed casting_hash.rb, moved to new library
|
356
|
+
* Removed opencollection.rb, moved to new library
|
357
|
+
* Removed ansicode.rb, use ansi gem
|
358
|
+
|
359
|
+
* Bug Fixes
|
360
|
+
|
361
|
+
* changed Numeric#length to return self, not to_s.self
|
362
|
+
* Fix mispelling of Class#descendants
|
363
|
+
|
364
|
+
* Other Improvements
|
365
|
+
|
366
|
+
* Range#at_rand has been optimized
|
367
|
+
* Kernel#singleton_class no longer can take a block
|
368
|
+
* Hash#to_proc takes response argument replacing #to_proc_with_response
|
369
|
+
* OpenHash becomes more like OpenObject and OpenObject becomes bare bones
|
370
|
+
* Range#at_rand optimized for Fixnum/Bignum instead of Integer
|
371
|
+
|
372
|
+
|
373
|
+
## 2.8.3 / 2010-04-10
|
374
|
+
|
375
|
+
New release which makes a few adjustments in Kernel core extensions,
|
376
|
+
adds a few new extensions and additions, plus other small improvements.
|
377
|
+
The biggest change is the addition of Recusor, which is created via
|
378
|
+
Enumerable#recursive. This class is somewhat like Enumerator and
|
379
|
+
provides a number of recursive methods.
|
380
|
+
|
381
|
+
Changes:
|
382
|
+
|
383
|
+
* 9 New Core Extensions
|
384
|
+
|
385
|
+
* Enumerable#recursive provides a number of other recursive methods.
|
386
|
+
* Enumerable#visit can be used to recursively iterate any Enumerable.
|
387
|
+
* Module#set has been added (from Sinatra).
|
388
|
+
* Symbol#/ is added to be like String#/.
|
389
|
+
* Struct#to_h is added and will ultimately replace Struct#attributes.
|
390
|
+
* ObjectSpace#reflect routes method calls to Kernel context.
|
391
|
+
* Hash#to_module converts a hash to mixin module (Jay Fields).
|
392
|
+
* Kernel#dup! is same as #try_dup from extlib.
|
393
|
+
* Add File#ext which is a useful variation of #extname (Lavir the Whiolet).
|
394
|
+
|
395
|
+
* 3 Core Extensions Renamed
|
396
|
+
|
397
|
+
* Renamed #set_from to #assign_from (alias remains until Kernel#set is considerd).
|
398
|
+
* Renamed #populate to #assign and improve.
|
399
|
+
* Kernel#instance_vars is now Kernel#instance and also more useful.
|
400
|
+
|
401
|
+
* 1 Core Deprecation
|
402
|
+
|
403
|
+
* Removed #instance_eval hack.
|
404
|
+
|
405
|
+
* 2 Core Bug Fixes
|
406
|
+
|
407
|
+
* #map_with_index now uses #each_with_index.
|
408
|
+
* #to_proc_with_response spelling correction.
|
409
|
+
|
410
|
+
* 1 Core Adjustment
|
411
|
+
|
412
|
+
* Aliased #metadef to #meta_def.
|
413
|
+
|
414
|
+
* 3 New More Libraries
|
415
|
+
|
416
|
+
* casting_hash.rb provides CastingHash class, a hash with flexible keys and values.
|
417
|
+
* prepend.rb allows for AOP-like inclusion of modules.
|
418
|
+
* roman.rb provides simple roman numeral extensions to String and Integer.
|
419
|
+
|
420
|
+
* 5 More Improvements
|
421
|
+
|
422
|
+
* Pathname#visit for iterating all entries beneath a path (chikamichi).
|
423
|
+
* Pathname#to_str, b/c Pathname is basically a type of String (from extlib).
|
424
|
+
* Range#at_rand in random.rb handles Float ranges (Lavir the Whiolet).
|
425
|
+
* FileUtils#cp_rx provides controlled copies.
|
426
|
+
* Stash class in stash.rb is improved and is now available as a stand-alone library.
|
427
|
+
* ioredirect.rb has been removed as IORedirect no longer worked.
|
428
|
+
* plugin_manager.rb has been removed. Use 'plugin' gem instead.
|
429
|
+
|
430
|
+
|
431
|
+
## 2.8.2 / 2010-02-22
|
432
|
+
|
433
|
+
This release fixes a bug by removing Numeric#size. Turns out that was a
|
434
|
+
core method already. It includes an "auditing" of the core enumerable
|
435
|
+
method which has led to a few modifications most noteable amoung them
|
436
|
+
renaming #map_detect to #find_yield and #compact_map to #purge.
|
437
|
+
|
438
|
+
Changes:
|
439
|
+
|
440
|
+
* 7 New Core Extensions
|
441
|
+
|
442
|
+
* Add Enumerable#each_with_object.
|
443
|
+
* Add #collapse which is a shortcut for flatten.compact.
|
444
|
+
* Add Numeric#spacing (Mr. Groff)
|
445
|
+
* Add Array#uniq_by! to complement Enumerable#uniq_by.
|
446
|
+
* Add String#exclude? as opposite of #include?
|
447
|
+
* Add Enumerable#exclude? as opposite of #include?
|
448
|
+
* Add Proc#bind_to
|
449
|
+
|
450
|
+
* 2 Extensions Renamed
|
451
|
+
|
452
|
+
* Rename Enumerable#compact_map to #purge.
|
453
|
+
* Rename Enumerable#map_detect to #find_yield.
|
454
|
+
|
455
|
+
* 4 Deprecations
|
456
|
+
|
457
|
+
* Deprecate #inject!/#injecting in favor of #filter.
|
458
|
+
* Deprecate Array#** as alias of #product.
|
459
|
+
* Remove Numeric#size, as it was already used by core.
|
460
|
+
* Spun tracepoint.rb off as a seprate library.
|
461
|
+
|
462
|
+
* 3 Other Changes
|
463
|
+
|
464
|
+
* Integer#multiple? handles zero as an argument.
|
465
|
+
* facets.rb is now dynamically loaded instead of code generated.
|
466
|
+
* General imporvements to date.rb.
|
467
|
+
|
468
|
+
|
469
|
+
## 2.8.1 / 2009-12-25
|
470
|
+
|
471
|
+
This release simply fixes a few minor issues.
|
472
|
+
|
473
|
+
Changes:
|
474
|
+
|
475
|
+
* 1 New Standard Extension
|
476
|
+
|
477
|
+
* Added Pathname#glob_relative to pathanme.rb.
|
478
|
+
|
479
|
+
* 3 Adjustments
|
480
|
+
|
481
|
+
* Loading string/tab.rb no longer loads margin.rb or expand_tab.rb.
|
482
|
+
* Fixed FileList method delegations.
|
483
|
+
* Numeric#length and #size return +self+, not +to_s.length+.
|
484
|
+
|
485
|
+
|
486
|
+
## 2.8.0 / 2009-11-05
|
487
|
+
|
488
|
+
Facets 2.8 effectively completes the MORE library clean-up which peaked
|
489
|
+
with the previous 2.7 release. Another eight libraries have been deprecated,
|
490
|
+
a few of them spun-off to a separate project. However, this verison also
|
491
|
+
reverts a few of the deprecations made in the last version. These libs
|
492
|
+
will remain in Facets's MORE library for the forseeable future.
|
493
|
+
|
494
|
+
This version effectively concludes the MORE library clean-up. The next, and
|
495
|
+
last version before Facets 3.0, will focus on "auditing" the CORE library.
|
496
|
+
|
497
|
+
Changes:
|
498
|
+
|
499
|
+
* 6 Libraries "Undeprecated":
|
500
|
+
|
501
|
+
* ini.rb
|
502
|
+
* linkedlist.rb
|
503
|
+
* matcher.rb
|
504
|
+
* memoizer.rb
|
505
|
+
* roman.rb
|
506
|
+
* semaphore.rb
|
507
|
+
|
508
|
+
* 5 Libraries Deprecated:
|
509
|
+
|
510
|
+
* fileable.rb (too esoteric)
|
511
|
+
* ioredirect.rb (needs better implementation)
|
512
|
+
* coroutine.rb (because of Fiber)
|
513
|
+
* capsule.rb (may be spun-off)
|
514
|
+
* recorder.rb (may be spun-off)
|
515
|
+
|
516
|
+
* 3 Libraries Spun-Off and Deprecated:
|
517
|
+
|
518
|
+
* ansicode.rb ansi
|
519
|
+
* progressbar.rb ansi
|
520
|
+
* logger.rb ansi
|
521
|
+
|
522
|
+
* Additonal Enhancements:
|
523
|
+
|
524
|
+
* Kernel#extend can now take a block
|
525
|
+
* Fixed kernel#d so it is useable
|
526
|
+
* Added Range#at_rand (thanks to Tyler Rick)
|
527
|
+
* Added Enumerable#map_detect (thanks to Scott Taylor)
|
528
|
+
* String#/ calls File.join
|
529
|
+
* Added String#newlines and String#cleanlines
|
530
|
+
* String#titlecase includes apostrophe in words
|
531
|
+
* BasicObject/BlankSlate is more compliant with 1.9.1 design
|
532
|
+
* Enumerable#count can take multiple items, treats as logical Or
|
533
|
+
* Class#class_extend extends class level, not class_eval
|
534
|
+
* Integer#succ(n) becomes Fixnum#succ(n), succ.rb
|
535
|
+
* Complete rewrite of Inheritor
|
536
|
+
* Shellwords extensions have been reworked
|
537
|
+
* Added String#similarity
|
538
|
+
* Added Levenshtein String#edit_distance method
|
539
|
+
* And other minor improvements (some thanks to ccjr)
|
540
|
+
|
541
|
+
|
542
|
+
## 2.7.0 / 2009-08-01
|
543
|
+
|
544
|
+
Facets 2.7 is the biggest release of Facets since 2.4. Rather then trickle-release these
|
545
|
+
changes over the course of the 2.6.x series, I made the decision to let 2.7 have them
|
546
|
+
all at once. In so doing this release nearly completes the process of trimming down
|
547
|
+
the MORE library to its essentials. Over 40 high-level libraries have been spun-off
|
548
|
+
as separate gems and/or deprecated. No doubt this is a big change for Facets, and the
|
549
|
+
transition may be a bit bumpy over the short-term, but I am certain that in the long-run
|
550
|
+
everyone involved will be better served. To help, I have listed the effected libraries
|
551
|
+
and the alternate gems availble to take their place.
|
552
|
+
|
553
|
+
A few other changes have also been made in the release that may also effect your code.
|
554
|
+
In particular you should note that #class_extension has been renamed to #class_extend
|
555
|
+
(require 'facets/class_extend'). In addition we have added a few new core methods such
|
556
|
+
as Exception#raised? and Symbol#thrown?.
|
557
|
+
|
558
|
+
Changes:
|
559
|
+
|
560
|
+
* Spun-Off Projects
|
561
|
+
|
562
|
+
These libraries have been deprectated from Facets entirely, but are available
|
563
|
+
as separate gems (or soon will be).
|
564
|
+
|
565
|
+
LIBRARY GEM
|
566
|
+
-------------------- ------------------------------
|
567
|
+
overload.rb overload
|
568
|
+
binreadable.rb binaryio
|
569
|
+
downloader.rb downloader
|
570
|
+
xoxo.rb xoxo
|
571
|
+
bicrypt.rb bicrypt
|
572
|
+
typecast.rb typecast
|
573
|
+
association.rb association
|
574
|
+
syncarray.rb sync
|
575
|
+
synchash.rb sync
|
576
|
+
paramix.rb paramix
|
577
|
+
crypt.rb crypt3
|
578
|
+
lrucache.rb lrucache
|
579
|
+
net/smtp_tls.rb smtp_tls
|
580
|
+
advisable.rb advisable
|
581
|
+
buildable.rb buildable
|
582
|
+
memoizer.rb memoizer
|
583
|
+
harray.rb sparray
|
584
|
+
sparse_array.rb sparray
|
585
|
+
iteration.rb iteration
|
586
|
+
interval.rb stick
|
587
|
+
infinity.rb stick
|
588
|
+
pool.rb pool
|
589
|
+
linkedlist.rb linkedlist
|
590
|
+
semaphore.rb semaphore
|
591
|
+
pqueue.rb pqueue
|
592
|
+
censor.rb language
|
593
|
+
matcher.rb language
|
594
|
+
basex.rb radix
|
595
|
+
minitar.rb archive-tar-minitar -or- folio
|
596
|
+
|
597
|
+
* Spun-Off But Still Available
|
598
|
+
|
599
|
+
These libraries have been spun-off into stand-alone gems, but remain
|
600
|
+
available via Facets too. Ultimately some of these will be removed
|
601
|
+
from Facets too (in particular the ansi libraries).
|
602
|
+
|
603
|
+
LIBRARY GEM
|
604
|
+
-------------------- ------------------------------
|
605
|
+
ansicode.rb ansi
|
606
|
+
progressbar.rb ansi
|
607
|
+
logger.rb ansi
|
608
|
+
tracepoint.rb tracepoint
|
609
|
+
dictionary.rb dictionary
|
610
|
+
recorder.rb recorder
|
611
|
+
ostructable.rb ostructable -or- openhash
|
612
|
+
openobject.rb openhash
|
613
|
+
opencollection.rb openhash
|
614
|
+
opencascade.rb openhash
|
615
|
+
openhash.rb openhash
|
616
|
+
openmodule.rb openmodule
|
617
|
+
fileable.rb fileable
|
618
|
+
enumerablepass.rb enumargs
|
619
|
+
|
620
|
+
* Deprecations Without Current Replacement
|
621
|
+
|
622
|
+
The libraries have been deprecated but do not yet have replacements.
|
623
|
+
Seperate gems for these are planned though.
|
624
|
+
|
625
|
+
bbcode.rb
|
626
|
+
ini.rb
|
627
|
+
settings.rb
|
628
|
+
xmlhash.rb
|
629
|
+
|
630
|
+
* Deprecations Merged Into CORE
|
631
|
+
|
632
|
+
These libraries have been deprecated because their functionality was merged into
|
633
|
+
the CORE library and/or made available in some another way.
|
634
|
+
|
635
|
+
1stclassmethod.rb #method! and #instance_method! are now part of CORE.
|
636
|
+
elementor.rb #per has been added to CORE.
|
637
|
+
elementwise.rb #ewise has been added to CORE.
|
638
|
+
consoleutils.rb #ask is in CORE, for the rest see Ansi or Clio project.
|
639
|
+
attr.rb Added Module#attr_setter to CORE, and separated the rest in MORE.
|
640
|
+
|
641
|
+
* General Deprecations
|
642
|
+
|
643
|
+
These libraries have simply been deprecated because they were found lacking in
|
644
|
+
some significant fashion.
|
645
|
+
|
646
|
+
nilstatus.rb Poved rather useless, not to mention trivial.
|
647
|
+
heap.rb Heap was just an alias for PQueue anyway. Use 'pqueue' instead.
|
648
|
+
dependency.rb Other solutions exist that are much better (like Advisable).
|
649
|
+
classmethods.rb #class_extend solution is more robust.
|
650
|
+
ziputils.rb Have a look at Folio (gem install folio) for replacement.
|
651
|
+
unheritable.rb Implementation is trivial and usefulness questionable.
|
652
|
+
instantise.rb Replaced by instance_function.rb.
|
653
|
+
|
654
|
+
* Other Enhancements
|
655
|
+
|
656
|
+
* Fixed Proc#curry to work with #define_method (Thanks to R.Potter)
|
657
|
+
* Module#class_extension has been renamed to #class_extend (require 'facets/class_extend').
|
658
|
+
* kernel#instance is no longer in core; now it is an extra monkey patch for #instance_eval.
|
659
|
+
* Kernel#this has been removed. It is equivalent to 'method(__method__)'.
|
660
|
+
* BlankSlate is now an alias for BasicObject, and will be deprecated in the future.
|
661
|
+
* Kernel#method! and Module#instance_method! now use a global variable for their cache.
|
662
|
+
* #object_state (old name was #state) has been added to core.
|
663
|
+
|
664
|
+
|
665
|
+
## 2.6.0 / 2009-07-03
|
666
|
+
|
667
|
+
Facets 2.6.0 removes htmlfilter.rb and cssfilter.rb due to licensing
|
668
|
+
incompatability. These scripts are now available as a separate package
|
669
|
+
called 'htmlfilter'. Also removed are a few MORE libs that were too
|
670
|
+
expiremental and/or not robust enough. Effectively this finishes up
|
671
|
+
the "spring cleaning" of the MORE lib mentioned a few releases back.
|
672
|
+
|
673
|
+
But it also marks a new start in trimming MORE down further. We have
|
674
|
+
decided to do this for three reasons 1) Some of the MORE libs would
|
675
|
+
be better served as separate projects. 2) Facets will become a tighter
|
676
|
+
library, primarily focused on extensions. And 3) all libraries involved
|
677
|
+
will become easier to maintain and thus more robust in the long run.
|
678
|
+
|
679
|
+
This release also fixes an important arity bug with the recently added
|
680
|
+
Module#extend method --one of the very few actual core overrides in Facets.
|
681
|
+
|
682
|
+
Changes:
|
683
|
+
|
684
|
+
* 7 Major Enhancements
|
685
|
+
|
686
|
+
* Removed htmlfilter.rb due to licensing issues.
|
687
|
+
* Also removed cssfilter.rb ('gem install htmlfilter' now)
|
688
|
+
* Removed rwdelegator.rb, simply not a robust solution.
|
689
|
+
* Removed buildable.rb, api is too confusing.
|
690
|
+
* Removed meta.rb which was not very useful and too expiremental anyway.
|
691
|
+
* Removed prototype.rb, which needs it's own project.
|
692
|
+
|
693
|
+
* 3 Minor Enhancements
|
694
|
+
|
695
|
+
* Removed Kernel#__HERE__ as it simply cannot work.
|
696
|
+
(Ruby 1.9.2 will offer #source_location for the same, btw)
|
697
|
+
* Returned binding/opvars to core.
|
698
|
+
* Added Integer#length as suggested by Victor H. Goff III.
|
699
|
+
|
700
|
+
* 1 Bug Fix
|
701
|
+
|
702
|
+
* Fixed arity issue with Module#extend.
|
703
|
+
|
704
|
+
|
705
|
+
## 2.5.2 / 2009-04-07
|
706
|
+
|
707
|
+
Facets 2.5.2 is a simple maintentance release which fixed a few issues
|
708
|
+
in the new to_hash.rb library. This release also added String#lowercase
|
709
|
+
and String#uppercae.
|
710
|
+
|
711
|
+
Changes:
|
712
|
+
|
713
|
+
* 1 Major Enhancement
|
714
|
+
|
715
|
+
* added string/uppercase and lowercase
|
716
|
+
|
717
|
+
* 1 Minor Enhancement
|
718
|
+
|
719
|
+
* adjustments to to_hash.rb
|
720
|
+
|
721
|
+
|
722
|
+
## 2.5.1 / 2009-03-05
|
723
|
+
|
724
|
+
Facets 2.5.1 fixes a few bugs, makes some small but nice additions
|
725
|
+
and improves 1.9 compatibility.
|
726
|
+
|
727
|
+
The most important addition to make note of is Object#extend, which has
|
728
|
+
been overridden to allow a block parameter. This is one of only two or three
|
729
|
+
actual "monkey patches" in all of Facets. The block, when provided,
|
730
|
+
is used to create an annonymous module which then extends the reciever.
|
731
|
+
This is a "good practice" way to extend objects, rather than using class_eval
|
732
|
+
on the singleton class.
|
733
|
+
|
734
|
+
Special thanks to Erik Veenstra, Pit Capitan and especially Sandor Szücs
|
735
|
+
for their contributions to this release.
|
736
|
+
|
737
|
+
Changes:
|
738
|
+
|
739
|
+
* 7 Major Enhancements
|
740
|
+
|
741
|
+
* added Hash#group_by_value (thanks to Erik Veenstra)
|
742
|
+
* added String#file
|
743
|
+
* added Hash#new_with (Pit Capitan)
|
744
|
+
* added module/extend.rb, now can take a block.
|
745
|
+
* added hook.rb
|
746
|
+
* added to_h_auto
|
747
|
+
* overhauled to_hash.rb, now has multiple methods
|
748
|
+
|
749
|
+
* 10 Bug Fixes
|
750
|
+
|
751
|
+
* corrected ostruct.rb to test for frozen state on updates
|
752
|
+
* fixed String#left_align
|
753
|
+
* fixed conflict between test_name.rb and test_arguments.rb
|
754
|
+
* fixed Enumreable#split when reciever is empty array
|
755
|
+
* fixed coruption of reciever by Hash#collate (thanks to Tilo Sloboda)
|
756
|
+
* fixed Array#to_h, h={} was not initialized
|
757
|
+
* fixed test of Module#conflict according ruby19
|
758
|
+
* fixed Hash#dearray_singluar_values
|
759
|
+
* association.rb stores reference when using #new
|
760
|
+
* changed Array#product to make it compatible to ruby 19, deleted block parameter
|
761
|
+
|
762
|
+
* 5 Minor Enhancements
|
763
|
+
|
764
|
+
* split enumerable/collect into map_with_index and compact_map
|
765
|
+
* improved Array#to_h for 1.9 using flatten(1)
|
766
|
+
* Dictionary#replace can take regular Hash too
|
767
|
+
* move test_to_hash.rb from more to core
|
768
|
+
* Doc'd that UnboundMethod#name returns Symbol in 1.9, but String in 1.8
|
769
|
+
|
770
|
+
|
771
|
+
## 2.5.0 / 2008-11-23
|
772
|
+
|
773
|
+
Facets 2.5.0 is an important milestone in the development of Facets.
|
774
|
+
|
775
|
+
This release has been tested against Rails' ActiveSupport library.
|
776
|
+
As long as Facets is loaded after ActiveSupport, everything
|
777
|
+
should work fine. Of course, there's no counting for real world
|
778
|
+
trials, but all ActiveSupport testcases pass under this scenario.
|
779
|
+
|
780
|
+
Secondly, this release is the first of two (or three) down-scaling
|
781
|
+
releases intended to remove all the remaining "excess" from the
|
782
|
+
library. This is being done for a variety of reasons. Some scripts
|
783
|
+
are substantial enough to be one their own and have been spun-off
|
784
|
+
into separate largely compatible projects. In this release:
|
785
|
+
|
786
|
+
If you were using... Use this project instead...
|
787
|
+
|
788
|
+
annotations.rb Anise
|
789
|
+
|
790
|
+
bytes.rb RichUnits
|
791
|
+
times.rb
|
792
|
+
|
793
|
+
command.rb Clio
|
794
|
+
consoleutils.rb
|
795
|
+
|
796
|
+
A few others scripts have been deprecated, without an alternative
|
797
|
+
recourse, simply because they were too weak, such as uploadutils.rb,
|
798
|
+
or highly experimental, such as chain.rb and eventhook.rb.
|
799
|
+
|
800
|
+
Although this release constitutes an over all slimming down of Facets,
|
801
|
+
two excellent new libraries have been added.
|
802
|
+
|
803
|
+
1) *ini.rb* by Jeena Paradies. While YAML is frequently used by
|
804
|
+
Rubyists for configuration files, a full-on serializer like YAML
|
805
|
+
is often overkill. INI files provide a lightweight solution
|
806
|
+
specifically geared for configuration.
|
807
|
+
|
808
|
+
2) *filter.rb* by Brian Candler offers lazy evaluation chains of
|
809
|
+
Enumerable methods. This is an elegant way to optimize contiguous
|
810
|
+
maps, selections, etc. --effective even on infinite enumerators.
|
811
|
+
(Note, the name of this library may be changed in the next release.)
|
812
|
+
|
813
|
+
While work remains to be done, I am happy to say, Facets is
|
814
|
+
finally beginning to approach the level of solidity I set out to
|
815
|
+
achieve just over a year ago. Thank the Maker!
|
816
|
+
|
817
|
+
Special thanks to Brian Candler, Jeena Paradies and Tyler Rick.
|
818
|
+
|
819
|
+
Changes:
|
820
|
+
|
821
|
+
* 9 Major Changes
|
822
|
+
|
823
|
+
* added Brian Candler's Enumerator::Filter
|
824
|
+
* added sparse_array.rb (was old harray.rb)
|
825
|
+
* added Jeena Paradies' ini.rb
|
826
|
+
* renamed CacheDelegator to Memoizer
|
827
|
+
* renamed DictionaryMatcher to just Matcher
|
828
|
+
* deprecated bytes.rb and times.rb (use RichUnits instead)
|
829
|
+
* deprecated uploadutils.rb; ziputils.rb will be (use Folio)
|
830
|
+
* deprecated annotations.rb (use Anise instead)
|
831
|
+
* deprecated command.rb and consoleutils.rb (use Clio instead)
|
832
|
+
|
833
|
+
* 5 Minor Changes
|
834
|
+
|
835
|
+
* deprecated chain.rb (very expiremental)
|
836
|
+
* deprecated eventhook.rb (moved to ToadCode project)
|
837
|
+
* deprecated tagiter.rb (moved to ToadCode project)
|
838
|
+
* moved Hash#symolize_keys and #stringify_keys to core lib
|
839
|
+
(still recommend #rekey instead though)
|
840
|
+
* switched to git as of 2.4.5
|
841
|
+
|
842
|
+
* 4 Bug Fixes
|
843
|
+
|
844
|
+
* memoize.rb, cache was at class-level, now at instance-level
|
845
|
+
* binding/caller.rb, fixed require for callstack.rb
|
846
|
+
* fixed missing require in string/tabto.rb
|
847
|
+
* Fixed some bugs with Time#ago/Time#hence not changing years
|
848
|
+
correctly when you changed months.
|
849
|
+
(For example, Time.utc(2008, 1, 1).ago(12, :months) incorrectly
|
850
|
+
returned 2009-01-01 instead of 2007-01-01.)
|
851
|
+
Changed Time#ago/Time#hence to still work if passed negative number.
|
852
|
+
|
853
|
+
|
854
|
+
## 2.4.5 / 2008-10-02
|
855
|
+
|
856
|
+
Facets 2.4.5 is a maintaince release. This release is notable however in that
|
857
|
+
it will likely be the last that to use SVN. Facets will be switching to Git.
|
858
|
+
Also, some libraries that have been flagged "to be deprecated" for some time
|
859
|
+
will finally be so.
|
860
|
+
|
861
|
+
Changes:
|
862
|
+
|
863
|
+
* 8 Major Enhancements
|
864
|
+
|
865
|
+
* Re-added date.rb to lore library, and removed from core. (#r1014)
|
866
|
+
* Much improved date.rb extension now in Lore library. (#r1027)
|
867
|
+
* Deprecated kernel/suppress. Use Exception.suppress from now on. (#r1040)
|
868
|
+
* Deprecated string/style.rb. Use English project instead. (#r1074)
|
869
|
+
* Console namespace is no longer supported (for Ansicode). (#r1077)
|
870
|
+
* enumerable/mode.rb, Enumerable#mode returns array since there can be more than one. (#r1079)
|
871
|
+
* OpenCascade automatically creates nodes, use foo? to query. (#r1056)
|
872
|
+
* Change #index_of to #index which now takes a block.
|
873
|
+
|
874
|
+
* 14 Minor Enhancements
|
875
|
+
|
876
|
+
* OpenStruct.new can now take a default block, like Hash.new.
|
877
|
+
* Moved variablize methods out of metaid.rb and into separate files (string/ and symbol/). (#r1042)
|
878
|
+
* Added Time#advance. (#r1046)
|
879
|
+
* Speed up of Integer odd/even methods. (#r1057)
|
880
|
+
* Array#index now takes a block (this is a core override). (#r1059)
|
881
|
+
* Spilt file/write.rb into separate method files (append, create, writelines). (#r1073)
|
882
|
+
* Modified Enumerable#split to behave like String#split. (#r1076)
|
883
|
+
* hash/op.rb, split into separate method files. (#r1081)
|
884
|
+
* Added string/modulize. string/methodize handles path names now too. (#r1085)
|
885
|
+
* Class#cattr is now part of core. (#r1089)
|
886
|
+
* Modified Enumerable#split to behave like String#split. [minor]
|
887
|
+
* Removed Rope class. If anything this will have a separate project.
|
888
|
+
* Added doc/news.html and doc/authors.html to website (temporarily?).
|
889
|
+
* Added zlib.rb to Lore library.
|
890
|
+
|
891
|
+
* 7 Bug Fixes
|
892
|
+
|
893
|
+
* OpenStruct#to_h dups internal table. (#r1015)
|
894
|
+
* Fixed require of string/xor in bicrypt.rb. (#r1039)
|
895
|
+
* integer/odd.rb, fixed Ruby 1.9 condition. (#r1080)
|
896
|
+
* class/cattr_*.rb fix require bug
|
897
|
+
* opencascade.rb, fixed bug when accessing sub-hash.
|
898
|
+
* typecast.rb, fixed require for string/methodize.
|
899
|
+
* Fixed Pathname#glob to ensure use of ::File.
|
900
|
+
|
901
|
+
|
902
|
+
## 2.4.4 / 2008-09-01
|
903
|
+
|
904
|
+
Facets 2.4.4 includes a major bug fix that caused Facets not to load properly,
|
905
|
+
having to do with a Time extension. The problem has been fixed. In addition,
|
906
|
+
this release put Facets only a few pending adjustments away from full
|
907
|
+
Rails/ActiveSupport compatibility.
|
908
|
+
|
909
|
+
Changes:
|
910
|
+
|
911
|
+
* 10 Major Enhancements
|
912
|
+
|
913
|
+
* Added string/mask providing powerful string manipulation. (#997)
|
914
|
+
* BasicObject is now just a synonm for BlankSlate unless Ruby 1.9. (#1000)
|
915
|
+
* Added Symbol#plain?, Symbol#query? and Symbol#setter? (#1011)
|
916
|
+
* Removed Time#to_date.
|
917
|
+
* Due to clobberd RI Docs (!) this should have been in Lore lib date.rb
|
918
|
+
* Moved to Lore date.rb. (#1012)
|
919
|
+
* Re-added date.rb to lore library, and removed from core. (#1014)
|
920
|
+
* Much improved date.rb extension now in Lore library. (#1027)
|
921
|
+
* Deprecated kernel/suppress. Use Exception.suppress from now on. (#1040)
|
922
|
+
* Improved date.rb and moved to LORE library, and removed from CORE. [major]
|
923
|
+
* Deprecated kernel/suppress. Use Exception.suppress from now on. [major]
|
924
|
+
* Deprecated String#to_time.
|
925
|
+
* This method reqiures the loading of a number of other standard libs.
|
926
|
+
* We can reconsider adding it again if we decide these other libs should be core.
|
927
|
+
* Or if we find a more suitable way to define the method.
|
928
|
+
|
929
|
+
* 17 Minor Enhancements
|
930
|
+
|
931
|
+
* Moved style.rb to string/stylize.rb (#998)
|
932
|
+
* Renamed string/subtract to string/op_sub.
|
933
|
+
Old name will remain for time being for compatability. (#1002)
|
934
|
+
* Module#instance_method_define? now only applies to public methods. (#1003)
|
935
|
+
* Array#index accepts a block (one of the few core overrides). (#1004)
|
936
|
+
* Moved Hash#<< from hash/update.rb to hash/op_push.rb (#1005)
|
937
|
+
* Add facets class files (eg. facets/string) have been made dynamic. (#1013)
|
938
|
+
* Moved variablize methods out of metaid.rb and into separate files (string/ and symbol/). (#1042)
|
939
|
+
* Added Time#advance. (#1046)
|
940
|
+
* Added qua_class.rb. Yea. It really is my favorite.
|
941
|
+
* Added simple functional test that loads all of Facets.
|
942
|
+
* Added a benchmark for measuring how fast Facets loads. (Core < 1sec!)
|
943
|
+
* Made Module#alias_method_chain a public method (for better Rails support).
|
944
|
+
* Wrapped Nilclass#to_f in 1.9 condition.
|
945
|
+
* float/round.rb redirects to numeric/round.rb.
|
946
|
+
* numeric/float.rb holds rounding methods for all classed Numeric, Integer and Float.
|
947
|
+
* Replaced Kernel#instance_exec with Mauricio's version.
|
948
|
+
* Improved String#each_char to work like Ruby 1.9.
|
949
|
+
* This loads strscan.rb.
|
950
|
+
* It is wrapped in a 1.9 condition.
|
951
|
+
|
952
|
+
* 8 Bug Fixes
|
953
|
+
|
954
|
+
* Hash#<< now returns self (#1001)
|
955
|
+
* OpenStruct#to_h dups internal table. (#1015)
|
956
|
+
* Fixed require of string/xor in bicrypt.rb. (#1039)
|
957
|
+
* Fixed facets.rb to use relative paths.
|
958
|
+
* Fixed cgi.rb (CGI is a class not a module).
|
959
|
+
* OpenStruct#to_h dups internal table. [bug]
|
960
|
+
* Fixed require of string/xor in bicrypt.rb. [bug]
|
961
|
+
* date.rb (stamp) fixed ref to constant FORMAT.
|
962
|
+
|
963
|
+
|
964
|
+
## 2.4.3 / 2008-08-14
|
965
|
+
|
966
|
+
Facets is almost fully interoperable with ActiveSupport and Ruby 1.9.
|
967
|
+
We will continue to improve this interoperability in upcoming releases.
|
968
|
+
|
969
|
+
As a REMINDER, Facets 2.4+ now encourages:
|
970
|
+
|
971
|
+
require 'facets'
|
972
|
+
|
973
|
+
This is better than cherry-picking methods. It may seem counter-intuitive,
|
974
|
+
but it actually proves more advantages to do this for the sake of
|
975
|
+
improved interoperability. The practice of cherry-picking can become
|
976
|
+
problematic if other dependent libraries have cherry-picked different
|
977
|
+
methods. In those cases these distinctions go unaccounted and untested.
|
978
|
+
|
979
|
+
Note that this release does not include a setup.rb script. We are working
|
980
|
+
on a new version of this script, which we plan to include in the next release.
|
981
|
+
|
982
|
+
This release give special thanks to the following people for their contributions:
|
983
|
+
Ken Bloom, Nick Caruso, Evgeniy Dolzhenko, Andy Freeman, Tomasz Muras and Dave Myron.
|
984
|
+
And of course, to anyone else I failed to mention that has contributed.
|
985
|
+
|
986
|
+
(NOTE: 2.4.3's changes may actually be long to 2.4.2. Notice the releases are
|
987
|
+
only two days apart. There was an issue with 2.4.2 and it had to be replaced
|
988
|
+
immediately. So take the distinct with a grain of salt.)
|
989
|
+
|
990
|
+
Changes:
|
991
|
+
|
992
|
+
* Additions
|
993
|
+
|
994
|
+
* Add Time#trunc and Time#round to Core.
|
995
|
+
* Add Array#recursively and fixed bug in Hash#recursively.
|
996
|
+
* Add Kernel#instance method which provides a fluent interface to private object space.
|
997
|
+
* Add Symbol#plain?, Symbol#query? and Symbol#setter?
|
998
|
+
* Add Hash#symbolize_keys and #stringify_keys.
|
999
|
+
* Add File#split_root.
|
1000
|
+
* Add #glob and #glob_first as extensions to Pathname.
|
1001
|
+
* Add NilClass#ergo whic points back to kernel/ergo.
|
1002
|
+
* Add #bump method to VersionNumber class.
|
1003
|
+
* Add String#mask providing powerful string manipulation.
|
1004
|
+
* Add Ken Bloom's DictionaryMatcher class (will be renamed in future version)
|
1005
|
+
|
1006
|
+
* Deprecations
|
1007
|
+
|
1008
|
+
* Deprecate Hash#keys_to_s and Hash#keys_to_sym.
|
1009
|
+
* These are the original versions of these methods.
|
1010
|
+
* But now we can use #rekey(:to_s) and #rekey(:to_sym) instead.
|
1011
|
+
* Deprecat ruby.rb, which was a sort 1.9 compatibility layer.
|
1012
|
+
|
1013
|
+
* 22 Major Enhancements
|
1014
|
+
|
1015
|
+
* Changed File#rewrite to not use the in-place change of the string.
|
1016
|
+
* Renamed Class#to_pathname and #to_methodname to #pathize and #methodize.
|
1017
|
+
* Removed Console:: namespace for ANSICode.
|
1018
|
+
* Moved Mentalguy's lazy.rb to core!
|
1019
|
+
* Added Indexable and Stackable to core.
|
1020
|
+
* BasicObject is now just a synonm for BlankSlate unless Ruby 1.9. [major]
|
1021
|
+
* Moved Indexable and Stackable to core.
|
1022
|
+
* Renamed arguments.rb and CLI::Arguments to argvector.rb and Argvector.
|
1023
|
+
* Added optional argument to Dictionary#first and #last.
|
1024
|
+
* Moved binding/opvars from core to more.
|
1025
|
+
|
1026
|
+
* 19 Minor Enhancements
|
1027
|
+
|
1028
|
+
* Improved File#rootname --it is now more robust.
|
1029
|
+
* Made FileUtils#whereis a module_function again.
|
1030
|
+
* Created Lore library to house extensions to Ruby's standard library.
|
1031
|
+
* Re-added facets class files (eg. facets/string) and are now dynamic.
|
1032
|
+
* Added block to Array#index.
|
1033
|
+
* This is one of the few core overrides in Facets.
|
1034
|
+
* It is a feature already in Ruby 1.9.
|
1035
|
+
* Added Jim Weirich's BlankSlate class.
|
1036
|
+
* This is a temporary measure be compatible w/ AcitveSupport's BasicObject.
|
1037
|
+
* Split kernel/load.rb into require_all.rb and require_local.rb.
|
1038
|
+
* Split module/alias.rb up into alias_accessor, alias_module_function and alias_method_chain.
|
1039
|
+
* Renamed string/subtract to string/op_sub.
|
1040
|
+
Old name will remain for time being for compatability. [minor]
|
1041
|
+
* Moved style.rb to string/stylize.rb [minor]
|
1042
|
+
* Added warning to bytes to use RichUnits instead.
|
1043
|
+
* Updated warn line fore eventual deprecation of fileshell and arguments.*
|
1044
|
+
* Added facets-load.rb to allow old school cherry picking.*
|
1045
|
+
* Between 2.0 and 2.4 require 'facets' simply added core to LOAD_PATH.
|
1046
|
+
* Starting with 2.4 it loads all of core automatically instead.
|
1047
|
+
* facets-load.rb provides a way to use the old behavior.
|
1048
|
+
require 'facets-load.rb
|
1049
|
+
require 'kernel/with'
|
1050
|
+
require 'symbol/to_proc'
|
1051
|
+
* This adds the path to the end of LOAD_PATH to prevent any load conflicts.
|
1052
|
+
|
1053
|
+
* 5 Bug Fixes
|
1054
|
+
|
1055
|
+
* Fixed Time#hence changed years when changing months.
|
1056
|
+
* Fixed Time#hence to flip year correctly when adding months.
|
1057
|
+
* Hash#<< returns self
|
1058
|
+
* Fixed String#pathize.
|
1059
|
+
* Module#instance_method_defined? now only applies to public methods.
|
1060
|
+
|
1061
|
+
* Administrative Enhancements
|
1062
|
+
|
1063
|
+
* While not perceptible to an end user, there are now 3 divisions: lib/core, lib/lore, lib/more.
|
1064
|
+
* Modified script/test to display $LOAD_PATH before running tests.
|
1065
|
+
|
1066
|
+
## 2.4.2 / 2008-08-12
|
1067
|
+
|
1068
|
+
Just some more of those great old work your ass off changes.
|
1069
|
+
|
1070
|
+
Changes:
|
1071
|
+
|
1072
|
+
* Major Enhancements
|
1073
|
+
|
1074
|
+
* Added Ken Bloom's DictionaryMatcher class from Ruby Quiz #103.
|
1075
|
+
(Note this class will probably be renamed in the future.)
|
1076
|
+
* Changed File#rewrite to not use the inplace change of the string.
|
1077
|
+
* If you were using the function, change your code to use File#rewrite! instead.
|
1078
|
+
* Or, modify your code ot use the new behavior.
|
1079
|
+
* This change can make for a slippery bug, so be sure to check for it!
|
1080
|
+
* Moved live.rb to facets-live.rb.
|
1081
|
+
* Added kernel/instance method which provides a fluent interface to private object space.
|
1082
|
+
|
1083
|
+
* 5 Minor Enhancements
|
1084
|
+
|
1085
|
+
* Added sow generation forms.
|
1086
|
+
* Spilt Time#trunc into separate file.
|
1087
|
+
* Remove old log files --shouldn't version control these.
|
1088
|
+
* Added note to FileList to add glob options parameter.
|
1089
|
+
* Added optional argument to Dictionary#first and #last.
|
1090
|
+
|
1091
|
+
* Other Enhancements
|
1092
|
+
|
1093
|
+
* Move "lore" tests to test/lore (lore are extensions to Ruby's standard lib).
|
1094
|
+
* Added test/core, test/lore and test/more.
|
1095
|
+
* Added time/test_round.rb
|
1096
|
+
* Added array/recursively.
|
1097
|
+
* Added time/round.
|
1098
|
+
* Time#to_date makes the public (it already existed in Ruby!)
|
1099
|
+
* Fixed Time#hence to flip year correctly when adding months.
|
1100
|
+
* Work on documentation using new Sow system.
|
1101
|
+
* Moved meta.rb to more/kernel/meta.rb and merged facets/core.rb into facets.rb.
|
1102
|
+
* Added more/kernel directory --hey not every extension can be core.
|
1103
|
+
* Adjusted loadpath and moved lazy.rb to core!
|
1104
|
+
* Moved remaing files to subdirectory locations.
|
1105
|
+
* Moved most core libs to core/.
|
1106
|
+
* Move most more files to the more directory.
|
1107
|
+
* Added lore and more directories.
|
1108
|
+
* Added facets/core directory. Yes, I'm spiliting the lib again.
|
1109
|
+
* Loadpath will be used, so user inteface will stay the same.
|
1110
|
+
* Setup.rb will be adjusted to recognaize loadpath.
|
1111
|
+
* Removed Rope class. If anything this will have a separate project.
|
1112
|
+
* Moved setup.rb to script/setup.
|
1113
|
+
* This will either be replaced with configure/install scripts.
|
1114
|
+
* Or, depend on a separate ruby setup.rb project.
|
1115
|
+
* Added recorder.rb to consider in work directory.
|
1116
|
+
* Added admin directory.
|
1117
|
+
* Added "TO BE DEPRECATED" message to ruby.rb.
|
1118
|
+
* Added all methods from ruby.rb as individual core methods.
|
1119
|
+
* These are the methods that overlap with 1.9.
|
1120
|
+
* They are encased in 'unless RUBY_VERSION' caluses.
|
1121
|
+
* Imporved file/rootname --now much more robust.
|
1122
|
+
* Added Kernel#to_yamlfrag to yaml.rb as way to output yaml w/o the "---" header.
|
1123
|
+
* Perhaps not the most robust solution, but okay for now.
|
1124
|
+
* Maybe a poor name for the method, but you got a better one?
|
1125
|
+
* Made FileUtils#whereis a module_function again like it used to be. Because:
|
1126
|
+
(1) that seems to be the way most other FileUtils methods are (cd, mkdir, cp, ...) and the most
|
1127
|
+
obvious way that users would WANT to use FileUtils: FileUtils.whereis("ruby").
|
1128
|
+
(2) I see module_function used in other comparible parts of Facets: UploadUtils, ConsoleUtils,
|
1129
|
+
ZipUtils, FileUtils#safe_ln, ...
|
1130
|
+
(3) My code that relied on the old module_function behavior was breaking
|
1131
|
+
What were you thinking changing it?? ;)
|
1132
|
+
|
1133
|
+
|
1134
|
+
## 2.4.1 / 2008-04-03
|
1135
|
+
|
1136
|
+
This release takes aim at improving compatability with ActiveSupport.
|
1137
|
+
It also reintroduces an improved paramix.rb.
|
1138
|
+
|
1139
|
+
Changes:
|
1140
|
+
|
1141
|
+
* 4 Major Enhancements
|
1142
|
+
|
1143
|
+
* A much improved paramix.rb has been returned to the library.
|
1144
|
+
* There a no longer capitialize module methods at all.
|
1145
|
+
* Use Module#[] and mixin_params[] instead.
|
1146
|
+
* Deprecated behavior.rb. It was not robust.
|
1147
|
+
* Added basex.rb, for working in any encoding base using any character set (base62 is the default).
|
1148
|
+
|
1149
|
+
* 3 Minor Enhancements
|
1150
|
+
|
1151
|
+
* Comparing to ActiveSupport, found 63 extension clashes, but most are due to 1.9 features.
|
1152
|
+
The rest should be compatible.
|
1153
|
+
* Reatomized a number of Kernel and String methods. Reatomization is nearly complete.
|
1154
|
+
* Continued work on reatomizing core extensions (nearly complete now).
|
1155
|
+
|
1156
|
+
|
1157
|
+
## 2.4.0 / 2008-03-24
|
1158
|
+
|
1159
|
+
Facets 2.4 is a major step forward for Facets. It is perhaps the release
|
1160
|
+
that 2.0 should have been, but of course it took the actual 2.0 release
|
1161
|
+
to make 2.4 possible. Some annoyances you may have encountered in updating
|
1162
|
+
your code to 2.0 are now fixed. And from 2.4 on, Facets will now be
|
1163
|
+
settling down into simple refinement release cycles for a while.
|
1164
|
+
|
1165
|
+
The main change under the hood is to bring everything up to the top
|
1166
|
+
lib/facets/ directory. No longer are the libraries sorted by category.
|
1167
|
+
I had done so for a long time to make it easier to track the various libs,
|
1168
|
+
but in the end it was only making it more diffcult to deal with build tools
|
1169
|
+
and packaging.
|
1170
|
+
|
1171
|
+
For the end-user, the largest change is a new emphisis on:
|
1172
|
+
|
1173
|
+
require 'facets'
|
1174
|
+
|
1175
|
+
This is better than cherry-picking methods. It may seem counter-
|
1176
|
+
intuitive, but it actually proves more advantantages to do this
|
1177
|
+
for the sake of interoperability than the practice of cherry-picking.
|
1178
|
+
The reason is simply because others may have cherry-picked different
|
1179
|
+
methods, and those distinctions go unaccounted and untested.
|
1180
|
+
|
1181
|
+
Also with this release, to bolster the use of require 'facets',
|
1182
|
+
some lack-luster extensions have been deprecated and namespace usage
|
1183
|
+
has been improved. In addition, we are getting very close to full
|
1184
|
+
ActiveSupport, and Ruby 1.9, interoperability. Expect this
|
1185
|
+
to be complete in the next minor release or two.
|
1186
|
+
|
1187
|
+
Changes:
|
1188
|
+
|
1189
|
+
* Enhancements
|
1190
|
+
|
1191
|
+
* String#to_re and String#to_rx have swapped default behaviors. #to_rx escapes, #to_re does not.
|
1192
|
+
* The Console namespace is being deprecated. command.rb and arguments.rb now use CLI naemspace.
|
1193
|
+
* #compare_on and #equate_on are now "mixin methods" Comparable() and Equateable().
|
1194
|
+
* Enumerable#product, #combintations and #permutations have change to be Ruby 1.9 compatible.
|
1195
|
+
* thread.rb, map_send, et al, block is passed to send instead of yielding on result.
|
1196
|
+
* namespace.rb has been renamed to methodspace.rb.
|
1197
|
+
* Ruby 1.9 defined a new Proc#curry method, so Facets version has been made compatible.
|
1198
|
+
* The old curry method is now called #partial, as in "partial application".
|
1199
|
+
* Deprecated interface.rb. Perhaps a better approach but nonetheless extraneous.
|
1200
|
+
* Deprecated paramix.rb. A better way is to use a capitialized methods. (Perhaps a lib for that?)
|
1201
|
+
* Brought back a few web related libs, htmlfilter.rb and cssfilter.rb in particular.
|
1202
|
+
* camelcase and snakecase are core extensions. For specialized styles use String#style in style.rb.
|
1203
|
+
* Renamed ArgVector to CLI::Arguments
|
1204
|
+
* Moved one_nine.rb to ruby.rb
|
1205
|
+
* Moved test/test_one_nine.rb to test/test_ruby.rb.
|
1206
|
+
* Updated requires for "one_nine" to just "ruby" b/c of backports to 1.8.7.
|
1207
|
+
* Added warning to Rick Kilmers's unit system.
|
1208
|
+
* Moving Rich Kilmers's units system to it's own package.
|
1209
|
+
* Three are alternate unit systems available and Facets should work with any of them.
|
1210
|
+
* Will keep a fair amount of the Time extensions though.
|
1211
|
+
* Moved nil/status.rb to nilstatus.rb
|
1212
|
+
* Got rid of Method#curry and Method#partial since they just convert to Procs.
|
1213
|
+
* Made op_esc.rb a separate module rather thanan extension.
|
1214
|
+
* Deprecated with_reader, with_writer and with_accessor for attr_singleton_reader, &c.
|
1215
|
+
* Deprecated Hash#pairs_at. Use Hash#slice instead from core.
|
1216
|
+
* Fixed the namespaces of some extensions.
|
1217
|
+
* Added prime directory and files.
|
1218
|
+
* Removed all "prime" extension files.
|
1219
|
+
* Move mattr to module.
|
1220
|
+
* Fixed require bug in time methods.
|
1221
|
+
* Reverted memomize.rb back to original code --will come back to later.
|
1222
|
+
* Added stylizer.rb to replace stylize.rb
|
1223
|
+
* Array #recursively is not only called #traverse.
|
1224
|
+
* Added case/stylize methods to more/facets/string.
|
1225
|
+
* Renamed more/string/facets/titlecase to captialize_all.
|
1226
|
+
* Added uri and xoxo tests.
|
1227
|
+
* Progressive work on memoize and elementor.
|
1228
|
+
* Functor no longer privatizes =, == and =~.
|
1229
|
+
* Properly split conversion.rb.
|
1230
|
+
* Some string methods extracted from stylize.rb.
|
1231
|
+
* Moved random.rb to more/.
|
1232
|
+
* Renamed namespace.eb to methodspace.rb.
|
1233
|
+
* Moved autoreload to more/facets/kernel.
|
1234
|
+
* Removed old curry.rb.
|
1235
|
+
* Added cgi.rb with some standard extensions.
|
1236
|
+
* Deprecated paramix.rb.
|
1237
|
+
* Added xmlhash.rb and returned uri.rb extensions to the library.
|
1238
|
+
* Added #method_name to Date class.
|
1239
|
+
* Remove cut-bases AOP, now in it's own library.
|
1240
|
+
* Converted compare_on.rb to Paramtric Mixins.
|
1241
|
+
* Split fileutils up into individual methods.
|
1242
|
+
* Renamed console.rb to what it should be consoleutils.rb.
|
1243
|
+
* Update to command.rb integrating MasterCommand and Command into a single class.
|
1244
|
+
* Added options back into multiglob_r.
|
1245
|
+
* Improved cloneable.rb to be a true deep dup/clone mixin using Ken Bloom's suggestion.
|
1246
|
+
* Added tasksystem.rb.
|
1247
|
+
* Added enumerable/combinations.
|
1248
|
+
* Added openhash and tracepoint.
|
1249
|
+
|
1250
|
+
* Bug Fixes
|
1251
|
+
|
1252
|
+
* Fixed bug with #peek in stackable.
|
1253
|
+
* Fixed bug in Kernel#object_hexid.
|
1254
|
+
* Fixed bug in multiglob_r so it will NOT follow symlinks.
|
1255
|
+
* Fixed test_keyize.rb.
|
1256
|
+
|
1257
|
+
* Adminstrative Changes
|
1258
|
+
|
1259
|
+
* This was a fairly large and fast-paced update, so unfortunately not all changes are listed this time.
|
1260
|
+
* Added ri generation to setup.rb.
|
1261
|
+
* Updated README and allowed doc/ to be included in package.
|
1262
|
+
* Finally completed removal of all embedded tests.
|
1263
|
+
* Organized all libs between core, more, class and mixin.
|
1264
|
+
|
1265
|
+
|
1266
|
+
## 2.3.0 / 2008-02-01
|
1267
|
+
|
1268
|
+
Amoung other changes with this release, cloneable.rb is now a true deep
|
1269
|
+
dup/clone mixin; tracepoint.rb returns to the library.
|
1270
|
+
|
1271
|
+
Changes:
|
1272
|
+
|
1273
|
+
* 4 Major Enhancements
|
1274
|
+
|
1275
|
+
* Cloneable provides true deep cloning.
|
1276
|
+
* Moved hash_keyize.rb to CORE as hash/keyize.rb.
|
1277
|
+
* Added tracepoint.rb back to the library.
|
1278
|
+
* Added hash/collate.
|
1279
|
+
|
1280
|
+
* 3 Bug Fixes
|
1281
|
+
|
1282
|
+
* Fixed multiglob_r bug, so it will NOT follow symlinks.
|
1283
|
+
* Added a couple of missing binding requires.
|
1284
|
+
* Fixed test_keyize.rb.
|
1285
|
+
|
1286
|
+
* 6 Admistrative Changes
|
1287
|
+
|
1288
|
+
* Reorganized library into smaller groups: core, more, class and mixin.
|
1289
|
+
* Remove admin/svn subdir.
|
1290
|
+
* Remove admin/log.
|
1291
|
+
* Add admin tasks.
|
1292
|
+
* Moved admin tasks to admin directory.
|
1293
|
+
* Added admin directory.
|
1294
|
+
|
1295
|
+
|
1296
|
+
|
1297
|
+
## 2.2.1 / 2007-12-22
|
1298
|
+
|
1299
|
+
This release get rid of the underlying methods subdir.
|
1300
|
+
All method redirects are now in core, to ensure there
|
1301
|
+
are no more name clashes.
|
1302
|
+
|
1303
|
+
Changes:
|
1304
|
+
|
1305
|
+
* Method Renames
|
1306
|
+
|
1307
|
+
* Moved string/format.rb to string/wrap.rb.
|
1308
|
+
* Updated String#brief.
|
1309
|
+
* Moved binding/cflow.rb to caller.rb.
|
1310
|
+
* Moved core hash/keyize to more.
|
1311
|
+
|
1312
|
+
* Other Enhancements
|
1313
|
+
|
1314
|
+
* Fixed up binding extensions.
|
1315
|
+
|
1316
|
+
* Administrative Adjustments
|
1317
|
+
|
1318
|
+
* Got rid of methods subdir. All method redirects are in core/.
|
1319
|
+
* Moved doc/wiki to apiwiki b/c of Rubyforge's wiki.
|
1320
|
+
* Removed doc/api dir.
|
1321
|
+
* Added wiki.
|
1322
|
+
* Renamed a couple test tasks.
|
1323
|
+
* Update per-module/class files.
|
1324
|
+
* Moved methods and groups task to trash.
|
1325
|
+
* Added test class/remove_descendents.rb.
|
1326
|
+
* Added all remaining per-method require libs from methods/ (will need to wrok through these over time).
|
1327
|
+
* Added trash work directory.
|
1328
|
+
* Adjust text according to per-method file changes.
|
1329
|
+
* All hash method, but the conversion methods, are now represented in core/facets/hash.
|
1330
|
+
* Added a few more Hash per-method files.
|
1331
|
+
* Add per-method libs for hash.
|
1332
|
+
* Updated facets/string.rb.
|
1333
|
+
* Renamed ROLLRC to facets.roll.
|
1334
|
+
|
1335
|
+
|
1336
|
+
## 2.2.0 / 2007-12-13
|
1337
|
+
|
1338
|
+
This release provides improved rdocs and prepares facets for use with Ruby 1.9.
|
1339
|
+
It also adds Matthew Harris' duration.rb library. Bug thanks to Matthew!
|
1340
|
+
|
1341
|
+
Changes:
|
1342
|
+
|
1343
|
+
* Additions
|
1344
|
+
|
1345
|
+
* Added Matthew Harris' Duration class.
|
1346
|
+
* Added Hash#slice and Hash#except (didn't we have this before?)
|
1347
|
+
* Added registerable.rb, updated history.
|
1348
|
+
* Added #include_as to facets/namespace.rb.
|
1349
|
+
* Added op.rb to string.rb.
|
1350
|
+
* Added String/op.rb with String#- method.
|
1351
|
+
|
1352
|
+
* Method Renames and Reorganizations
|
1353
|
+
|
1354
|
+
* The name Array#unzip didn't makes sense, it was renamed to #modulate (though #collate seems better?)
|
1355
|
+
* Renamed Enumerable#collate to #mash (Map hASH); #collate and #graph remain aliases for the time being.
|
1356
|
+
* Renamed accessor #attributes to #instance_attributes.
|
1357
|
+
* Renamed Enumerable #collate to #mash. (old name, along with graph, will be an alias for time being)
|
1358
|
+
* Divided enumerable/collect into split.rb and each.rb as well.
|
1359
|
+
* Moved mapsend.rb to thread.rb.
|
1360
|
+
* Updated mapsend.rb to focus on threads.
|
1361
|
+
* Moved continuation extensions to more lib.
|
1362
|
+
|
1363
|
+
* Deprecations
|
1364
|
+
|
1365
|
+
* Deprecated Module#include_and_extend. Just use both silly.
|
1366
|
+
* More lib pp_s.rb has been removed. Use #pretty_inspect instead.
|
1367
|
+
* Removed continuation from core.
|
1368
|
+
* Removed pp_s.rb (use pretty_inspect) add continuation.rb.
|
1369
|
+
* Remove kernel/require_esc.rb.
|
1370
|
+
|
1371
|
+
* Other Enhancements
|
1372
|
+
|
1373
|
+
* integer/bitmask.rb has changed a bit --pun intended ;) Deprecated some methods and now use "~" instead of "-" to clear bits.
|
1374
|
+
* Split binding extensions up a bit more finely --eval.rb sprouted here.rb, self.rb and defined.rb.
|
1375
|
+
* Move Time#stamp out of conversion.rb and into time/ dir, and remove to_s alias.
|
1376
|
+
* Preliminary addition of Matthew Harris' excellent duration.rb lib (will integrate with times.rb better in future).
|
1377
|
+
* Minor edit to basicobject.rb in light of 1.9.
|
1378
|
+
* Minor adjustments to lazy.rb to fix warnings by Ruby 1.9.
|
1379
|
+
* Added if clauses to handle upcoming Ruby 1.9 gracefully. Facets should now be just about ready for use with 1.9.
|
1380
|
+
|
1381
|
+
* Documentation Enhancements
|
1382
|
+
|
1383
|
+
* A lot of rdoc updates to core extensions --as promised ;)
|
1384
|
+
* Just about every method now has at least a brief explinaiton and an example.
|
1385
|
+
|
1386
|
+
* Administrative Adjustments
|
1387
|
+
|
1388
|
+
* Moved task/config.yaml to meta/ per new Ratch.
|
1389
|
+
* Moved task/special to task/doc.
|
1390
|
+
* Updated todo list (in dev/).
|
1391
|
+
* Copied log/history.rd to CHANGES.
|
1392
|
+
* Removed log/history.rd and log/todo.rd
|
1393
|
+
* Fixed stylize.rb for use with 1.9 (fixed case statement).
|
1394
|
+
* Separated kernel/returning, now that #tap will be in 1.9.
|
1395
|
+
* Updated facets.rb for use with 1.9.
|
1396
|
+
* Separated time/stamp.rb.
|
1397
|
+
* Divided binding up into a few more pieces.
|
1398
|
+
* Fixed kernel/instance to play nice with 1.9.
|
1399
|
+
* Added test for string/op.rb.
|
1400
|
+
* Added test_collect.rb split-offs and test_mash inplace of test_collate.
|
1401
|
+
* Cleanup test headers.
|
1402
|
+
* Added 1.9 check in continuation/create.rb.
|
1403
|
+
* Add a couple new task for rdoc gen.
|
1404
|
+
* Added nbsp to quickopts task.
|
1405
|
+
* Work on website using siteparts.
|
1406
|
+
|
1407
|
+
|
1408
|
+
## 2.1.3 / 2007-11-28
|
1409
|
+
|
1410
|
+
This release fixes four bugs --one being fairly serious, as it prevented
|
1411
|
+
require 'facets' from working at all.
|
1412
|
+
|
1413
|
+
Changes:
|
1414
|
+
|
1415
|
+
* 4 Bug Fixes
|
1416
|
+
|
1417
|
+
* Fixed oddity in Enumerable/collate.
|
1418
|
+
* Fixed issue that prevented loading of facets.rb.
|
1419
|
+
* Array#to_h used flatten, but it needed to be flatten(1).
|
1420
|
+
* Move core/main.rb back to core/facets.rb as it conflicts with lib in more/.
|
1421
|
+
|
1422
|
+
|
1423
|
+
## 2.1.2 / 2007-11-22
|
1424
|
+
|
1425
|
+
Changes:
|
1426
|
+
|
1427
|
+
* Additions
|
1428
|
+
|
1429
|
+
* Added Exception#details.
|
1430
|
+
|
1431
|
+
* General Enhancements
|
1432
|
+
|
1433
|
+
* Dir::multiglob no longer handels -/+ modifiers. Use FileList instead.
|
1434
|
+
|
1435
|
+
* Administrative Adjustments
|
1436
|
+
|
1437
|
+
* Fixed task/install script.
|
1438
|
+
* Improved task/changes.
|
1439
|
+
|
1440
|
+
|
1441
|
+
## 2.1.1 / 2007-11-16
|
1442
|
+
|
1443
|
+
Changes:
|
1444
|
+
|
1445
|
+
* Additions
|
1446
|
+
|
1447
|
+
* Added kernel/ergo.rb.
|
1448
|
+
* Added pp_s.rb (Questionable addition, but we'll leave it for now.)
|
1449
|
+
* Added validation.rb. This is here for Nitro's sake --better techinques may replace it in the future.
|
1450
|
+
* Added Console::Logger to logger.rb (may be separated in future).
|
1451
|
+
* Added option arity to command.rb.
|
1452
|
+
|
1453
|
+
* Deprecations
|
1454
|
+
|
1455
|
+
* Removed tracepoint.rb.
|
1456
|
+
|
1457
|
+
* Bug Fixes
|
1458
|
+
|
1459
|
+
* Fixed bug in command.rb that clobbered options.
|
1460
|
+
* Fixed options bug in command.rb.
|
1461
|
+
|
1462
|
+
|
1463
|
+
## 2.1.0 / 2007-11-10
|
1464
|
+
|
1465
|
+
Major changes include a new and much-improved command.rb, a new BiCrypt
|
1466
|
+
class for simple two-way crypotgraphy, as well as attr_reader!,
|
1467
|
+
attr_writer! and attr_accessor! for flag attributes, plus
|
1468
|
+
alias_xxx methods for all attr_xxx methods.
|
1469
|
+
|
1470
|
+
Changes:
|
1471
|
+
|
1472
|
+
* Additions
|
1473
|