franz 2.1.8 → 2.1.9

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: 11f00654a465bdcecd3268306209bb0ca09eb0c5
4
- data.tar.gz: ec6e7b3bd6c6f8710739dc9a1f7eb6d402d29087
3
+ metadata.gz: 57ec3c8168602750bc3d92b7fb85b3726e8ee388
4
+ data.tar.gz: 37a3fcd07aadd473385364afb214dc69a3221fa4
5
5
  SHA512:
6
- metadata.gz: ab263c372d9b576c6435271d186e7e9e771c050d70ed8d023c0f31d84a162bb178a546d9abae21e22a4738c0b9e4cfebcec9e1f1e6a5aca0663172890baf6c4e
7
- data.tar.gz: db6572a16aec153ed1b22255e41f7f4dfad8d6e897eccaee0b89204d4789bf65e77039f6de5b8b600c3e25d3e346f47f136ecee5a7b30f19128c88f06e9dbd3d
6
+ metadata.gz: 5ae213ef7b324adf8a1fe4047569bbe4e567118eaa84bcee7a712d734f7002ff626ab3f93b7a086c64833c10b1110940af3cff08810fedf10f75b93fc2e8cc0d
7
+ data.tar.gz: cdb3ef21b32939fff9b9695c814f7154aa01d5e0ed487c7c584b709b1767694e4c335be453c9a51f5f3285231e136bdf2e59ee49fe60e3ec91f6805e3a159bff
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.8
1
+ 2.1.9
data/lib/franz/config.rb CHANGED
@@ -13,6 +13,10 @@ module Franz
13
13
  # @return [Hash] config compiled into a native Hash
14
14
  def self.new path
15
15
  config = JSON::parse File.read(path), symbolize_names: true
16
+ config = {
17
+ input: { configs: [] },
18
+ output: {}
19
+ }.deep_merge!(config)
16
20
  config[:input][:configs].map! do |input|
17
21
  input[:multiline] = Regexp.new input[:multiline] if input.has_key?(:multiline)
18
22
  input[:type] = input[:type].to_sym
@@ -98,7 +98,9 @@ module Franz
98
98
  def patterns_for path, kind, memo
99
99
  memo.fetch path
100
100
  rescue KeyError
101
- memo[path] = config(path)[kind]
101
+ c = config(path)
102
+ k = c ? c[kind] : []
103
+ memo[path] = k
102
104
  end
103
105
 
104
106
  end
data/lib/franz/watch.rb CHANGED
@@ -41,7 +41,11 @@ module Franz
41
41
  if @play_catchup
42
42
  log.debug event: 'play catchup'
43
43
  stats.keys.each do |path|
44
- stats[path][:size] = opts[:cursors][path] || 0
44
+ if @ic.type path
45
+ stats[path][:size] = opts[:cursors][path] || 0
46
+ else # we shouldn't be watching this file anymore
47
+ stats.delete path
48
+ end
45
49
  end
46
50
  end
47
51
 
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.8
4
+ version: 2.1.9
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-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slog