Skip to content

Modernize Ruby, Fluentd support and CI#8

Merged
daichirata merged 1 commit into
masterfrom
modernize
May 22, 2026
Merged

Modernize Ruby, Fluentd support and CI#8
daichirata merged 1 commit into
masterfrom
modernize

Conversation

@daichirata

Copy link
Copy Markdown
Owner

Summary

  • Drop EOL Ruby and Fluentd v0.14; require Ruby >= 3.2 and fluentd >= 1.0
  • Replace defunct wercker CI with GitHub Actions matrix (Ruby 3.2 / 3.3 / 3.4 / 4.0)
  • Modernize plugin code to current Fluentd v1.x style (top-level requires, drop redundant initialize)
  • Bump version to 0.4.0
  • Expand test coverage: error event emission, parse-error fallback, suppress_parse_error_log

Changes

Dependencies / metadata

  • required_ruby_version = ">= 3.2"
  • fluentd constraint: >= 0.14.0, < 2>= 1.0, < 2
  • bundler ~> 1.11 → unpinned, rake ~> 10.0~> 13.0, pin test-unit ~> 3.6
  • README requirement table updated, wercker badge replaced with GH Actions badge

CI

  • Delete wercker.yml (service shut down)
  • Add .github/workflows/test.yml with ruby/setup-ruby@v1 + bundler-cache

Plugin code (filter_uri_parser.rb / filter_query_string_parser.rb)

  • Add require 'fluent/plugin/filter' and require 'addressable/uri' at file top
  • Remove initialize (only called super and lazy-required addressable)

Tests

  • test/helper.rb: drop require 'rubygems', drop Bundler.setup guard, drop nulllogger pattern, include Fluent::Test::Helpers
  • Use event_time("...") helper instead of Fluent::EventTime.from_time(Time.parse(...))
  • New tests (3 each per filter):
    • test_filter_emit_invalid_record_to_error_on_missing_key
    • test_filter_parse_error_is_swallowed
    • test_filter_suppress_parse_error_log

Test plan

  • bundle exec rake test on Ruby 3.3 — 17 tests / 77 assertions / 0 failures
  • Plugin files load standalone (ruby -Ilib -rfluent/plugin/filter_uri_parser)
  • GitHub Actions matrix passes on Ruby 3.2 / 3.3 / 3.4 / 4.0

🤖 Generated with Claude Code

- Require Ruby >= 3.2, drop bundler version pin, bump rake to 13.x
- Require fluentd >= 1.0, < 2; drop v0.14 from supported range
- Bump version to 0.4.0
- Replace defunct wercker CI with GitHub Actions matrix (Ruby 3.2-4.0)
- Move `require 'fluent/plugin/filter'` and `require 'addressable/uri'`
  to file top so plugins load standalone
- Modernize test/helper.rb (drop rubygems/Bundler.setup/nulllogger,
  include Fluent::Test::Helpers)
- Add tests for emit_invalid_record_to_error, parse error swallowing,
  and suppress_parse_error_log

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daichirata daichirata merged commit 126231c into master May 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant