callable_tree 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +4 -4
- data/examples/hooks-call.rb +3 -2
- data/lib/callable_tree/node/hooks/call.rb +12 -0
- data/lib/callable_tree/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a506dec2678a69b014cff69b6cc4fd94e22b1f7f5027e9230727720c8dc049e
|
4
|
+
data.tar.gz: 3b7ee0419139ef24f40f8b0714cbd19551568967d0170a4b550a84f528811da4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84af5f3ae12941eabdb1cdbc159d9a3f424388bffab74c2704d5507a875c924ae637b2b868194244d2530bcbd8bf5895118e42f7a79c91f901854896d686eb5
|
7
|
+
data.tar.gz: 816f558c0118c57bda18c3b69fef45240c9de5e87a1acea0bcf1f9448e0c67e34a7de613292796635f8e5c16d1835c2ba4bdef959939c44a6358bce94197a82a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.3.2] - 2022-02-05
|
4
|
+
|
5
|
+
- Change `CallableTree::Node::Hooks::Call#before_call` to return a new instance.
|
6
|
+
To keep the same behavior as the older version, use `CallableTree::Node::Hooks::Call#before_call!` that makes destructive change.
|
7
|
+
- Change `CallableTree::Node::Hooks::Call#around_call` to return a new instance.
|
8
|
+
To keep the same behavior as the older version, use `CallableTree::Node::Hooks::Call#around_call!` that makes destructive change.
|
9
|
+
- Change `CallableTree::Node::Hooks::Call#after_call` to return a new instance.
|
10
|
+
To keep the same behavior as the older version, use `CallableTree::Node::Hooks::Call#after_call!` that makes destructive change.
|
11
|
+
|
3
12
|
## [0.3.1] - 2022-01-10
|
4
13
|
|
5
14
|
- Add `CallableTree::Node::Internal#seek?` to check whether the node's strategy is `seek` or not.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
callable_tree (0.3.
|
4
|
+
callable_tree (0.3.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -12,12 +12,12 @@ GEM
|
|
12
12
|
rspec-core (~> 3.10.0)
|
13
13
|
rspec-expectations (~> 3.10.0)
|
14
14
|
rspec-mocks (~> 3.10.0)
|
15
|
-
rspec-core (3.10.
|
15
|
+
rspec-core (3.10.2)
|
16
16
|
rspec-support (~> 3.10.0)
|
17
|
-
rspec-expectations (3.10.
|
17
|
+
rspec-expectations (3.10.2)
|
18
18
|
diff-lcs (>= 1.2.0, < 2.0)
|
19
19
|
rspec-support (~> 3.10.0)
|
20
|
-
rspec-mocks (3.10.
|
20
|
+
rspec-mocks (3.10.3)
|
21
21
|
diff-lcs (>= 1.2.0, < 2.0)
|
22
22
|
rspec-support (~> 3.10.0)
|
23
23
|
rspec-support (3.10.3)
|
data/examples/hooks-call.rb
CHANGED
@@ -9,16 +9,28 @@ module CallableTree
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def before_call(&block)
|
12
|
+
clone.before_call!(&block)
|
13
|
+
end
|
14
|
+
|
15
|
+
def before_call!(&block)
|
12
16
|
before_callbacks << block
|
13
17
|
self
|
14
18
|
end
|
15
19
|
|
16
20
|
def around_call(&block)
|
21
|
+
clone.around_call!(&block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def around_call!(&block)
|
17
25
|
around_callbacks << block
|
18
26
|
self
|
19
27
|
end
|
20
28
|
|
21
29
|
def after_call(&block)
|
30
|
+
clone.after_call!(&block)
|
31
|
+
end
|
32
|
+
|
33
|
+
def after_call!(&block)
|
22
34
|
after_callbacks << block
|
23
35
|
self
|
24
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: callable_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jsmmr
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Builds a tree by linking callable nodes. The nodes that match the conditions
|
14
14
|
are called in a chain from the root node to the leaf node. These are like nested
|
@@ -62,7 +62,7 @@ licenses:
|
|
62
62
|
metadata:
|
63
63
|
homepage_uri: https://github.com/jsmmr/ruby_callable_tree
|
64
64
|
source_code_uri: https://github.com/jsmmr/ruby_callable_tree
|
65
|
-
changelog_uri: https://github.com/jsmmr/ruby_callable_tree/blob/v0.3.
|
65
|
+
changelog_uri: https://github.com/jsmmr/ruby_callable_tree/blob/v0.3.2/CHANGELOG.md
|
66
66
|
post_install_message:
|
67
67
|
rdoc_options: []
|
68
68
|
require_paths:
|