logstash-input-google_pubsub 1.0.4 → 1.0.5

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
  SHA256:
3
- metadata.gz: 456f995041eb093cbde3e6dbfb9cb910ba5b4d737391e6480999a5363eecbd2f
4
- data.tar.gz: dc1a1964cbac705f0b028674782431230c9924a9110350f129b91e586d345cdf
3
+ metadata.gz: d4d1d534f0cc5d9beca70f86b6f9076e983fbc169171a46b9ac9e7da56e347ac
4
+ data.tar.gz: b9ae64633d0fd94bd67a34249351564307fb44e9855978d17c043ceab2725960
5
5
  SHA512:
6
- metadata.gz: 5024b239db5429f05d5e92a06bc8d271eacbfa8c9d20325c7d785d042a23c1392cdacf10edcc033af15a78e42232fb859ce84e9f8918a37b0649ee5884b5e8f2
7
- data.tar.gz: 643a15cabaac60a459e3996eedc506ed9fc8c2b5c3375d69d81e63667d707efbab740532ca7a07c99929b595a060bb4d34a4979c677246de0d729d30ac3ea37f
6
+ metadata.gz: ae1d8d858f80d4a8e25fe0cfcd8568d4ebfd5b9caf43863afdb9217e47ed86ffc8ccd9cdb63624d8379670fe3c7f6d3fd169ca21342fe1146058d4f5c89dceab
7
+ data.tar.gz: '08187af9f268db6900c60b688ba91cf823056d36176cf35ecf8ae34e2f6f57f8ac997d8e738f42f3f7174d5170e94973747f3cd91be3b3a047fe692abfc312c7'
@@ -1,3 +1,6 @@
1
+ ## 1.0.5
2
+ - Docs: Set the default_codec doc attribute.
3
+
1
4
  ## 1.0.4
2
5
  - Update gemspec summary
3
6
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012-2018 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
@@ -1,5 +1,6 @@
1
1
  :plugin: google_pubsub
2
2
  :type: input
3
+ :default_codec: plain
3
4
 
4
5
  ///////////////////////////////////////////
5
6
  START - GENERATED VARIABLES, DO NOT EDIT!
@@ -175,7 +176,8 @@ specify a Service Account JSON key file.
175
176
  * Value type is <<number,number>>
176
177
  * Default value is `5`
177
178
 
178
-
179
+ The maximum number of messages returned per request.
180
+ The Pub/Sub system may return fewer than the number specified.
179
181
 
180
182
  [id="plugins-{type}s-{plugin}-project_id"]
181
183
  ===== `project_id`
@@ -184,7 +186,7 @@ specify a Service Account JSON key file.
184
186
  * Value type is <<string,string>>
185
187
  * There is no default value for this setting.
186
188
 
187
- Google Cloud Project ID (name, not number)
189
+ Google Cloud Project ID (name, not number).
188
190
 
189
191
  [id="plugins-{type}s-{plugin}-subscription"]
190
192
  ===== `subscription`
@@ -210,4 +212,6 @@ The subscription will be created automatically by the plugin.
210
212
 
211
213
 
212
214
  [id="plugins-{type}s-{plugin}-common-options"]
213
- include::{include_path}/{type}.asciidoc[]
215
+ include::{include_path}/{type}.asciidoc[]
216
+
217
+ :default_codec!:
@@ -199,7 +199,7 @@ class LogStash::Inputs::GooglePubSub < LogStash::Inputs::Base
199
199
  :signing_key => signing_key,
200
200
  :token_credential_uri => "https://accounts.google.com/o/oauth2/token"
201
201
  )
202
- @logger.info("Client authorizataion with JSON key ready")
202
+ @logger.info("Client authorization with JSON key ready")
203
203
  else
204
204
  # Assume we're running in GCE and can use metadata tokens, if the host
205
205
  # GCE instance was not created with the PubSub scope, then the plugin
@@ -253,14 +253,10 @@ class LogStash::Inputs::GooglePubSub < LogStash::Inputs::Base
253
253
  messages.each do |msg|
254
254
  if msg.key?("message") and msg["message"].key?("data")
255
255
  decoded_msg = Base64.decode64(msg["message"]["data"])
256
- begin
257
- parsed_msg = JSON.parse(decoded_msg)
258
- rescue
259
- parsed_msg = { :raw_message => decoded_msg }
256
+ @codec.decode(decoded_msg) do |event|
257
+ decorate(event)
258
+ queue << event
260
259
  end
261
- event = LogStash::Event.new(parsed_msg)
262
- decorate(event)
263
- queue << event
264
260
  end
265
261
  end
266
262
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-google_pubsub'
3
- s.version = '1.0.4'
3
+ s.version = '1.0.5'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Consume events from a Google Cloud PubSub service"
6
6
  s.description = "This gem is a Logstash input plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-google_pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Johnson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement