Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Marvin1973:pcs
rubygem-zeitwerk
rubygem-zeitwerk.changes
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rubygem-zeitwerk.changes of Package rubygem-zeitwerk
------------------------------------------------------------------- Wed Nov 6 13:19:12 UTC 2024 - Dan Čermák <dcermak@suse.com> - New upstream release 2.7.1 - limit building to ruby >= 3.2 ------------------------------------------------------------------- Fri Jun 21 10:57:43 UTC 2024 - Dan Čermák <dan.cermak@posteo.net> - New upstream release 2.6.16, no changelog found ------------------------------------------------------------------- Tue Nov 14 15:45:15 UTC 2023 - Dan Čermák <dan.cermak@posteo.net> - New upstream release 2.6.12, no changelog found ------------------------------------------------------------------- Wed Dec 7 11:39:03 UTC 2022 - Stephan Kulow <coolo@suse.com> updated to version 2.6.6 no changelog found ------------------------------------------------------------------- Mon Oct 10 13:27:38 UTC 2022 - Stephan Kulow <coolo@suse.com> updated to version 2.6.1 no changelog found ------------------------------------------------------------------- Wed Jun 15 14:01:10 UTC 2022 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.6.0 * Directories are processed in lexicographic order. Different file systems may list directories in different order, and with this change we ensure that client code eager loads consistently across platforms, for example. * Before this release, subdirectories of root directories always represented namespaces (unless ignored or collapsed). From now on, to be considered namespaces they also have to contain at least one non-ignored Ruby file with extension `.rb`, directly or recursively. If you know beforehand a certain directory or directory pattern does not represent a namespace, it is intentional and more efficient to tell Zeitwerk to [ignore](https://github.com/fxn/zeitwerk#ignoring-parts-of-the-project) it. However, if you don't do so and have a directory `tasks` that only contains Rake files, arguably that directory is not meant to represent a Ruby module. Before, Zeitwerk would define a top-level `Tasks` module after it; now, it does not. This feature is also handy for projects that have directories with auxiliary resources mixed in the project tree in a way that is too dynamic for an ignore pattern to be practical. See https://github.com/fxn/zeitwerk/issues/216. In the unlikely case that an existing project has an empty directory for the sole purpose of defining a totally empty module (no code, and no nested classes or modules), such module has now to be defined in a file. Directories are scanned again on reloads. * On setup, loaders created with `Zeitwerk::Loader.for_gem` issue warnings if `lib` has extra, non-ignored Ruby files or directories. This is motivated by existing gems with directories under `lib` that are not meant to define Ruby modules, like directories for Rails generators, for instance. This warning can be silenced in the unlikely case that the extra stuff is actually autoloadable and has to be managed by Zeitwerk. Please, check the [documentation](https://github.com/fxn/zeitwerk#for_gem) for further details. This method returns an instance of a private subclass of `Zeitwerk::Loader` now, but you cannot rely on the type, just on the interface. ------------------------------------------------------------------- Tue Feb 15 07:46:00 UTC 2022 - Stephan Kulow <coolo@suse.com> updated to version 2.5.4 no changelog found ------------------------------------------------------------------- Sat Jan 1 18:12:41 UTC 2022 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.5.3 * The change introduced in 2.5.2 implied a performance regression that was particularly dramatic in Ruby 3.1. We'll address [#198](https://github.com/fxn/zeitwerk/issues/198) in a different way. ------------------------------------------------------------------- Wed Dec 29 01:18:19 UTC 2021 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.5.2 * When `Module#autoload` triggers the autovivification of an implicit namespace, `$LOADED_FEATURES` now gets the correspoding directory pushed. This is just a tweak to Zeitwerk's `Kernel#require` decoration. That way it acts more like the original, and cooperates better with other potential `Kernel#require` wrappers, like Bootsnap's. ------------------------------------------------------------------- Tue Dec 21 23:10:24 UTC 2021 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.5.1 ## 2.5.1 (20 October 2021) * Restores support for namespaces that are not hashable. For example namespaces that override the `hash` method with a different arity as shown in [#188](https://github.com/fxn/zeitwerk/issues/188). ## 2.5.0 (20 October 2021) ### Breaking changes * Requires Ruby 2.5. * Deletes the long time deprecated preload API. Instead of: ```ruby loader.preload("app/models/user.rb") ``` just reference the constant on setup: ```ruby loader.on_setup { User } ``` If you want to eager load a namespace, use the constants API: ```ruby loader.on_setup do Admin.constants(false).each { |cname| Admin.const_get(cname) } end ``` ### Bug fixes * Fixes a bug in which a certain valid combination of overlapping trees managed by different loaders and ignored directories was mistakenly reported as having conflicting directories. * Detects external namespaces defined with `Module#autoload`. If your project reopens a 3rd party namespace, Zeitwerk already detected it and did not consider the namespace to be managed by the loader (automatically descends, ignored for reloads, etc.). However, the loader did not do that if the namespace had only an autoload in the 3rd party code yet to be executed. Now it does. ### Callbacks * Implements `Zeitwerk::Loader#on_setup`, which allows you to configure blocks of code to be executed on setup and on each reload. When the callback is fired, the loader is ready, you can refer to project constants in the block. See the [documentation](https://github.com/fxn/zeitwerk#the-on_setup-callback) for further details. * There is a new catch-all `Zeitwerk::Loader#on_load` that takes no argument and is triggered for all loaded objects: ```ruby loader.on_load do |cpath, value, abspath| # ... end ``` Please, remember that if you want to trace the activity of a loader, `Zeitwerk::Loader#log!` logs plenty of information. See the [documentation](https://github.com/fxn/zeitwerk#the-on_load-callback) for further details. * The block of the existing `Zeitwerk::Loader#on_load` receives also the value stored in the constant, and the absolute path to its corresponding file or directory: ```ruby loader.on_load("Service::NotificationsGateway") do |klass, abspath| # ... end ``` Remember that blocks can be defined to take less arguments than passed. So this change is backwards compatible. If you had ```ruby loader.on_load("Service::NotificationsGateway") do Service::NotificationsGateway.endpoint = ... end ``` That works. * Implements `Zeitwerk::Loader#on_unload`, which allows you to configure blocks of code to be executed before a certain class or module gets unloaded: ```ruby loader.on_unload("Country") do |klass, _abspath| klass.clear_cache end ``` These callbacks are invoked during unloading, which happens in an unspecified order. Therefore, they should not refer to reloadable constants. You can also be called for all unloaded objects: ```ruby loader.on_unload do |cpath, value, abspath| # ... end ``` Please, remember that if you want to trace the activity of a loader, `Zeitwerk::Loader#log!` logs plenty of information. See the [documentation](https://github.com/fxn/zeitwerk/blob/master/README.md#the-on_unload-callback) for further details. ### Assorted * Performance improvements. * Documentation improvements. * The method `Zeitwerk::Loader#eager_load` accepts a `force` flag: ```ruby loader.eager_load(force: true) ``` If passed, eager load exclusions configured with `do_not_eager_load` are not honoured (but ignored files and directories are). This may be handy for test suites that eager load in order to ensure all files define the expected constant. * Eliminates internal use of `File.realpath`. One visible consequence is that in logs root dirs are shown as configured if they contain symlinks. * When an autoloaded file does not define the expected constant, Ruby clears state differently starting with Ruby 3.1. Unloading has been revised to be compatible with both behaviours. * Logging prints a few new traces. ------------------------------------------------------------------- Fri Dec 11 03:23:04 UTC 2020 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.4.2 * Implements `Zeitwerk::Loader#on_load`, which allows you to configure blocks of code to be executed after a certain class or module have been loaded: ```ruby # config/environments/development.rb loader.on_load("SomeApiClient") do SomeApiClient.endpoint = "https://api.dev" # config/environments/production.rb loader.on_load("SomeApiClient") do SomeApiClient.endpoint = "https://api.prod" end ``` See the [documentation](https://github.com/fxn/zeitwerk/blob/master/README.md#the-on_load-callback) for further details. ------------------------------------------------------------------- Sun Nov 1 13:09:57 UTC 2020 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.4.1 * Use `__send__` instead of `send` internally. ------------------------------------------------------------------- Thu Jul 16 08:43:36 UTC 2020 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.4.0 * `Zeitwerk::Loader#push_dir` supports an optional `namespace` keyword argument. Pass a class or module object if you want the given root directory to be associated with it instead of `Object`. Said class or module object cannot be reloadable. * The default inflector is even more performant. ------------------------------------------------------------------- Mon Jul 13 14:43:11 UTC 2020 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.3.1 * Saves some unnecessary allocations made internally by MRI. See [#125](https://github.com/fxn/zeitwerk/pull/125), by [@casperisfine](https://github.com/casperisfine). * Documentation improvements. * Internal code base maintenance. ------------------------------------------------------------------- Mon Apr 27 11:38:16 UTC 2020 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.3.0 * Adds support for collapsing directories. For example, if `booking/actions/create.rb` is meant to define `Booking::Create` because the subdirectory `actions` is there only for organizational purposes, you can tell Zeitwerk with `collapse`: ```ruby loader.collapse("booking/actions") ``` The method also accepts glob patterns to support standardized project structures: ```ruby loader.collapse("*/actions") ``` Please check the documentation for more details. * Eager loading is idempotent, but now you can eager load again after reloading. ------------------------------------------------------------------- Sat Dec 14 00:32:05 UTC 2019 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.2.2 * `Zeitwerk::NameError#name` has the name of the missing constant now. ------------------------------------------------------------------- Tue Nov 12 14:02:42 UTC 2019 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.2.1 * Zeitwerk raised `NameError` when a managed file did not define its expected constant. Now, it raises `Zeitwerk::NameError` instead, so it is possible for client code to distinguish that mismatch from a regular `NameError`. Regarding backwards compatibility, `Zeitwerk::NameError` is a subclass of `NameError`. ## 2.2.0 (9 October 2019) * The default inflectors have API to override how to camelize selected basenames: ```ruby loader.inflector.inflect "mysql_adapter" => "MySQLAdapter" ``` This addresses a common pattern, which is to use the basic inflectors with a few straightforward exceptions typically configured in a hash table or `case` expression. You no longer have to define a custom inflector if that is all you need. * Documentation improvements. ## 2.1.10 (6 September 2019) * Raises `Zeitwerk::NameError` with a better error message when a managed file or directory has a name that yields an invalid constant name when inflected. `Zeitwerk::NameError` is a subclass of `NameError`. ------------------------------------------------------------------- Fri Jul 19 07:21:43 UTC 2019 - Manuel Schnitzer <mschnitzer@suse.com> - updated to version 2.1.9 * Preloading is soft-deprecated. The use case it was thought for is no longer. Please, if you have a legit use case for it, drop me a line. * Root directory conflict detection among loaders takes ignored directories into account. * Supports classes and modules with overridden `name` methods. * Documentation improvements. ------------------------------------------------------------------- Sun Jun 30 08:32:05 UTC 2019 - Manuel Schnitzer <mschnitzer@suse.com> - initialize package
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor