fluent-plugin-lm-logs 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9029af24ba774f88379606844f5faabf062c5bfe4df7f47386dccd72ceb62217
4
- data.tar.gz: e2418db14714305e3cec4103255d9ee86a28b2abfdecceb35ec2976b0b78858d
3
+ metadata.gz: e2f2d379ca3023506ac1e1781ae37e44bdd57558894d7f9ee743c6d9d823894c
4
+ data.tar.gz: 8a88cc0984177c019f1b357ab2d72a8d8d956cb73683b48bb0e4bf0e71f4c56f
5
5
  SHA512:
6
- metadata.gz: f63f0f6a27956cbd08bc8272fcbaebd50f93fd2338b4f17ea9480f2ab35579b86078a8d422476e235dbf6c8e3e014c022158bca72ce6e621399f6d724db95ed0
7
- data.tar.gz: 3abdc791dceb1d87407004537ad6f4ec1e40bf730aea9680f4124846d6eb506c9e14817a57a7da8c26af2b01894a9f8353489ad2d6ecfbf6297972f93a028f84
6
+ metadata.gz: 5b72a7ca3c7cfdc2179244cdd82ee7f830f63c98a145b61bb5e5140d8d00dfa6ec0307d422546e5e33fc94106e32aaaa624936a02df83aef4d33b063292fba07
7
+ data.tar.gz: 2a9928406e7c5bfb460e15ef22df5b1d3f711aca6bcc171e95aa3ba663b59bae123cdd5e3a168b5a9887b4d8bb798e6188ec08181601f8a07424461a5b86e7b0
data/Rakefile CHANGED
@@ -3,5 +3,6 @@ require "rake/testtask"
3
3
  task default: "test"
4
4
 
5
5
  Rake::TestTask.new do |task|
6
- task.pattern = "test/plugin/*.rb"
7
- end
6
+ task.libs << "test"
7
+ task.test_files = Dir.glob('test/plugin/*.rb') - ['test/plugin/test_performance.rb']
8
+ end
@@ -83,11 +83,11 @@ module Fluent
83
83
 
84
84
  def configure_auth
85
85
  @use_bearer_instead_of_lmv1 = false
86
- if @access_id == nil || @access_key == nil
87
- log.info "Access Id or access key null. Using bearer token for authentication."
86
+ if is_blank(@access_id) || is_blank(@access_key)
87
+ log.info "Access Id or access key blank / null. Using bearer token for authentication."
88
88
  @use_bearer_instead_of_lmv1 = true
89
89
  end
90
- if @use_bearer_instead_of_lmv1 && @bearer_token == nil
90
+ if @use_bearer_instead_of_lmv1 && is_blank(@bearer_token)
91
91
  log.error "Bearer token not specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor."
92
92
  raise ArgumentError, 'No valid authentication specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor.'
93
93
  end
@@ -244,5 +244,14 @@ module Fluent
244
244
  return "LMv1 #{@access_id}:#{signature}:#{timestamp}"
245
245
  end
246
246
  end
247
+
248
+ def is_blank(str)
249
+ if str.nil? || str.to_s.strip.empty?
250
+ return true
251
+ else
252
+ return false
253
+ end
254
+ end
255
+
247
256
  end
248
257
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LmLogsFluentPlugin
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-lm-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LogicMonitor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-21 00:00:00.000000000 Z
11
+ date: 2024-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.4.10
83
+ rubygems_version: 3.5.3
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: LogicMonitor logs fluentd output plugin