Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Facets Release History

## Unreleased
## 4.2.0 / 2026-11-17

This release brings back four libraries that began in Facets and were
later kept as gems of their own: number bases (Radix), object
introspection (Instance, now `Mirror`), parametric mixins (Paramix) and
string masks (Strmask). The number bases load with `require 'facets'`;
the other three are loaded on request.

Changes:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

**More of Ruby, one method at a time.** Facets is a collection of extensions to Ruby's core classes and standard library, plus a few small, reusable classes and modules. Most methods live in their own files, so you can load one extension, a class's extensions, or the core collection.

Facets took its name in 2004, growing out of a small methods library started in 2002, and is still maintained. The current release is **4.1.0**, which requires **Ruby 3.1 or newer**. See the [release history](HISTORY.md) for changes and migration notes from earlier versions. The `main` branch also contains changes awaiting the next release.
Facets took its name in 2004, growing out of a small methods library started in 2002, and is still maintained. The current release is **4.2.0**, which requires **Ruby 3.1 or newer**. See the [release history](HISTORY.md) for changes and migration notes from earlier versions. The `main` branch also contains changes awaiting the next release.

## Install

Expand Down
9 changes: 8 additions & 1 deletion docs/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
<id>https://rubyworks.github.io/facets/</id>
<link href="https://rubyworks.github.io/facets/"/>
<link href="https://rubyworks.github.io/facets/atom.xml" rel="self" type="application/atom+xml"/>
<updated>2026-11-08T00:00:00Z</updated>
<updated>2026-11-17T00:00:00Z</updated>
<author><name>Ruby Facets</name></author>
<entry>
<title>Ruby Facets 4.2.0</title>
<id>https://rubyworks.github.io/facets/news.html#facets-4-2-0</id>
<link href="https://rubyworks.github.io/facets/news.html#facets-4-2-0"/>
<updated>2026-11-17T00:00:00Z</updated>
<summary>Adds number bases up to 62, and brings back Mirror, Paramix and String::Mask as opt-in libraries.</summary>
</entry>
<entry>
<title>Ruby Facets 4.1.0</title>
<id>https://rubyworks.github.io/facets/news.html#facets-4-1-0</id>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>More of Ruby,<br><em>one method</em><br>at a time.</h1>
<a class="button button-primary" href="learn.html">Get started <span aria-hidden="true">↗</span></a>
<a class="button button-outline" href="https://github.com/rubyworks/facets">Explore the source <span aria-hidden="true">↗</span></a>
</div>
<p class="hero-note">Version <strong>4.1.0</strong> <span aria-hidden="true">·</span> Ruby <strong>3.1+</strong> <span aria-hidden="true">·</span> BSD 2-Clause</p>
<p class="hero-note">Version <strong>4.2.0</strong> <span aria-hidden="true">·</span> Ruby <strong>3.1+</strong> <span aria-hidden="true">·</span> BSD 2-Clause</p>
</div>
<div class="hero-visual" aria-label="Ruby Facets code example">
<div class="orbit orbit-one"></div><div class="orbit orbit-two"></div>
Expand Down Expand Up @@ -57,5 +57,5 @@ <h1>More of Ruby,<br><em>one method</em><br>at a time.</h1>
</section>

<section class="section release-section">
<div class="shell release-grid"><div><p class="kicker kicker-light">LATEST RELEASE</p><h2>Fresh facets<br>for modern Ruby.</h2><p>Version 4.1 makes the methods Facets shares with ActiveSupport work the same in both, so it no longer matters which one loads last, and stops Facets from changing what Ruby's own methods do. Version 4.0 made <code>#try</code> strict and <code>#try!</code> lenient, added a <code>lib/rails</code> area for Rails-compatible methods, and gave every deprecation a removal date.</p><a class="button button-light" href="news.html">Read the release notes <span aria-hidden="true">↗</span></a></div><div class="release-stamp"><span class="release-stamp-small">RUBY FACETS</span><strong>4.1.0</strong><span>NOVEMBER 2026</span></div></div>
<div class="shell release-grid"><div><p class="kicker kicker-light">LATEST RELEASE</p><h2>Fresh facets<br>for modern Ruby.</h2><p>Version 4.2 adds conversion to any number base up to 62, and brings back <code>Mirror</code>, <code>Paramix</code> and <code>String::Mask</code> as libraries you load when you want them. Version 4.1 made the methods Facets shares with ActiveSupport work the same in both. Version 4.0 made <code>#try</code> strict and <code>#try!</code> lenient, added a <code>lib/rails</code> area for Rails-compatible methods, and gave every deprecation a removal date.</p><a class="button button-light" href="news.html">Read the release notes <span aria-hidden="true">↗</span></a></div><div class="release-stamp"><span class="release-stamp-small">RUBY FACETS</span><strong>4.1.0</strong><span>NOVEMBER 2026</span></div></div>
</section>
2 changes: 1 addition & 1 deletion docs/learn.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
---
<section class="page-hero"><div class="shell"><p class="eyebrow"><span class="eyebrow-line"></span> THE GUIDE</p><h1>Find your way<br><em>into Facets.</em></h1><p>Install the gem, choose how much to load, and make Ruby feel a little more like yours.</p></div></section>
<section class="section section-light"><div class="shell guide-grid"><aside class="guide-aside"><p class="kicker">ON THIS PAGE</p><a href="#install">Install</a><a href="#load">Load extensions</a><a href="#examples">Try a few methods</a><a href="#reference">Find the API</a></aside><div class="guide-content">
<section id="install" class="guide-block"><p class="kicker">01 / GET READY</p><h2>Install Facets</h2><p>Facets 4.1.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.</p><div class="snippet"><div class="snippet-label">TERMINAL</div><pre><code>gem install facets</code></pre></div><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: false</code></pre></div><p><code>require: false</code> keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.</p><p>To have Bundler load only certain extensions, for example in a Rails app, list their files instead:</p><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']</code></pre></div></section>
<section id="install" class="guide-block"><p class="kicker">01 / GET READY</p><h2>Install Facets</h2><p>Facets 4.2.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.</p><div class="snippet"><div class="snippet-label">TERMINAL</div><pre><code>gem install facets</code></pre></div><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: false</code></pre></div><p><code>require: false</code> keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.</p><p>To have Bundler load only certain extensions, for example in a Rails app, list their files instead:</p><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']</code></pre></div></section>
<section id="load" class="guide-block"><p class="kicker">02 / CHOOSE YOUR SCOPE</p><h2>Load what fits</h2><p>Most core extension methods are stored in individual files. You can require one method, a class's core methods, or the core collection.</p><div class="snippet"><div class="snippet-label">RUBY</div><pre><code><span class="code-comment"># One method</span>
require 'facets/array/to_ranges'

Expand Down
3 changes: 2 additions & 1 deletion docs/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
---
<section class="page-hero"><div class="shell"><p class="eyebrow"><span class="eyebrow-line"></span> RELEASES & HISTORY</p><h1>A living Ruby<br><em>collection.</em></h1><p>Facets has been growing since 2004. Here are the recent releases and a path back through its story.</p></div></section>
<section class="section section-light"><div class="shell"><div class="section-heading narrow"><p class="kicker">LATEST RELEASES</p><h2>Facets 4</h2><p>Facets 4 continues the modernization begun in 3.2 for Ruby 3.1 and newer. The 3.2.0 release changed enough that it should have been 4.0.0; 4.0.0 makes the next round of changes under the right number.</p></div><div class="timeline">
<article class="timeline-item" id="facets-4-1-0"><div class="timeline-date"><strong>4.1.0</strong><span>08 NOV 2026</span></div><div><p class="tag">LATEST</p><h3>Out of Ruby's way</h3><p>Makes the methods Facets shares with ActiveSupport behave as ActiveSupport's do, so it no longer matters which library loads last. Stops Facets from changing what Ruby's own methods do, including <code>Hash#count</code> and <code>Array#shelljoin</code>, and deprecates the block form of <code>Kernel#extend</code>.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#410--2026-11-08">Read changes <span aria-hidden="true">↗</span></a></div></article>
<article class="timeline-item" id="facets-4-2-0"><div class="timeline-date"><strong>4.2.0</strong><span>17 NOV 2026</span></div><div><p class="tag">LATEST</p><h3>Old friends return</h3><p>Adds <code>Integer#to_base</code> and <code>String#from_base</code> for any base from 2 to 62, and a <code>:flush</code> option for <code>String#margin</code>. Brings back three libraries that began in Facets, each loaded on request: <code>Mirror</code> for looking inside any object, <code>Paramix</code> for parametric mixins, and <code>String::Mask</code>. Fixes <code>String#dashcase</code>, <code>Dir.multiglob</code>, <code>Array#delete_first</code> and the salt <code>Crypt3</code> generates.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#420--2026-11-17">Read changes <span aria-hidden="true">↗</span></a></div></article>
<article class="timeline-item" id="facets-4-1-0"><div class="timeline-date"><strong>4.1.0</strong><span>08 NOV 2026</span></div><div><h3>Out of Ruby's way</h3><p>Makes the methods Facets shares with ActiveSupport behave as ActiveSupport's do, so it no longer matters which library loads last. Stops Facets from changing what Ruby's own methods do, including <code>Hash#count</code> and <code>Array#shelljoin</code>, and deprecates the block form of <code>Kernel#extend</code>.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#410--2026-11-08">Read changes <span aria-hidden="true">↗</span></a></div></article>
<article class="timeline-item" id="facets-4-0-1"><div class="timeline-date"><strong>4.0.1</strong><span>02 NOV 2026</span></div><div><h3>Safer shell escaping</h3><p>Stops <code>facets/shellwords</code> from replacing Ruby's <code>Shellwords.escape</code> with a version that left shell metacharacters unescaped, lets Rails apps that load Facets boot again, and fixes several methods that broke on Ruby 3.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#401--2026-11-02">Read changes <span aria-hidden="true">↗</span></a></div></article>
<article class="timeline-item" id="facets-4-0-0"><div class="timeline-date"><strong>4.0.0</strong><span>27 SEP 2026</span></div><div><h3>Clearer by design</h3><p>Makes <code>#try</code> strict and <code>#try!</code> lenient, moves Rails-compatible methods to a new <code>lib/rails</code> area, and schedules every deprecation for removal after 2027-09-30.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#400--2026-09-27">Read changes <span aria-hidden="true">↗</span></a></div></article>
<article class="timeline-item" id="facets-3-2-2"><div class="timeline-date"><strong>3.2.2</strong><span>15 JUN 2026</span></div><div><h3>Compatibility, polished</h3><p>Fixes range intersection on Ruby 3.1 and 3.2, restores <code>Range#overlap?</code> where Ruby does not provide it, and corrects <code>Binding#caller_locations</code> argument handling.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#322--2026-06-15">Read changes <span aria-hidden="true">↗</span></a></div></article>
Expand Down
2 changes: 1 addition & 1 deletion lib/core/facets/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Facets
VERSION = '4.1.0'
VERSION = '4.2.0'
end
Loading