logstash-output-s3 4.3.4 → 4.3.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: 841014c4e389a87dc3e63adb53303b5f6ea231221c45bc17b0eec5efb89a4bc6
4
- data.tar.gz: a6f52f77844ce60a32a0fe05915e2865838a05505beee6ff095d402f2201d502
3
+ metadata.gz: bc8cc704a468f0576b34c9fad38dd2506ea303c4b8671e8f575a48c7e1f4e602
4
+ data.tar.gz: d39aaebe320c7a3dd109a5b35b3e5eaf9b06c9f382b88ca934e51c4ae990491d
5
5
  SHA512:
6
- metadata.gz: 211e4bb8bef9cfa55e8af453d456fa4dbe4670559a747a625b0bf91344c8c475d0a8f8d4e00eba070c7d32f81b39cf7af2ab9a8f248a18042678722ea7393165
7
- data.tar.gz: bd1f5c0e3f3337b20cdc1c4d9e835b24dda0882b0b8d2ad7d47a55fe9658c91e6137ca5869869e7dee90d0a506601e7d1557287c7c7aa833c44678bd2ebaae01
6
+ metadata.gz: 67c47cbdcf47983beed7edd157541f5d614c300c6c28f2eccd9ed039a1cd1b29eeab4f512c7b45e3a8f2936a128e95ca028f4b4b94797c8217bd9144bad6e6ab
7
+ data.tar.gz: faeeb2f29ac962ebc50dc2a874617f85f3d7dbb882ab754b7a6fc571c721d416ddb25e63ce01ab951b18b9585e3b287faadea612b99790dee624ec82c61303a4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.3.5
2
+ - Feat: cast true/false values for additional_settings [#241](https://github.com/logstash-plugins/logstash-output-s3/pull/241)
3
+
1
4
  ## 4.3.4
2
5
  - [DOC] Added note about performance implications of interpolated strings in prefixes [#233](https://github.com/logstash-plugins/logstash-output-s3/pull/233)
3
6
 
@@ -283,17 +283,24 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
283
283
  end
284
284
 
285
285
  def symbolized_settings
286
- @symbolized_settings ||= symbolize_keys(@additional_settings)
286
+ @symbolized_settings ||= symbolize_keys_and_cast_true_false(@additional_settings)
287
287
  end
288
288
 
289
- def symbolize_keys(hash)
290
- return hash unless hash.is_a?(Hash)
291
- symbolized = {}
292
- hash.each { |key, value| symbolized[key.to_sym] = symbolize_keys(value) }
293
- symbolized
289
+ def symbolize_keys_and_cast_true_false(hash)
290
+ case hash
291
+ when Hash
292
+ symbolized = {}
293
+ hash.each { |key, value| symbolized[key.to_sym] = symbolize_keys_and_cast_true_false(value) }
294
+ symbolized
295
+ when 'true'
296
+ true
297
+ when 'false'
298
+ false
299
+ else
300
+ hash
301
+ end
294
302
  end
295
303
 
296
-
297
304
  def normalize_key(prefix_key)
298
305
  prefix_key.gsub(PathValidator.matches_re, PREFIX_KEY_NORMALIZE_CHARACTER)
299
306
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-s3'
3
- s.version = '4.3.4'
3
+ s.version = '4.3.5'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Sends Logstash events to the Amazon Simple Storage Service"
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"
@@ -140,7 +140,7 @@ describe LogStash::Outputs::S3 do
140
140
 
141
141
  describe "temporary directory" do
142
142
  let(:temporary_directory) { Stud::Temporary.pathname }
143
- let(:options) { super.merge({ "temporary_directory" => temporary_directory }) }
143
+ let(:options) { super().merge({ "temporary_directory" => temporary_directory }) }
144
144
 
145
145
  it "creates the directory when it doesn't exist" do
146
146
  expect(Dir.exist?(temporary_directory)).to be_falsey
@@ -160,13 +160,15 @@ describe LogStash::Outputs::S3 do
160
160
  end
161
161
 
162
162
  describe "additional_settings" do
163
- context "when enabling force_path_style" do
163
+ context "supported settings" do
164
164
  let(:additional_settings) do
165
- { "additional_settings" => { "force_path_style" => true } }
165
+ { "additional_settings" => { "force_path_style" => 'true', "ssl_verify_peer" => 'false', "profile" => 'logstash' } }
166
166
  end
167
167
 
168
168
  it "validates the prefix" do
169
- expect(Aws::S3::Bucket).to receive(:new).twice.with(anything, hash_including(:force_path_style => true)).and_call_original
169
+ expect(Aws::S3::Bucket).to receive(:new).twice.
170
+ with(anything, hash_including(:force_path_style => true, :ssl_verify_peer => false, :profile => 'logstash')).
171
+ and_call_original
170
172
  described_class.new(options.merge(additional_settings)).register
171
173
  end
172
174
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.4
4
+ version: 4.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-02 00:00:00.000000000 Z
11
+ date: 2021-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -185,8 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubyforge_project:
189
- rubygems_version: 2.6.13
188
+ rubygems_version: 3.1.6
190
189
  signing_key:
191
190
  specification_version: 4
192
191
  summary: Sends Logstash events to the Amazon Simple Storage Service