logstash-output-treasure_data 0.9.0 → 0.9.1

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: 2f5e686e282066c730f8066476006c4ead9c96b1
4
- data.tar.gz: 638b4d8ccfd879410e4fec517eda34da8ea49251
3
+ metadata.gz: 18e1cfe6a9b03bb08fc114dc17af9cfad386f123
4
+ data.tar.gz: 7daf03523e4cbb3b452ec9677607850138fdad99
5
5
  SHA512:
6
- metadata.gz: a27752a6b709b5f32338873e3b0a5e087979bc9d5d80447148b6229df1f5be7fd6b3016bdf92ad1e5e63a91abf0c2270c5df664c49a2cf2307599a7a9818157a
7
- data.tar.gz: eb0596d09bfb33550fbcf3658cce42a106d806b21405bef0387edadf004060c45dd6ec1f96b9465fbb6f468dad536a132f5860ad833c7aefead09977934e05ba
6
+ metadata.gz: 0c2b55ebb66816e4422aba03968491525b634b44bd9fcc7560fea27f9ea17a79bf91ff7659d8cd3aae0e8585e7a2b29e6d2137d08e5e4de4c9b38fa6f10362be
7
+ data.tar.gz: 4b8296a1764a44ba924bfe11572a3a62a8188fd97936c8ba5e421ed7cad479371617be425a843f0c364cfda0302a54718951051d6e18b9f5396c5d373b1fad89
@@ -11,8 +11,6 @@ require "uuid"
11
11
  require "stringio"
12
12
  require "zlib"
13
13
 
14
- require_relative "./treasure_data/version"
15
-
16
14
  # Logstash output plugin to send data to Treasure Data service.
17
15
 
18
16
  class LogStash::Event
@@ -20,7 +18,7 @@ class LogStash::Event
20
18
  # LogStash objects (ex: LogStash::Timestamp) are impossible to serialize by msgpack
21
19
  begin
22
20
  @data.reject{|a,b| a == TIMESTAMP }.to_msgpack
23
- rescue ArgumentError => e
21
+ rescue ArgumentError, NoMethodError
24
22
  LogStash::Json.load(@data.to_json).to_msgpack
25
23
  end
26
24
  end
@@ -37,6 +35,9 @@ class LogStash::Outputs::TreasureData < LogStash::Outputs::Base
37
35
 
38
36
  UUID_FORMAT = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/
39
37
 
38
+ require 'rubygems'
39
+ VERSION = Gem::Specification.load(File.expand_path('../../../../logstash-output-treasure_data.gemspec', __FILE__)).version
40
+
40
41
  config :apikey, validate: :password, required: true
41
42
  config :auto_create_table, validate: :boolean, default: true
42
43
  config :endpoint, validate: :string, default: TreasureData::API::NEW_DEFAULT_ENDPOINT
@@ -51,7 +52,7 @@ class LogStash::Outputs::TreasureData < LogStash::Outputs::Base
51
52
  config :send_timeout, validate: :number, default: nil
52
53
 
53
54
  config :flush_size, validate: :number, default: 10000 # 10,000 records for flush
54
- config :flush_interval, validate: :number, default: 60 * 5 # 15min for flush
55
+ config :flush_interval, validate: :number, default: 60 * 5 # 5min for flush
55
56
 
56
57
  public
57
58
  def register
@@ -163,4 +164,4 @@ class LogStash::Outputs::TreasureData < LogStash::Outputs::Base
163
164
  def close
164
165
  buffer_flush(final: true)
165
166
  end
166
- end # class LogStash::Outputs::Example
167
+ end # class LogStash::Outputs::TreasureData
@@ -1,17 +1,17 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-treasure_data'
3
- s.version = "0.9.0"
4
- s.licenses = ["Apache License (2.0)"]
5
- s.summary = "Logstash plugin to store data into Treasure Data service."
3
+ s.version = "0.9.1"
4
+ s.licenses = ["Apache License (2.0)"]
5
+ s.summary = "Logstash plugin to store data into Treasure Data service."
6
6
  s.description = "This gem is a logstash plugin to store data from logstash to Treasure Data service. This gem is not a stand-alone program."
7
- s.authors = ["Satoshi Tagomori"]
8
- s.email = "tagomoris@gmail.com"
9
- s.homepage = "https://github.com/tagomoris/logstash-output-treasure_data"
7
+ s.authors = ["Satoshi Tagomori"]
8
+ s.email = "tagomoris@gmail.com"
9
+ s.homepage = "https://github.com/tagomoris/logstash-output-treasure_data"
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
13
  s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
14
- # Tests
14
+ # Tests
15
15
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
16
 
17
17
  # Special flag to let us know this is actually a logstash plugin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-treasure_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Tagomori
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +114,6 @@ files:
114
114
  - NOTICE.TXT
115
115
  - README.md
116
116
  - lib/logstash/outputs/treasure_data.rb
117
- - lib/logstash/outputs/treasure_data/version.rb
118
117
  - logstash-output-treasure_data.gemspec
119
118
  - spec/outputs/treasure_data_spec.rb
120
119
  homepage: https://github.com/tagomoris/logstash-output-treasure_data
@@ -1,6 +0,0 @@
1
- # encoding: utf-8
2
- require "logstash/outputs/base"
3
-
4
- class LogStash::Outputs::TreasureData < LogStash::Outputs::Base
5
- VERSION = "0.0.1"
6
- end