Facets 2.8.3 released

Just released Facets 2.8.3. Release notes are below. This release
should be the last in the 2.8.x series. The next release, in fact,
will be 3.0 as Facets will be making the transition of a modular
design instead of adding extension methods directly into core classes.
Please let me know if you have any thoughts/concerns about this.

Release Notes

This release makes a few adjustments in Kernel core extensions, adds a
few new extensions, plus some additions, and other small improvements.
Probably the biggest change is the addition of Recusor, which is
created via Enumerable#recursive. This class is somewhat like
Enumerator and provides a number of recursive methods. Be sure to note
the couple of extensions that have been renamed as those are the most
likely to cause issues when upgrading.

Changes:

  • 9 New Core Extensions

    • Enumerable#recursive provides a number of other recursive methods.
    • Enumerable#visit can be used to recursively iterate any
      Enumerable.
    • Module#set has been added (from Sinatra).
    • Symbol#/ is added to be like String#/.
    • Struct#to_h is added and will ultimately replace
      Struct#attributes.
    • ObjectSpace#reflect routes method calls to Kernel context.
    • Hash#to_module converts a hash to mixin module (Jay Fields).
    • Kernel#dup! is same as #try_dup from extlib.
    • Add File#ext which is a useful variation of #extname (Lavir the
      Whiolet).
  • 3 Core Extensions Renamed

    • renamed #set_from to #assign_from (but kept #set_from as alias
      while Kernel#set is considered).
    • rename #populate to #assign and improved.
    • Kernel#instance_vars is now Kernel#instance, and also more useful.
  • 1 Core Deprecation

    • Removed #instance_eval hack.
  • 2 Core Bug Fixes

    • #map_with_index now uses #each_with_index.
    • #to_proc_with_response spelling correction.
  • 1 Core Adjustment

    • Aliased #metadef to #meta_def.
  • 3 New More Libraries

    • casting_hash.rb provides CastingHash class, a hash with flexible
      keys and values.
    • prepend.rb allows for AOP-like inclusion of modules.
    • roman.rb provides simple roman numeral extensions to String and
      Integer.
  • 5 More Improvements

    • Pathname#visit for iterating all entries beneath a path
      (chikamichi).
    • Pathname#to_str, b/c Pathname is basically a type of String (from
      extlib).
    • Range#at_rand in random.rb handles Float ranges (Lavir the
      Whiolet).
    • FileUtils#cp_rx provides controlled copies.
    • Stash class in stash.rb is improved and is now available as a
      stand-alone library.
  • 2 More Deprecations

    • ioredirect.rb has been removed as IORedirect no longer worked.
    • plugin_manager.rb has been removed. Use ‘plugin’ gem instead.

On Apr 10, 6:38 pm, Intransition [email protected] wrote:

Just released Facets 2.8.3. Release notes are below. This release
should be the last in the 2.8.x series. The next release, in fact,
will be 3.0 as Facets will be making the transition of a modular
design instead of adding extension methods directly into core classes.
Please let me know if you have any thoughts/concerns about this.

FYI. Looks like I won’t be moving Ruby F.s to a modular design
after all! My main reason for doing so was to finally give-in and
conform to ActiveSupport’s way of doing things, so that the two libs
could play nice without issue or special conditional clauses. So often
I’ve see people write extensions emulating how ActiveSupport handled
it with mixin modules (b/c presumably that’s where they learned how to
do it), and I would often suggest they not bother with all that and
just insert the extensions directly. But I was always told they wanted
to “do the right thing” and play nice with ActiveSupport. But the
truth is, using modules provides a false sense of security --nothing
of significant import is gained by it. Well, lo and behold, the guys
over at ActiveSupport must have finally seen the light, because I was
just perusing the new 3.0 lib and all the mixin modules are gone!. All
I can say is “Thank the Maker”! While using modules has some benefits
in documenting niceties, both in RDoc and error messages, they were
fraught with issues like the Double Inclusion Problem, the need for
separate modules for metaclass extensions, and worst of all, as I
mentioned, forcing everyone else to do the same thing in order to
coexist.

So whomever is responsible for this change over there at the
“Railroad”. Thank You! You just made my life, and ultimately everyone
else’s, a whole lot easier.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs