fluent-plugin-color-stripper 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: 9aa4b23ec2a3be836b31af80604b4ec83f88aff7
4
- data.tar.gz: 4f9ed855efadc5d05e432d3ca164bd56bb370528
3
+ metadata.gz: d99837a88f38b1e42b970d805933ecbb918b4a2f
4
+ data.tar.gz: 1c86e20cb533ecd35d04919cd62a640bc8889a7a
5
5
  SHA512:
6
- metadata.gz: e1bb4d36f0e5c9306238cc24ef42da1c45fc0331ce0008379abb1840d405187b8407d4efc79e2971404bde4848963ce74b81f4a205b477279808521eaacc9b36
7
- data.tar.gz: f726c7ae003a91dda548eb7873e13547943193eac08c602ba913d6c65706463da226042d0996a8a4caa0d846d5a234306be6300de06935ae30886ff8dbe5946f
6
+ metadata.gz: 2130c6fa0925a6a53620b0cdb7ee835349135680cebb83a58a9d39ba5517467069b69be97fc9a8af5e996d7e4c2fd6288cd81288fbe02ae6b6916bc0f0605297
7
+ data.tar.gz: e44c37730a8b666ef514a8d1094321bd4103859a9deb30acc61ab9d8344a301d75ddb798b8b16b7a21c7ecb2ef7938197b52fa3dc41ea5d0ad4949155f7a5182
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-color-stripper"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Matthew O'Riordan"]
9
9
  spec.email = ["matt@ably.io "]
10
10
  spec.description = %q{Output plugin to strip ANSI color codes in the logs.}
@@ -2,10 +2,14 @@ module Fluent
2
2
  class ColorStripperOutput < Output
3
3
  Fluent::Plugin.register_output('color_stripper', self)
4
4
 
5
+ config_param :tag, :string
5
6
  config_param :strip_fields, :string, default: nil
6
7
 
7
8
  def configure(conf)
8
9
  super
10
+
11
+ @tag = conf.fetch('tag') { raise ArgumentError, 'tag field is required to direct transformed logs to' }
12
+
9
13
  @strip_fields_arr = conf['strip_fields'].to_s.split(/\s*,\s*/).map do |field|
10
14
  field unless field.strip.empty?
11
15
  end.compact
@@ -57,4 +57,14 @@ class ColorStripperOutputTest < Test::Unit::TestCase
57
57
  }
58
58
  ], d1.records
59
59
  end
60
+
61
+ def test_missing_tag
62
+ err = assert_raises Fluent::ConfigError do
63
+ create_driver %[
64
+ type color_stripper
65
+ ]
66
+ end
67
+
68
+ assert_match /tag.*required/, err.message
69
+ end
60
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-color-stripper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew O'Riordan