fluent-plugin-s3 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ Release 0.2.3 - 2012/11/19
3
+
4
+ * Loosen 'aws-sdk' version requirement from "~> 1.1.3" to "~> 1.1"
5
+ * Support aws-sdk facility to load credentials from ENV vars or IAM Instance Profile by making the credentials non-mandatory
6
+ * Use Yajl instead of to_json not to raise exceptions when it got invalid bytes as UTF-8.
7
+
8
+
2
9
  Release 0.2.2 - 2011/12/15
3
10
 
4
11
  * Add s3_endpoint optio
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -17,5 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_dependency "fluentd", "~> 0.10.0"
20
- gem.add_dependency "aws-sdk", "~> 1.1.3"
20
+ gem.add_dependency "aws-sdk", "~> 1.7"
21
+ gem.add_dependency "yajl-ruby", "~> 1.0"
22
+ gem.add_development_dependency "rake", ">= 0.9.2"
21
23
  end
@@ -15,8 +15,8 @@ class S3Output < Fluent::TimeSlicedOutput
15
15
  config_param :path, :string, :default => ""
16
16
  config_param :time_format, :string, :default => nil
17
17
 
18
- config_param :aws_key_id, :string
19
- config_param :aws_sec_key, :string
18
+ config_param :aws_key_id, :string, :default => nil
19
+ config_param :aws_sec_key, :string, :default => nil
20
20
  config_param :s3_bucket, :string
21
21
  config_param :s3_endpoint, :string, :default => nil
22
22
 
@@ -28,10 +28,11 @@ class S3Output < Fluent::TimeSlicedOutput
28
28
 
29
29
  def start
30
30
  super
31
- options = {
32
- :access_key_id => @aws_key_id,
33
- :secret_access_key => @aws_sec_key
34
- }
31
+ options = {}
32
+ if @aws_key_id && @aws_sec_key
33
+ options[:access_key_id] = @aws_key_id
34
+ options[:secret_access_key] = @aws_sec_key
35
+ end
35
36
  options[:s3_endpoint] = @s3_endpoint if @s3_endpoint
36
37
  @s3 = AWS::S3.new(options)
37
38
  @bucket = @s3.buckets[@s3_bucket]
@@ -39,7 +40,7 @@ class S3Output < Fluent::TimeSlicedOutput
39
40
 
40
41
  def format(tag, time, record)
41
42
  time_str = @timef.format(time)
42
- "#{time_str}\t#{tag}\t#{record.to_json}\n"
43
+ "#{time_str}\t#{tag}\t#{Yajl.dump(record)}\n"
43
44
  end
44
45
 
45
46
  def write(chunk)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-16 00:00:00.000000000Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
16
- requirement: &70265351398300 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,18 +21,60 @@ dependencies:
21
21
  version: 0.10.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70265351398300
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.10.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: aws-sdk
27
- requirement: &70265351397440 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.7'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.7'
46
+ - !ruby/object:Gem::Dependency
47
+ name: yajl-ruby
48
+ requirement: !ruby/object:Gem::Requirement
28
49
  none: false
29
50
  requirements:
30
51
  - - ~>
31
52
  - !ruby/object:Gem::Version
32
- version: 1.1.3
53
+ version: '1.0'
33
54
  type: :runtime
34
55
  prerelease: false
35
- version_requirements: *70265351397440
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.9.2
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.9.2
36
78
  description: Amazon S3 output plugin for Fluent event collector
37
79
  email: frsyuki@gmail.com
38
80
  executables: []
@@ -68,9 +110,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
110
  version: '0'
69
111
  requirements: []
70
112
  rubyforge_project:
71
- rubygems_version: 1.8.10
113
+ rubygems_version: 1.8.23
72
114
  signing_key:
73
115
  specification_version: 3
74
116
  summary: Amazon S3 output plugin for Fluent event collector
75
117
  test_files:
76
118
  - test/out_s3.rb
119
+ has_rdoc: false