tins 1.32.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.contexts/code_comment.rb +23 -0
- data/.contexts/full.rb +31 -0
- data/.contexts/lib.rb +24 -0
- data/.contexts/yard.md +92 -0
- data/.github/workflows/codeql-analysis.yml +72 -0
- data/CHANGES.md +194 -0
- data/README.md +161 -90
- data/Rakefile +23 -19
- data/examples/let.rb +8 -40
- data/examples/mail.rb +0 -1
- data/examples/ones_difference.stm +0 -1
- data/examples/turing.rb +3 -1
- data/lib/tins/alias.rb +1 -0
- data/lib/tins/annotate.rb +37 -27
- data/lib/tins/ask_and_send.rb +41 -0
- data/lib/tins/attempt.rb +39 -0
- data/lib/tins/bijection.rb +34 -0
- data/lib/tins/case_predicate.rb +21 -0
- data/lib/tins/complete.rb +16 -0
- data/lib/tins/concern.rb +100 -0
- data/lib/tins/date_dummy.rb +36 -4
- data/lib/tins/date_time_dummy.rb +34 -2
- data/lib/tins/deep_dup.rb +9 -2
- data/lib/tins/deprecate.rb +27 -0
- data/lib/tins/dslkit.rb +563 -59
- data/lib/tins/duration.rb +160 -3
- data/lib/tins/expose.rb +54 -5
- data/lib/tins/extract_last_argument_options.rb +9 -0
- data/lib/tins/file_binary.rb +108 -25
- data/lib/tins/find.rb +114 -11
- data/lib/tins/generator.rb +10 -2
- data/lib/tins/go.rb +81 -4
- data/lib/tins/hash_bfs.rb +69 -0
- data/lib/tins/hash_symbolize_keys_recursive.rb +62 -4
- data/lib/tins/hash_union.rb +47 -2
- data/lib/tins/if_predicate.rb +31 -0
- data/lib/tins/implement.rb +50 -0
- data/lib/tins/limited.rb +105 -29
- data/lib/tins/lines_file.rb +81 -2
- data/lib/tins/lru_cache.rb +54 -17
- data/lib/tins/memoize.rb +86 -58
- data/lib/tins/method_description.rb +87 -4
- data/lib/tins/minimize.rb +39 -11
- data/lib/tins/module_group.rb +27 -2
- data/lib/tins/named_set.rb +20 -0
- data/lib/tins/null.rb +86 -15
- data/lib/tins/once.rb +61 -4
- data/lib/tins/p.rb +44 -8
- data/lib/tins/partial_application.rb +66 -7
- data/lib/tins/proc_compose.rb +58 -1
- data/lib/tins/proc_prelude.rb +97 -10
- data/lib/tins/range_plus.rb +30 -2
- data/lib/tins/require_maybe.rb +36 -0
- data/lib/tins/responding.rb +39 -0
- data/lib/tins/secure_write.rb +25 -5
- data/lib/tins/sexy_singleton.rb +46 -48
- data/lib/tins/string_byte_order_mark.rb +33 -2
- data/lib/tins/string_camelize.rb +31 -2
- data/lib/tins/string_named_placeholders.rb +70 -0
- data/lib/tins/string_underscore.rb +33 -2
- data/lib/tins/string_version.rb +183 -10
- data/lib/tins/subhash.rb +35 -10
- data/lib/tins/temp_io.rb +7 -0
- data/lib/tins/temp_io_enum.rb +19 -0
- data/lib/tins/terminal.rb +34 -12
- data/lib/tins/thread_local.rb +69 -11
- data/lib/tins/time_dummy.rb +47 -21
- data/lib/tins/to.rb +15 -0
- data/lib/tins/to_proc.rb +17 -4
- data/lib/tins/token.rb +61 -2
- data/lib/tins/unit.rb +288 -149
- data/lib/tins/version.rb +1 -1
- data/lib/tins/write.rb +14 -3
- data/lib/tins/xt/blank.rb +81 -2
- data/lib/tins/xt/concern.rb +51 -0
- data/lib/tins/xt/deep_dup.rb +4 -2
- data/lib/tins/xt/deprecate.rb +5 -0
- data/lib/tins/xt/full.rb +56 -11
- data/lib/tins/xt/hash_bfs.rb +7 -0
- data/lib/tins/xt/irb.rb +46 -2
- data/lib/tins/xt/method_description.rb +0 -12
- data/lib/tins/xt/minimize.rb +7 -0
- data/lib/tins/xt/named.rb +71 -16
- data/lib/tins/xt/proc_compose.rb +4 -0
- data/lib/tins/xt/secure_write.rb +0 -4
- data/lib/tins/xt/string.rb +1 -0
- data/lib/tins/xt/string_camelize.rb +4 -2
- data/lib/tins/xt/string_named_placeholders.rb +7 -0
- data/lib/tins/xt/string_underscore.rb +4 -2
- data/lib/tins/xt/subhash.rb +11 -0
- data/lib/tins/xt/time_freezer.rb +43 -6
- data/lib/tins/xt/write.rb +0 -4
- data/lib/tins/xt.rb +3 -3
- data/lib/tins.rb +19 -3
- data/tests/annotate_test.rb +0 -1
- data/tests/bijection_test.rb +0 -1
- data/tests/concern_test.rb +63 -4
- data/tests/date_dummy_test.rb +0 -1
- data/tests/date_time_dummy_test.rb +0 -1
- data/tests/delegate_test.rb +0 -1
- data/tests/deprecate_test.rb +41 -0
- data/tests/dslkit_test.rb +15 -1
- data/tests/duration_test.rb +23 -2
- data/tests/dynamic_scope_test.rb +0 -1
- data/tests/extract_last_argument_options_test.rb +0 -1
- data/tests/find_test.rb +0 -1
- data/tests/from_module_test.rb +30 -3
- data/tests/generator_test.rb +0 -1
- data/tests/go_test.rb +0 -1
- data/tests/hash_bfs_test.rb +34 -0
- data/tests/hash_symbolize_keys_recursive_test.rb +0 -1
- data/tests/implement_test.rb +6 -9
- data/tests/limited_test.rb +12 -12
- data/tests/lines_file_test.rb +2 -1
- data/tests/lru_cache_test.rb +12 -1
- data/tests/memoize_test.rb +0 -1
- data/tests/method_description_test.rb +14 -20
- data/tests/minimize_test.rb +0 -1
- data/tests/module_group_test.rb +0 -1
- data/tests/named_set_test.rb +0 -1
- data/tests/null_test.rb +0 -1
- data/tests/partial_application_test.rb +4 -0
- data/tests/proc_prelude_test.rb +1 -1
- data/tests/require_maybe_test.rb +0 -1
- data/tests/scope_test.rb +1 -2
- data/tests/secure_write_test.rb +6 -1
- data/tests/sexy_singleton_test.rb +1 -1
- data/tests/string_named_placeholders.rb +109 -0
- data/tests/string_version_test.rb +3 -1
- data/tests/subhash_test.rb +0 -1
- data/tests/test_helper.rb +4 -7
- data/tests/time_dummy_test.rb +0 -1
- data/tests/time_freezer_test.rb +1 -1
- data/tests/to_test.rb +6 -6
- data/tests/token_test.rb +0 -1
- data/tests/unit_test.rb +0 -1
- data/tins.gemspec +18 -30
- metadata +55 -38
- data/lib/tins/count_by.rb +0 -8
- data/lib/tins/deep_const_get.rb +0 -50
- data/lib/tins/timed_cache.rb +0 -51
- data/lib/tins/uniq_by.rb +0 -10
- data/lib/tins/xt/count_by.rb +0 -11
- data/lib/tins/xt/deep_const_get.rb +0 -7
- data/lib/tins/xt/uniq_by.rb +0 -15
- data/tests/count_by_test.rb +0 -17
- data/tests/deep_const_get_test.rb +0 -37
- data/tests/uniq_by_test.rb +0 -31
- /data/{COPYING → LICENSE} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85b86d026f46e89213c6a4716ccd6296b4a8990b2fcd20ac8aa12a227c2f7a9a
|
4
|
+
data.tar.gz: b85c6e3f69fa911e10bb801fca3197949877bc6908bd565167c5dbb67c6d8248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb41548efe7a7c5628c225c89fe81417081a7aff6f5760a7ac21d5490731468488a25d0d795b4a932ebe516caf3d0d4722f2f645b674454b8b014791b44ecf88
|
7
|
+
data.tar.gz: 50eb96f4b5a54a4e38d0282ac926752c792acf8a7d09e61bb12eaad725e7f17bcd7195043f69a9c5d59a23b77d99a0461012474dbb6564c7e4b87ad40e0d4c0c
|
@@ -0,0 +1,23 @@
|
|
1
|
+
context do
|
2
|
+
namespace "lib" do
|
3
|
+
Dir['lib/**/*.rb'].each do |filename|
|
4
|
+
file filename, tags: 'lib'
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
file 'README.md', tags: 'documentation'
|
10
|
+
|
11
|
+
file '.contexts/yard.md', tags: [ 'yard', 'cheatsheet' ]
|
12
|
+
|
13
|
+
meta guidelines: <<~EOT
|
14
|
+
# Guidelines for creating YARD documentation
|
15
|
+
|
16
|
+
- Look into the file, with tags yard and cheatsheet for how comment ruby
|
17
|
+
constructs.
|
18
|
+
- In comments above initialize methods **ALWAYS** omit @return.
|
19
|
+
- **NEVER** output @return [ void ] in comments of any method, because
|
20
|
+
in Ruby every method returns something. If you don't know or if the
|
21
|
+
method is just called because its side effect just omit the @return.
|
22
|
+
EOT
|
23
|
+
end
|
data/.contexts/full.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
context do
|
2
|
+
variable project_name: Pathname.pwd.basename
|
3
|
+
|
4
|
+
variable project_version: File.read('VERSION').chomp
|
5
|
+
|
6
|
+
variable branch: `git rev-parse --abbrev-ref HEAD`.chomp
|
7
|
+
|
8
|
+
namespace "structure" do
|
9
|
+
command "tree", tags: %w[ project_structure ]
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace "lib" do
|
13
|
+
Dir['lib/**/*.rb'].each do |filename|
|
14
|
+
file filename, tags: 'lib'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
namespace "tests" do
|
19
|
+
Dir['tests/**/*.rb'].each do |filename|
|
20
|
+
file filename, tags: 'test'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
file 'Rakefile', tags: 'gem_hadar'
|
25
|
+
|
26
|
+
file 'README.md', tags: 'documentation'
|
27
|
+
|
28
|
+
meta ruby: RUBY_DESCRIPTION
|
29
|
+
|
30
|
+
meta code_coverage: json('coverage/coverage_context.json')
|
31
|
+
end
|
data/.contexts/lib.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
context do
|
2
|
+
variable project_name: Pathname.pwd.basename
|
3
|
+
|
4
|
+
variable project_version: File.read('VERSION').chomp
|
5
|
+
|
6
|
+
variable branch: `git rev-parse --abbrev-ref HEAD`.chomp
|
7
|
+
|
8
|
+
namespace "structure" do
|
9
|
+
command "tree", tags: %w[ project_structure ]
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace "lib" do
|
13
|
+
Dir['lib/**/*.rb'].each do |filename|
|
14
|
+
file filename, tags: 'lib'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
file 'Rakefile', tags: 'gem_hadar'
|
19
|
+
|
20
|
+
file 'README.md', tags: 'documentation'
|
21
|
+
|
22
|
+
meta ruby: RUBY_DESCRIPTION
|
23
|
+
end
|
24
|
+
|
data/.contexts/yard.md
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# YARD CHEATSHEET http://yardoc.org
|
2
|
+
|
3
|
+
## May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
|
4
|
+
|
5
|
+
cribbed from http://pastebin.com/xgzeAmBn
|
6
|
+
|
7
|
+
Templates to remind you of the options and formatting for the different types of objects you might
|
8
|
+
want to document using YARD.
|
9
|
+
|
10
|
+
## Modules
|
11
|
+
|
12
|
+
# Namespace for classes and modules that handle serving documentation over HTTP
|
13
|
+
# @since 0.6.0
|
14
|
+
|
15
|
+
## Classes
|
16
|
+
|
17
|
+
# Abstract base class for CLI utilities. Provides some helper methods for
|
18
|
+
# the option parser
|
19
|
+
#
|
20
|
+
# @author Full Name
|
21
|
+
# @abstract
|
22
|
+
# @since 0.6.0
|
23
|
+
# @attr [Types] attribute_name a full description of the attribute
|
24
|
+
# @attr_reader [Types] name description of a readonly attribute
|
25
|
+
# @attr_writer [Types] name description of writeonly attribute
|
26
|
+
# @deprecated Describe the reason or provide alt. references here
|
27
|
+
|
28
|
+
## Methods
|
29
|
+
|
30
|
+
# An alias to {Parser::SourceParser}'s parsing method
|
31
|
+
#
|
32
|
+
# @author Donovan Bray
|
33
|
+
#
|
34
|
+
# @see http://example.com Description of URL
|
35
|
+
# @see SomeOtherClass#method
|
36
|
+
#
|
37
|
+
# @deprecated Use {#my_new_method} instead of this method because
|
38
|
+
# it uses a library that is no longer supported in Ruby 1.9.
|
39
|
+
# The new method accepts the same parameters.
|
40
|
+
#
|
41
|
+
# @abstract
|
42
|
+
# @private
|
43
|
+
#
|
44
|
+
# @param opts [Hash] the options to create a message with.
|
45
|
+
# @option opts [String] :subject The subject
|
46
|
+
# @option opts [String] :from ('nobody') From address
|
47
|
+
# @option opts [String] :to Recipient email
|
48
|
+
# @option opts [String] :body ('') The email's body
|
49
|
+
#
|
50
|
+
# @param (see User#initialize)
|
51
|
+
# @param [OptionParser] opts the option parser object
|
52
|
+
# @param [Array<String>] args the arguments passed from input. This
|
53
|
+
# array will be modified.
|
54
|
+
# @param [Array<String, Symbol>] list the list of strings and symbols.
|
55
|
+
#
|
56
|
+
# The options parsed out of the commandline.
|
57
|
+
# Default options are:
|
58
|
+
# :format => :dot
|
59
|
+
#
|
60
|
+
# @example Reverse a string
|
61
|
+
# "mystring.reverse" #=> "gnirtsym"
|
62
|
+
#
|
63
|
+
# @example Parse a glob of files
|
64
|
+
# YARD.parse('lib/**/*.rb')
|
65
|
+
#
|
66
|
+
# @raise [ExceptionClass] description
|
67
|
+
#
|
68
|
+
# @return [optional, types, ...] description
|
69
|
+
# @return [true] always returns true
|
70
|
+
# @return [String, nil] the contents of our object or nil
|
71
|
+
# if the object has not been filled with data.
|
72
|
+
#
|
73
|
+
# We don't care about the "type" here:
|
74
|
+
# @return the object
|
75
|
+
#
|
76
|
+
# @return [String, #read] a string or object that responds to #read
|
77
|
+
# @return description here with no types
|
78
|
+
|
79
|
+
## Anywhere
|
80
|
+
|
81
|
+
# @todo Add support for Jabberwocky service
|
82
|
+
# There is an open source Jabberwocky library available
|
83
|
+
# at http://somesite.com that can be integrated easily
|
84
|
+
# into the project.
|
85
|
+
|
86
|
+
## Blocks
|
87
|
+
|
88
|
+
# for block {|a, b, c| ... }
|
89
|
+
# @yield [a, b, c] Description of block
|
90
|
+
#
|
91
|
+
# @yieldparam [optional, types, ...] argname description
|
92
|
+
# @yieldreturn [optional, types, ...] description
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ master ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ master ]
|
20
|
+
schedule:
|
21
|
+
- cron: '37 18 * * 5'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v3
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v2
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
|
52
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
53
|
+
# queries: security-extended,security-and-quality
|
54
|
+
|
55
|
+
|
56
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
57
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
58
|
+
- name: Autobuild
|
59
|
+
uses: github/codeql-action/autobuild@v2
|
60
|
+
|
61
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
62
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
63
|
+
|
64
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
65
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
66
|
+
|
67
|
+
# - run: |
|
68
|
+
# echo "Run, Build Application using script"
|
69
|
+
# ./location_of_script_within_repo/buildscript.sh
|
70
|
+
|
71
|
+
- name: Perform CodeQL Analysis
|
72
|
+
uses: github/codeql-action/analyze@v2
|
data/CHANGES.md
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
# Changes
|
2
|
+
|
3
|
+
## 2025-09-12 v1.44.0
|
4
|
+
|
5
|
+
### Major Changes
|
6
|
+
|
7
|
+
- **Ruby Version Requirement**: Updated minimum Ruby version requirement to 3.1
|
8
|
+
- **Dependency Modernization**: Replaced deprecated `Tins::Memoize` module
|
9
|
+
implementation with `mize` gem for memoization functionality
|
10
|
+
- **Documentation Overhaul**: Comprehensive YARD documentation added across all
|
11
|
+
modules with examples and parameter descriptions
|
12
|
+
- **README Enhancement**: Improved README.md with better documentation,
|
13
|
+
examples, and usage instructions
|
14
|
+
|
15
|
+
## 2025-09-05 v1.43.0
|
16
|
+
|
17
|
+
- Added new `dsl_lazy_accessor` method that creates lazy-loaded accessors with
|
18
|
+
support for default blocks and dynamic block assignment
|
19
|
+
- Removed support for Ruby versions **3.1** and **3.0** from image definitions
|
20
|
+
|
21
|
+
## 2025-08-19 v1.42.0
|
22
|
+
|
23
|
+
- Improved core class extension safety by using `respond_to?` checks to avoid
|
24
|
+
overriding existing methods such as `deep_dup`, `camelize`, and `underscore`
|
25
|
+
- Simplified GitHub directory ignore patterns in `Rakefile` by removing
|
26
|
+
recursive glob pattern for `.github` directory and directly specifying it as
|
27
|
+
a single entry
|
28
|
+
- Added documentation context files and YARD cheatsheet, including `.contexts/`
|
29
|
+
directory with code comment examples and updated `Rakefile` and
|
30
|
+
`tins.gemspec` to include context files and `context_spook` dependency
|
31
|
+
|
32
|
+
## 2025-08-18 v1.41.0
|
33
|
+
|
34
|
+
- Added new `named_placeholders_interpolate` method for template substitution
|
35
|
+
- Method supports both static and dynamic default values via Proc
|
36
|
+
- Maintains backward compatibility with existing `named_placeholders_assign` method
|
37
|
+
- Includes comprehensive tests for all functionality and error handling
|
38
|
+
- Uses `named_placeholders_assign` internally for consistent implementation
|
39
|
+
|
40
|
+
## 2025-08-18 v1.40.0
|
41
|
+
|
42
|
+
- Added `Tins::StringNamedPlaceholders` module with `named_placeholders` and
|
43
|
+
`named_placeholders_assign` methods for string template substitution
|
44
|
+
- Implemented support for both static and dynamic default values using Proc
|
45
|
+
objects
|
46
|
+
- Extended `String` class with `tins/xt/string` to include the new named
|
47
|
+
placeholders functionality
|
48
|
+
- Enhanced test coverage with comprehensive tests for all named placeholders
|
49
|
+
functionality including error handling and duplicate placeholder management
|
50
|
+
- Replaced manual SimpleCov setup with `GemHadar::SimpleCov.start` in test
|
51
|
+
helper
|
52
|
+
|
53
|
+
## 2025-07-30 v1.39.1
|
54
|
+
|
55
|
+
- Updated `gem_hadar` development dependency to version **1.22**
|
56
|
+
- Bumped version from '1.39.0' to '1.39.1' in lib/tins/version.rb
|
57
|
+
- Updated `s.version` in tins.gemspec from "1.39.0" to "1.39.1"
|
58
|
+
- Updated stub version in tins.gemspec from **1.39.0** to **1.39.1**
|
59
|
+
|
60
|
+
## 2025-07-30 v1.39.0
|
61
|
+
|
62
|
+
- Updated `VERSION` constant in `lib/tins/version.rb` from **1.38.0** to **1.39.0**
|
63
|
+
- Updated gem stub and version in `tins.gemspec`
|
64
|
+
- Updated `s.rubygems_version` from **3.6.2** to **3.6.9**
|
65
|
+
- Updated `s.add_development_dependency :gem_hadar` from ~> **1.19** to ~> **1.21**
|
66
|
+
- Added support for thread naming in `Limited` class
|
67
|
+
- Added `name` parameter to `Limited#initialize`
|
68
|
+
- Set `@name` attribute when provided
|
69
|
+
- Set executor name with `@name` if available
|
70
|
+
- Updated tests to use named threads
|
71
|
+
- Removed `binary` option from discover block in `.utilsrc`
|
72
|
+
|
73
|
+
## 2025-01-04 v1.38.0
|
74
|
+
|
75
|
+
* Improved Tins::Limited concurrency handling:
|
76
|
+
* Added `execute` method for task submission with a block
|
77
|
+
* Changed `process` method to manage thread execution and queue management
|
78
|
+
* Introduced `stop` method to signal processing termination
|
79
|
+
* Modified test cases in `limited_test.rb` to accommodate new functionality
|
80
|
+
* Added `ensure` clause to decrement counter and signal continuation after
|
81
|
+
block execution
|
82
|
+
* Added support for Ruby **3.4** Alpine image:
|
83
|
+
* Updated `.all_images.yml` to include Ruby **3.4**-alpine environment
|
84
|
+
* Added `ruby:3.4-alpine` to the list of supported images
|
85
|
+
* Now uses **3.4** instead of **3.3**, **3.2**, and **3.1** for ruby versions
|
86
|
+
|
87
|
+
## 2024-12-13 v1.37.1
|
88
|
+
|
89
|
+
* Renamed `ZERO` and `BINARY` constants to `ZERO_RE` and `BINARY_RE` to avoid
|
90
|
+
collisions with Logger/File constants.
|
91
|
+
|
92
|
+
## 2024-10-19 v1.37.0
|
93
|
+
|
94
|
+
* Add support for module prepended blocks in **Tins::Concern**:
|
95
|
+
* Added `prepend_features` method to Tins concern
|
96
|
+
* Updated ConcernTest to test prepend feature
|
97
|
+
* Raise StandardError for duplicate block definitions for included and
|
98
|
+
prepended blocks
|
99
|
+
* Added `class_methods` method to Tins concern:
|
100
|
+
* Added `class_methods` method to lib/tins/concern.rb
|
101
|
+
- Creates or retrieves ClassMethods module for defining class-level methods
|
102
|
+
* Updated tests in `tests/concern_test.rb`
|
103
|
+
- Added test for new `baz1` and `baz2` methods
|
104
|
+
+ Tested availability of `bar`, `baz1`, and `baz2` methods on A
|
105
|
+
|
106
|
+
## 2024-10-11 v1.36.1
|
107
|
+
|
108
|
+
* Fixed a typo in the code
|
109
|
+
|
110
|
+
## 2024-10-11 v1.36.0
|
111
|
+
|
112
|
+
### Significant Changes
|
113
|
+
|
114
|
+
* Refactor bfs method in `hash_bfs.rb`:
|
115
|
+
+ Rename `include_nodes` variable to `visit_internal`
|
116
|
+
+ Update test cases in `hash_bfs_test.rb` to use new method signature
|
117
|
+
+ Update method signature and docstring to reflect new behavior
|
118
|
+
* Update hash conversion logic:
|
119
|
+
+ Rename method parameter from `v` to `object`
|
120
|
+
+ Use `object` instead of `v` consistently throughout the method
|
121
|
+
+ Add documentation for new method name and behavior
|
122
|
+
|
123
|
+
## 2024-10-10 v1.35.0
|
124
|
+
|
125
|
+
### New Features
|
126
|
+
* Implemented breadth-first search in hashes using the `Tins::HashBFS` module.
|
127
|
+
+ Added tests for the `Tins::HashBFS` module.
|
128
|
+
|
129
|
+
### Refactoring and Cleanup
|
130
|
+
* Reformatted code.
|
131
|
+
* Removed TODO note from the `TODO` file.
|
132
|
+
* Cleaned up test requirements:
|
133
|
+
- Added `require 'tins'` to `tests/test_helper.rb`.
|
134
|
+
- Removed unnecessary `require 'tins'` lines from test files.
|
135
|
+
* Refactored BASE16 constants and alphabet:
|
136
|
+
+ Added `BASE16_LOWERCASE_ALPHABET` constant.
|
137
|
+
+ Added `BASE16_UPPERCASE_ALPHABET` constant.
|
138
|
+
|
139
|
+
### Tool Updates
|
140
|
+
* Updated bundler command to use full index:
|
141
|
+
- Added `--full-index` flag to `bundle install`.
|
142
|
+
- Replaced `bundle update` with `bundle install --full-index`.
|
143
|
+
|
144
|
+
## 2024-09-30 v1.34.0
|
145
|
+
|
146
|
+
* **Secure write functionality updated**
|
147
|
+
+ Added support for `Pathname` objects in `secure_write`
|
148
|
+
+ Updated `File.new` call to use `to_s` method on filename
|
149
|
+
+ New test case added for `secure_write` with `Pathname` object
|
150
|
+
* **Refactor version comparisons in various modules**
|
151
|
+
+ Added `Tins::StringVersion.compare` method to compare Ruby versions with operators.
|
152
|
+
+ Replaced direct version comparisons with `compare` method in multiple modules.
|
153
|
+
* **Deprecate deep_const_get and const_defined_in? methods**
|
154
|
+
+ Add deprecation notice for `const_defined_in?` for ruby >= 1.8
|
155
|
+
+ Add deprecation notice for `deep_const_get` method with a new method name `const_get` for ruby >= 2.0
|
156
|
+
* **Refactor deprecation logic and tests**
|
157
|
+
+ Update `Tins::Deprecate#deprecate` method to allow for optional `new_method` parameter.
|
158
|
+
+ Modify `tests/deprecate_test.rb` to test deprecated methods with and without messages.
|
159
|
+
* **Prepare count_by method for deprecation**
|
160
|
+
+ Suggest using `count` with block instead in newer Rubies
|
161
|
+
* **Prepare uniq_by / uniq_by! method for deprecation**
|
162
|
+
+ Suggest using `uniq` / `uniq!` with block instead in newer Rubies
|
163
|
+
|
164
|
+
## 2024-04-17 v1.33.0
|
165
|
+
|
166
|
+
* **Changes for Ruby 3.3 and 3.4**
|
167
|
+
+ Added support for Ruby **3.3**
|
168
|
+
+ Added dependency on `bigdecimal` for upcoming Ruby **3.4**
|
169
|
+
* **Other Changes**
|
170
|
+
+ Halting once is enough
|
171
|
+
+ Added ruby **3.2**, removed some older ones
|
172
|
+
+ Added test process convenience method
|
173
|
+
|
174
|
+
## 2022-11-21 v1.32.1
|
175
|
+
|
176
|
+
* Removed mutex for finalizer, allowing Ruby to handle cleanup instead.
|
177
|
+
* Significant changes:
|
178
|
+
+ Removed `mutex` variable
|
179
|
+
+ Updated code to rely on Ruby's built-in finalization mechanism
|
180
|
+
|
181
|
+
## 2022-11-17 v1.32.0
|
182
|
+
|
183
|
+
* **attempt** method now supports passing of previously caught exception into
|
184
|
+
the called block to let the handling behaviour depend on it.
|
185
|
+
* Some smaller changes to make debugging on multiple Ruby releases, easier via
|
186
|
+
all_images.
|
187
|
+
* Enable fast failing mode
|
188
|
+
* Add convenience method to create `Tins::StringVersion` objects.
|
189
|
+
* Pass previous exception to attempt block ...
|
190
|
+
... to allow reacting to it, logging it etc.
|
191
|
+
* Remove additional groups
|
192
|
+
* Use debug instead of byebug for development
|
193
|
+
* Ignore more hidden files in the package
|
194
|
+
* Update Ruby version to **3.1**
|