logstash-codec-avro 0.1.3 → 0.1.4

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: 47489110ed2cecb0672bc9c508fae3b49d1a789b
4
- data.tar.gz: 0b3923cb213e0b4a6297fcdb7c06717712ce451e
3
+ metadata.gz: 6109fac1ab995b8591a7059b16def1c32c4d902f
4
+ data.tar.gz: 4e10765814e061bb9ea159a8d04954b9037c4d87
5
5
  SHA512:
6
- metadata.gz: cf3168cfc57488dbefc9e3e513f12f307945c40360c99f5d430136f13d7473cf5097ec25c23f261f2f4576a98c9ef646f8b05187048cc6751af1d1e089ecfba3
7
- data.tar.gz: 9ea99b247e7a96199423269e71241a1d162b33a332c6c6ac30e76b8a188b06ac6b2a56b7238ff49cd192533d464e8c4b3e189461e68a672d2a74e25a290718c1
6
+ metadata.gz: ce7db13a29b1668e9ab69b4f680be35f43e7c852a4ea043186be9eaa3d40b93790f3abb87c45061ca51520b4473c92a32f84c154504adff606851301ee52902a
7
+ data.tar.gz: c5bb00a3f7f751bdb246d51e4bb35bf02f72011713acd433f6200dfb2581884ac092ad47dee0d1e30f19b9b3af255c8e44dd5708883ad0c17dabe862acdcf39e
@@ -40,6 +40,6 @@ class LogStash::Codecs::Avro < LogStash::Codecs::Base
40
40
  buffer = StringIO.new
41
41
  encoder = Avro::IO::BinaryEncoder.new(buffer)
42
42
  dw.write(event.to_hash, encoder)
43
- @on_event.call(buffer.string)
43
+ @on_event.call(event, buffer.string)
44
44
  end
45
45
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-avro'
4
- s.version = '0.1.3'
4
+ s.version = '0.1.4'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Encode and decode avro formatted data"
7
7
  s.description = "Encode and decode avro formatted data"
@@ -36,7 +36,7 @@ describe LogStash::Codecs::Avro do
36
36
  context "#encode" do
37
37
  it "should return avro data from a LogStash::Event" do
38
38
  got_event = false
39
- subject.on_event do |data|
39
+ subject.on_event do |event, data|
40
40
  schema = Avro::Schema.parse(avro_config['schema_uri'])
41
41
  datum = StringIO.new(data)
42
42
  decoder = Avro::IO::BinaryDecoder.new(datum)
@@ -45,6 +45,7 @@ describe LogStash::Codecs::Avro do
45
45
 
46
46
  insist { record["foo"] } == test_event["foo"]
47
47
  insist { record["bar"] } == test_event["bar"]
48
+ insist { event.is_a? LogStash::Event }
48
49
  got_event = true
49
50
  end
50
51
  subject.encode(test_event)
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-avro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- requirement: !ruby/object:Gem::Requirement
14
+ name: logstash-core
15
+ version_requirements: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - '>='
17
18
  - !ruby/object:Gem::Version
@@ -19,10 +20,7 @@ dependencies:
19
20
  - - <
20
21
  - !ruby/object:Gem::Version
21
22
  version: 2.0.0
22
- name: logstash-core
23
- prerelease: false
24
- type: :runtime
25
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - '>='
28
26
  - !ruby/object:Gem::Version
@@ -30,34 +28,36 @@ dependencies:
30
28
  - - <
31
29
  - !ruby/object:Gem::Version
32
30
  version: 2.0.0
31
+ prerelease: false
32
+ type: :runtime
33
33
  - !ruby/object:Gem::Dependency
34
+ name: avro
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
34
40
  requirement: !ruby/object:Gem::Requirement
35
41
  requirements:
36
42
  - - '>='
37
43
  - !ruby/object:Gem::Version
38
44
  version: '0'
39
- name: avro
40
45
  prerelease: false
41
46
  type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ name: logstash-devutils
42
49
  version_requirements: !ruby/object:Gem::Requirement
43
50
  requirements:
44
51
  - - '>='
45
52
  - !ruby/object:Gem::Version
46
53
  version: '0'
47
- - !ruby/object:Gem::Dependency
48
54
  requirement: !ruby/object:Gem::Requirement
49
55
  requirements:
50
56
  - - '>='
51
57
  - !ruby/object:Gem::Version
52
58
  version: '0'
53
- name: logstash-devutils
54
59
  prerelease: false
55
60
  type: :development
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - '>='
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
61
  description: Encode and decode avro formatted data
62
62
  email: info@elastic.co
63
63
  executables: []