jackal 0.1.10 → 0.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: dc9e1dfcbc4625124cf64836401a54e6bfc2fd27
4
- data.tar.gz: 92549591aaef5463e1a1ade9c3b3637049d3dcc8
3
+ metadata.gz: ff9bb4a1b15fb821c46592fe2c38aec7bf9edde1
4
+ data.tar.gz: e9841cad0e280a6a6e537e0ef4cd8004625229ca
5
5
  SHA512:
6
- metadata.gz: e49262b50348d41cbb8eed6153e56c305872cee04bc34f472604e4037719878e0c4a1e2ca4b6d64d616acb0674e76408046f388a52979593d80c9ccedad3741b
7
- data.tar.gz: bc1730415cd904bb61319d931496b6c70d87d19a6b63e43cd07c8404532c85e0dd382e522db90ff7356e0d27c5f128d09ac49365f83598adad9231697c0ab3ba
6
+ metadata.gz: 9a8e62b85de16333381fd577b42c304597dd4748aac6592e794b14e0bb8804efd49de193e973b08b466fb490c08abd41f208e50c03c8ae2d0e1c1570f8d96ebb
7
+ data.tar.gz: 10a9d456b501adcc202aebb820554cdf20878ca7dbb67adcbcdab5a86cfdb41a0b35da0dc0aed82be7aca1d4ae4df9e7e05d847fac086bf1ccb881d392ba6724
@@ -1,3 +1,7 @@
1
+ # v0.1.12
2
+ * Only output source configuration in debug mode
3
+ * Catch unprocessed messages and remove from bus
4
+
1
5
  # v0.1.10
2
6
  * Add flag to control verbosity
3
7
 
@@ -22,20 +22,26 @@ begin
22
22
  next unless args.is_a?(Hash)
23
23
  args.each do |key, opts|
24
24
  next unless opts.is_a?(Hash) && opts[:sources]
25
- Carnivore::Utils.info "Processing: #{opts.inspect}"
25
+ Carnivore::Utils.debug "Processing: #{opts.inspect}"
26
26
  Carnivore.configure do
27
27
  opts.fetch(:sources, {}).each do |kind, source_args|
28
28
  source = Carnivore::Source.build(
29
29
  :type => source_args[:type].to_sym,
30
30
  :args => source_args.fetch(:args, {}).merge(:name => "#{namespace}_#{key}_#{kind}")
31
31
  )
32
- Carnivore::Utils.info "Initialized new source: #{namespace}_#{key}_#{kind}"
32
+ Carnivore::Utils.info "Registered new source: #{namespace}_#{key}_#{kind}"
33
33
  if(kind == :input)
34
34
  opts.fetch(:callbacks, []).each do |klass_name|
35
35
  klass = klass_name.split('::').inject(Object) do |memo, name|
36
36
  memo.const_get(name)
37
37
  end
38
38
  source.add_callback(klass_name, klass)
39
+ # If no callbacks match message, ensure message is
40
+ # confirmed from the source and logged as error
41
+ source.orphan_callback do |message|
42
+ error "No callbacks matched message. Failed to process. Removed from bus. (#{message})"
43
+ message.confirm!
44
+ end
39
45
  end
40
46
  end
41
47
  end
@@ -1,4 +1,4 @@
1
1
  module Jackal
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.10')
3
+ VERSION = Gem::Version.new('0.1.12')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jackal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carnivore