logstash-output-s3 4.1.1 → 4.1.2

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: cd61ed1556617ad1cc932844c9a0dd25e0378535292960baf7570c1aadd7c6cd
4
- data.tar.gz: 395bd1ffb63fb8c97361c28e33e298a29e678a045698bb96ba0f585c2aae4634
3
+ metadata.gz: 7c2ddd787ca677ba096ca344aaf6f30974ffbddc9ecd5f76c4fe1ac3b3ef2dad
4
+ data.tar.gz: 16a8637b8cb54b008a303ecf0fa60eb60f27dd5cb7a22c1bb15176b65e965f05
5
5
  SHA512:
6
- metadata.gz: 4ab2243decd9bdf789f5b8e2fc1efe174c73f91e50ae82d32a8c0ce463b20dc51e77be0c3c75195a6a18661c07e9a9c033a2f6296e4740e5d52809ea3ac41b95
7
- data.tar.gz: 1f280daf62b4d4d1e567b8346cb168f83a99e06656d2e0ea83ae5d6c56f9908b1ee518a868493a22c9ed4861cf689eb3ef2069d15f0a752eeccc88e83e0ee2cd
6
+ metadata.gz: 9cb1fca399cdf70dd0fb319d8402ac5f21ed0dec7cd367c07405be768165980600aee1c8d3e44c4411c302988d4a4bb87986c6d6dc06bd5325bef72d2d71ef8b
7
+ data.tar.gz: f0856add86126d3f176a61e750a78eb99cb0acfb4dcb229925d75f70ee14a820dc020a74a1bc7250090c36fee658d263b3f0793f8c5cf17c14273aa767e4e12e
@@ -1,3 +1,6 @@
1
+ ## 4.1.2
2
+ - Symbolize hash keys for additional_settings hash #179
3
+
1
4
  ## 4.1.1
2
5
  - Docs: Set the default_codec doc attribute.
3
6
 
@@ -142,7 +142,7 @@ the connection to S3. See full list in https://docs.aws.amazon.com/sdkforruby/ap
142
142
  region => "eu-west-1",
143
143
  bucket => "logstash-test",
144
144
  additional_settings => {
145
- "force_path_style => true,
145
+ "force_path_style" => true,
146
146
  "follow_redirects" => false
147
147
  }
148
148
  }
@@ -275,7 +275,7 @@ The AWS Secret Access Key
275
275
  * Value type is <<boolean,boolean>>
276
276
  * Default value is `false`
277
277
 
278
- Specifies wether or not to use S3's server side encryption. Defaults to no encryption.
278
+ Specifies whether or not to use S3's server side encryption. Defaults to no encryption.
279
279
 
280
280
  [id="plugins-{type}s-{plugin}-server_side_encryption_algorithm"]
281
281
  ===== `server_side_encryption_algorithm`
@@ -382,4 +382,4 @@ In some circonstances you need finer grained permission on subfolder, this allow
382
382
  [id="plugins-{type}s-{plugin}-common-options"]
383
383
  include::{include_path}/{type}.asciidoc[]
384
384
 
385
- :default_codec!:
385
+ :default_codec!:
@@ -129,7 +129,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
129
129
  config :canned_acl, :validate => ["private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"],
130
130
  :default => "private"
131
131
 
132
- # Specifies wether or not to use S3's server side encryption. Defaults to no encryption.
132
+ # Specifies whether or not to use S3's server side encryption. Defaults to no encryption.
133
133
  config :server_side_encryption, :validate => :boolean, :default => false
134
134
 
135
135
  # Specifies what type of encryption to use when SSE is enabled.
@@ -271,9 +271,21 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
271
271
  def full_options
272
272
  options = aws_options_hash || {}
273
273
  options[:signature_version] = @signature_version if @signature_version
274
- @additional_settings.merge(options)
274
+ symbolized_settings.merge(options)
275
275
  end
276
276
 
277
+ def symbolized_settings
278
+ @symbolized_settings ||= symbolize_keys(@additional_settings)
279
+ end
280
+
281
+ def symbolize_keys(hash)
282
+ return hash unless hash.is_a?(Hash)
283
+ symbolized = {}
284
+ hash.each { |key, value| symbolized[key.to_sym] = symbolize_keys(value) }
285
+ symbolized
286
+ end
287
+
288
+
277
289
  def normalize_key(prefix_key)
278
290
  prefix_key.gsub(PathValidator.matches_re, PREFIX_KEY_NORMALIZE_CHARACTER)
279
291
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-s3'
3
- s.version = '4.1.1'
3
+ s.version = '4.1.2'
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"
@@ -149,7 +149,7 @@ describe LogStash::Outputs::S3 do
149
149
  end
150
150
 
151
151
  it "validates the prefix" do
152
- expect(Aws::S3::Bucket).to receive(:new).twice.with(anything, hash_including("force_path_style" => true)).and_call_original
152
+ expect(Aws::S3::Bucket).to receive(:new).twice.with(anything, hash_including(:force_path_style => true)).and_call_original
153
153
  described_class.new(options.merge(additional_settings)).register
154
154
  end
155
155
  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.1.1
4
+ version: 4.1.2
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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.6.11
189
+ rubygems_version: 2.6.13
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Sends Logstash events to the Amazon Simple Storage Service