Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rubocop violation for fluentd/fluent-plugin-loki #1646

Merged
merged 6 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion fluentd/fluent-plugin-grafana-loki/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -euo pipefail
IFS=$'\n\t'
set -vx

sudo gem install bundle
gem install bundler
bundle install
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ class LokiOutput < Fluent::Plugin::Output # rubocop:disable Metrics/ClassLength
config_set_default :chunk_keys, []
end

def configure(conf)
def configure(conf) # rubocop:disable Metrics/CyclomaticComplexity
compat_parameters_convert(conf, :buffer)
super
@uri = URI.parse(@url + '/loki/api/v1/push')
unless @uri.kind_of?(URI::HTTP) or @uri.kind_of?(URI::HTTPS)
raise Fluent::ConfigError, "url parameter must be valid HTTP"
unless @uri.is_a?(URI::HTTP) || @uri.is_a?(URI::HTTPS)
raise Fluent::ConfigError, 'url parameter must be valid HTTP'
end

@record_accessors = {}
conf.elements.select { |element| element.name == 'label' }.each do |element|
element.each_pair do |k, v|
Expand Down