Skip to content

Commit a306af2

Browse files
committed
Merge branch 'develop'
* develop: Bump version to 0.3.10 Run `rubocop -a` Run `bundle update` Bump ruby from 3.1.2 to 3.2.0 Refactor Update document Change to dynamically define methods related to strategies Run `rubocop -a` Add build with 3.2.0-preview3 Change strategy methods to take `matchable` keyword parameter Refactor
2 parents 40df875 + 0e2c9f2 commit a306af2

30 files changed

+799
-508
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2.0-preview1']
8+
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
99
steps:
1010
- uses: actions/checkout@v3
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: ${{ matrix.ruby }}
14-
- run: gem install bundler:2.3.7
14+
- run: gem install bundler:2.3.26
1515
- uses: actions/cache@v3
1616
with:
1717
path: vendor/bundle

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.2
1+
3.2.0

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## [Unreleased]
22

3+
## [0.3.10] - 2022-12-30
4+
5+
- Change `CallableTree::Node::Internal#broadcastable` to take `matchable` keyword parameter as boolean. It defaults to `true`, which is the same behavior as before.
6+
- Change `CallableTree::Node::Internal#composable` to take `matchable` keyword parameter as boolean. It defaults to `true`, which is the same behavior as before.
7+
- Change `CallableTree::Node::Internal#seekable` to take `matchable` keyword parameter as boolean. It defaults to `true`, which is the same behavior as before.
8+
39
## [0.3.9] - 2022-11-06
410

511
- Change `CallableTree::Node::Internal#broadcastable` to take `terminable` keyword parameter as boolean. It defaults to `false`, which is the same behavior as before.

Gemfile.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
PATH
22
remote: .
33
specs:
4-
callable_tree (0.3.9)
4+
callable_tree (0.3.10)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
99
diff-lcs (1.5.0)
1010
rake (13.0.6)
11-
rspec (3.11.0)
12-
rspec-core (~> 3.11.0)
13-
rspec-expectations (~> 3.11.0)
14-
rspec-mocks (~> 3.11.0)
15-
rspec-core (3.11.0)
16-
rspec-support (~> 3.11.0)
17-
rspec-expectations (3.11.1)
11+
rspec (3.12.0)
12+
rspec-core (~> 3.12.0)
13+
rspec-expectations (~> 3.12.0)
14+
rspec-mocks (~> 3.12.0)
15+
rspec-core (3.12.0)
16+
rspec-support (~> 3.12.0)
17+
rspec-expectations (3.12.1)
1818
diff-lcs (>= 1.2.0, < 2.0)
19-
rspec-support (~> 3.11.0)
20-
rspec-mocks (3.11.1)
19+
rspec-support (~> 3.12.0)
20+
rspec-mocks (3.12.1)
2121
diff-lcs (>= 1.2.0, < 2.0)
22-
rspec-support (~> 3.11.0)
23-
rspec-support (3.11.1)
22+
rspec-support (~> 3.12.0)
23+
rspec-support (3.12.0)
2424

2525
PLATFORMS
26-
x86_64-darwin-21
26+
x86_64-darwin-22
2727

2828
DEPENDENCIES
2929
callable_tree!
3030
rake (~> 13.0)
3131
rspec (~> 3.0)
3232

3333
BUNDLED WITH
34-
2.3.7
34+
2.3.26

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -659,19 +659,19 @@ module Logging
659659
matched
660660
end
661661
662-
if node.external?
663-
node
664-
.before_caller! do |input, *, _node_:, **|
665-
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
666-
puts "#{input_prefix} #{input}"
667-
input
668-
end
669-
.after_caller! do |output, _node_:, **|
670-
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
671-
puts "#{output_prefix} #{output}"
672-
output
673-
end
674-
end
662+
return unless node.external?
663+
664+
node
665+
.before_caller! do |input, *, _node_:, **|
666+
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
667+
puts "#{input_prefix} #{input}"
668+
input
669+
end
670+
.after_caller! do |output, _node_:, **|
671+
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
672+
puts "#{output_prefix} #{output}"
673+
output
674+
end
675675
end
676676
end
677677
@@ -778,7 +778,7 @@ end
778778
...
779779
```
780780
781-
Run `examples/class/identity.rb`:
781+
Run `examples/builder/identity.rb`:
782782
```sh
783783
% ruby examples/builder/identity.rb
784784
#<struct CallableTree::Node::External::Output

examples/builder/external-verbosify.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313
.caller do |input, **options, &block|
1414
File.open(input) do |file|
15-
json = ::JSON.load(file)
15+
json = JSON.load(file)
1616
# The following block call is equivalent to calling `super` in the class style.
1717
block.call(json, **options)
1818
end

examples/builder/identity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313
.caller do |input, **options, &block|
1414
File.open(input) do |file|
15-
json = ::JSON.load(file)
15+
json = JSON.load(file)
1616
# The following block call is equivalent to calling `super` in the class style.
1717
block.call(json, **options)
1818
end

examples/builder/internal-seekable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313
.caller do |input, **options, &original|
1414
File.open(input) do |file|
15-
json = ::JSON.load(file)
15+
json = JSON.load(file)
1616
# The following block call is equivalent to calling `super` in the class style.
1717
original.call(json, **options)
1818
end

examples/builder/logging.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313
.caller do |input, **options, &original|
1414
File.open(input) do |file|
15-
json = ::JSON.load(file)
15+
json = JSON.load(file)
1616
# The following block call is equivalent to calling `super` in the class style.
1717
original.call(json, **options)
1818
end
@@ -87,19 +87,19 @@ def self.loggable(node)
8787
matched
8888
end
8989

90-
if node.external?
91-
node
92-
.before_caller! do |input, *, _node_:, **|
93-
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
94-
puts "#{input_prefix} #{input}"
95-
input
96-
end
97-
.after_caller! do |output, _node_:, **|
98-
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
99-
puts "#{output_prefix} #{output}"
100-
output
101-
end
102-
end
90+
return unless node.external?
91+
92+
node
93+
.before_caller! do |input, *, _node_:, **|
94+
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
95+
puts "#{input_prefix} #{input}"
96+
input
97+
end
98+
.after_caller! do |output, _node_:, **|
99+
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
100+
puts "#{output_prefix} #{output}"
101+
output
102+
end
103103
end
104104
end
105105

examples/class/logging.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ def self.loggable(node)
124124
matched
125125
end
126126

127-
if node.external?
128-
node
129-
.before_caller! do |input, *, _node_:, **|
130-
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
131-
puts "#{input_prefix} #{input}"
132-
input
133-
end
134-
.after_caller! do |output, _node_:, **|
135-
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
136-
puts "#{output_prefix} #{output}"
137-
output
138-
end
139-
end
127+
return unless node.external?
128+
129+
node
130+
.before_caller! do |input, *, _node_:, **|
131+
input_prefix = INPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + INPUT_LABEL.length, BLANK)
132+
puts "#{input_prefix} #{input}"
133+
input
134+
end
135+
.after_caller! do |output, _node_:, **|
136+
output_prefix = OUTPUT_LABEL.rjust((_node_.depth * INDENT_SIZE) + OUTPUT_LABEL.length, BLANK)
137+
puts "#{output_prefix} #{output}"
138+
output
139+
end
140140
end
141141
end
142142

0 commit comments

Comments
 (0)