Ruby Facets v2.4.3 Release Notes

Release Date: 2008-08-14 // almost 16 years ago
  • ๐Ÿ’Ž Facets is almost fully interoperable with ActiveSupport and Ruby 1.9. ๐Ÿš€ We will continue to improve this interoperability in upcoming releases.

    As a REMINDER, Facets 2.4+ now encourages:

    require 'facets'

    ๐Ÿ‘€ This is better than cherry-picking methods. It may seem counter-intuitive, but it actually proves more advantages to do this for the sake of ๐Ÿ‘Œ improved interoperability. The practice of cherry-picking can become problematic if other dependent libraries have cherry-picked different โœ… methods. In those cases these distinctions go unaccounted and untested.

    ๐Ÿš€ Note that this release does not include a setup.rb script. We are working ๐Ÿš€ on a new version of this script, which we plan to include in the next release.

    ๐Ÿš€ This release give special thanks to the following people for their contributions: Ken Bloom, Nick Caruso, Evgeniy Dolzhenko, Andy Freeman, Tomasz Muras and Dave Myron. And of course, to anyone else I failed to mention that has contributed.

    ๐Ÿš€ (NOTE: 2.4.3's changes may actually be long to 2.4.2. Notice the releases are only two days apart. There was an issue with 2.4.2 and it had to be replaced immediately. So take the distinct with a grain of salt.)

    ๐Ÿ”„ Changes:

    • โž• Additions

      • Add Time#trunc and Time#round to Core.
      • Add Array#recursively and fixed bug in Hash#recursively.
      • Add Kernel#instance method which provides a fluent interface to private object space.
      • Add Symbol#plain?, Symbol#query? and Symbol#setter?
      • Add Hash#symbolize_keys and #stringify_keys.
      • Add File#split_root.
      • Add #glob and #glob_first as extensions to Pathname.
      • Add NilClass#ergo whic points back to kernel/ergo.
      • Add #bump method to VersionNumber class.
      • Add String#mask providing powerful string manipulation.
      • Add Ken Bloom's DictionaryMatcher class (will be renamed in future version)
    • ๐Ÿ—„ Deprecations

      • Deprecate Hash#keys_to_s and Hash#keys_to_sym.
      • These are the original versions of these methods.
      • But now we can use #rekey(:to_s) and #rekey(:to_sym) instead.
      • Deprecat ruby.rb, which was a sort 1.9 compatibility layer.
    • 22 Major Enhancements

      • Changed File#rewrite to not use the in-place change of the string.
      • Renamed Class#to_pathname and #to_methodname to #pathize and #methodize.
      • Removed Console:: namespace for ANSICode.
      • Moved Mentalguy's lazy.rb to core!
      • Added Indexable and Stackable to core.
      • BasicObject is now just a synonm for BlankSlate unless Ruby 1.9. [major]
      • Moved Indexable and Stackable to core.
      • Renamed arguments.rb and CLI::Arguments to argvector.rb and Argvector.
      • Added optional argument to Dictionary#first and #last.
      • Moved binding/opvars from core to more.
    • 19 Minor Enhancements

      • Improved File#rootname --it is now more robust.
      • Made FileUtils#whereis a module_function again.
      • Created Lore library to house extensions to Ruby's standard library.
      • Re-added facets class files (eg. facets/string) and are now dynamic.
      • Added block to Array#index.
      • This is one of the few core overrides in Facets.
      • It is a feature already in Ruby 1.9.
      • Added Jim Weirich's BlankSlate class.
      • This is a temporary measure be compatible w/ AcitveSupport's BasicObject.
      • Split kernel/load.rb into require_all.rb and require_local.rb.
      • Split module/alias.rb up into alias_accessor, alias_module_function and alias_method_chain.
      • Renamed string/subtract to string/op_sub. Old name will remain for time being for compatability. [minor]
      • Moved style.rb to string/stylize.rb [minor]
      • Added warning to bytes to use RichUnits instead.
      • Updated warn line fore eventual deprecation of fileshell and arguments.*
      • Added facets-load.rb to allow old school cherry picking.*
      • Between 2.0 and 2.4 require 'facets' simply added core to LOAD_PATH.
      • Starting with 2.4 it loads all of core automatically instead.
      • facets-load.rb provides a way to use the old behavior. require 'facets-load.rb require 'kernel/with' require 'symbol/to_proc'
      • This adds the path to the end of LOAD_PATH to prevent any load conflicts.
    • ๐Ÿ›  5 Bug Fixes

      • Fixed Time#hence changed years when changing months.
      • Fixed Time#hence to flip year correctly when adding months.
      • Hash#<< returns self
      • Fixed String#pathize.
      • Module#instance_method_defined? now only applies to public methods.
    • Administrative Enhancements

      • While not perceptible to an end user, there are now 3 divisions: lib/core, lib/lore, lib/more.
      • Modified script/test to display $LOAD_PATH before running tests.