Skip to content

Commit 7ec076c

Browse files
committed
support Ruby 2.4
For td-agent v3.1.1 and later. (Embedded Fluentd version must be v1) Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
1 parent 7ad3dbc commit 7ec076c

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ jobs:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616
include:
1717
- os: ubuntu-latest
18-
ruby: 2.7.1
18+
ruby: '2.7.1'
19+
- os: ubuntu-latest
20+
ruby: '2.4.2'
21+
- os: windows-latest
22+
ruby: '2.7.1'
1923
- os: windows-latest
20-
ruby: 2.7.1
24+
ruby: '2.4.2'
2125
runs-on: ${{ matrix.os }}
2226
name: Test with Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
2327
steps:
@@ -58,6 +62,8 @@ jobs:
5862
shell: bash
5963
- os: windows-latest
6064
shell: cmd
65+
- ruby: '2.7.1'
66+
fluentd: '1.11.1'
6167
runs-on: ${{ matrix.os }}
6268
name: Gem test with Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
6369
steps:
@@ -69,6 +75,9 @@ jobs:
6975
with:
7076
name: gem
7177
path: pkg
78+
- name: Install specific version Fluentd
79+
if: ${{ matrix.fluentd != '' }}
80+
run: gem install fluentd --version ${{ matrix.fluentd }}
7281
- name: Install gem
7382
run: gem install pkg/*
7483
- name: Test command (bash)

lib/fluent/tail_checker/collection_ratio_checker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def check
5050
ratio = collection_ratio(entry.pos, size)
5151
if ratio < @collection_ratio_threshold
5252
unacceptable_collection_ratio_found = true
53-
unacceptable_collection_ratio_path_and_ratio_list.append([entry.path, ratio])
53+
unacceptable_collection_ratio_path_and_ratio_list.push([entry.path, ratio])
5454
end
5555
end
5656

lib/fluent/tail_checker/pos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def self.load_entries(path)
5050
end
5151

5252
def watching_entries
53-
entries.filter do |entry|
53+
entries.select do |entry|
5454
not entry.unwatched?
5555
end
5656
end

0 commit comments

Comments
 (0)