tins 1.53.0 → 1.55.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/.envrc +1 -0
- data/CHANGES.md +44 -0
- data/README.md +68 -2
- data/lib/tins/deep_transform.rb +114 -0
- data/lib/tins/go.rb +28 -4
- data/lib/tins/hash_symbolize_keys_recursive.rb +17 -58
- data/lib/tins/version.rb +1 -1
- data/lib/tins/xt/deep_transform.rb +11 -0
- data/lib/tins/xt.rb +1 -0
- data/lib/tins.rb +1 -0
- data/tests/deep_transform_test.rb +162 -0
- data/tests/go_test.rb +27 -0
- data/tins.gemspec +7 -7
- metadata +11 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25e1ebaf405851a3e394d65aef937256661193a24880705810ba7e8e6db57597
|
|
4
|
+
data.tar.gz: cf32d4c83244e5f520813b76fa2daab32375e25703f5336ae6408efcf08029b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e4ef17d79b952c50aca87d142bf45207cc178ab3058732b393d143b0cb3f5793029c403689ca8251bd6cb93f85347e6cdcf1af20bbbed1e316e99ef4b86a355
|
|
7
|
+
data.tar.gz: d396866f396f77f4ae99f996a643cdbc23c738d5471cc2fa96ba0d0856ebdea80fdfb71eacba5b7c3acec9517ef3d73bdeca1f1f22146663753bf9458a643d69
|
data/.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export OLLAMA_CHAT_TOOLS_TEST_RUNNER="bundle exec test-unit"
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-07-17 v1.55.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Introduced the `Tins::DeepTransform` module, providing a stack-safe,
|
|
8
|
+
iterative engine for deep transformations via the `deep_transform` method.
|
|
9
|
+
- Added support for flexible lambda arity (1, 2, or 3) within `deep_transform`
|
|
10
|
+
to allow access to the node, key/index, and parent container context.
|
|
11
|
+
- Implemented a core extension in `tins/xt/deep_transform` that integrates
|
|
12
|
+
`DeepTransform` into the `Hash` and `Array` classes.
|
|
13
|
+
- Added comprehensive test coverage for deep nesting, circularity, and arity
|
|
14
|
+
variations in `tests/deep_transform_test.rb`.
|
|
15
|
+
- Updated `README.md` with usage examples for structural pruning, moving
|
|
16
|
+
averages, and basic transformations.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Refactored `Tins::HashSymbolizeKeysRecursive` to utilize the new iterative
|
|
21
|
+
engine instead of recursive logic.
|
|
22
|
+
- Registered new modules within `lib/tins.rb` and `lib/tins/xt.rb`.
|
|
23
|
+
- Updated CI configuration in `.all_images.yml` to use `bundle exec rake test`
|
|
24
|
+
and added `before`/`after` hooks.
|
|
25
|
+
|
|
26
|
+
## 2026-05-20 v1.54.0
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Tins::GO.go**
|
|
31
|
+
- Improved handling of missing arguments: the system now issues a warning
|
|
32
|
+
when an option requiring an argument is missing its value and prevents
|
|
33
|
+
subsequent flags from being consumed as arguments.
|
|
34
|
+
- Added protection against overlapping flag definitions; flags defined as
|
|
35
|
+
both boolean and value-requiring are now disabled, and a warning is issued.
|
|
36
|
+
- Expanded documentation for the `go` method to include pattern syntax,
|
|
37
|
+
ambiguity handling, side effects, and the in-place modification of the
|
|
38
|
+
`_args_` array.
|
|
39
|
+
|
|
40
|
+
- **Dependencies & Configuration**
|
|
41
|
+
- Updated `gem_hadar` dependency from **2.17.0** to **2.17.1**.
|
|
42
|
+
- Added `.envrc` to `s.files` in `tins.gemspec`.
|
|
43
|
+
- Configured the test runner for `ollama-chat` by setting the
|
|
44
|
+
`OLLAMA_CHAT_TOOLS_TEST_RUNNER` environment variable to `bundle exec
|
|
45
|
+
test-unit` via `.envrc`.
|
|
46
|
+
|
|
3
47
|
## 2026-04-14 v1.53.0
|
|
4
48
|
|
|
5
49
|
- Added `stringify_keys_recursive` and `stringify_keys_recursive!` methods to convert hash keys from symbols to strings
|
data/README.md
CHANGED
|
@@ -150,7 +150,7 @@ hello
|
|
|
150
150
|
### Hash Symbolization
|
|
151
151
|
|
|
152
152
|
```ruby
|
|
153
|
-
require 'tins/hash_symbolize_keys_recursive'
|
|
153
|
+
require 'tins/xt/hash_symbolize_keys_recursive'
|
|
154
154
|
|
|
155
155
|
hash = {
|
|
156
156
|
'name' => 'John',
|
|
@@ -159,7 +159,73 @@ hash = {
|
|
|
159
159
|
'street' => '123 Main St'
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
hash.symbolize_keys_recursive! # Converts all keys to symbols
|
|
162
|
+
hash.symbolize_keys_recursive! # Converts all keys to symbols using a stack-safe deep transformation
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Deep Hash and Array Transformation
|
|
166
|
+
|
|
167
|
+
```ruby
|
|
168
|
+
require 'tins/xt/deep_transform'
|
|
169
|
+
|
|
170
|
+
h = { "name" => "john", "details" => { "city" => "berlin", "tags" => ["ruby", "dev"] } }
|
|
171
|
+
|
|
172
|
+
# Transform keys to symbols and values (if strings) to uppercase
|
|
173
|
+
result = h.deep_transform(
|
|
174
|
+
key: -> k { k.to_sym },
|
|
175
|
+
value: -> v { v.is_a?(String) ? v.upcase : v }
|
|
176
|
+
)
|
|
177
|
+
# => { name: "JOHN", details: { city: "BERLIN", tags: ["RUBY", "DEV"] } }
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
#### Advanced Usage (Contextual Transformations)
|
|
181
|
+
|
|
182
|
+
The `value` lambda can accept 1, 2, or 3 arguments depending on the level of context required for each node's transformation:
|
|
183
|
+
- `-> v { ... }`: Global transform (node only).
|
|
184
|
+
- `-> k, v { ... }`: Contextual transform (key/index and node).
|
|
185
|
+
- `-> k, v, c { ... }`: Full structural transform (key/index, node, and parent container).
|
|
186
|
+
|
|
187
|
+
#### 🧮 Example: Calculating a moving average on a nested array structure
|
|
188
|
+
|
|
189
|
+
```ruby
|
|
190
|
+
require 'tins/xt/deep_transform'
|
|
191
|
+
|
|
192
|
+
# Root can be an Array as well
|
|
193
|
+
a = (1..10).each_slice(5).map(&:to_a)
|
|
194
|
+
# => [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]
|
|
195
|
+
|
|
196
|
+
result = a.deep_transform(value: -> i, x, c {
|
|
197
|
+
Array === c && Numeric === x && i > 0 ? (c[i-1] + x) / 2.0 : x
|
|
198
|
+
})
|
|
199
|
+
# => [[1, 1.5, 2.5, 3.5, 4.5], [6, 6.5, 7.5, 8.5, 9.5]]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### 🛡️ Example: Structural Pruning & Sanitization
|
|
203
|
+
|
|
204
|
+
Because `deep_transform` processes nodes bottom-up, you can effectively prune
|
|
205
|
+
entire branches of a tree by returning an empty container when a specific
|
|
206
|
+
condition (like a "private" flag) is met.
|
|
207
|
+
|
|
208
|
+
```ruby
|
|
209
|
+
require 'tins/xt/deep_transform'
|
|
210
|
+
|
|
211
|
+
# A nested data structure with some sections marked for pruning
|
|
212
|
+
api_response = {
|
|
213
|
+
user: {
|
|
214
|
+
name: "Florian",
|
|
215
|
+
profile: { bio: "Ruby Expert", internal_id: "SECRET_123", noindex: true }
|
|
216
|
+
},
|
|
217
|
+
settings: {
|
|
218
|
+
theme: "dark",
|
|
219
|
+
debug_info: { logs: ["Error 404"], noindex: true }
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
# Prune any Hash that is marked with `noindex: true`
|
|
224
|
+
sanitized = api_response.deep_transform(value: -> v {
|
|
225
|
+
(v.is_a?(Hash) && v[:noindex]) ? {} : v
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
# => { user: { name: "Florian", profile: {} }, settings: { theme: "dark", debug_info: {} } }
|
|
163
229
|
```
|
|
164
230
|
|
|
165
231
|
## Author
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
module Tins
|
|
2
|
+
# DeepTransform provides a robust engine for traversing an object tree and
|
|
3
|
+
# applying a transformation to each node iteratively, preventing stack
|
|
4
|
+
# overflows.
|
|
5
|
+
module DeepTransform
|
|
6
|
+
# Transforms an object and its children using the provided lambdas. This
|
|
7
|
+
# implementation uses an iterative bottom-up approach to avoid
|
|
8
|
+
# SystemStackError.
|
|
9
|
+
#
|
|
10
|
+
# @param key [Proc, nil] An optional lambda/proc used to transform hash keys
|
|
11
|
+
# during reconstruction. Defaults to an identity transformation.
|
|
12
|
+
# @param value [Proc, nil] An optional lambda/proc used to transform nodes
|
|
13
|
+
# (values) during reconstruction. Its behavior depends on its arity:
|
|
14
|
+
# - Arity 1: called with `(node)`
|
|
15
|
+
# - Arity 2: called with `(index_or_key, node)`
|
|
16
|
+
# - Arity 3: called with `(index_or_key, node, parent_container)`
|
|
17
|
+
# Defaults to an identity transformation.
|
|
18
|
+
# @param circular [Object] value returned when a circular reference is detected
|
|
19
|
+
# @return [Object] the fully transformed object tree
|
|
20
|
+
# @raise [ArgumentError] if a block is provided (use `key:` and `value:` instead)
|
|
21
|
+
def deep_transform(key: nil, value: nil, circular: nil)
|
|
22
|
+
block_given? and raise ArgumentError, '&block not supported'
|
|
23
|
+
_transform_iterative(self, key: key, value: value, circular: circular)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
# The core iterative engine used to traverse and transform object trees.
|
|
29
|
+
#
|
|
30
|
+
# This method implements a non-recursive, two-pass approach to avoid
|
|
31
|
+
# `SystemStackError` on deeply nested structures:
|
|
32
|
+
#
|
|
33
|
+
# 1. **Discovery Pass**: Performs a pre-order traversal using an explicit stack
|
|
34
|
+
# to identify all reachable nodes in the tree, tracking them by their
|
|
35
|
+
# object ID (`__id__`) to handle shared references and circularities.
|
|
36
|
+
# 2. **Reconstruction Pass**: Processes the discovered nodes in reverse
|
|
37
|
+
# order (bottom-up). This ensures that child nodes are transformed and
|
|
38
|
+
# stored in the results map before their parent nodes are processed.
|
|
39
|
+
#
|
|
40
|
+
# @param root [Object] The root object of the tree to be transformed.
|
|
41
|
+
# @param key [Proc, nil] An optional lambda/proc used to transform hash keys
|
|
42
|
+
# during reconstruction. Defaults to an identity transformation.
|
|
43
|
+
# @param value [Proc, nil] An optional lambda/proc used to transform nodes
|
|
44
|
+
# (values) during reconstruction. Its behavior depends on its arity:
|
|
45
|
+
# - Arity 1: called with `(node)`
|
|
46
|
+
# - Arity 2: called with `(index_or_key, node)`
|
|
47
|
+
# - Arity 3: called with `(index_or_key, node, parent_container)`
|
|
48
|
+
# Defaults to an identity transformation.
|
|
49
|
+
# @param circular [Object] The value to assign when a circular reference is
|
|
50
|
+
# detected during the reconstruction phase.
|
|
51
|
+
# @return [Object] The root of the newly reconstructed and transformed tree.
|
|
52
|
+
#
|
|
53
|
+
# @note This method relies on `to_hash` and `to_ary` to identify container
|
|
54
|
+
# nodes. Objects must implement these methods if they are to be treated
|
|
55
|
+
# as branch nodes in the tree.
|
|
56
|
+
def _transform_iterative(root, key: nil, value: nil, circular:)
|
|
57
|
+
key ||= -> x { x }
|
|
58
|
+
value ||= -> x { x }
|
|
59
|
+
|
|
60
|
+
# Pass 1: Discovery (Pre-order traversal to find all nodes)
|
|
61
|
+
nodes = []
|
|
62
|
+
stack = [ [ nil, root, nil ] ]
|
|
63
|
+
visited = {}
|
|
64
|
+
|
|
65
|
+
while stack.any?
|
|
66
|
+
idx, node, cont = stack.pop
|
|
67
|
+
next if visited[node.__id__]
|
|
68
|
+
|
|
69
|
+
visited[node.__id__] = true
|
|
70
|
+
nodes << [ idx, node, cont ]
|
|
71
|
+
|
|
72
|
+
# Unfold containers to find children for discovery
|
|
73
|
+
if node.respond_to?(:to_hash)
|
|
74
|
+
node.to_hash.each_pair { |k, v| stack << [ k, v, node ] }
|
|
75
|
+
elsif node.respond_to?(:to_ary)
|
|
76
|
+
node.to_ary.each_with_index { |v, i| stack << [ i, v, node ] }
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Pass 2: Bottom-Up Reconstruction
|
|
81
|
+
results = {}
|
|
82
|
+
nodes.reverse_each do |idx, node, cont|
|
|
83
|
+
transformed = case value.arity
|
|
84
|
+
when 1 then value.(node)
|
|
85
|
+
when 2 then value.(idx, node)
|
|
86
|
+
when 3 then value.(idx, node, cont)
|
|
87
|
+
else
|
|
88
|
+
raise ArgumentError, 'value lambda has to be arity in 1..3'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if transformed.respond_to?(:to_hash)
|
|
92
|
+
hash = transformed.to_hash
|
|
93
|
+
new_hash = hash.dup.tap(&:clear)
|
|
94
|
+
hash.each do |k, v|
|
|
95
|
+
# Resolve child from results map or mark as circular
|
|
96
|
+
new_hash[key.(k)] = results[v.__id__] ||
|
|
97
|
+
(v.respond_to?(:to_hash) || v.respond_to?(:to_ary) ? circular : v)
|
|
98
|
+
end
|
|
99
|
+
transformed = new_hash
|
|
100
|
+
elsif transformed.respond_to?(:to_ary)
|
|
101
|
+
ary = transformed.to_ary
|
|
102
|
+
transformed = ary.map do |v|
|
|
103
|
+
results[v.__id__] ||
|
|
104
|
+
(v.respond_to?(:to_hash) || v.respond_to?(:to_ary) ? circular : v)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
results[node.__id__] = transformed
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
results[root.__id__]
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
data/lib/tins/go.rb
CHANGED
|
@@ -41,10 +41,22 @@ module Tins
|
|
|
41
41
|
module_function
|
|
42
42
|
|
|
43
43
|
# Parses the argument array _args_, according to the pattern _s_, to
|
|
44
|
-
# retrieve the single character command line options from it.
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
44
|
+
# retrieve the single character command line options from it.
|
|
45
|
+
#
|
|
46
|
+
# Pattern syntax:
|
|
47
|
+
# - 'x': Boolean flag.
|
|
48
|
+
# - 'x:': Option requiring an argument.
|
|
49
|
+
# - '~x': Explicitly disables the -x option.
|
|
50
|
+
#
|
|
51
|
+
# Note: If a character is defined as both a boolean and a value flag
|
|
52
|
+
# (e.g., 'xx:'), it is considered ambiguous and will be disabled.
|
|
53
|
+
#
|
|
54
|
+
# Behavior:
|
|
55
|
+
# - If a value flag is missing its argument, or the next argument
|
|
56
|
+
# starts with '-', a warning is issued to STDERR and the flag
|
|
57
|
+
# is not set.
|
|
58
|
+
# - This method modifies the _args_ array in-place, removing all
|
|
59
|
+
# parsed options and leaving only the remaining positional arguments.
|
|
48
60
|
#
|
|
49
61
|
# The _defaults_ argument specifies default values for the options.
|
|
50
62
|
#
|
|
@@ -91,6 +103,11 @@ module Tins
|
|
|
91
103
|
t[a ? 1 : 0][o] = a ? nil : false
|
|
92
104
|
t
|
|
93
105
|
}
|
|
106
|
+
(b.keys & v.keys).each do |o|
|
|
107
|
+
warn "Warning: Option #{o} passed as boolean and value flag! => Ignoring #{o.inspect}."
|
|
108
|
+
b.delete(o)
|
|
109
|
+
v.delete(o)
|
|
110
|
+
end
|
|
94
111
|
b.each_key do |k|
|
|
95
112
|
d.key?(k) or next
|
|
96
113
|
if [ 0, false, nil ].include?(d[k])
|
|
@@ -116,9 +133,16 @@ module Tins
|
|
|
116
133
|
o = p.slice!(0, 1)
|
|
117
134
|
if v.key?(o)
|
|
118
135
|
if p.empty? && args.empty?
|
|
136
|
+
warn "Warning: Option -#{o} requires an argument, but none was provided."
|
|
119
137
|
r << a
|
|
120
138
|
break 1
|
|
121
139
|
elsif p == ''
|
|
140
|
+
an = args.first
|
|
141
|
+
if an =~ /\A-/
|
|
142
|
+
warn "Warning: Option -#{o} requires an argument, but #{an.inspect} is not a valid value."
|
|
143
|
+
r << a
|
|
144
|
+
break
|
|
145
|
+
end
|
|
122
146
|
a = args.shift
|
|
123
147
|
else
|
|
124
148
|
a = p
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
require 'tins/
|
|
1
|
+
require 'tins/deep_transform'
|
|
2
2
|
|
|
3
3
|
module Tins
|
|
4
|
-
# This module provides
|
|
5
|
-
# nested structures including hashes and arrays,
|
|
6
|
-
#
|
|
4
|
+
# This module provides deep symbolization of hash keys. It handles
|
|
5
|
+
# nested structures including hashes and arrays, utilizing an iterative
|
|
6
|
+
# engine to prevent stack overflows and handle circular references.
|
|
7
7
|
#
|
|
8
8
|
# @example Basic usage
|
|
9
9
|
# hash = { "name" => "John", "address" => { "street" => "123 Main St" } }
|
|
@@ -16,14 +16,11 @@ module Tins
|
|
|
16
16
|
# hash.symbolize_keys_recursive(circular: "[Circular Reference]")
|
|
17
17
|
# # => { name: "John", self: "[Circular Reference]" }
|
|
18
18
|
module HashSymbolizeKeysRecursive
|
|
19
|
-
|
|
19
|
+
include Tins::DeepTransform
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
# Recursively converts all string keys in a hash (and nested hashes/arrays)
|
|
26
|
-
# to symbols. This method does not modify the original hash.
|
|
21
|
+
# Deeply converts all string keys in a hash (and nested hashes/arrays)
|
|
22
|
+
# to symbols using an iterative approach to avoid SystemStackError.
|
|
23
|
+
# This method does not modify the original hash.
|
|
27
24
|
#
|
|
28
25
|
# @param circular [Object] The value to use when encountering circular references.
|
|
29
26
|
# Defaults to nil, which means circular references will be ignored.
|
|
@@ -48,13 +45,11 @@ module Tins
|
|
|
48
45
|
# hash.symbolize_keys_recursive(circular: "[Circular]")
|
|
49
46
|
# # => { name: "John", self: "[Circular]" }
|
|
50
47
|
def symbolize_keys_recursive(circular: nil)
|
|
51
|
-
|
|
52
|
-
_transform_keys_recursive(self, circular: circular, transform: :to_sym)
|
|
53
|
-
ensure
|
|
54
|
-
self.seen = nil
|
|
48
|
+
deep_transform(key: -> x { x.to_sym }, circular: circular)
|
|
55
49
|
end
|
|
56
50
|
|
|
57
|
-
#
|
|
51
|
+
# Deeply converts all keys in the hash (and nested hashes) to strings,
|
|
52
|
+
# using an iterative approach to avoid SystemStackError.
|
|
58
53
|
#
|
|
59
54
|
# @param circular [Object] The value to return for circular references.
|
|
60
55
|
# @return [Hash] A new hash with all keys converted to strings.
|
|
@@ -64,14 +59,12 @@ module Tins
|
|
|
64
59
|
# hash.stringify_keys_recursive
|
|
65
60
|
# # => { "name" => "John", "address" => { "city" => "NYC" } }
|
|
66
61
|
def stringify_keys_recursive(circular: nil)
|
|
67
|
-
|
|
68
|
-
_transform_keys_recursive(self, circular: circular, transform: :to_s)
|
|
69
|
-
ensure
|
|
70
|
-
self.seen = nil
|
|
62
|
+
deep_transform(key: -> x { x.to_s }, circular: circular)
|
|
71
63
|
end
|
|
72
64
|
|
|
73
|
-
#
|
|
74
|
-
# to symbols. This method modifies the
|
|
65
|
+
# Deeply converts all string keys in a hash (and nested hashes/arrays)
|
|
66
|
+
# to symbols using an iterative approach. This method modifies the
|
|
67
|
+
# original hash in place.
|
|
75
68
|
#
|
|
76
69
|
# @param circular [Object] The value to use when encountering circular references.
|
|
77
70
|
# Defaults to nil, which means circular references will be ignored.
|
|
@@ -86,7 +79,8 @@ module Tins
|
|
|
86
79
|
replace symbolize_keys_recursive(circular: circular)
|
|
87
80
|
end
|
|
88
81
|
|
|
89
|
-
#
|
|
82
|
+
# Deeply converts all keys in the hash (and nested hashes) to strings
|
|
83
|
+
# in place, using an iterative approach.
|
|
90
84
|
#
|
|
91
85
|
# @param circular [Object] The value to return for circular references.
|
|
92
86
|
# @return [Hash] The same hash with all keys converted to strings.
|
|
@@ -98,40 +92,5 @@ module Tins
|
|
|
98
92
|
def stringify_keys_recursive!(circular: nil)
|
|
99
93
|
replace stringify_keys_recursive(circular: circular)
|
|
100
94
|
end
|
|
101
|
-
|
|
102
|
-
private
|
|
103
|
-
|
|
104
|
-
# Performs the actual recursive transformation work
|
|
105
|
-
#
|
|
106
|
-
# @param object [Object] The object to process
|
|
107
|
-
# @param circular [Object] The value to return for circular references
|
|
108
|
-
# @param transform [Symbol] The transformation to apply to keys (`:to_sym` or `:to_s`).
|
|
109
|
-
# @return [Object] The processed object with transformed keys
|
|
110
|
-
def _transform_keys_recursive(object, circular: nil, transform:)
|
|
111
|
-
case
|
|
112
|
-
when seen[object.__id__]
|
|
113
|
-
object = circular
|
|
114
|
-
when object.respond_to?(:to_hash)
|
|
115
|
-
object = object.to_hash
|
|
116
|
-
seen[object.__id__] = true
|
|
117
|
-
new_object = object.class.new
|
|
118
|
-
seen[new_object.__id__] = true
|
|
119
|
-
object.each do |k, v|
|
|
120
|
-
new_object[k.to_s.__send__(transform)] =
|
|
121
|
-
_transform_keys_recursive(v, circular: circular, transform:)
|
|
122
|
-
end
|
|
123
|
-
object = new_object
|
|
124
|
-
when object.respond_to?(:to_ary)
|
|
125
|
-
object = object.to_ary
|
|
126
|
-
seen[object.__id__] = true
|
|
127
|
-
new_object = object.class.new(object.size)
|
|
128
|
-
seen[new_object.__id__] = true
|
|
129
|
-
object.each_with_index do |v, i|
|
|
130
|
-
new_object[i] = _transform_keys_recursive(v, circular: circular, transform:)
|
|
131
|
-
end
|
|
132
|
-
object = new_object
|
|
133
|
-
end
|
|
134
|
-
object
|
|
135
|
-
end
|
|
136
95
|
end
|
|
137
96
|
end
|
data/lib/tins/version.rb
CHANGED
data/lib/tins/xt.rb
CHANGED
data/lib/tins.rb
CHANGED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
require 'tins/xt/deep_transform'
|
|
3
|
+
|
|
4
|
+
module Tins
|
|
5
|
+
class DeepTransformTest < Test::Unit::TestCase
|
|
6
|
+
class HashLike
|
|
7
|
+
attr_reader :name, :children
|
|
8
|
+
def initialize(name, children = [])
|
|
9
|
+
@name = name
|
|
10
|
+
@children = children
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def to_hash
|
|
14
|
+
{ name: @name, children: @children }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def test_basic_transform
|
|
19
|
+
# Simple identity transform on a flat hash
|
|
20
|
+
h = { a: 1, b: 2 }
|
|
21
|
+
result = h.deep_transform(value: -> node { node })
|
|
22
|
+
assert_equal h, result
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def test_identity_behavior
|
|
26
|
+
# Test calling without any blocks - should act as a deep copy identity
|
|
27
|
+
# transform
|
|
28
|
+
h = { a: 1, b: { c: 2 }, d: [3, { e: 4 }] }
|
|
29
|
+
result = h.deep_transform
|
|
30
|
+
assert_equal h, result
|
|
31
|
+
refute_same h, result # Ensure it's a new object (deep copy)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def test_value_transformation
|
|
35
|
+
# Transform all numbers to strings
|
|
36
|
+
h = { a: 1, b: [2, 3] }
|
|
37
|
+
result = h.deep_transform(value: -> node {
|
|
38
|
+
node.is_a?(Integer) ? node.to_s : node
|
|
39
|
+
})
|
|
40
|
+
assert_equal({ a: '1', b: ['2', '3'] }, result)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def test_key_transformation
|
|
44
|
+
# Transform all keys to uppercase strings
|
|
45
|
+
h = { name: 'John', details: { age: 30, city: 'Berlin' } }
|
|
46
|
+
result = h.deep_transform(
|
|
47
|
+
key: -> k { k.to_s.upcase },
|
|
48
|
+
value: -> node { node }
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
expected = {
|
|
52
|
+
'NAME' => 'John',
|
|
53
|
+
'DETAILS' => { 'AGE' => 30, 'CITY' => 'Berlin' }
|
|
54
|
+
}
|
|
55
|
+
assert_equal expected, result
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def test_recursive_object_flattening
|
|
59
|
+
# Objects unfold into hashes, which contain more objects.
|
|
60
|
+
child = HashLike.new('Child')
|
|
61
|
+
parent = HashLike.new('Parent', [child])
|
|
62
|
+
root = { root_node: parent }
|
|
63
|
+
|
|
64
|
+
result = root.deep_transform(
|
|
65
|
+
value: -> node { node.respond_to?(:to_hash) ? node.to_hash : node }
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
expected = {
|
|
69
|
+
root_node: {
|
|
70
|
+
name: 'Parent',
|
|
71
|
+
children: [ { name: 'Child', children: [] } ]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
assert_equal expected, result
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def test_circular_reference_detection
|
|
78
|
+
# Create a tight loop: A -> B -> A
|
|
79
|
+
a = { name: 'A' }
|
|
80
|
+
b = { name: 'B', parent: a }
|
|
81
|
+
a[:child] = b
|
|
82
|
+
|
|
83
|
+
placeholder = "🔄 LOOP"
|
|
84
|
+
result = a.deep_transform(circular: placeholder, value: -> node { node })
|
|
85
|
+
|
|
86
|
+
# Parent should be OK, Child's reference to Parent should be the placeholder
|
|
87
|
+
assert_equal 'A', result[:name]
|
|
88
|
+
assert_equal 'B', result[:child][:name]
|
|
89
|
+
assert_equal placeholder, result[:child][:parent]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def test_deeply_nested_structure
|
|
93
|
+
# Create a chain of 100 nested objects to ensure no stack overflow
|
|
94
|
+
current = { val: 'leaf' }
|
|
95
|
+
100.times do |i|
|
|
96
|
+
current = { level: i, child: current }
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
result = current.deep_transform(value: -> node { node })
|
|
100
|
+
# Just verify the depth is preserved without crashing
|
|
101
|
+
depth = 0
|
|
102
|
+
temp = result
|
|
103
|
+
while temp.is_a?(Hash) && temp[:child]
|
|
104
|
+
temp = temp[:child]
|
|
105
|
+
depth += 1
|
|
106
|
+
end
|
|
107
|
+
assert_equal 100, depth
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def test_mixed_containers
|
|
111
|
+
# Test a mix of arrays and hashes
|
|
112
|
+
h = {
|
|
113
|
+
list: [ { item: 1 }, { item: 2 } ],
|
|
114
|
+
meta: { tags: ['a', 'b'] }
|
|
115
|
+
}
|
|
116
|
+
result = h.deep_transform(value: -> node { node })
|
|
117
|
+
assert_equal h, result
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def test_empty_containers
|
|
121
|
+
assert_equal({}, {}.deep_transform(value: -> node { node }))
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def test_with_nil_values
|
|
125
|
+
h = { a: nil, b: [nil, 1] }
|
|
126
|
+
result = h.deep_transform(value: -> node { node })
|
|
127
|
+
assert_equal({ a: nil, b: [nil, 1] }, result)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def test_arity_2_transformation
|
|
131
|
+
# Transform values only if the key starts with 'a'
|
|
132
|
+
h = { a_name: 'john', b_name: 'doe' }
|
|
133
|
+
result = h.deep_transform(value: -> k, v {
|
|
134
|
+
k.to_s.start_with?('a') ? v.upcase : v
|
|
135
|
+
})
|
|
136
|
+
assert_equal({ a_name: 'JOHN', b_name: 'doe' }, result)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def test_arity_3_transformation
|
|
140
|
+
# Sliding window sum using parent context
|
|
141
|
+
input = (1..5).to_a # [1, 2, 3, 4, 5]
|
|
142
|
+
result = input.deep_transform(value: -> i, x, c {
|
|
143
|
+
Integer === x ? (i + 1) * x : x
|
|
144
|
+
})
|
|
145
|
+
assert_equal [ 1, 4, 9, 16, 25 ], result # 🤔 I've seen this before
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def test_invalid_zero_arity
|
|
149
|
+
h = { a: 1 }
|
|
150
|
+
assert_raise(ArgumentError) do
|
|
151
|
+
h.deep_transform(value: -> { :nix })
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def test_invalid_arity
|
|
156
|
+
h = { a: 1 }
|
|
157
|
+
assert_raise(ArgumentError) do
|
|
158
|
+
h.deep_transform(value: -> k, v, c, extra { v })
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
data/tests/go_test.rb
CHANGED
|
@@ -77,5 +77,32 @@ module Tins
|
|
|
77
77
|
assert_equal({ ?b => false, 'v' => 'foo' }, r)
|
|
78
78
|
assert_equal [], args
|
|
79
79
|
end
|
|
80
|
+
|
|
81
|
+
def test_missing_argument
|
|
82
|
+
r = go 'x:', args = %w[-x]
|
|
83
|
+
assert_equal({ 'x' => nil }, r)
|
|
84
|
+
assert_equal %w[-x], args
|
|
85
|
+
|
|
86
|
+
r = go 'x:', args = %w[-x -y]
|
|
87
|
+
assert_equal({ 'x' => nil }, r)
|
|
88
|
+
assert_equal %w[-x -y], args
|
|
89
|
+
|
|
90
|
+
r = go 'x:', args = %w[-x pos]
|
|
91
|
+
assert_equal({ 'x' => 'pos' }, r)
|
|
92
|
+
assert_equal [], args
|
|
93
|
+
|
|
94
|
+
r = go 'x', args = %w[-x pos]
|
|
95
|
+
assert_equal({ 'x' => 1 }, r)
|
|
96
|
+
assert_equal %w[pos], args
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def test_invalid_pattern
|
|
100
|
+
r = go 'xx:', args = %w[-x pos]
|
|
101
|
+
assert_equal({}, r)
|
|
102
|
+
assert_equal %w[-x pos], args
|
|
103
|
+
r = go 'xx:', args = %w[-x]
|
|
104
|
+
assert_equal({}, r)
|
|
105
|
+
assert_equal %w[-x], args
|
|
106
|
+
end
|
|
80
107
|
end
|
|
81
108
|
end
|
data/tins.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: tins 1.
|
|
2
|
+
# stub: tins 1.55.0 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "tins".freeze
|
|
6
|
-
s.version = "1.
|
|
6
|
+
s.version = "1.55.0".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
@@ -11,19 +11,19 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.date = "1980-01-02"
|
|
12
12
|
s.description = "All the stuff that isn't good/big enough for a real library.".freeze
|
|
13
13
|
s.email = "flori@ping.de".freeze
|
|
14
|
-
s.extra_rdoc_files = ["README.md".freeze, "lib/dslkit.rb".freeze, "lib/dslkit/polite.rb".freeze, "lib/dslkit/rude.rb".freeze, "lib/spruz.rb".freeze, "lib/tins.rb".freeze, "lib/tins/alias.rb".freeze, "lib/tins/annotate.rb".freeze, "lib/tins/ask_and_send.rb".freeze, "lib/tins/attempt.rb".freeze, "lib/tins/bijection.rb".freeze, "lib/tins/case_predicate.rb".freeze, "lib/tins/complete.rb".freeze, "lib/tins/concern.rb".freeze, "lib/tins/date_dummy.rb".freeze, "lib/tins/date_time_dummy.rb".freeze, "lib/tins/deep_dup.rb".freeze, "lib/tins/deprecate.rb".freeze, "lib/tins/dslkit.rb".freeze, "lib/tins/duration.rb".freeze, "lib/tins/expose.rb".freeze, "lib/tins/extract_last_argument_options.rb".freeze, "lib/tins/file_binary.rb".freeze, "lib/tins/find.rb".freeze, "lib/tins/generator.rb".freeze, "lib/tins/go.rb".freeze, "lib/tins/hash_bfs.rb".freeze, "lib/tins/hash_dfs.rb".freeze, "lib/tins/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/hash_union.rb".freeze, "lib/tins/if_predicate.rb".freeze, "lib/tins/implement.rb".freeze, "lib/tins/limited.rb".freeze, "lib/tins/lines_file.rb".freeze, "lib/tins/lru_cache.rb".freeze, "lib/tins/memoize.rb".freeze, "lib/tins/method_description.rb".freeze, "lib/tins/minimize.rb".freeze, "lib/tins/module_group.rb".freeze, "lib/tins/named_set.rb".freeze, "lib/tins/null.rb".freeze, "lib/tins/once.rb".freeze, "lib/tins/p.rb".freeze, "lib/tins/partial_application.rb".freeze, "lib/tins/proc_compose.rb".freeze, "lib/tins/proc_prelude.rb".freeze, "lib/tins/range_plus.rb".freeze, "lib/tins/require_maybe.rb".freeze, "lib/tins/responding.rb".freeze, "lib/tins/secure_write.rb".freeze, "lib/tins/sexy_singleton.rb".freeze, "lib/tins/string_byte_order_mark.rb".freeze, "lib/tins/string_camelize.rb".freeze, "lib/tins/string_named_placeholders.rb".freeze, "lib/tins/string_underscore.rb".freeze, "lib/tins/string_version.rb".freeze, "lib/tins/subhash.rb".freeze, "lib/tins/temp_io.rb".freeze, "lib/tins/temp_io_enum.rb".freeze, "lib/tins/terminal.rb".freeze, "lib/tins/thread_local.rb".freeze, "lib/tins/time_dummy.rb".freeze, "lib/tins/to.rb".freeze, "lib/tins/to_proc.rb".freeze, "lib/tins/token.rb".freeze, "lib/tins/unit.rb".freeze, "lib/tins/version.rb".freeze, "lib/tins/write.rb".freeze, "lib/tins/xt.rb".freeze, "lib/tins/xt/annotate.rb".freeze, "lib/tins/xt/ask_and_send.rb".freeze, "lib/tins/xt/attempt.rb".freeze, "lib/tins/xt/blank.rb".freeze, "lib/tins/xt/case_predicate.rb".freeze, "lib/tins/xt/complete.rb".freeze, "lib/tins/xt/concern.rb".freeze, "lib/tins/xt/date_dummy.rb".freeze, "lib/tins/xt/date_time_dummy.rb".freeze, "lib/tins/xt/deep_dup.rb".freeze, "lib/tins/xt/deprecate.rb".freeze, "lib/tins/xt/dslkit.rb".freeze, "lib/tins/xt/expose.rb".freeze, "lib/tins/xt/extract_last_argument_options.rb".freeze, "lib/tins/xt/file_binary.rb".freeze, "lib/tins/xt/full.rb".freeze, "lib/tins/xt/hash_bfs.rb".freeze, "lib/tins/xt/hash_dfs.rb".freeze, "lib/tins/xt/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/xt/hash_union.rb".freeze, "lib/tins/xt/if_predicate.rb".freeze, "lib/tins/xt/implement.rb".freeze, "lib/tins/xt/irb.rb".freeze, "lib/tins/xt/method_description.rb".freeze, "lib/tins/xt/minimize.rb".freeze, "lib/tins/xt/named.rb".freeze, "lib/tins/xt/null.rb".freeze, "lib/tins/xt/p.rb".freeze, "lib/tins/xt/partial_application.rb".freeze, "lib/tins/xt/proc_compose.rb".freeze, "lib/tins/xt/proc_prelude.rb".freeze, "lib/tins/xt/range_plus.rb".freeze, "lib/tins/xt/require_maybe.rb".freeze, "lib/tins/xt/responding.rb".freeze, "lib/tins/xt/secure_write.rb".freeze, "lib/tins/xt/sexy_singleton.rb".freeze, "lib/tins/xt/string.rb".freeze, "lib/tins/xt/string_byte_order_mark.rb".freeze, "lib/tins/xt/string_camelize.rb".freeze, "lib/tins/xt/string_named_placeholders.rb".freeze, "lib/tins/xt/string_underscore.rb".freeze, "lib/tins/xt/string_version.rb".freeze, "lib/tins/xt/subhash.rb".freeze, "lib/tins/xt/temp_io.rb".freeze, "lib/tins/xt/time_dummy.rb".freeze, "lib/tins/xt/time_freezer.rb".freeze, "lib/tins/xt/to.rb".freeze, "lib/tins/xt/write.rb".freeze]
|
|
15
|
-
s.files = ["CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "examples/add_one.png".freeze, "examples/add_one.stm".freeze, "examples/bb3.png".freeze, "examples/bb3.stm".freeze, "examples/concatenate_compare.mtm".freeze, "examples/concatenate_compare.png".freeze, "examples/length_difference.mtm".freeze, "examples/length_difference.png".freeze, "examples/let.rb".freeze, "examples/mail.rb".freeze, "examples/minsky.rb".freeze, "examples/multiply.reg".freeze, "examples/null_pattern.rb".freeze, "examples/ones_difference-mtm.png".freeze, "examples/ones_difference-stm.png".freeze, "examples/ones_difference.mtm".freeze, "examples/ones_difference.stm".freeze, "examples/prefix-equals-suffix-reversed-with-infix.png".freeze, "examples/prefix-equals-suffix-reversed-with-infix.stm".freeze, "examples/recipe.rb".freeze, "examples/recipe2.rb".freeze, "examples/recipe_common.rb".freeze, "examples/subtract.reg".freeze, "examples/turing-graph.rb".freeze, "examples/turing.rb".freeze, "lib/dslkit.rb".freeze, "lib/dslkit/polite.rb".freeze, "lib/dslkit/rude.rb".freeze, "lib/spruz".freeze, "lib/spruz.rb".freeze, "lib/tins.rb".freeze, "lib/tins/alias.rb".freeze, "lib/tins/annotate.rb".freeze, "lib/tins/ask_and_send.rb".freeze, "lib/tins/attempt.rb".freeze, "lib/tins/bijection.rb".freeze, "lib/tins/case_predicate.rb".freeze, "lib/tins/complete.rb".freeze, "lib/tins/concern.rb".freeze, "lib/tins/date_dummy.rb".freeze, "lib/tins/date_time_dummy.rb".freeze, "lib/tins/deep_dup.rb".freeze, "lib/tins/deprecate.rb".freeze, "lib/tins/dslkit.rb".freeze, "lib/tins/duration.rb".freeze, "lib/tins/expose.rb".freeze, "lib/tins/extract_last_argument_options.rb".freeze, "lib/tins/file_binary.rb".freeze, "lib/tins/find.rb".freeze, "lib/tins/generator.rb".freeze, "lib/tins/go.rb".freeze, "lib/tins/hash_bfs.rb".freeze, "lib/tins/hash_dfs.rb".freeze, "lib/tins/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/hash_union.rb".freeze, "lib/tins/if_predicate.rb".freeze, "lib/tins/implement.rb".freeze, "lib/tins/limited.rb".freeze, "lib/tins/lines_file.rb".freeze, "lib/tins/lru_cache.rb".freeze, "lib/tins/memoize.rb".freeze, "lib/tins/method_description.rb".freeze, "lib/tins/minimize.rb".freeze, "lib/tins/module_group.rb".freeze, "lib/tins/named_set.rb".freeze, "lib/tins/null.rb".freeze, "lib/tins/once.rb".freeze, "lib/tins/p.rb".freeze, "lib/tins/partial_application.rb".freeze, "lib/tins/proc_compose.rb".freeze, "lib/tins/proc_prelude.rb".freeze, "lib/tins/range_plus.rb".freeze, "lib/tins/require_maybe.rb".freeze, "lib/tins/responding.rb".freeze, "lib/tins/secure_write.rb".freeze, "lib/tins/sexy_singleton.rb".freeze, "lib/tins/string_byte_order_mark.rb".freeze, "lib/tins/string_camelize.rb".freeze, "lib/tins/string_named_placeholders.rb".freeze, "lib/tins/string_underscore.rb".freeze, "lib/tins/string_version.rb".freeze, "lib/tins/subhash.rb".freeze, "lib/tins/temp_io.rb".freeze, "lib/tins/temp_io_enum.rb".freeze, "lib/tins/terminal.rb".freeze, "lib/tins/thread_local.rb".freeze, "lib/tins/time_dummy.rb".freeze, "lib/tins/to.rb".freeze, "lib/tins/to_proc.rb".freeze, "lib/tins/token.rb".freeze, "lib/tins/unit.rb".freeze, "lib/tins/version.rb".freeze, "lib/tins/write.rb".freeze, "lib/tins/xt.rb".freeze, "lib/tins/xt/annotate.rb".freeze, "lib/tins/xt/ask_and_send.rb".freeze, "lib/tins/xt/attempt.rb".freeze, "lib/tins/xt/blank.rb".freeze, "lib/tins/xt/case_predicate.rb".freeze, "lib/tins/xt/complete.rb".freeze, "lib/tins/xt/concern.rb".freeze, "lib/tins/xt/date_dummy.rb".freeze, "lib/tins/xt/date_time_dummy.rb".freeze, "lib/tins/xt/deep_dup.rb".freeze, "lib/tins/xt/deprecate.rb".freeze, "lib/tins/xt/dslkit.rb".freeze, "lib/tins/xt/expose.rb".freeze, "lib/tins/xt/extract_last_argument_options.rb".freeze, "lib/tins/xt/file_binary.rb".freeze, "lib/tins/xt/full.rb".freeze, "lib/tins/xt/hash_bfs.rb".freeze, "lib/tins/xt/hash_dfs.rb".freeze, "lib/tins/xt/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/xt/hash_union.rb".freeze, "lib/tins/xt/if_predicate.rb".freeze, "lib/tins/xt/implement.rb".freeze, "lib/tins/xt/irb.rb".freeze, "lib/tins/xt/method_description.rb".freeze, "lib/tins/xt/minimize.rb".freeze, "lib/tins/xt/named.rb".freeze, "lib/tins/xt/null.rb".freeze, "lib/tins/xt/p.rb".freeze, "lib/tins/xt/partial_application.rb".freeze, "lib/tins/xt/proc_compose.rb".freeze, "lib/tins/xt/proc_prelude.rb".freeze, "lib/tins/xt/range_plus.rb".freeze, "lib/tins/xt/require_maybe.rb".freeze, "lib/tins/xt/responding.rb".freeze, "lib/tins/xt/secure_write.rb".freeze, "lib/tins/xt/sexy_singleton.rb".freeze, "lib/tins/xt/string.rb".freeze, "lib/tins/xt/string_byte_order_mark.rb".freeze, "lib/tins/xt/string_camelize.rb".freeze, "lib/tins/xt/string_named_placeholders.rb".freeze, "lib/tins/xt/string_underscore.rb".freeze, "lib/tins/xt/string_version.rb".freeze, "lib/tins/xt/subhash.rb".freeze, "lib/tins/xt/temp_io.rb".freeze, "lib/tins/xt/time_dummy.rb".freeze, "lib/tins/xt/time_freezer.rb".freeze, "lib/tins/xt/to.rb".freeze, "lib/tins/xt/write.rb".freeze, "tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_named_placeholders.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/test_helper.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze, "tins.gemspec".freeze]
|
|
14
|
+
s.extra_rdoc_files = ["README.md".freeze, "lib/dslkit.rb".freeze, "lib/dslkit/polite.rb".freeze, "lib/dslkit/rude.rb".freeze, "lib/spruz.rb".freeze, "lib/tins.rb".freeze, "lib/tins/alias.rb".freeze, "lib/tins/annotate.rb".freeze, "lib/tins/ask_and_send.rb".freeze, "lib/tins/attempt.rb".freeze, "lib/tins/bijection.rb".freeze, "lib/tins/case_predicate.rb".freeze, "lib/tins/complete.rb".freeze, "lib/tins/concern.rb".freeze, "lib/tins/date_dummy.rb".freeze, "lib/tins/date_time_dummy.rb".freeze, "lib/tins/deep_dup.rb".freeze, "lib/tins/deep_transform.rb".freeze, "lib/tins/deprecate.rb".freeze, "lib/tins/dslkit.rb".freeze, "lib/tins/duration.rb".freeze, "lib/tins/expose.rb".freeze, "lib/tins/extract_last_argument_options.rb".freeze, "lib/tins/file_binary.rb".freeze, "lib/tins/find.rb".freeze, "lib/tins/generator.rb".freeze, "lib/tins/go.rb".freeze, "lib/tins/hash_bfs.rb".freeze, "lib/tins/hash_dfs.rb".freeze, "lib/tins/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/hash_union.rb".freeze, "lib/tins/if_predicate.rb".freeze, "lib/tins/implement.rb".freeze, "lib/tins/limited.rb".freeze, "lib/tins/lines_file.rb".freeze, "lib/tins/lru_cache.rb".freeze, "lib/tins/memoize.rb".freeze, "lib/tins/method_description.rb".freeze, "lib/tins/minimize.rb".freeze, "lib/tins/module_group.rb".freeze, "lib/tins/named_set.rb".freeze, "lib/tins/null.rb".freeze, "lib/tins/once.rb".freeze, "lib/tins/p.rb".freeze, "lib/tins/partial_application.rb".freeze, "lib/tins/proc_compose.rb".freeze, "lib/tins/proc_prelude.rb".freeze, "lib/tins/range_plus.rb".freeze, "lib/tins/require_maybe.rb".freeze, "lib/tins/responding.rb".freeze, "lib/tins/secure_write.rb".freeze, "lib/tins/sexy_singleton.rb".freeze, "lib/tins/string_byte_order_mark.rb".freeze, "lib/tins/string_camelize.rb".freeze, "lib/tins/string_named_placeholders.rb".freeze, "lib/tins/string_underscore.rb".freeze, "lib/tins/string_version.rb".freeze, "lib/tins/subhash.rb".freeze, "lib/tins/temp_io.rb".freeze, "lib/tins/temp_io_enum.rb".freeze, "lib/tins/terminal.rb".freeze, "lib/tins/thread_local.rb".freeze, "lib/tins/time_dummy.rb".freeze, "lib/tins/to.rb".freeze, "lib/tins/to_proc.rb".freeze, "lib/tins/token.rb".freeze, "lib/tins/unit.rb".freeze, "lib/tins/version.rb".freeze, "lib/tins/write.rb".freeze, "lib/tins/xt.rb".freeze, "lib/tins/xt/annotate.rb".freeze, "lib/tins/xt/ask_and_send.rb".freeze, "lib/tins/xt/attempt.rb".freeze, "lib/tins/xt/blank.rb".freeze, "lib/tins/xt/case_predicate.rb".freeze, "lib/tins/xt/complete.rb".freeze, "lib/tins/xt/concern.rb".freeze, "lib/tins/xt/date_dummy.rb".freeze, "lib/tins/xt/date_time_dummy.rb".freeze, "lib/tins/xt/deep_dup.rb".freeze, "lib/tins/xt/deep_transform.rb".freeze, "lib/tins/xt/deprecate.rb".freeze, "lib/tins/xt/dslkit.rb".freeze, "lib/tins/xt/expose.rb".freeze, "lib/tins/xt/extract_last_argument_options.rb".freeze, "lib/tins/xt/file_binary.rb".freeze, "lib/tins/xt/full.rb".freeze, "lib/tins/xt/hash_bfs.rb".freeze, "lib/tins/xt/hash_dfs.rb".freeze, "lib/tins/xt/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/xt/hash_union.rb".freeze, "lib/tins/xt/if_predicate.rb".freeze, "lib/tins/xt/implement.rb".freeze, "lib/tins/xt/irb.rb".freeze, "lib/tins/xt/method_description.rb".freeze, "lib/tins/xt/minimize.rb".freeze, "lib/tins/xt/named.rb".freeze, "lib/tins/xt/null.rb".freeze, "lib/tins/xt/p.rb".freeze, "lib/tins/xt/partial_application.rb".freeze, "lib/tins/xt/proc_compose.rb".freeze, "lib/tins/xt/proc_prelude.rb".freeze, "lib/tins/xt/range_plus.rb".freeze, "lib/tins/xt/require_maybe.rb".freeze, "lib/tins/xt/responding.rb".freeze, "lib/tins/xt/secure_write.rb".freeze, "lib/tins/xt/sexy_singleton.rb".freeze, "lib/tins/xt/string.rb".freeze, "lib/tins/xt/string_byte_order_mark.rb".freeze, "lib/tins/xt/string_camelize.rb".freeze, "lib/tins/xt/string_named_placeholders.rb".freeze, "lib/tins/xt/string_underscore.rb".freeze, "lib/tins/xt/string_version.rb".freeze, "lib/tins/xt/subhash.rb".freeze, "lib/tins/xt/temp_io.rb".freeze, "lib/tins/xt/time_dummy.rb".freeze, "lib/tins/xt/time_freezer.rb".freeze, "lib/tins/xt/to.rb".freeze, "lib/tins/xt/write.rb".freeze]
|
|
15
|
+
s.files = [".envrc".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "examples/add_one.png".freeze, "examples/add_one.stm".freeze, "examples/bb3.png".freeze, "examples/bb3.stm".freeze, "examples/concatenate_compare.mtm".freeze, "examples/concatenate_compare.png".freeze, "examples/length_difference.mtm".freeze, "examples/length_difference.png".freeze, "examples/let.rb".freeze, "examples/mail.rb".freeze, "examples/minsky.rb".freeze, "examples/multiply.reg".freeze, "examples/null_pattern.rb".freeze, "examples/ones_difference-mtm.png".freeze, "examples/ones_difference-stm.png".freeze, "examples/ones_difference.mtm".freeze, "examples/ones_difference.stm".freeze, "examples/prefix-equals-suffix-reversed-with-infix.png".freeze, "examples/prefix-equals-suffix-reversed-with-infix.stm".freeze, "examples/recipe.rb".freeze, "examples/recipe2.rb".freeze, "examples/recipe_common.rb".freeze, "examples/subtract.reg".freeze, "examples/turing-graph.rb".freeze, "examples/turing.rb".freeze, "lib/dslkit.rb".freeze, "lib/dslkit/polite.rb".freeze, "lib/dslkit/rude.rb".freeze, "lib/spruz".freeze, "lib/spruz.rb".freeze, "lib/tins.rb".freeze, "lib/tins/alias.rb".freeze, "lib/tins/annotate.rb".freeze, "lib/tins/ask_and_send.rb".freeze, "lib/tins/attempt.rb".freeze, "lib/tins/bijection.rb".freeze, "lib/tins/case_predicate.rb".freeze, "lib/tins/complete.rb".freeze, "lib/tins/concern.rb".freeze, "lib/tins/date_dummy.rb".freeze, "lib/tins/date_time_dummy.rb".freeze, "lib/tins/deep_dup.rb".freeze, "lib/tins/deep_transform.rb".freeze, "lib/tins/deprecate.rb".freeze, "lib/tins/dslkit.rb".freeze, "lib/tins/duration.rb".freeze, "lib/tins/expose.rb".freeze, "lib/tins/extract_last_argument_options.rb".freeze, "lib/tins/file_binary.rb".freeze, "lib/tins/find.rb".freeze, "lib/tins/generator.rb".freeze, "lib/tins/go.rb".freeze, "lib/tins/hash_bfs.rb".freeze, "lib/tins/hash_dfs.rb".freeze, "lib/tins/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/hash_union.rb".freeze, "lib/tins/if_predicate.rb".freeze, "lib/tins/implement.rb".freeze, "lib/tins/limited.rb".freeze, "lib/tins/lines_file.rb".freeze, "lib/tins/lru_cache.rb".freeze, "lib/tins/memoize.rb".freeze, "lib/tins/method_description.rb".freeze, "lib/tins/minimize.rb".freeze, "lib/tins/module_group.rb".freeze, "lib/tins/named_set.rb".freeze, "lib/tins/null.rb".freeze, "lib/tins/once.rb".freeze, "lib/tins/p.rb".freeze, "lib/tins/partial_application.rb".freeze, "lib/tins/proc_compose.rb".freeze, "lib/tins/proc_prelude.rb".freeze, "lib/tins/range_plus.rb".freeze, "lib/tins/require_maybe.rb".freeze, "lib/tins/responding.rb".freeze, "lib/tins/secure_write.rb".freeze, "lib/tins/sexy_singleton.rb".freeze, "lib/tins/string_byte_order_mark.rb".freeze, "lib/tins/string_camelize.rb".freeze, "lib/tins/string_named_placeholders.rb".freeze, "lib/tins/string_underscore.rb".freeze, "lib/tins/string_version.rb".freeze, "lib/tins/subhash.rb".freeze, "lib/tins/temp_io.rb".freeze, "lib/tins/temp_io_enum.rb".freeze, "lib/tins/terminal.rb".freeze, "lib/tins/thread_local.rb".freeze, "lib/tins/time_dummy.rb".freeze, "lib/tins/to.rb".freeze, "lib/tins/to_proc.rb".freeze, "lib/tins/token.rb".freeze, "lib/tins/unit.rb".freeze, "lib/tins/version.rb".freeze, "lib/tins/write.rb".freeze, "lib/tins/xt.rb".freeze, "lib/tins/xt/annotate.rb".freeze, "lib/tins/xt/ask_and_send.rb".freeze, "lib/tins/xt/attempt.rb".freeze, "lib/tins/xt/blank.rb".freeze, "lib/tins/xt/case_predicate.rb".freeze, "lib/tins/xt/complete.rb".freeze, "lib/tins/xt/concern.rb".freeze, "lib/tins/xt/date_dummy.rb".freeze, "lib/tins/xt/date_time_dummy.rb".freeze, "lib/tins/xt/deep_dup.rb".freeze, "lib/tins/xt/deep_transform.rb".freeze, "lib/tins/xt/deprecate.rb".freeze, "lib/tins/xt/dslkit.rb".freeze, "lib/tins/xt/expose.rb".freeze, "lib/tins/xt/extract_last_argument_options.rb".freeze, "lib/tins/xt/file_binary.rb".freeze, "lib/tins/xt/full.rb".freeze, "lib/tins/xt/hash_bfs.rb".freeze, "lib/tins/xt/hash_dfs.rb".freeze, "lib/tins/xt/hash_symbolize_keys_recursive.rb".freeze, "lib/tins/xt/hash_union.rb".freeze, "lib/tins/xt/if_predicate.rb".freeze, "lib/tins/xt/implement.rb".freeze, "lib/tins/xt/irb.rb".freeze, "lib/tins/xt/method_description.rb".freeze, "lib/tins/xt/minimize.rb".freeze, "lib/tins/xt/named.rb".freeze, "lib/tins/xt/null.rb".freeze, "lib/tins/xt/p.rb".freeze, "lib/tins/xt/partial_application.rb".freeze, "lib/tins/xt/proc_compose.rb".freeze, "lib/tins/xt/proc_prelude.rb".freeze, "lib/tins/xt/range_plus.rb".freeze, "lib/tins/xt/require_maybe.rb".freeze, "lib/tins/xt/responding.rb".freeze, "lib/tins/xt/secure_write.rb".freeze, "lib/tins/xt/sexy_singleton.rb".freeze, "lib/tins/xt/string.rb".freeze, "lib/tins/xt/string_byte_order_mark.rb".freeze, "lib/tins/xt/string_camelize.rb".freeze, "lib/tins/xt/string_named_placeholders.rb".freeze, "lib/tins/xt/string_underscore.rb".freeze, "lib/tins/xt/string_version.rb".freeze, "lib/tins/xt/subhash.rb".freeze, "lib/tins/xt/temp_io.rb".freeze, "lib/tins/xt/time_dummy.rb".freeze, "lib/tins/xt/time_freezer.rb".freeze, "lib/tins/xt/to.rb".freeze, "lib/tins/xt/write.rb".freeze, "tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/deep_transform_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_named_placeholders.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/test_helper.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze, "tins.gemspec".freeze]
|
|
16
16
|
s.homepage = "https://github.com/flori/tins".freeze
|
|
17
17
|
s.licenses = ["MIT".freeze]
|
|
18
18
|
s.rdoc_options = ["--title".freeze, "Tins - Useful stuff.".freeze, "--main".freeze, "README.md".freeze]
|
|
19
19
|
s.required_ruby_version = Gem::Requirement.new(">= 3.1".freeze)
|
|
20
|
-
s.rubygems_version = "4.0.
|
|
20
|
+
s.rubygems_version = "4.0.17".freeze
|
|
21
21
|
s.summary = "Useful stuff.".freeze
|
|
22
|
-
s.test_files = ["tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_named_placeholders.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/test_helper.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze, "tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze]
|
|
22
|
+
s.test_files = ["tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/deep_transform_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_named_placeholders.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/test_helper.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze, "tests/annotate_test.rb".freeze, "tests/ask_and_send_test.rb".freeze, "tests/attempt_test.rb".freeze, "tests/bijection_test.rb".freeze, "tests/blank_full_test.rb".freeze, "tests/case_predicate_test.rb".freeze, "tests/concern_test.rb".freeze, "tests/date_dummy_test.rb".freeze, "tests/date_time_dummy_test.rb".freeze, "tests/deep_dup_test.rb".freeze, "tests/deep_transform_test.rb".freeze, "tests/delegate_test.rb".freeze, "tests/deprecate_test.rb".freeze, "tests/dslkit_test.rb".freeze, "tests/duration_test.rb".freeze, "tests/dynamic_scope_test.rb".freeze, "tests/expose_test.rb".freeze, "tests/extract_last_argument_options_test.rb".freeze, "tests/file_binary_test.rb".freeze, "tests/find_test.rb".freeze, "tests/from_module_test.rb".freeze, "tests/generator_test.rb".freeze, "tests/go_test.rb".freeze, "tests/hash_bfs_test.rb".freeze, "tests/hash_dfs_test.rb".freeze, "tests/hash_symbolize_keys_recursive_test.rb".freeze, "tests/hash_union_test.rb".freeze, "tests/if_predicate_test.rb".freeze, "tests/implement_test.rb".freeze, "tests/limited_test.rb".freeze, "tests/lines_file_test.rb".freeze, "tests/lru_cache_test.rb".freeze, "tests/memoize_test.rb".freeze, "tests/method_description_test.rb".freeze, "tests/minimize_test.rb".freeze, "tests/module_group_test.rb".freeze, "tests/named_set_test.rb".freeze, "tests/named_test.rb".freeze, "tests/null_test.rb".freeze, "tests/p_test.rb".freeze, "tests/partial_application_test.rb".freeze, "tests/proc_compose_test.rb".freeze, "tests/proc_prelude_test.rb".freeze, "tests/range_plus_test.rb".freeze, "tests/require_maybe_test.rb".freeze, "tests/responding_test.rb".freeze, "tests/rotate_test.rb".freeze, "tests/scope_test.rb".freeze, "tests/secure_write_test.rb".freeze, "tests/sexy_singleton_test.rb".freeze, "tests/string_byte_order_mark_test.rb".freeze, "tests/string_camelize_test.rb".freeze, "tests/string_underscore_test.rb".freeze, "tests/string_version_test.rb".freeze, "tests/subhash_test.rb".freeze, "tests/temp_io_test.rb".freeze, "tests/time_dummy_test.rb".freeze, "tests/time_freezer_test.rb".freeze, "tests/to_test.rb".freeze, "tests/token_test.rb".freeze, "tests/unit_test.rb".freeze]
|
|
23
23
|
|
|
24
24
|
s.specification_version = 4
|
|
25
25
|
|
|
26
|
-
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.17.
|
|
26
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.17.1".freeze])
|
|
27
27
|
s.add_development_dependency(%q<all_images>.freeze, [">= 0".freeze])
|
|
28
28
|
s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
|
|
29
29
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tins
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.55.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 2.17.
|
|
18
|
+
version: 2.17.1
|
|
19
19
|
type: :development
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 2.17.
|
|
25
|
+
version: 2.17.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: all_images
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -171,6 +171,7 @@ extra_rdoc_files:
|
|
|
171
171
|
- lib/tins/date_dummy.rb
|
|
172
172
|
- lib/tins/date_time_dummy.rb
|
|
173
173
|
- lib/tins/deep_dup.rb
|
|
174
|
+
- lib/tins/deep_transform.rb
|
|
174
175
|
- lib/tins/deprecate.rb
|
|
175
176
|
- lib/tins/dslkit.rb
|
|
176
177
|
- lib/tins/duration.rb
|
|
@@ -233,6 +234,7 @@ extra_rdoc_files:
|
|
|
233
234
|
- lib/tins/xt/date_dummy.rb
|
|
234
235
|
- lib/tins/xt/date_time_dummy.rb
|
|
235
236
|
- lib/tins/xt/deep_dup.rb
|
|
237
|
+
- lib/tins/xt/deep_transform.rb
|
|
236
238
|
- lib/tins/xt/deprecate.rb
|
|
237
239
|
- lib/tins/xt/dslkit.rb
|
|
238
240
|
- lib/tins/xt/expose.rb
|
|
@@ -272,6 +274,7 @@ extra_rdoc_files:
|
|
|
272
274
|
- lib/tins/xt/to.rb
|
|
273
275
|
- lib/tins/xt/write.rb
|
|
274
276
|
files:
|
|
277
|
+
- ".envrc"
|
|
275
278
|
- CHANGES.md
|
|
276
279
|
- Gemfile
|
|
277
280
|
- LICENSE
|
|
@@ -318,6 +321,7 @@ files:
|
|
|
318
321
|
- lib/tins/date_dummy.rb
|
|
319
322
|
- lib/tins/date_time_dummy.rb
|
|
320
323
|
- lib/tins/deep_dup.rb
|
|
324
|
+
- lib/tins/deep_transform.rb
|
|
321
325
|
- lib/tins/deprecate.rb
|
|
322
326
|
- lib/tins/dslkit.rb
|
|
323
327
|
- lib/tins/duration.rb
|
|
@@ -380,6 +384,7 @@ files:
|
|
|
380
384
|
- lib/tins/xt/date_dummy.rb
|
|
381
385
|
- lib/tins/xt/date_time_dummy.rb
|
|
382
386
|
- lib/tins/xt/deep_dup.rb
|
|
387
|
+
- lib/tins/xt/deep_transform.rb
|
|
383
388
|
- lib/tins/xt/deprecate.rb
|
|
384
389
|
- lib/tins/xt/dslkit.rb
|
|
385
390
|
- lib/tins/xt/expose.rb
|
|
@@ -428,6 +433,7 @@ files:
|
|
|
428
433
|
- tests/date_dummy_test.rb
|
|
429
434
|
- tests/date_time_dummy_test.rb
|
|
430
435
|
- tests/deep_dup_test.rb
|
|
436
|
+
- tests/deep_transform_test.rb
|
|
431
437
|
- tests/delegate_test.rb
|
|
432
438
|
- tests/deprecate_test.rb
|
|
433
439
|
- tests/dslkit_test.rb
|
|
@@ -503,7 +509,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
503
509
|
- !ruby/object:Gem::Version
|
|
504
510
|
version: '0'
|
|
505
511
|
requirements: []
|
|
506
|
-
rubygems_version: 4.0.
|
|
512
|
+
rubygems_version: 4.0.17
|
|
507
513
|
specification_version: 4
|
|
508
514
|
summary: Useful stuff.
|
|
509
515
|
test_files:
|
|
@@ -517,6 +523,7 @@ test_files:
|
|
|
517
523
|
- tests/date_dummy_test.rb
|
|
518
524
|
- tests/date_time_dummy_test.rb
|
|
519
525
|
- tests/deep_dup_test.rb
|
|
526
|
+
- tests/deep_transform_test.rb
|
|
520
527
|
- tests/delegate_test.rb
|
|
521
528
|
- tests/deprecate_test.rb
|
|
522
529
|
- tests/dslkit_test.rb
|