fluent-plugin-s3 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/ChangeLog +5 -0
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/fluent-plugin-s3.gemspec +1 -0
- data/lib/fluent/plugin/out_s3.rb +4 -2
- data/test/test_out_s3.rb +14 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57b9015fd34e6bce4973b7768c86363cb9d8806
|
4
|
+
data.tar.gz: 3cb591a1dab99c38c072175e8a017e94c8bc4c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c00167f73102c70b247fdd2b4468b05f217a285ef940604c9ee7d322f341276d7bc27672852cb68a2a5ffd24865c9ee51dd6fd5538570431aeb2476d485795f
|
7
|
+
data.tar.gz: 47756efbab1ea121695ecb4ab67276369f1bd9b320e7a1468c720f0e523276c43eb46079a2ecfe9db39ff4865c2174fde49e4b45f9d082156809a3813ea88387
|
data/.travis.yml
CHANGED
data/ChangeLog
CHANGED
data/README.rdoc
CHANGED
@@ -39,6 +39,8 @@ Simply use RubyGems:
|
|
39
39
|
|
40
40
|
[s3_region] s3 region name. For example, US West (Oregon) Region is "us-west-2". The full list of regions are available here. > http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region. We recommend using `s3_region` instead of `s3_endpoint`.
|
41
41
|
|
42
|
+
[s3_endpoint] endpoint for S3 compatible services. For example, Riak CS based storage or something. This option doesn't work on S3, use `s3_region` instead.
|
43
|
+
|
42
44
|
[s3_object_key_format] The format of S3 object keys. You can use several built-in variables:
|
43
45
|
|
44
46
|
- %{path}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/fluent-plugin-s3.gemspec
CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_dependency "fluent-mixin-config-placeholders", ">= 0.3.0"
|
23
23
|
gem.add_development_dependency "rake", ">= 0.9.2"
|
24
24
|
gem.add_development_dependency "flexmock", ">= 1.2.0"
|
25
|
+
gem.add_development_dependency "test-unit", ">= 3.0.8"
|
25
26
|
end
|
data/lib/fluent/plugin/out_s3.rb
CHANGED
@@ -21,6 +21,7 @@ module Fluent
|
|
21
21
|
config_param :aws_sec_key, :string, :default => nil
|
22
22
|
config_param :s3_bucket, :string
|
23
23
|
config_param :s3_region, :string, :default => nil
|
24
|
+
config_param :s3_endpoint, :string, :default => nil
|
24
25
|
config_param :s3_object_key_format, :string, :default => "%{path}%{time_slice}_%{index}.%{file_extension}"
|
25
26
|
config_param :store_as, :string, :default => "gzip"
|
26
27
|
config_param :auto_create_bucket, :bool, :default => true
|
@@ -40,8 +41,8 @@ module Fluent
|
|
40
41
|
def configure(conf)
|
41
42
|
super
|
42
43
|
|
43
|
-
if
|
44
|
-
raise ConfigError, "s3_endpoint parameter is
|
44
|
+
if @s3_endpoint && @s3_endpoint.end_with?('amazonaws.com')
|
45
|
+
raise ConfigError, "s3_endpoint parameter is not supported for S3, use s3_region instead. This parameter is for S3 compatible services"
|
45
46
|
end
|
46
47
|
|
47
48
|
begin
|
@@ -75,6 +76,7 @@ module Fluent
|
|
75
76
|
options[:secret_access_key] = @aws_sec_key
|
76
77
|
end
|
77
78
|
options[:region] = @s3_region if @s3_region
|
79
|
+
options[:endpoint] = @s3_endpoint if @s3_endpoint
|
78
80
|
options[:proxy_uri] = @proxy_uri if @proxy_uri
|
79
81
|
options[:use_ssl] = @use_ssl
|
80
82
|
options[:s3_server_side_encryption] = @use_server_side_encryption
|
data/test/test_out_s3.rb
CHANGED
@@ -46,6 +46,20 @@ class S3OutputTest < Test::Unit::TestCase
|
|
46
46
|
assert_equal 'application/x-gzip', d.instance.instance_variable_get(:@compressor).content_type
|
47
47
|
end
|
48
48
|
|
49
|
+
def test_s3_endpoint_with_valid_endpoint
|
50
|
+
d = create_driver(CONFIG + 's3_endpoint riak-cs.example.com')
|
51
|
+
assert_equal 'riak-cs.example.com', d.instance.s3_endpoint
|
52
|
+
end
|
53
|
+
|
54
|
+
data('US West (Oregon)' => 's3-us-west-2.amazonaws.com',
|
55
|
+
'EU (Frankfurt)' => 's3.eu-central-1.amazonaws.com',
|
56
|
+
'Asia Pacific (Tokyo)' => 's3-ap-northeast-1.amazonaws.com')
|
57
|
+
def test_s3_endpoint_with_invalid_endpoint(endpoint)
|
58
|
+
assert_raise(Fluent::ConfigError, "s3_endpoint parameter is not supported, use s3_region instead. This parameter is for S3 compatible services") {
|
59
|
+
d = create_driver(CONFIG + "s3_endpoint #{endpoint}")
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
49
63
|
def test_configure_with_mime_type_json
|
50
64
|
conf = CONFIG.clone
|
51
65
|
conf << "\nstore_as json\n"
|
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.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -101,6 +101,20 @@ dependencies:
|
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 1.2.0
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: test-unit
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.0.8
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 3.0.8
|
104
118
|
description: Amazon S3 output plugin for Fluentd event collector
|
105
119
|
email: frsyuki@gmail.com
|
106
120
|
executables: []
|