fluent-plugin-cloudsearch 0.0.1 → 0.1.0

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: dea659ca8642450b2a01d66a3f065c05fd63493d
4
- data.tar.gz: 26a14b947a23ea19d853a2f1cd68065d65fcf046
3
+ metadata.gz: ee705a541dbf1bf026b0bf14ff699813487eb5d2
4
+ data.tar.gz: f1890568d5ddfadbbec1c46b76168294c0673393
5
5
  SHA512:
6
- metadata.gz: b77861b5190bfed7daae7c6a9f19d6e51ea1058abb766c1089ae50bf5363b506fd8bdc874218771bad4e2d366b4d7902c7d734f0c44fca34659ed89b540b0a6a
7
- data.tar.gz: e9c237222f6e2a7002ca9978fc75f98d9866c4bff5c7ff9fc1be9432f739750df27a3db839acd6306332cc3e511b2aaf7e41f543a285d2532c2064ae88b78c0f
6
+ metadata.gz: d4697d892f8176d27f7c02f234e93180aec00d6a066595f700878c201ca31d25100e7057766a6b2e178658f1f1e198bcce1a8e2b0dc85d6dc37005b41f2ee162
7
+ data.tar.gz: 8e3bfb5dc1cc70deb8f66db6f3b5dfdae52e143c55e471ff5677d63a91438b4492ae5838f5c24f9571a31ff4bde03864433541359952ac0dccf36b55d4bd445f
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-cloudsearch"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.1.0"
8
8
  spec.authors = ["Kensaku Araga"]
9
9
  spec.email = ["ken39arg@gmail.com"]
10
10
 
@@ -29,6 +29,9 @@ module Fluent
29
29
 
30
30
  super
31
31
 
32
+ unless @endpoint
33
+ raise ConfigError, "'endpoint' parameter is required"
34
+ end
32
35
  if @buffer.buffer_chunk_limit > MAX_SIZE_LIMIT
33
36
  raise ConfigError, "buffer_chunk_limit must be less than #{MAX_SIZE_LIMIT}"
34
37
  end
@@ -37,7 +40,7 @@ module Fluent
37
40
  def start
38
41
  super
39
42
  options = setup_credentials
40
- options[:endpoint] = @endpoint if @endpoint
43
+ options[:endpoint] = @endpoint
41
44
  options[:region] = @region if @region
42
45
  @client = Aws::CloudSearchDomain::Client.new(options)
43
46
  end
@@ -64,12 +67,12 @@ module Fluent
64
67
  return ''
65
68
  end
66
69
 
67
- "#{record.to_json}\n"
70
+ "#{record.to_json},"
68
71
  end
69
72
 
70
73
  def write(chunk)
71
74
  documents = '['
72
- documents << chunk.read.split("\n").join(",")
75
+ documents << chunk.read.chop # chop last ','
73
76
  documents << ']'
74
77
  resp = @client.upload_documents(
75
78
  :documents => documents,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kensaku Araga
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2015-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd