logstash-output-s3 0.1.4 → 0.1.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
  SHA1:
3
- metadata.gz: ed2d6b2f0155c24e0a931c664af916bab86392df
4
- data.tar.gz: f15f04f0a498fd65201f8a7274a162785a9c85eb
3
+ metadata.gz: ad7d91e4c1538aef3094e6c0b79aab310ee393f2
4
+ data.tar.gz: f92c9391aa44f59c8dc20139a5feacbe623e7214
5
5
  SHA512:
6
- metadata.gz: 036858633199c8843733eb963db4f218b2978d6ee433424f7479ca1203efb06cf3b7b14e78827c65ff1c86e80f9ca18cc476a7cdab25eb6d0f79ce503e26c6b3
7
- data.tar.gz: 6082485f20a205d2acc18ca2bc8c90e4bf48766870735413e3a9568b1b5aecd245eeb00eb1e8698ec57e112113b452132a8ffb4823bef8605a5ffbb111fb3658
6
+ metadata.gz: f48579783ac1da7c0ef4967e57b201cf70f8d1b8cec6611f8f7eb907c0a1111f5c43a11599c79d1a99bd55450659d1055b9ccd33e998cc5279998459f2c6b708
7
+ data.tar.gz: d061c669463ac5eb7b090ae5f9b49e3e585fbd5ef09c45919883c49376115d3445c1f652b8c2a894862298d7ed76e2412df63630aaaeaa31d5b9c20783b44ffa
@@ -144,13 +144,15 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
144
144
 
145
145
  @logger.debug("S3: ready to write file in bucket", :remote_filename => remote_filename, :bucket => @bucket)
146
146
 
147
- begin
148
- # prepare for write the file
149
- object = bucket.objects[remote_filename]
150
- object.write(:file => file, :acl => @canned_acl)
151
- rescue AWS::Errors::Base => error
152
- @logger.error("S3: AWS error", :error => error)
153
- raise LogStash::Error, "AWS Configuration Error, #{error}"
147
+ File.open(file, 'r') do |fileIO|
148
+ begin
149
+ # prepare for write the file
150
+ object = bucket.objects[remote_filename]
151
+ object.write(fileIO, :acl => @canned_acl)
152
+ rescue AWS::Errors::Base => error
153
+ @logger.error("S3: AWS error", :error => error)
154
+ raise LogStash::Error, "AWS Configuration Error, #{error}"
155
+ end
154
156
  end
155
157
 
156
158
  @logger.debug("S3: has written remote file in bucket with canned ACL", :remote_filename => remote_filename, :bucket => @bucket, :canned_acl => @canned_acl)
@@ -253,7 +255,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
253
255
  # Something else deleted the file, logging but not raising the issue
254
256
  @logger.warn("S3: Cannot delete the temporary file since it doesn't exist on disk", :filename => File.basename(file))
255
257
  rescue Errno::EACCES
256
- @logger.error("S3: Logstash doesnt have the permission to delete the file in the temporary directory.", :filename => File.basename, :temporary_directory => @temporary_directory)
258
+ @logger.error("S3: Logstash doesnt have the permission to delete the file in the temporary directory.", :filename => File.basename(file), :temporary_directory => @temporary_directory)
257
259
  end
258
260
  end
259
261
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-s3'
4
- s.version = '0.1.4'
4
+ s.version = '0.1.5'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
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/plugin install gemname. This gem is not a stand-alone program"
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency 'logstash', '>= 1.4.0', '< 2.0.0'
24
24
  s.add_runtime_dependency 'logstash-mixin-aws'
25
- s.add_runtime_dependency 'aws-sdk'
26
25
  s.add_runtime_dependency 'stud', '~> 0.0.18'
27
26
  s.add_development_dependency 'logstash-devutils'
28
27
  s.add_development_dependency 'logstash-input-generator'
@@ -51,6 +51,7 @@ describe LogStash::Outputs::S3 do
51
51
  s3.register
52
52
 
53
53
  expect(Dir.exist?(temporary_directory)).to eq(true)
54
+ s3.teardown
54
55
  FileUtils.rm_r(temporary_directory)
55
56
  end
56
57
 
@@ -92,10 +93,6 @@ describe LogStash::Outputs::S3 do
92
93
  end
93
94
 
94
95
  describe "#write_on_bucket" do
95
- after(:all) do
96
- File.unlink(fake_data.path)
97
- end
98
-
99
96
  let!(:fake_data) { Stud::Temporary.file }
100
97
 
101
98
  let(:fake_bucket) do
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: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elasticsearch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash
@@ -44,20 +44,6 @@ dependencies:
44
44
  version: '0'
45
45
  prerelease: false
46
46
  type: :runtime
47
- - !ruby/object:Gem::Dependency
48
- name: aws-sdk
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - '>='
57
- - !ruby/object:Gem::Version
58
- version: '0'
59
- prerelease: false
60
- type: :runtime
61
47
  - !ruby/object:Gem::Dependency
62
48
  name: stud
63
49
  version_requirements: !ruby/object:Gem::Requirement