logstash-input-sqs 2.0.5 → 3.0.0

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: f1a5e4abf0712d47dacd710b7403ec9c5a497dea
4
- data.tar.gz: 933844afe53d35c15b9a95c4ee1b2b710e9b767f
3
+ metadata.gz: cda70a3833d9598cc12e39be9b5f8d09c2094600
4
+ data.tar.gz: e17419caf38a472a8b727810fd8e8ad64ec2ea76
5
5
  SHA512:
6
- metadata.gz: 78011ab826eb9de6f49af5b998f2dffa867ae67e6ddc26ea20344bae6b8688cc6fa3021b736552470405e33a175a0c512f0b6cde985cf46a0302d0f920fc72f1
7
- data.tar.gz: 76d1029531772a0890c06a026274dca01ba04045f5c2286b3805a3fee65109891018831ba886817b29dc8e028895a4240e143bc241f276e49b05de30020dc015
6
+ metadata.gz: ba376350985307d9e9083ecdcf71b9a5ebf6d722e27e36a3c899800265defa121bb486ccd6339702e4404433c158d31fc9ca1e133dde359a544f66c5f8a8f6e9
7
+ data.tar.gz: 76355c2162787839ae2b2a469bd3458fdd949cb6e73bb511f617ccac27a946331876d26c2397d0f6ad55febd99a9d09fadbcff511d66734f20d52a7fb2952d09
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 3.0.0
2
+ - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
1
3
  # 2.0.5
2
4
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
5
  # 2.0.4
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
3
+ # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 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.
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Build
4
- Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-sqs-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-sqs-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-input-sqs.svg)](https://travis-ci.org/logstash-plugins/logstash-input-sqs)
5
4
 
6
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
7
6
 
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
56
55
  ```
57
56
  - Install plugin
58
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
59
62
  bin/plugin install --no-verify
63
+
60
64
  ```
61
65
  - Run Logstash with your plugin
62
66
  ```sh
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
74
78
  ```
75
79
  - Install the plugin from the Logstash home
76
80
  ```sh
77
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
81
+ # Logstash 2.3 and higher
82
+ bin/logstash-plugin install --no-verify
83
+
84
+ # Prior to Logstash 2.3
85
+ bin/plugin install --no-verify
86
+
78
87
  ```
79
88
  - Start Logstash and proceed to test the plugin
80
89
 
@@ -121,9 +121,9 @@ class LogStash::Inputs::SQS < LogStash::Inputs::Threadable
121
121
  end
122
122
 
123
123
  def add_sqs_data(event, message)
124
- event[@id_field] = message.message_id if @id_field
125
- event[@md5_field] = message.md5_of_body if @md5_field
126
- event[@sent_timestamp_field] = convert_epoch_to_timestamp(message.attributes[SENT_TIMESTAMP]) if @sent_timestamp_field
124
+ event.set(@id_field, message.message_id) if @id_field
125
+ event.set(@md5_field, message.md5_of_body) if @md5_field
126
+ event.set(@sent_timestamp_field, convert_epoch_to_timestamp(message.attributes[SENT_TIMESTAMP])) if @sent_timestamp_field
127
127
 
128
128
  return event
129
129
  end
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-sqs'
3
- s.version = '2.0.5'
3
+ s.version = '3.0.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Pull events from an Amazon Web Services Simple Queue Service (SQS) queue."
6
- s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
6
+ s.description = "This gem is a Logstash 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"
7
7
  s.authors = ["Elastic"]
8
8
  s.email = 'info@elastic.co'
9
9
  s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
22
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
23
23
 
24
24
  s.add_runtime_dependency 'logstash-codec-json'
25
25
  s.add_runtime_dependency "logstash-mixin-aws", ">= 1.0.0"
@@ -107,15 +107,15 @@ describe LogStash::Inputs::SQS do
107
107
  end
108
108
 
109
109
  it "add the `message_id`" do
110
- expect(subject[id_field]).to eq(message_id)
110
+ expect(subject.get(id_field)).to eq(message_id)
111
111
  end
112
112
 
113
113
  it "add the `md5_of_body`" do
114
- expect(subject[md5_field]).to eq(md5_of_body)
114
+ expect(subject.get(md5_field)).to eq(md5_of_body)
115
115
  end
116
116
 
117
117
  it "add the `sent_timestamp`" do
118
- expect(subject[sent_timestamp_field].to_i).to eq(sent_timestamp.to_i)
118
+ expect(subject.get(sent_timestamp_field).to_i).to eq(sent_timestamp.to_i)
119
119
  end
120
120
  end
121
121
 
@@ -138,7 +138,7 @@ describe LogStash::Inputs::SQS do
138
138
  subject { LogStash::Inputs::SQS::new(config.merge({ "codec" => "json" })) }
139
139
 
140
140
  it "uses the specified codec" do
141
- expect(subject.decode_event(encoded_message)["bonjour"]).to eq(decoded_message["bonjour"])
141
+ expect(subject.decode_event(encoded_message).get("bonjour")).to eq(decoded_message["bonjour"])
142
142
  end
143
143
  end
144
144
 
@@ -150,7 +150,7 @@ describe LogStash::Inputs::SQS do
150
150
  it "creates logstash event" do
151
151
  expect(mock_sqs).to receive(:poll).with(anything()).and_yield([encoded_message], double("stats"))
152
152
  subject.run(queue)
153
- expect(queue.pop["bonjour"]).to eq(decoded_message["bonjour"])
153
+ expect(queue.pop.get("bonjour")).to eq(decoded_message["bonjour"])
154
154
  end
155
155
  end
156
156
 
metadata CHANGED
@@ -1,72 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: '1.0'
19
- name: logstash-core-plugin-api
20
- prerelease: false
19
+ version: '2.0'
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: logstash-codec-json
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
- name: logstash-codec-json
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
+ name: logstash-mixin-aws
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - ">="
45
46
  - !ruby/object:Gem::Version
46
47
  version: 1.0.0
47
- name: logstash-mixin-aws
48
- prerelease: false
49
48
  type: :runtime
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
+ name: logstash-devutils
56
57
  requirement: !ruby/object:Gem::Requirement
57
58
  requirements:
58
59
  - - ">="
59
60
  - !ruby/object:Gem::Version
60
61
  version: '0'
61
- name: logstash-devutils
62
- prerelease: false
63
62
  type: :development
63
+ prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
69
+ description: This gem is a Logstash plugin required to be installed on top of the
70
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
71
+ gem is not a stand-alone program
70
72
  email: info@elastic.co
71
73
  executables: []
72
74
  extensions: []
@@ -90,7 +92,7 @@ licenses:
90
92
  metadata:
91
93
  logstash_plugin: 'true'
92
94
  logstash_group: input
93
- post_install_message:
95
+ post_install_message:
94
96
  rdoc_options: []
95
97
  require_paths:
96
98
  - lib
@@ -105,9 +107,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
107
  - !ruby/object:Gem::Version
106
108
  version: '0'
107
109
  requirements: []
108
- rubyforge_project:
109
- rubygems_version: 2.4.8
110
- signing_key:
110
+ rubyforge_project:
111
+ rubygems_version: 2.5.1
112
+ signing_key:
111
113
  specification_version: 4
112
114
  summary: Pull events from an Amazon Web Services Simple Queue Service (SQS) queue.
113
115
  test_files: