fluent-plugin-test 0.0.17 → 0.0.24

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.
metadata CHANGED
@@ -1,224 +1,145 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
- - imcotop
7
+ - Imcotop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-14 00:00:00.000000000 Z
11
+ date: 2025-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.14'
19
+ version: 1.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.14'
26
+ version: 1.8.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: opensearch-ruby
28
+ name: aws-sdk-cloudwatchlogs
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: aws-sdk-core
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3'
55
- - !ruby/object:Gem::Dependency
56
- name: excon
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
- type: :runtime
48
+ type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - "~>"
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: faraday
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2.0'
83
- - !ruby/object:Gem::Dependency
84
- name: faraday-excon
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2.0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2.0'
97
- - !ruby/object:Gem::Dependency
98
- name: faraday_middleware-aws-sigv4
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.0.1
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.0.1
111
55
  - !ruby/object:Gem::Dependency
112
56
  name: rake
113
57
  requirement: !ruby/object:Gem::Requirement
114
58
  requirements:
115
- - - "~>"
59
+ - - ">="
116
60
  - !ruby/object:Gem::Version
117
61
  version: '0'
118
62
  type: :development
119
63
  prerelease: false
120
64
  version_requirements: !ruby/object:Gem::Requirement
121
65
  requirements:
122
- - - "~>"
66
+ - - ">="
123
67
  - !ruby/object:Gem::Version
124
68
  version: '0'
125
69
  - !ruby/object:Gem::Dependency
126
- name: webrick
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.9'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '1.9'
139
- - !ruby/object:Gem::Dependency
140
- name: webmock
70
+ name: test-unit
141
71
  requirement: !ruby/object:Gem::Requirement
142
72
  requirements:
143
- - - "~>"
73
+ - - ">="
144
74
  - !ruby/object:Gem::Version
145
- version: 3.18.1
75
+ version: '0'
146
76
  type: :development
147
77
  prerelease: false
148
78
  version_requirements: !ruby/object:Gem::Requirement
149
79
  requirements:
150
- - - "~>"
80
+ - - ">="
151
81
  - !ruby/object:Gem::Version
152
- version: 3.18.1
82
+ version: '0'
153
83
  - !ruby/object:Gem::Dependency
154
- name: test-unit
84
+ name: test-unit-rr
155
85
  requirement: !ruby/object:Gem::Requirement
156
86
  requirements:
157
- - - "~>"
87
+ - - ">="
158
88
  - !ruby/object:Gem::Version
159
- version: 3.3.0
89
+ version: '0'
160
90
  type: :development
161
91
  prerelease: false
162
92
  version_requirements: !ruby/object:Gem::Requirement
163
93
  requirements:
164
- - - "~>"
94
+ - - ">="
165
95
  - !ruby/object:Gem::Version
166
- version: 3.3.0
96
+ version: '0'
167
97
  - !ruby/object:Gem::Dependency
168
- name: minitest
98
+ name: mocha
169
99
  requirement: !ruby/object:Gem::Requirement
170
100
  requirements:
171
- - - "~>"
101
+ - - ">="
172
102
  - !ruby/object:Gem::Version
173
- version: '5.8'
103
+ version: '0'
174
104
  type: :development
175
105
  prerelease: false
176
106
  version_requirements: !ruby/object:Gem::Requirement
177
107
  requirements:
178
- - - "~>"
108
+ - - ">="
179
109
  - !ruby/object:Gem::Version
180
- version: '5.8'
110
+ version: '0'
181
111
  - !ruby/object:Gem::Dependency
182
- name: flexmock
112
+ name: nokogiri
183
113
  requirement: !ruby/object:Gem::Requirement
184
114
  requirements:
185
- - - "~>"
115
+ - - ">="
186
116
  - !ruby/object:Gem::Version
187
- version: '2.0'
117
+ version: '0'
188
118
  type: :development
189
119
  prerelease: false
190
120
  version_requirements: !ruby/object:Gem::Requirement
191
121
  requirements:
192
- - - "~>"
122
+ - - ">="
193
123
  - !ruby/object:Gem::Version
194
- version: '2.0'
195
- description: Example plugin for Fluent event collector
124
+ version: '0'
125
+ description:
196
126
  email:
197
- - imcotop@icloud.com
127
+ - Imcotop@icloud.com
198
128
  executables: []
199
129
  extensions: []
200
130
  extra_rdoc_files: []
201
131
  files:
202
132
  - LICENSE.txt
203
133
  - README.md
204
- - lib/fluent/log-ext.rb
205
- - lib/fluent/plugin/filter_opensearch_genid.rb
206
- - lib/fluent/plugin/in_opensearch.rb
207
- - lib/fluent/plugin/oj_serializer.rb
208
- - lib/fluent/plugin/opensearch_constants.rb
209
- - lib/fluent/plugin/opensearch_error.rb
210
- - lib/fluent/plugin/opensearch_error_handler.rb
211
- - lib/fluent/plugin/opensearch_fallback_selector.rb
212
- - lib/fluent/plugin/opensearch_index_template.rb
213
- - lib/fluent/plugin/opensearch_simple_sniffer.rb
214
- - lib/fluent/plugin/opensearch_tls.rb
215
- - lib/fluent/plugin/out_opensearch.rb
216
- - lib/fluent/plugin/out_opensearch_data_stream.rb
217
- homepage: https://github.com/fluent/fluent-plugin-opensearch
134
+ - fluent-plugin-cloudwatch-logs.gemspec
135
+ - lib/fluent/plugin/cloudwatch/logs.rb
136
+ - lib/fluent/plugin/cloudwatch/logs/version.rb
137
+ - lib/fluent/plugin/in_cloudwatch_logs.rb
138
+ - lib/fluent/plugin/out_cloudwatch_logs.rb
139
+ homepage: https://github.com/imcotop/fluent-plugin-cloudwatch-logs
218
140
  licenses:
219
- - Apache-2.0
220
- metadata:
221
- changelog_uri: https://github.com/fluent/fluent-plugin-opensearch/blob/master/History.md
141
+ - MIT
142
+ metadata: {}
222
143
  post_install_message:
223
144
  rdoc_options: []
224
145
  require_paths:
@@ -227,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
148
  requirements:
228
149
  - - ">="
229
150
  - !ruby/object:Gem::Version
230
- version: '2.3'
151
+ version: '0'
231
152
  required_rubygems_version: !ruby/object:Gem::Requirement
232
153
  requirements:
233
154
  - - ">="
@@ -237,5 +158,5 @@ requirements: []
237
158
  rubygems_version: 3.5.7
238
159
  signing_key:
239
160
  specification_version: 4
240
- summary: Example plugin for Fluent event collector
161
+ summary: CloudWatch Logs Plugin for Fluentd
241
162
  test_files: []
@@ -1,64 +0,0 @@
1
- # SPDX-License-Identifier: Apache-2.0
2
- #
3
- # The fluent-plugin-opensearch Contributors require contributions made to
4
- # this file be licensed under the Apache-2.0 license or a
5
- # compatible open source license.
6
- #
7
- # Modifications Copyright OpenSearch Contributors. See
8
- # GitHub history for details.
9
- #
10
- # Licensed toUken Inc. under one or more contributor
11
- # license agreements. See the NOTICE file distributed with
12
- # this work for additional information regarding copyright
13
- # ownership. Elasticsearch B.V. licenses this file to you under
14
- # the Apache License, Version 2.0 (the "License"); you may
15
- # not use this file except in compliance with the License.
16
- # You may obtain a copy of the License at
17
- #
18
- # http://www.apache.org/licenses/LICENSE-2.0
19
- #
20
- # Unless required by applicable law or agreed to in writing,
21
- # software distributed under the License is distributed on an
22
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23
- # KIND, either express or implied. See the License for the
24
- # specific language governing permissions and limitations
25
- # under the License.
26
-
27
- require 'fluent/log'
28
- # For opensearch-ruby v1.0.0 or later which is based on elasticsearch-ruby v7.14 master tree
29
- # logger for Elasticsearch::Loggable required the following methods:
30
- #
31
- # * debug?
32
- # * info?
33
- # * warn?
34
- # * error?
35
- # * fatal?
36
-
37
- module Fluent
38
- class Log
39
- # OpenSearch::Loggable does not request trace? method.
40
- # def trace?
41
- # @level <= LEVEL_TRACE
42
- # end
43
-
44
- def debug?
45
- @level <= LEVEL_DEBUG
46
- end
47
-
48
- def info?
49
- @level <= LEVEL_INFO
50
- end
51
-
52
- def warn?
53
- @level <= LEVEL_WARN
54
- end
55
-
56
- def error?
57
- @level <= LEVEL_ERROR
58
- end
59
-
60
- def fatal?
61
- @level <= LEVEL_FATAL
62
- end
63
- end
64
- end
@@ -1,103 +0,0 @@
1
- # SPDX-License-Identifier: Apache-2.0
2
- #
3
- # The fluent-plugin-opensearch Contributors require contributions made to
4
- # this file be licensed under the Apache-2.0 license or a
5
- # compatible open source license.
6
- #
7
- # Modifications Copyright fluent-plugin-opensearch Contributors. See
8
- # GitHub history for details.
9
- #
10
- # Licensed to Uken Inc. under one or more contributor
11
- # license agreements. See the NOTICE file distributed with
12
- # this work for additional information regarding copyright
13
- # ownership. Uken Inc. licenses this file to you under
14
- # the Apache License, Version 2.0 (the "License"); you may
15
- # not use this file except in compliance with the License.
16
- # You may obtain a copy of the License at
17
- #
18
- # http://www.apache.org/licenses/LICENSE-2.0
19
- #
20
- # Unless required by applicable law or agreed to in writing,
21
- # software distributed under the License is distributed on an
22
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23
- # KIND, either express or implied. See the License for the
24
- # specific language governing permissions and limitations
25
- # under the License.
26
-
27
- require 'securerandom'
28
- require 'base64'
29
- require 'fluent/plugin/filter'
30
-
31
- module Fluent::Plugin
32
- class OpenSearchGenidFilter < Filter
33
- Fluent::Plugin.register_filter('opensearch_genid', self)
34
-
35
- config_param :hash_id_key, :string, :default => '_hash'
36
- config_param :include_tag_in_seed, :bool, :default => false
37
- config_param :include_time_in_seed, :bool, :default => false
38
- config_param :use_record_as_seed, :bool, :default => false
39
- config_param :use_entire_record, :bool, :default => false
40
- config_param :record_keys, :array, :default => []
41
- config_param :separator, :string, :default => '_'
42
- config_param :hash_type, :enum, list: [:md5, :sha1, :sha256, :sha512], :default => :sha1
43
-
44
- def initialize
45
- super
46
- end
47
-
48
- def configure(conf)
49
- super
50
-
51
- if !@use_entire_record
52
- if @record_keys.empty? && @use_record_as_seed
53
- raise Fluent::ConfigError, "When using record as hash seed, users must specify `record_keys`."
54
- end
55
- end
56
-
57
- if @use_record_as_seed
58
- class << self
59
- alias_method :filter, :filter_seed_as_record
60
- end
61
- else
62
- class << self
63
- alias_method :filter, :filter_simple
64
- end
65
- end
66
- end
67
-
68
- def filter(tag, time, record)
69
- # for safety.
70
- end
71
-
72
- def filter_simple(tag, time, record)
73
- record[@hash_id_key] = Base64.strict_encode64(SecureRandom.uuid)
74
- record
75
- end
76
-
77
- def filter_seed_as_record(tag, time, record)
78
- seed = ""
79
- seed += tag + separator if @include_tag_in_seed
80
- seed += time.to_s + separator if @include_time_in_seed
81
- if @use_entire_record
82
- record.each {|k,v| seed += "|#{k}|#{v}"}
83
- else
84
- seed += record_keys.map {|k| record[k]}.join(separator)
85
- end
86
- record[@hash_id_key] = Base64.strict_encode64(encode_hash(@hash_type, seed))
87
- record
88
- end
89
-
90
- def encode_hash(type, seed)
91
- case type
92
- when :md5
93
- Digest::MD5.digest(seed)
94
- when :sha1
95
- Digest::SHA1.digest(seed)
96
- when :sha256
97
- Digest::SHA256.digest(seed)
98
- when :sha512
99
- Digest::SHA512.digest(seed)
100
- end
101
- end
102
- end
103
- end