fluent-plugin-s3 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa201801e95642044876a29fe308d0df2912c214
4
- data.tar.gz: a04b2703154c2d7efd698911bb73a04e22ca0d8c
3
+ metadata.gz: a9d2e9c4b652b764291098f4f78295936bc061ae
4
+ data.tar.gz: bab3ab13e4fae1ff603197db57b86830ec22d532
5
5
  SHA512:
6
- metadata.gz: 425e1f44dcf826ee015b0b6581ed580648419dab9562a7ea5b2afe5dbb25cd278767e4c0be2ccab3aeb9eaa233a86a92c7721a11c6a1c6487e0f8b302736c11e
7
- data.tar.gz: 23c621c0922ad06e43766bc58c92e203f389c09b6b3a1d03c7ee4c3fa186368ae6032c9ed5cfa568bcde0f3ed2435257cc0353d7f0a5530abccc980132e3e861
6
+ metadata.gz: 920ccb7def0e7cb1dffd101d993b89a3d8206a4d643aa81452762561f90e25905dd107e7324f531fda4b1a37b0ad54ba0b0c1a2a430c5041ac6fc6e6e5699817
7
+ data.tar.gz: f2ff65f0e35ce52517e32a3cef95ad1e3da873f96b9dc03fe01af65ae08fd0db5f1a424feb5920e163427743dfa38b359b659f408cda42d3a56ee25162193f9b
@@ -6,9 +6,8 @@ rvm:
6
6
  - 2.1
7
7
  - 2.2.3
8
8
  - 2.3.1
9
- - 2.4.0-rc1
9
+ - 2.4.0
10
10
  - ruby-head
11
- - rbx
12
11
 
13
12
  gemfile:
14
13
  - Gemfile
@@ -17,6 +16,7 @@ gemfile:
17
16
  branches:
18
17
  only:
19
18
  - master
19
+ - v0.12
20
20
 
21
21
  before_install: gem update bundler
22
22
  script: bundle exec rake test
@@ -27,11 +27,10 @@ matrix:
27
27
  allow_failures:
28
28
  - rvm: 1.9.3
29
29
  - rvm: ruby-head
30
- - rvm: rbx
31
30
  exclude:
32
31
  - rvm: 1.9.3
33
32
  gemfile: Gemfile
34
33
  - rvm: 2.0
35
34
  gemfile: Gemfile
36
- - rvm: 2.4.0-rc1
35
+ - rvm: 2.4.0
37
36
  gemfile: Gemfile.v0.12
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Release 0.8.1 - 2017/01/29
2
+
3
+ * out_s3: Add ssl_verify_peer option to disable cert check
4
+ * out_s3: Fix %{hostname} regression in path
5
+
6
+
1
7
  Release 0.8.0 - 2016/12/20
2
8
 
3
9
  * out_s3: Add check_object / check_bucket parameters for only put permission
data/README.md CHANGED
@@ -77,6 +77,10 @@ recommend using `s3_region` instead of `s3_endpoint`.
77
77
  endpoint for S3 compatible services. For example, Riak CS based storage or
78
78
  something. This option doesn't work on S3, use `s3_region` instead.
79
79
 
80
+ **ssl_verify_peer**
81
+
82
+ Verify SSL certificate of the endpoint. Default is true. Set false when you want to ignore the endpoint SSL certificate.
83
+
80
84
  **s3_object_key_format**
81
85
 
82
86
  The format of S3 object keys. You can use several built-in variables:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -77,6 +77,8 @@ module Fluent
77
77
  config_param :s3_region, :string, :default => ENV["AWS_REGION"] || "us-east-1"
78
78
  desc "Use 's3_region' instead"
79
79
  config_param :s3_endpoint, :string, :default => nil
80
+ desc "If false, the certificate of endpoint will not be verified"
81
+ config_param :ssl_verify_peer, :bool, :default => true
80
82
  desc "The format of S3 object keys"
81
83
  config_param :s3_object_key_format, :string, :default => "%{path}%{time_slice}_%{index}.%{file_extension}"
82
84
  desc "If true, the bucket name is always left in the request URI and never moved to the host as a sub-domain"
@@ -161,7 +163,8 @@ module Fluent
161
163
  @storage_class = "REDUCED_REDUNDANCY"
162
164
  end
163
165
 
164
- @s3_object_key_format = process_s3_object_key_format
166
+ @path = process_deprecated_placeholders(@path)
167
+ @s3_object_key_format = process_deprecated_placeholders(@s3_object_key_format)
165
168
  @values_for_s3_object_chunk = {}
166
169
  end
167
170
 
@@ -173,6 +176,7 @@ module Fluent
173
176
  options[:force_path_style] = @force_path_style
174
177
  options[:compute_checksums] = @compute_checksums unless @compute_checksums.nil?
175
178
  options[:signature_version] = @signature_version unless @signature_version.nil?
179
+ options[:ssl_verify_peer] = @ssl_verify_peer
176
180
 
177
181
  s3_client = Aws::S3::Client.new(options)
178
182
  @s3 = Aws::S3::Resource.new(:client => s3_client)
@@ -305,14 +309,14 @@ module Fluent
305
309
  end
306
310
  end
307
311
 
308
- def process_s3_object_key_format
312
+ def process_deprecated_placeholders(target_path)
309
313
  %W(%{uuid} %{uuid:random} %{uuid:hostname} %{uuid:timestamp}).each { |ph|
310
- if @s3_object_key_format.include?(ph)
311
- raise ConfigError, %!#{ph} placeholder in s3_object_key_format is removed!
314
+ if target_path.include?(ph)
315
+ raise ConfigError, %!#{ph} placeholder is removed!
312
316
  end
313
317
  }
314
318
 
315
- if @s3_object_key_format.include?('%{uuid_flush}')
319
+ if target_path.include?('%{uuid_flush}')
316
320
  # test uuidtools works or not
317
321
  begin
318
322
  require 'uuidtools'
@@ -327,7 +331,7 @@ module Fluent
327
331
  @uuid_flush_enabled = true
328
332
  end
329
333
 
330
- @s3_object_key_format.gsub('%{hostname}') { |expr|
334
+ target_path.gsub('%{hostname}') { |expr|
331
335
  log.warn "%{hostname} will be removed in the future. Use \"\#{Socket.gethostname}\" instead"
332
336
  Socket.gethostname
333
337
  }
@@ -129,6 +129,19 @@ class S3OutputTest < Test::Unit::TestCase
129
129
  assert_equal false, d.instance.check_object
130
130
  end
131
131
 
132
+ def test_config_with_hostname_placeholder
133
+ d = create_driver(<<EOC)
134
+ aws_key_id test_key_id
135
+ aws_sec_key test_sec_key
136
+ s3_bucket test_bucket
137
+ path log/%{hostname}/test
138
+ s3_object_key_format %{path}%{hostname}_%{index}
139
+ buffer_type memory
140
+ EOC
141
+ assert_match /#{Socket.gethostname}/, d.instance.s3_object_key_format
142
+ assert_match /#{Socket.gethostname}/, d.instance.path
143
+ end
144
+
132
145
  def test_path_slicing
133
146
  config = CONFIG.clone.gsub(/path\slog/, "path log/%Y/%m/%d")
134
147
  d = create_driver(config)
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.8.0
4
+ version: 0.8.1
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: 2016-12-21 00:00:00.000000000 Z
12
+ date: 2017-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.5.1
171
+ rubygems_version: 2.5.2
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Amazon S3 output plugin for Fluentd event collector