Up to [cvs.NetBSD.org] / pkgsrc / devel / ruby-tins
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
devel/ruby-tins: update to 1.62.0 1.62.0 (2026-11-06) Features * Added Tins::EnumJoined module providing #joined for human-friendly sentence-style joining of Enumerable objects. * Added Tins::Duration#to_human for generating human-readable duration strings with configurable styles and connectors. * Added Tins::Duration.parse_human class method to parse human-readable duration strings (inverse of #to_human). * Added Tins::Duration.from_string class method to create a Duration instance from a parsed string. * Tins::Duration.parse now accepts an Array of template strings, trying them in order until a match is found. * Added Tins::Duration::HUMAN_CONNECTORS constant with :none, :spaces, and :prose presets. * Added Tins::Duration::STYLE_DEFAULT_CONNECTOR constant mapping styles to default connector presets. Fixes * Tins::Duration.parse: Fixed a bug where a literal mismatch raised a RuntimeError instead of Tins::Duration::ParserError. * Tins::Null: Fixed documentation example to correctly show user.name.to_s instead of user.name. Improvements * Tins::Duration: Refactored parsing logic to extract parse_template as a private method. * Tins::Duration: Updated to_f documentation to clarify that it returns the magnitude (always non-negative) and that sign is tracked via negative?. * Tins::Duration: Changed template: default in parse to nil to support multi-template detection. * Tins::Duration: Extracted connector resolution logic into a private ConnectorResolver module. Build & CI * Bumped development dependency gem_hadar to require version 2.21.0 or later. Testing * Added tests for Tins::EnumJoined#joined covering empty, single, multiple elements, custom connectors, and type coercion. * Added tests for Tins::Duration#to_human covering styles, connectors, max units, and negative durations. * Added tests for Tins::Duration.parse_human covering roundtrips, custom connectors, and error cases. * Added tests for Tins::Duration.from_string covering default and custom templates. * Added tests for Tins::Duration.parse with template arrays, including order sensitivity and error handling. * Added tests for Tins::Duration::ParserError inheritance and specific mismatch scenarios. Documentation * Tins::Attempt: Rewrote documentation using YARD tags and added examples for fixed sleep, exponential backoff, and return-value mode. * Tins::EnumSqueeze: Added module-level documentation explaining squeeze/squeeze! semantics and usage examples. * Tins::DslKit: Fixed documentation examples for Eigenclass, ClassMethod, ThreadGlobal, Delegate, Scope, DynamicScope, and Deflect to accurately reflect API usage.
devel/ruby-tins: update to 1.61.0
1.60.0 (2026-10-02)
* Add unpadded %H, %M, and %u format directives to Duration#format for
unpadded hours, minutes, and seconds, complementing the existing
zero-padded %h, %m, and %s
* Update the directive regex in format from /%[DdhmSs%]/ to /%[DdHhMmuSs%]/
to match the new directives
1.60.1 (2026-10-08)
* Fix Limited shutdown race and busy-spin
- Move @tg.add to the executor thread to close a @count/@tg race
- Replace wait until done? + @executor.kill with sentinel, join, wait
- Remove unused done?
1.61.0 (2026-10-11)
* Tins::Once#only_once and Tins::Once#try_only_once now accept a touch:
option to automatically create the lock file via FileUtils.touch,
preventing Errno::ENOENT errors on first boot.
* Removed stale @raise [Errno::EAGAIN] and @raise [SystemCallError]
documentation, as flock returns false rather than raising an exception.
* Updated module examples to use the or idiom instead of rescue.
devel/ruby-tins: update to 1.59.0 1.58.0 (2026-09-24) * Add Tins::EnumSqueeze module providing squeeze and squeeze! methods that collapse consecutive duplicate elements, mirroring String#squeeze semantics. * Freeze the UNSET sentinel constant in Tins::Delegate to prevent accidental mutation of the shared Object.new instance. 1.59.0 (2026-09-25) * Add *sels and &block parameters to squeeze and squeeze!, allowing squeezing to be restricted to elements matching case-equality (===) selectors or a predicate block * Raise ArgumentError when both *sels and &block are provided * Change hot-loop comparison to item != prev || !block.(item) so non-matching elements are never collapsed * Forward (*sels, &block) from squeeze! to squeeze
devel/ruby-tins: update to 1.56.0 1.55.0 (2026-07-23) * Introduced the Tins::DeepTransform module, providing a stack-safe, iterative engine for deep transformations via the deep_transform method. * Added support for flexible lambda arity (1, 2, or 3) within deep_transform to allow access to the node, key/index, and parent container context. * Implemented a core extension in tins/xt/deep_transform that integrates DeepTransform into the Hash and Array classes. * Refactored Tins::HashSymbolizeKeysRecursive to utilize the new iterative engine instead of recursive logic. 1.56.0 (2026-07-25) * Added irb as a runtime dependency
devel/ruby-tins: update to 1.54.0
1.54.0 (2026-05-20)
* Tins::GO.go
- Improved handling of missing arguments: the system now issues a
warning when an option requiring an argument is missing its value and
prevents subsequent flags from being consumed as arguments.
- Added protection against overlapping flag definitions; flags defined
as both boolean and value-requiring are now disabled, and a warning is
issued.
- Expanded documentation for the go method to include pattern syntax,
ambiguity handling, side effects, and the in-place modification of the
_args_ array.
devel/ruby-tins: update to 1.52.0 1.52.0 (2026-02-23) * Renamed BASE32_EXTENDED_HEX_ALPHABET to BASE32_EXTENDED_UPPERCASE_HEX_ALPHABET for clarity. * Added BASE32_EXTENDED_LOWERCASE_HEX_ALPHABET constant for lowercase hex alphabet. * Updated BASE32_EXTENDED_HEX_ALPHABET to default to the uppercase variant. * Updated comment for BASE32_ALPHABET to specify RFC4648 compliance. * Improved maintainability by separating uppercase and lowercase hex alphabet variants. * Added require 'tins/hash_dfs' to lib/tins.rb and lib/tins/xt.rb. * Renamed thread‑local flag in HashBFS from :seen to :bfs_seen and updated all references. * Replaced calls to convert_to_hash_or_ary with bfs_convert_to_hash_or_ary in HashBFS. * Added bfs_convert_to_hash_or_ary method to HashBFS. * Added new module Tins::HashDFS providing depth‑first traversal with * thread‑local dfs_seen and dfs_convert_to_hash_or_ary. * Mixed HashDFS into ::Hash via lib/tins/xt/hash_dfs.rb. * Added tests/hash_dfs_test.rb with DFS tests mirroring BFS tests. * Updated YARD documentation for HashBFS#bfs with an example. * Optimized token analysis bit calculation by using a direct computation with Math.log2 instead of large exponentiation, improving performance and numerical stability for large token lengths.
devel/ruby-tins: update to 1.44.1 1.43.0 (2025-09-05) * Added new dsl_lazy_accessor method that creates lazy-loaded accessors with * support for default blocks and dynamic block assignment * Removed support for Ruby versions 3.1 and 3.0 from image definitions 1.44.0 (2025-09-12) Documentation Improvements * Added extensive YARD documentation to all modules and methods throughout the library * Included usage examples and detailed parameter descriptions for better * developer experience * Updated README.md with clearer project information Code Modernization * Removed support for Ruby 1.8 and 1.9, focusing on modern Ruby versions * Eliminated deprecated compatibility modules and methods * Cleaned up unused requires and dependencies Technical Enhancements * Improved error handling in various modules (Attempt, Bijection, etc.) * Enhanced method signatures with proper parameter documentation * Added comprehensive test coverage for all functionality File Structure Changes * Updated gemspec to reflect modern Ruby standards * Modified Rakefile and .gitignore to exclude documentation directories * Removed obsolete test files and deprecated code paths 1.44.1 (2025-09-12) * Updated documentation link in README.md to point to GitHub.io instead of * RubyDoc.info * Added graceful handling for missing gem_hadar/simplecov gem by wrapping * require and start in begin/rescue block to catch LoadError * Modified gem packaging to include all files in .github and .contexts * directories using FileList for dynamic inclusion * Created static.yml file
devel/ruby-tins: update to 1.42.0 1.40.0 (2025-08-18) * Added Tins::StringNamedPlaceholders module with named_placeholders and named_placeholders_assign methods for string template substitution * Implemented support for both static and dynamic default values using Proc objects * Extended String class with tins/xt/string to include the new named placeholders functionality * Enhanced test coverage with comprehensive tests for all named placeholders functionality including error handling and duplicate placeholder management * Replaced manual SimpleCov setup with GemHadar::SimpleCov.start in test helper 1.41.0 (2025-08-18) * Added new named_placeholders_interpolate method for template substitution * Method supports both static and dynamic default values via Proc * Maintains backward compatibility with existing named_placeholders_assign method * Includes comprehensive tests for all functionality and error handling * Uses named_placeholders_assign internally for consistent implementation 1.42.0 (2025-08-19) * Improved core class extension safety by using respond_to? checks to avoid overriding existing methods such as deep_dup, camelize, and underscore * Simplified GitHub directory ignore patterns in Rakefile by removing recursive glob pattern for .github directory and directly specifying it as a single entry * Added documentation context files and YARD cheatsheet, including .contexts/ directory with code comment examples and updated Rakefile and tins.gemspec to include context files and context_spook dependency
devel/ruby-tins: update to 1.36.1
1.34.0 (2024-09-30)
* Secure write functionality updated
- Added support for Pathname objects in secure_write
- Updated File.new call to use to_s method on filename
- New test case added for secure_write with Pathname object
* Refactor version comparisons in various modules
- Added Tins::StringVersion.compare method to compare Ruby versions with
operators.
- Replaced direct version comparisons with compare method in multiple
modules.
* Deprecate deep_const_get and const_defined_in? methods
- Add deprecation notice for const_defined_in? for ruby >= 1.8
- Add deprecation notice for deep_const_get method with a new method name
const_get for ruby >= 2.0
* Refactor deprecation logic and tests
- Update Tins::Deprecate#deprecate method to allow for optional new_method
parameter.
- Modify tests/deprecate_test.rb to test deprecated methods with and
without messages.
* Prepare count_by method for deprecation
- Suggest using count with block instead in newer Rubies
* Prepare uniq_by / uniq_by! method for deprecation
- Suggest using uniq / uniq! with block instead in newer Rubies
1.35.0 (2024-10-10)
New Features
* Implemented breadth-first search in hashes using the Tins::HashBFS module.
- Added tests for the Tins::HashBFS module.
Refactoring and Cleanup
* Reformatted code.
* Removed TODO note from the TODO file.
* Cleaned up test requirements:
- Added require 'tins' to tests/test_helper.rb.
- Removed unnecessary require 'tins' lines from test files.
* Refactored BASE16 constants and alphabet:
- Added BASE16_LOWERCASE_ALPHABET constant.
- Added BASE16_UPPERCASE_ALPHABET constant.
Tool Updates
* Updated bundler command to use full index:
- Added --full-index flag to bundle install.
- Replaced bundle update with bundle install --full-index.
1.36.0 (2024-10-11)
Significant Changes
* Refactor bfs method in hash_bfs.rb:
- Rename include_nodes variable to visit_internal
- Update test cases in hash_bfs_test.rb to use new method signature
- Update method signature and docstring to reflect new behavior
* Update hash conversion logic:
- Rename method parameter from v to object
- Use object instead of v consistently throughout the method
- Add documentation for new method name and behavior
1.36.1 (2024-10-11)
* Fixed a typo in the code
devel/ruby-tins: update to 1.31.1 1.31.1 (2022-04-26) * Create codeql-analysis.yml * Remove some hidden/unneeded files from gem
devel/ruby-tins: update to 1.31.0 Quote from commit logs. 1.29.1 (2021-05-20) * Reraise the same exception object for exceptions with additional methods. 1.30.0 (2021-12-27) * Fix for upcoming ruby 3.1.0. 1.31.0 (2022-01-07) * Add small LRU cache implementation.
devel/ruby-tins: update to 1.29.0 1.29.0 (2021-05-07) * Add more ways to reraise exceptions in attempt.
devel/ruby-tins: update to 1.28.0 No changes, but it adds support for Ruby 3.0.
devel/ruby-tins: udpate to 1.20.2 * 2018-11-14 Release 1.20.2 - Fix ~x options * 2018-11-14 Release 1.20.1 - Add disabling boolean options in Tins::GO#go method. * 2018-11-14 Release 1.20.0 - Support default arguments in Tins::GO#go method. * 2018-11-07 Release 1.19.0 - Allow annotations without arguments * 2018-11-02 Release 1.18.0 - `thread_local` and `thread_global` with default block * 2018-10-15 Release 1.17.0 - Add Tins::TempIO::Enum class to wrap `temp_io` into Enumerator.
devel/ruby-tins: update to 1.16.3 2017-12-05 Release 1.16.3 * Improve temp_io method by not changing working dir. 2017-12-05 Release 1.16.2 * Improve temp_io method with a given name. 2017-12-05 Release 1.16.1 * Improve temp_io method with block 2017-11-29 Release 1.16.0 * Prove temp_io method with block
Update ruby-tinsto 1.15.0. 2017-06-29 Release 1.15.0 * Add support for smart duration formats with %D directive
Update ruby-tins to 1.13.2. 2016-11-23 Release 1.13.0 * Add expose method mostly for testing hidden methods.
Update ruby-tins to 1.12.0. 2016-08-04 Release 1.12.0 * Add Tins::Unit.parse? method to check for units in strings. 2016-07-12 Release 1.11.0 * Provide Tins::Unit.format and Tins::Unit.parse methods. 2016-05-25 Release 1.10.2 * Avoid some warnings. 2016-04-15 Release 1.10.1 * Fix bug in go if a concatenated argument comes last. 2016-04-12 Release 1.10.0 * Support mixed rest arguments in go argument parsing.
Update ruby-tins to 1.9.0. Add Tins::Duration class to display time durations.
Update ruby-tins to 1.8.1. * 2015-12-03 Release 1.8.1 - Remove some backports already existant in the newer supported rubies.
Update ruby-tins to 1.7.0. 2015-11-09 Release 1.7.0 * Officially require ruby >= 2.0 and use new hash syntax. * New feature attempt: sleep:-30 sleeps upto 30 seconds while retrying with an exponential waiting pattern. * Remove rotate and shuffle, recent rubies all support them. * Add an object oriented view on method signatures and use it to create method descriptions.
Update ruby-tins to 1.6.0. * 2015-08-13 Release 1.6.0 - Add complete method for readline completion * 2015-06-21 Release 1.5.4 - Avoid %i syntax for now * 2015-06-17 Release 1.5.3 - Make it run on 1.9 again. - Avoid a warning in Time.dummy implementation.
Update ruby-tins to 1.5.2. Changes are not available except commit log. <https://github.com/flori/tins/commits/master>
Update ruby-tins to 1.3.4. * 2015-02-04 Release 1.3.4 - Add some default alphabets to Tins::Token, e. g. Base64 - Add changes to Readme
Update ruby-tins to 1.3.3. * Add json support. * Avoid conflict with Rails.
Add ruby-tins package version 1.0.0. Approved by wiz@. All the stuff that isn't good/big enough for a real library.