Skip to content

Update dependency toys to '~> 0.24.0' - #180

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/toys-packages
Open

Update dependency toys to '~> 0.24.0'#180
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/toys-packages

Conversation

@renovate

@renovate renovate Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
toys (source, changelog) '~> 0.19.1''~> 0.24.0' age confidence

Release Notes

dazuma/toys (toys)

v0.24.0: toys 0.24.0

v0.24.0 / 2026-09-11
  • Feature: The toys do builtin provides an --on-missing-gem flag that governs how the --gem flag handles gems that are not installed.
  • BREAKING CHANGE: Removed deprecated gem_version: argument from :rspec and :minitest templates.

v0.23.0: toys 0.23.0

v0.23.0 / 2026-09-09

This is a major release, with several new features. It also includes a significant refactor of some of the underlying layers, which should be mostly invisible. It is a release candidate for the upcoming version 1.0.

Highlights include:

  • Added the ability to treat unknown flags as positional args via the treat_unknown_flags_as_args DSL directive. Useful for wrapping and delegating to other commands.
  • The do builtin tool supports --gem=, --git=, and --path= flags that make additional tool sources available.
  • Running tools from within a tool should generally now be done via the new Toys::Runner object, now available in the runtime context, instead of via the Toys::CLI. The new object provides finer-grained control over error handling and verbosity.
  • Updates to error handling to improve the output and fix some long-standing issues related to tool delegation.
  • Several fixes to bundler integration, especially with Bundler 4.

Details follow.

  • Changes to tool definition:

    • Added the treat_unknown_flags_as_args DSL directive (and the corresponding ToolDefinition#treat_unknown_flags_as_args setter and ToolDefinition#unknown_flags_are_args? query), which redirects unrecognized flags to the tool's positional arguments instead of reporting a usage error. Useful for wrapping and delegating to other commands.
    • The set_context_directory DSL directive can now take Pathname arguments and handles relative paths (by expanding to absolute paths).
    • When two or more flags are declared using the same context key, within a flag group, the flag group's requirements now evaluate correctly.
    • A flag or optional/remaining positional argument declared with a nil default no longer clears default data already set for the same key by an earlier declaration.
    • Toys now raises Toys::ToolDefinitionError if you attempt to "reset" a tool previously defined using a Toys::Tool subclass.
    • SECURITY FIX: Toys now raises Toys::ToolSourceError if a tool loaded from a RubyGem attempts to load tools from the local file system.
    • BREAKING CHANGE: Toys now raises Toys::ToolDefintionError if you attempt to create or descend into a subtool from a subtool_apply block or a middleware-based config.
    • Caught additional cases of incorrectly located Toys::Tool subclasses and raised Toys::ToolDefinitionError
    • Toys directory contents are loaded in deterministic (sorted) order.
  • Changes to tool execution:

    • Added Toys::Context#runner for access to the Toys::Runner object. This is now the preferred way to run tools from within other tools (instead of Toys::CLI#run), unless you need to change the configuration.
    • Added Toys::Context#loader for access to the Toys::Loader object.
    • BREAKING CHANGE: Toys::Context#context_directory, and Toys::Context#get with the associated context key, now never return nil. If no context directory is set for the tool, these now return the current working directory.
    • BREAKING CHANGE: Removed git- and gem- specific attributes from Toys::SourceInfo and replaced with Toys::SourceInfo#origin.
    • Standard context keys and sentinels use the new class Toys::UniqueKey, which displays useful names in diagnostic output.
    • Delegation now propagates the caller's verbosity to the delegate target, rather than resetting it to zero.
    • When a tool delegates, a SignalException unhandled by the inner tool now propagates outward so each tool in the delegation chain gets a chance at its own on_interrupt / on_signal handler.
    • A nested run that shares a logger with the run that called it now uses the base level already in effect for that logger, so verbosity no longer compounds across nested runs.
    • Revamped the output and stack trace printed when an exception occurs.
  • Changes to shell completion:

    • Fixed shell completion for non-flag words containing = or :: completions are now computed against the whole word, and the engine trims candidates to the span the shell will actually replace.
    • Zsh completion now replaces the entire word rather than only the text after an = or :, matching how zsh actually handles word breaks; bash continues to break at = and :.
    • Word-break trimming for bash now ignores = and : characters that were quoted or backslash-escaped, since the shell does not break a word at a quoted character.
    • Subtool completion now uses the loader's configured delimiters to decide where a tool path ends, rather than a separate regex over the fragment prefix, so completing a partially typed tool path works consistently with any configured extra delimiters.
  • Changes to builtin tools:

    • The do builtin tool supports --gem=, --git=, and --path= flags that make additional tool sources available.
  • Changes to CLI interfaces:

    • Toys::CLI#child accepts copy_sources: true, which populates the new CLI's loader with the same sources as the original. This makes it easy to create a new CLI with additional sources on top of the current.
    • You can get the Toys::Runner for a CLI using Toys::CLI#runner, providing a way to customize the run process more closely than using Toys::CLI#run.
    • Added add_source method that takes an instance of the new Toys::SourceSpec types that describe a tool source. This method replaces the now deprecated add_config_* methods (although those methods will continue to be supported for a time). In general, the "config" terminology is being retired in favor of "source" which I think better describes what is going on.
    • BREAKING CHANGE: The config_file_name and config_dir_name arguments to CLI have been renamed to toplevel_tool_file_name and toplevel_tool_dir_name, respectively, as part of a general removal of the "config" term. The old names are not aliased.
    • BREAKING CHANGE: Toys::CLI#run no longer accepts the delegated_from: keyword argument. Tool delegation is now handled internally and its runtime is not exposed in the public interface.
    • BREAKING CHANGE: Renamed the StandardCLI::CONFIG_DIR_NAME to StandardCLI::TOPLEVEL_TOOL_DIR_NAME and StandardCLI::CONFIG_FILE_NAME to StandardCLI::TOPLEVEL_TOOL_FILE_NAME.
    • BREAKING CHANGE: Removed the constants INDEX_FILE_NAME, PRELOAD_DIR_NAME, PRELOAD_FILE_NAME, DATA_DIR_NAME, and LIB_DIR_NAME from StandardCLI.
    • The Toys::StandardCLI constructor now takes git_cache and gems_util keyword arguments letting you customize the objects used to resolve git and gem sources.
    • Path parameters for the methods that add sources, such as path and context_directory, can now take Pathname objects and can handle relative paths properly (by expanding them into absolute paths).
  • Rubygems/Bundler integration changes:

    • Bundler integration requires Bundler 2.4 or later. This is the default on Ruby 3.2, but requires that Bundler is updated on earlier Rubies.
    • Bundler integration properly detects provenance attributes such as path: and git:.
    • Calling bundler integration with a nonempty group list no longer loses gems that were already loaded.
    • Bundler integration now honors BUNDLE_LOCKFILE (new in Bundler 4) and stops leaking it from the modified bundle.
  • Other fixes

    • Terminal mixin now raises the correct ArgumentError (instead of NameError) if given an unknown style code.
    • Toys::Loader#list_subtools now ensures returned tools have been finished by their middleware. This affects listing tools not underneath the currently running tool.

A number of additional minor breaking changes were made to internal interfaces in the toys-core gem classes. It is unlikely you will encounter these unless you are extending the framework, but you can see the toys-core changelog for details.

v0.22.0: toys 0.22.0

v0.22.0 / 2026-05-05

Toys 0.22 is a major release focused on polish and cleanup in preparation for version 1.0. It includes a number of small breaking changes where needed to clean up the interfaces. (Note that many of the changes listed below are actually in the toys-core gem.)

Breaking interface changes:

  • The static directive no longer "forces" creating of helper methods, instead using the same logic as the flag and argument directives. In particular, by default it will not create a method starting with underscore.
  • Removed Toys::Settings and moved inheritable_helper_methods to a dedicated tool attribute. Use the basic_settings gem if you need the old settings class.
  • Toys::Acceptor#create no longer takes a hash as the spec. (This was undocumented but worked previously.) To construct an object, pass the class as the main spec object, and the keyword arguments in the options.
  • Toys::Acceptor::Enum#values now returns the values themselves instead of a zipped array that includes strings.
  • Toys::FlagGroup::Base is no longer instantiable; use Toys::FlagGroup::Optional instead.
  • The acceptor and display_name attributes of Toys::PositionalArg are no longer writable and must be set in the constructor.
  • Toys::Completion#create no longer takes a hash as the spec. (This was undocumented but worked previously.) To construct an object, pass the class as the main spec object, and the keyword arguments in the options.
  • The delegation_target attribute of Toys::ToolDefinition::DefaultCompletion is no longer writable and must be set in the constructor.
  • You can no longer override a completion class using the :"" key. (This was undocumented but worked previously.) Just pass a fully constructed completion object if you need a custom object.
  • The original Module#include method is now available in the DSL as include_module instead of super_include.
  • Template classes no longer automatically include Toys::Context::Key. This behavior was undocumented and inconsistent between different ways of defining templates.
  • Made Toys::CLI#load_tool return the block value rather than the exit_code.
  • Made Toys::Testing#toys_load_tool return the block value rather than the exit_code
  • Dropped undocumented Loader#add_path_set option to include individual source names in the relative_paths argument.
  • Renamed use_less in the Toys::StandardMiddleware::ShowHelp constructor to use_pager, and added support for custom pagers.
  • Renamed many of the methods in StandardUI to reduce confusion.
  • Removed LoaderError and used ToolDefinitionError for those cases, as it was decided that the distinction was ambiguous and dependent on internal details.
  • Removed ContextualError#underlying_error as it was synonymous with cause.
  • Consolidated ContextualError public interface into a single capture method.
  • ArgParser::ExtraArgumentsError now takes :arguments instead of :values, and provides an accessor for the same.
  • ArgParser::ToolUnrecognizedError now takes :full_name instead of :values, and provides an accessor for the same.
  • Renamed ArgParser::UsageError#full_message to message_with_suggestions to avoid overriding Exception#full_message.

New features:

  • The range acceptor supports beginless and endless ranges.
  • A custom source_name can be provided to Loader#add_path_set, Loader#add_git, and Loader#add_gem.
  • The :gems mixin provides a context key for retrieving the underlying Toys::Utils::Gems service object.
  • The :gems mixin provides an explicit Toys::Utils::Gems::ClassMethods module defining the directives added to the tool class.
  • The activate and bundle methods in the Gems utility now return useful results.

Other fixes:

  • The :update argument to the load_git directive had no effect if the :as argument was provided.
  • FlagValueUnacceptableError and ArgValueUnacceptableError have their value set correctly.
  • If a CLI has a static (shared) logger, creating a child with logger: nil actually clears it.
  • Removed unused Toys::StandardMiddleware::ShowHelp::TOOL_NAME_KEY.
  • ShowHelp middleware displays an error message instead of raising an exception when help cannot be generated due to a bad search regex.
  • ArgParser::UsageError is now a proper exception.
  • ContextualError does a better job of capturing relevant syntax errors.
  • Various minor completion system fixes.

Several libraries under toys/utils were extracted into their own gems. The current code remains under Toys::Utils as a vendored copy of the external gem, so the extracted gems are not actually dependencies of Toys. The affected libraries are:

  • Toys::Utils::Exec which was extracted to the gem exec_service.
  • Toys::Utils::XDG which was extracted to the gem simple_xdg.
  • Toys::Utils::GitCache which was extracted to the gem git_cache.

Finally, a variety of clarifications and fixes were made to the reference documentation, readme, and user's guide.

v0.21.0: toys 0.21.0

v0.21.0 / 2026-03-23

This release includes a variety of small fixes and updates toward improving product polish in preparation for a 1.0 release. It focuses on the following areas:

  • Updates to the help system
    • FIXED / BREAKING CHANGE: The help middleware omits the subtool filter flags on runnable tools that have subtools
  • Updates to bundler integration
    • FIXED: Fixed some cleanup issues when bundler setup fails
  • Updates to the exec utility
    • ADDED: Support for the :unbundle option which removes any existing bundle for a subprocess
    • FIXED: Fixed several thread-safety issues with the controller
    • FIXED: The result callback is now called in background mode if the result is never explicitly obtained from the controller
  • Updates to the git_cache utility
    • ADDED: Support for filtering lookups of ref and source info
    • ADDED: Support for SHA-256 repos
    • FIXED: Fixed failure to get a parent directory after previously getting a descendant object
    • FIXED: GitCache no longer unnecessarily sets the write bit on files copied into a specified directory
    • FIXED: GitCache no longer cleans out existing files when writing to a shared source, which should reduce issues with concurrent clients
  • Updates to the XDG utility
    • FIXED / BREAKING CHANGE: The XDG utility returns an empty array (instead of the system defaults) from the corresponding methods if XDG_DATA_DIRS or XDG_CONFIG_DIRS is nonempty but contains only relative paths
    • ADDED: Provided lookup_state and lookup_cache methods on the XDG utility
  • Updates to the settings system:
    • FIXED: Block certain reserved names from being used as Settings field names
    • FIXED: Fixed Settings#load_data! when subclassing another settings class
    • FIXED: Reject non-String values in Settings regexp type spec
    • FIXED: Settings guards against unknown classes when loading YAML on older Ruby versions
    • FIXED: Settings guards against ILLEGAL_VALUE being passed to range.member?
    • FIXED: Settings does a better job choosing exact-match values when using a union type
    • FIXED: Settings reject non-numeric strings in Integer and Float converters
    • FIXED: Settings propagates nested group errors in Settings#load_data!

v0.20.0: toys 0.20.0

v0.20.0 / 2026-03-09

Toys 0.20 is a major release with several new features and a number of fixes, including a few minor breaking changes.

Changes in the :minitest template:

  • BREAKING CHANGE: Tools produced by the :minitest template default to looking for test files of the forms *_test.rb and test_*.rb instead of test*.rb.
  • NEW: The :minitest template supports installing specified gems without using bundler.
  • NEW: Tools produced by the :minitest template provide command line arguments for overriding the gem installation or bundler settings.
  • NEW: Tools produced by the :minitest template recognize --include as an alias for --name. This matches recent versions of minitest.
  • NEW: The :minitest template generates more comprehensive documentation.
  • NEW: The minitest tool template now requires "minitest/autorun" before loading tests, so tests don't have to do so themselves.
  • BREAKING API CHANGE: Toys::Templates::Minitest::DEFAULT_GEM_VERSION_REQUIREMENTS is now a hash that covers multiple gems rather than just the minitest gem
  • FIXED: The minitest template no longer exceeds command line length limits if the list of test files is extremely long.

New functionality in the :rspec template:

  • NEW: The :rspec template supports installing specified gems without using bundler.
  • NEW: Tools produced by the :rspec template provide command line arguments for overriding the gem installation or bundler settings.
  • NEW: Tools produced by the :rspec template recognize the --example-matches flag, and can handle multiple --example and --tag flags.
  • NEW: The :rspec template generates more comprehensive documentation.
  • BREAKING API CHANGE: Toys::Templates::Rspec::DEFAULT_GEM_VERSION_REQUIREMENTS is now a hash that covers potentially multiple gems

New functionality in the :clean template:

  • The :clean template supports specifying certain gitignored files to preserve.
  • The :clean template is more robust against concurrent modification and works better with large git repos.

New functionality in the system test builtin tool:

  • BREAKING CHANGE: The system test builtin looks for test files of the form *_test.rb in addition to test_*.rb.
  • The system test builtin uses bundler to install gems if a Gemfile is present in the .test directory.
  • The system test builtin supports flags that can specify arbitrary gems to load.

Updates to the Exec mixin and library:

  • NEW: The new Toys::Utils::Exec::Result#effective_result method provides a reasonable integer result code even when a process terminates via signal or fails to start at all.
  • BREAKING API CHANGE: :cli is no longer a legal config option.
  • BREAKING API CHANGE: An options hash is no longer passed to the proc when executing a proc using a fork.
  • BREAKING API CHANGE: Passing an IO object as an input or output stream no longer closes it afterward.
  • BREAKING API CHANGE: Toys::Utils::Exec::Controller#result no longer preemptively (and prematurely) closes the controller input stream
  • FIXED: The :unsetenv_others option now works properly when executing a proc using a fork.
  • FIXED: Environment variable values specified as nil are now correctly unset when executing a proc using a fork.
  • FIXED: Fixed a rare concurrency issue if multiple threads concurrently get the result from a controller.

Other changes:

  • NEW: Native tab completion for zsh.
  • NEW: The :bundler mixin supports "manual" bundle setup, allowing bundler decisions to be deferred to execution time
  • FIXED: The :bundler mixin will not attempt to add the pathname gem to generated Gemfiles when running on TruffleRuby. This caused issues because TruffleRuby includes a special version of the gem and cannot install the one from Rubygems.
  • FIXED: ContextualError no longer overrides Exception#cause, which could confuse TruffleRuby.
  • DOCUMENTATION: Updated user guide to cover zsh completion and manual bundler setup
  • DOCUMENTATION: Some reorganization and cleanup in the user guide

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/toys-packages branch from eaba539 to 2303b47 Compare March 23, 2026 05:03
@renovate renovate Bot changed the title Update dependency toys to '~> 0.20.0' Update dependency toys to '~> 0.21.0' Mar 23, 2026
@renovate
renovate Bot force-pushed the renovate/toys-packages branch from 2303b47 to dbedbce Compare May 5, 2026 18:49
@renovate renovate Bot changed the title Update dependency toys to '~> 0.21.0' Update dependency toys to '~> 0.22.0' May 5, 2026
@renovate renovate Bot changed the title Update dependency toys to '~> 0.22.0' Update Toys packages to '~> 0.22.0' Jun 2, 2026
@renovate renovate Bot changed the title Update Toys packages to '~> 0.22.0' Update Toys packages Jun 22, 2026
@renovate renovate Bot changed the title Update Toys packages Update dependency toys to '~> 0.22.0' Jun 25, 2026
@renovate
renovate Bot force-pushed the renovate/toys-packages branch from dbedbce to 24bf721 Compare September 10, 2026 18:45
@renovate renovate Bot changed the title Update dependency toys to '~> 0.22.0' Update dependency toys to '~> 0.23.0' Sep 10, 2026
@renovate renovate Bot changed the title Update dependency toys to '~> 0.23.0' Update dependency toys to '~> 0.24.0' Sep 12, 2026
@renovate
renovate Bot force-pushed the renovate/toys-packages branch from 24bf721 to 05d7c82 Compare September 12, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants