franz 2.1.11 → 2.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ac4d511cd616ba167e59aaa1666c42ab68277d1
4
- data.tar.gz: 7b27d7f6eeffb531f8c9d494fe64fa206a33fb1c
3
+ metadata.gz: 3212bbf41902b0ff5e82c125c017b4f75337219d
4
+ data.tar.gz: 2d9df298998b543aed11c8468f01efa9a22ab4c6
5
5
  SHA512:
6
- metadata.gz: f7158f2eefb2397c8d443cf559cf6976eada6e1b29a965149351553a93ed4cf5449a02aea2ff89d505da54078bb96bf463b37035255a336f15a6047c7ca8718a
7
- data.tar.gz: da95fa7610e4ca297f648060182c86004b9fefbe0118bc8543ea016d3c59d04723a46109daef2cde74e2bb0a930533001c1fafde6bd86a39020ccb3055e4b16a
6
+ metadata.gz: 05a3ed6849e5cb9d2b42dd5e4f316ff56ac271a7fce20a7744edd0e4e4a9558da0b2607f1f0a30a2320320cf49aa0989104adb6fde655041a9e9720ff18a581b
7
+ data.tar.gz: 83b8446bbec4d46f24002b5828fa084688ceec37376d6812885df8307b8a26697b259a35c6b28364986078f4d29ed898be006dbb48316e975fdd6714d8629dc6
data/Readme.md CHANGED
@@ -238,6 +238,8 @@ for Chef.
238
238
  - Add `FNM_EXTGLOB` flag for better glob matching
239
239
  - Handle `EACCESS` on `IO.read` gracefully
240
240
  - New `HTTP` output (experimental)
241
+ - Allow for `nil` or `false` multiline configs
242
+ - Implement missing (yet documented) "tags" feature
241
243
  - Remove default line limit
242
244
  - Allow minimal configs
243
245
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.11
1
+ 2.1.12
data/lib/franz/agg.rb CHANGED
@@ -146,7 +146,7 @@ module Franz
146
146
  event: 'capture',
147
147
  raw: event
148
148
  multiline = @ic.config(event[:path])[:multiline] rescue nil
149
- if multiline.nil?
149
+ unless multiline
150
150
  @statz.inc :num_lines
151
151
  enqueue event[:path], event[:line] unless event[:line].empty?
152
152
  else
@@ -35,6 +35,11 @@ module Franz
35
35
  until @stop
36
36
  event = opts[:input].shift
37
37
 
38
+ unless opts[:tags].empty?
39
+ event['tags'] ||= []
40
+ event['tags'] += opts[:tags]
41
+ end
42
+
38
43
  log.trace \
39
44
  event: 'publish',
40
45
  raw: event
@@ -57,9 +57,16 @@ module Franz
57
57
 
58
58
  @thread = Thread.new do
59
59
  until @stop
60
- event = JSON::generate(opts[:input].shift)
60
+ event = opts[:input].shift
61
+
62
+ unless opts[:tags].empty?
63
+ event['tags'] ||= []
64
+ event['tags'] += opts[:tags]
65
+ end
66
+
67
+ payload = JSON::generate event
61
68
  @lock.synchronize do
62
- enqueue event
69
+ enqueue payload
63
70
  end
64
71
 
65
72
  log.trace \
@@ -82,6 +82,11 @@ module Franz
82
82
  until @stop
83
83
  event = opts[:input].shift
84
84
 
85
+ unless opts[:tags].empty?
86
+ event['tags'] ||= []
87
+ event['tags'] += opts[:tags]
88
+ end
89
+
85
90
  log.trace \
86
91
  event: 'publish',
87
92
  raw: event
@@ -61,6 +61,11 @@ module Franz
61
61
  until @stop
62
62
  event = opts[:input].shift
63
63
 
64
+ unless opts[:tags].empty?
65
+ event['tags'] ||= []
66
+ event['tags'] += opts[:tags]
67
+ end
68
+
64
69
  log.trace \
65
70
  event: 'publish',
66
71
  raw: event
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: franz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11
4
+ version: 2.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slog