Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ COPY LICENSE /licenses/LICENSE

FROM base as builder
WORKDIR /opt/app-root/src
COPY Gemfile Gemfile.lock ./
COPY Gemfile Gemfile.lock fluent-plugin-slack-pull-58.patch ./
Comment thread
suzana-nesic marked this conversation as resolved.
RUN bundle config set --local deployment true \
bundle config set --local path "vendor/bundle" \
&& bundle install \
&& patch -d ./vendor/bundle/ruby/3.3.0/gems/fluent-plugin-slack-0.6.7 -p1 < fluent-plugin-slack-pull-58.patch \
&& rm -rf .bundle/cache vendor/bundle/ruby/*/cache
RUN bundle exec fluentd --setup fluentd --setup ./fluent

Expand Down
23 changes: 23 additions & 0 deletions fluent-plugin-slack-pull-58.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From e9cc84483ad5d5eda33c7279bf4d2f2b2c32bf17 Mon Sep 17 00:00:00 2001
From: Oscar Baracos <oscar.baracos@gmail.com>
Date: Mon, 13 Feb 2023 16:59:38 +0400
Subject: [PATCH] Replace deprecated unescape call

URI.unescape => CGI.unescape
---
lib/fluent/plugin/out_slack.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fluent/plugin/out_slack.rb b/lib/fluent/plugin/out_slack.rb
index 1c52223..2e3035b 100644
--- a/lib/fluent/plugin/out_slack.rb
+++ b/lib/fluent/plugin/out_slack.rb
@@ -134,7 +134,7 @@ def configure(conf)
super

if @channel
- @channel = URI.unescape(@channel) # old version compatibility
+ @channel = CGI.unescape(@channel) # old version compatibility
if !@channel.start_with?('#') and !@channel.start_with?('@')
@channel = '#' + @channel # Add # since `#` is handled as a comment in fluentd conf
end