logstash-input-s3 3.3.2 → 3.3.3

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: 123e7dc8edb8418d3f45024c2b2e58e86b37bc42d2732136d804dc3d81ea247e
4
- data.tar.gz: 6403228c2a23c4b3ef77afebecfafbed806889193843e63db16ce2921807d0c9
3
+ metadata.gz: 1c3b88def1290e33f7d948bc9d48a62e43ac098be76f98b9b5fdd3745ab9e92e
4
+ data.tar.gz: f1901fe7e0c0edab44370b28f58c3145dc393a97a0098e7e4020d13534e08f36
5
5
  SHA512:
6
- metadata.gz: 18a261a31be91191aa8b64bbd6acb7ba778e7eec155e9fedfd63bc243aa14d2ecdf782c1365dd961e1e06bd7427d1538598d7f5cf85f0e69be6babe37607d75d
7
- data.tar.gz: baa33634df8652c71256959d9ad7904511750c84adef161023a3c134c48d48f2e4ae8c3bbfe7be0d6674cac0eafed3894f67d34dd82818fa07e3cc0d4a184d91
6
+ metadata.gz: e5a17bf1aafc53530789724d2fcb9073c8b3b3f99f944044da7806e44a10023f278b3d54d44587238834d74b42b6cb9287561479f368a23c2c8afe552c000ad7
7
+ data.tar.gz: 8f9c6ba566077a036bd8a6737299bb83f480a35bfe8471fc847d6ef6378000f160b268e2068567e05497cd38ca22a90788bb7e7047b0b0e7cd9ab7ba46b5ac95
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.3.3
2
+ - Symbolize hash keys for additional_settings hash #148
3
+
1
4
  ## 3.3.2
2
5
  - Docs: Set the default_codec doc attribute.
3
6
 
data/docs/index.asciidoc CHANGED
@@ -170,7 +170,7 @@ the connection to s3. See full list in https://docs.aws.amazon.com/sdkforruby/ap
170
170
  "secret_access_key" => "secret",
171
171
  "bucket" => "logstash-test",
172
172
  "additional_settings" => {
173
- "force_path_style => true,
173
+ "force_path_style" => true,
174
174
  "follow_redirects" => false
175
175
  }
176
176
  }
@@ -268,4 +268,4 @@ Set the directory where logstash will store the tmp files before processing them
268
268
  [id="plugins-{type}s-{plugin}-common-options"]
269
269
  include::{include_path}/{type}.asciidoc[]
270
270
 
271
- :default_codec!:
271
+ :default_codec!:
@@ -323,6 +323,16 @@ class LogStash::Inputs::S3 < LogStash::Inputs::Base
323
323
  path
324
324
  end
325
325
 
326
+ def symbolized_settings
327
+ @symbolized_settings ||= symbolize(@additional_settings)
328
+ end
329
+
330
+ def symbolize(hash)
331
+ return hash unless hash.is_a?(Hash)
332
+ symbolized = {}
333
+ hash.each { |key, value| symbolized[key.to_sym] = symbolize(value) }
334
+ symbolized
335
+ end
326
336
 
327
337
  private
328
338
  def old_sincedb_file
@@ -394,7 +404,7 @@ class LogStash::Inputs::S3 < LogStash::Inputs::Base
394
404
 
395
405
  private
396
406
  def get_s3object
397
- options = @additional_settings.merge(aws_options_hash || {})
407
+ options = symbolized_settings.merge(aws_options_hash || {})
398
408
  s3 = Aws::S3::Resource.new(options)
399
409
  end
400
410
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-s3'
4
- s.version = '3.3.2'
4
+ s.version = '3.3.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Streams events from files in a S3 bucket"
7
7
  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"
@@ -89,7 +89,7 @@ describe LogStash::Inputs::S3 do
89
89
  it 'should instantiate AWS::S3 clients with force_path_style set' do
90
90
  expect(Aws::S3::Resource).to receive(:new).with({
91
91
  :region => subject.region,
92
- "force_path_style" => true
92
+ :force_path_style => true
93
93
  }).and_call_original
94
94
 
95
95
  subject.send(:get_s3object)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.6.11
156
+ rubygems_version: 2.6.13
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Streams events from files in a S3 bucket