fluent-plugin-multi-condition-selector 0.1.0 → 0.2.0

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: 3b921a540af345708b0e7c2a8e0673fd93761aeb4b95b6ec2ac4eb8f1443e903
4
- data.tar.gz: 4fc8ecf62ffd38f6392e79e7afad4c134b07768bf7c2965774e5156ee6858a52
3
+ metadata.gz: d32fdd93c1276440f5cbc40c9165ad9873d9c089aee5dc417344d49db83b7b4e
4
+ data.tar.gz: 165b43376cc2e9d72307b821264a8f9dcf59a933b48f639364dd3adb0e04b682
5
5
  SHA512:
6
- metadata.gz: 219e0580cff95721adfe4c66f5864d08d5ea0ce3a49118104858b5bca7de125890215d8005a2033d2bbcc93389459d4bace280aed69024cbb80e4509d25e7916
7
- data.tar.gz: f2419a4ada661c7f53c9d3a3f71c465bd58f1e37872027955cc4c965deb0e1aee4d4d7ee10284bc0d0fa8e6a5940036b03e8b3a8914b9e172bb1c9797e935901
6
+ metadata.gz: e612abcca3a0b7ba3a90d0e28a9f4d12a4da38c5a66f44c5962b2888162bd1b8dea56bea1627bb913e784d6b6d69ec2782a33444301f95cddd1f3c94f685f1aa
7
+ data.tar.gz: 320243ab706705ee9c7a455be13f6c8d10f276abad22a8567aa60ea7bcb0151e05496d4d0d6f50cb2190c1b9ae4ffb3a3452747c14d6db081059c4da2cb9abfd
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-multi-condition-selector"
6
- spec.version = "0.1.0"
6
+ spec.version = "0.2.0"
7
7
  spec.authors = ["wally"]
8
8
  spec.email = ["u.str.gm@gmail.com"]
9
9
 
@@ -40,6 +40,7 @@ module Fluent
40
40
  config_param :auto_typecast, :bool, :default => true, # false for lower version compatibility
41
41
  :desc => 'Automatically cast the field types.'
42
42
  config_param :tag, :string, :default => 'checked_tag', :desc => "new record tag."
43
+ config_param :at_least_one, :bool, default: true, desc: "If true it should match conditions at least 1."
43
44
 
44
45
  config_param(
45
46
  "condition".to_sym,
@@ -131,7 +132,7 @@ module Fluent
131
132
  # TODO: ここの処理よくないって evaluate
132
133
  matched_conditions, aditional_data = evaluate_condition(@conditions, placeholder_values )
133
134
 
134
- if matched_conditions.size > 0
135
+ if (@at_least_one && matched_conditions.size > 0) || @at_least_one == false
135
136
  new_record = reform(record, aditional_data, placeholder_values)
136
137
  if @renew_time_key && new_record.has_key?(@renew_time_key)
137
138
  time = new_record[@renew_time_key].to_i
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-multi-condition-selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wally
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler