logstash-input-sqs 3.3.0 → 3.3.1

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: bbca33a52d6cff51cbe851d9cba61a874804d15dc8675866936740586478751f
4
- data.tar.gz: '08c907ba377fa84416e7ae49f161b39909fd361cc710f4ebdd51ae97bd94e852'
3
+ metadata.gz: 7e5a412aaf0b37b3f1c6673afc9fd8b78556daa2f9376a23d1487d2f67a3dedd
4
+ data.tar.gz: 9743307a98b4776f11c345a99eca8ebf33f85bb877d06665d65e22f1523f70a8
5
5
  SHA512:
6
- metadata.gz: 7fd07bb9d70f3a564a878fb42ba8a17421ea5718890ce1b125958280d5d0f2ce7943b7285d7edcec778fdbe0b421e010e5783d8e3aae3617fee0a7d3a0762db7
7
- data.tar.gz: '087aff018b51eb2f7eaa233dc730ee817719aa89d4b877fff7b0557a189fe6ca48006a3b753efcac35712d1dbf442881dfb7c33127ee6b031393b8f12f3c58c0'
6
+ metadata.gz: e7cc7618b904128cec536bc969a866eff79115a572387847be526eb491f7686e57036c37d7c88e6c144c07e42f814a82bfd62e36c1b74638f9bb09828dc791c8
7
+ data.tar.gz: 216ff224a892a75c6189fec011643af992f014af8cdcf9d2401ecc95687d3eea400a83d218a5b3823cd3f53918f93aef3c78297eea9cc4fd804a8f000e7cd629
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.3.1
2
+ - Refactoring: used logstash-mixin-aws to leverage shared code to manage `additional_settings` [#64](https://github.com/logstash-plugins/logstash-input-sqs/pull/64)
3
+
1
4
  ## 3.3.0
2
5
  - Feature: Add `additional_settings` option to fine-grain configuration of AWS client [#61](https://github.com/logstash-plugins/logstash-input-sqs/pull/61)
3
6
 
@@ -118,8 +118,7 @@ class LogStash::Inputs::SQS < LogStash::Inputs::Threadable
118
118
  end
119
119
 
120
120
  def setup_queue
121
- options = symbolized_settings.merge(aws_options_hash || {})
122
- aws_sqs_client = Aws::SQS::Client.new(options)
121
+ aws_sqs_client = Aws::SQS::Client.new(aws_options_hash || {})
123
122
  @poller = Aws::SQS::QueuePoller.new(queue_url(aws_sqs_client), :client => aws_sqs_client)
124
123
  rescue Aws::SQS::Errors::ServiceError, Seahorse::Client::NetworkingError => e
125
124
  @logger.error("Cannot establish connection to Amazon SQS", exception_details(e))
@@ -198,23 +197,4 @@ class LogStash::Inputs::SQS < LogStash::Inputs::Threadable
198
197
  details
199
198
  end
200
199
 
201
- def symbolized_settings
202
- @symbolized_settings ||= symbolize_keys_and_cast_true_false(@additional_settings)
203
- end
204
-
205
- def symbolize_keys_and_cast_true_false(hash)
206
- case hash
207
- when Hash
208
- symbolized = {}
209
- hash.each { |key, value| symbolized[key.to_sym] = symbolize_keys_and_cast_true_false(value) }
210
- symbolized
211
- when 'true'
212
- true
213
- when 'false'
214
- false
215
- else
216
- hash
217
- end
218
- end
219
-
220
200
  end # class LogStash::Inputs::SQS
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-sqs'
3
- s.version = '3.3.0'
3
+ s.version = '3.3.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Pulls events from an Amazon Web Services Simple Queue Service queue"
6
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"
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
23
23
 
24
24
  s.add_runtime_dependency 'logstash-codec-json'
25
- s.add_runtime_dependency 'logstash-mixin-aws', '>= 4.3.0'
25
+ s.add_runtime_dependency 'logstash-mixin-aws', '>= 5.1.0'
26
26
 
27
27
  s.add_development_dependency 'logstash-devutils'
28
28
  s.add_development_dependency "logstash-codec-json_lines"
@@ -80,9 +80,8 @@ describe LogStash::Inputs::SQS do
80
80
  expect(Aws::SQS::Client).to receive(:new).and_return(mock_sqs)
81
81
  # mock a remote call to retrieve the queue URL
82
82
  expect(mock_sqs).to receive(:get_queue_url).with({ :queue_name => queue_name }).and_return({:queue_url => queue_url })
83
- expect(subject).to receive(:symbolized_settings) do |arg|
84
- expect(arg).to include({:force_path_style => true, :ssl_verify_peer => false, :profile => 'logstash'})
85
- end.and_call_original
83
+
84
+ expect(subject.aws_options_hash).to include({:force_path_style => true, :ssl_verify_peer => false, :profile => 'logstash'})
86
85
 
87
86
  expect { subject.register }.not_to raise_error
88
87
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 4.3.0
52
+ version: 5.1.0
53
53
  name: logstash-mixin-aws
54
54
  prerelease: false
55
55
  type: :runtime
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 4.3.0
60
+ version: 5.1.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements: