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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 583365ff89e3d5371be071e1065030ae655e3dbb
4
- data.tar.gz: 3f938eab7dd5bb3a5d686a007e6a29743f751f35
3
+ metadata.gz: c57b9015fd34e6bce4973b7768c86363cb9d8806
4
+ data.tar.gz: 3cb591a1dab99c38c072175e8a017e94c8bc4c5f
5
5
  SHA512:
6
- metadata.gz: eb68e549ce5db08df659e30fd341c90ff9d199f1ddbb0b977b98021c26fc7aa21ef69a3a5f1ec08d44d69ed4c412469eb7532b70e3790d8f5482171f447cfe89
7
- data.tar.gz: db22de81850f26cd017a11f09ea6c6abe32016f1979059c5ad3dc6a83fd5c502db87979b354000b7a1681f50cdeeb8eb2acdbdc9d5f89f65c84ba65bcd865a53
6
+ metadata.gz: 9c00167f73102c70b247fdd2b4468b05f217a285ef940604c9ee7d322f341276d7bc27672852cb68a2a5ffd24865c9ee51dd6fd5538570431aeb2476d485795f
7
+ data.tar.gz: 47756efbab1ea121695ecb4ab67276369f1bd9b320e7a1468c720f0e523276c43eb46079a2ecfe9db39ff4865c2174fde49e4b45f9d082156809a3813ea88387
data/.travis.yml CHANGED
@@ -2,8 +2,9 @@ language: ruby
2
2
 
3
3
  rvm:
4
4
  - 1.9.3
5
- - 2.0.0
5
+ - 2.0
6
6
  - 2.1
7
+ - 2.2.0
7
8
  - rbx
8
9
 
9
10
  gemfile:
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Release 0.5.5 - 2015/02/19
2
+
3
+ * Revive s3_endpoint parameter for S3 compatible services
4
+
5
+
1
6
  Release 0.5.4 - 2015/02/12
2
7
 
3
8
  * Add use_server_side_encryption parameter
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.4
1
+ 0.5.5
@@ -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
@@ -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 conf.has_key?('s3_endpoint')
44
- raise ConfigError, "s3_endpoint parameter is removed. Use s3_region instead"
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
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 00:00:00.000000000 Z
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: []