logstash-output-s3 4.0.6 → 4.0.7

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: d62c917fb80e5d23d3805867be54c62391c9d118
4
- data.tar.gz: ded80a07e55c538ad48da433dc2cd5cb07509f5e
3
+ metadata.gz: 4101484ab3c3ed89b22088de339be1cf010b3753
4
+ data.tar.gz: 4f31784de1daf62a7673a3e756bff48876c3874f
5
5
  SHA512:
6
- metadata.gz: fd6617e4be2b6c0abb035c96e21c1a99141bcb66a6f764c6168c34c6762d3bbfac096956ef570759fde88e787f867c5a96ff9d203836af1a5491fc395e4e3386
7
- data.tar.gz: 0def00c7a109bb34a07ef2e96ffe6c017dcf0fdec5329e5432497264d7261a18d4cfa71390e0047c5f3f47cf383246bc609aeef4d6c27c7922af779a55822d29
6
+ metadata.gz: fd14b0db9ce158b3c0d7a00182f7aa6adf7eb5d5c178d958d6103204864fd1dc914929a2f214e67b1b4f0c931abef23f57fde968f423fb4ce62f31f52d79952a
7
+ data.tar.gz: f56cd39938dbf9191e8d4190b5e38fa60072a8ffb2e876776bcd82a7b84436d349d7056ee81372247ccdc7a88cc5b0635e2f81251c1d560f81777b52a66ca527
@@ -1,3 +1,7 @@
1
+ ## 4.0.7
2
+ - Fix: `#restore_from_crash` should use the same upload options as the normal uploader. #140
3
+ - Fix: Wrongly named `canned_acl` options, renamed to "public-read", "public-read-write", "authenticated-read", from the documentation http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
4
+
1
5
  ## 4.0.6
2
6
  - Fix: Use the right `signature_version` for the SDK v2 #129
3
7
  - Fix an issue to prevent the output to upload empty file to S3 #128
@@ -71,8 +71,8 @@ Aws.eager_autoload!
71
71
  # bucket => "your_bucket" (required)
72
72
  # size_file => 2048 (optional) - Bytes
73
73
  # time_file => 5 (optional) - Minutes
74
- # format => "plain" (optional)
75
- # canned_acl => "private" (optional. Options are "private", "public_read", "public_read_write", "authenticated_read". Defaults to "private" )
74
+ # codec => "plain" (optional)
75
+ # canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read". Defaults to "private" )
76
76
  # }
77
77
  #
78
78
  class LogStash::Outputs::S3 < LogStash::Outputs::Base
@@ -124,7 +124,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
124
124
  config :restore, :validate => :boolean, :default => true
125
125
 
126
126
  # The S3 canned ACL to use when putting the file. Defaults to "private".
127
- config :canned_acl, :validate => ["private", "public_read", "public_read_write", "authenticated_read"],
127
+ config :canned_acl, :validate => ["private", "public-read", "public-read-write", "authenticated-read"],
128
128
  :default => "private"
129
129
 
130
130
  # Specifies wether or not to use S3's server side encryption. Defaults to no encryption.
@@ -372,7 +372,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
372
372
  .each do |file|
373
373
  temp_file = TemporaryFile.create_from_existing_file(file, temp_folder_path)
374
374
  @logger.debug("Recovering from crash and uploading", :file => temp_file.path)
375
- @crash_uploader.upload_async(temp_file, :on_complete => method(:clean_temporary_file))
375
+ @crash_uploader.upload_async(temp_file, :on_complete => method(:clean_temporary_file), :upload_options => upload_options)
376
376
  end
377
377
  end
378
378
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-s3'
3
- s.version = '4.0.6'
3
+ s.version = '4.0.7'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
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"
@@ -7,7 +7,7 @@ require "stud/temporary"
7
7
  describe "Restore from crash", :integration => true do
8
8
  include_context "setup plugin"
9
9
 
10
- let(:options) { main_options.merge({ "restore" => true }) }
10
+ let(:options) { main_options.merge({ "restore" => true, "canned_acl" => "public-read-write" }) }
11
11
 
12
12
  let(:number_of_files) { 5 }
13
13
  let(:dummy_content) { "foobar\n" * 100 }
@@ -33,6 +33,7 @@ describe "Restore from crash", :integration => true do
33
33
  try(20) do
34
34
  expect(bucket_resource.objects(:prefix => prefix).count).to eq(number_of_files)
35
35
  expect(Dir.glob(File.join(temporary_directory, "*")).size).to eq(0)
36
+ expect(bucket_resource.objects(:prefix => prefix).first.acl.grants.collect(&:permission)).to include("READ", "WRITE")
36
37
  end
37
38
  end
38
39
  end
@@ -45,7 +45,7 @@ describe LogStash::Outputs::S3 do
45
45
 
46
46
  describe "Access control list" do
47
47
  context "when configured" do
48
- ["private", "public_read", "public_read_write", "authenticated_read"].each do |permission|
48
+ ["private", "public-read", "public-read-write", "authenticated-read"].each do |permission|
49
49
  it "should return the configured ACL permissions: #{permission}" do
50
50
  s3 = described_class.new(options.merge({ "canned_acl" => permission }))
51
51
  expect(s3.upload_options).to include(:acl => permission)
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.0.6
4
+ version: 4.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement