fluent-plugin-out-solr 0.0.5 → 0.0.6

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: 084cfbcff140583951af85f95686ce9b1cce218a
4
- data.tar.gz: b76871e6609e4b256ae5a7c2e1657bf5a29c894f
3
+ metadata.gz: 7b582635ea5b9599bb0ffad3ff691afe325faa65
4
+ data.tar.gz: 940b3f04bcb7a3cdfdbd5dbabef135be23c0656c
5
5
  SHA512:
6
- metadata.gz: f1bb5193a19f3689a040114fa4d515ad19f5b7cbc3779139632bbeadb57355b5b1db604c9d192d52131904ad30f3c63aa09ffa13722fee37498da4a8ba6ca2f8
7
- data.tar.gz: 68b6b924c039f2b5c77f6254c5ee2c60907265a6974141b4f7d14cf1a1c2e205f724b88d7eb73aeb2530d1b5780ccf972cd767c9bd78dfe8fa0b039af3c93e41
6
+ metadata.gz: 6eb9e32bbe6766c0a5d278a9131b45af9fc03412d16e72266bf153e88c30354d5c7bf0acd6ffc643d10c8a4fc07030cf7abdd71cccb348bdf484b78489294ee3
7
+ data.tar.gz: 367a03794954616edfc202e9ea4d0b199838ab66fb23cf16826d95897baa6424aa69332faa8e90b87177e9660616b973609077e06e05e5585ff000d9c1849d22
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ LineLength:
2
+ Enabled: false
3
+
4
+ MethodLength:
5
+ Enabled: true
6
+ CountComments: false # count full line comments?
7
+ Max: 50
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
3
 
4
4
  Rake::TestTask.new(:test) do |test|
@@ -7,5 +7,4 @@ Rake::TestTask.new(:test) do |test|
7
7
  test.verbose = true
8
8
  end
9
9
 
10
- task :default => :test
11
-
10
+ task default: :test
@@ -1,19 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ require 'English'
3
+
4
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
5
 
4
6
  Gem::Specification.new do |s|
5
7
  s.name = 'fluent-plugin-out-solr'
6
- s.version = '0.0.5'
7
- s.authors = ['diogo', 'pitr', 'haruyama']
8
- s.email = ['team@uken.com', 'haruyama@unixuser.org']
9
- s.description = %q{Solr output plugin for Fluent event collector}
8
+ s.version = '0.0.6'
9
+ s.authors = %w(diogo pitr haruyama )
10
+ s.email = ['haruyama@unixuser.org']
11
+ s.description = %q(Solr output plugin for Fluent event collector)
10
12
  s.summary = s.description
11
13
  s.homepage = 'https://github.com/haruyama/fluent-plugin-out-solr'
12
14
  s.license = 'MIT'
13
15
 
14
- s.files = `git ls-files`.split($/)
15
- s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
- s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
+ s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
+ s.executables = s.files.grep(/^bin\//).map { |f| File.basename(f) }
18
+ s.test_files = s.files.grep(/^(test|spec|features)\//)
17
19
  s.require_paths = ['lib']
18
20
 
19
21
  s.add_runtime_dependency 'fluentd'
@@ -1,46 +1,48 @@
1
1
  # encoding: UTF-8
2
2
 
3
- # Solr output plugin for Fluent
4
- class Fluent::SolrOutput < Fluent::BufferedOutput
5
- Fluent::Plugin.register_output('solr', self)
6
-
7
- require 'fluent/plugin/solr_util'
8
- include SolrUtil
9
- require 'fluent/plugin/solr_config_common'
10
- include SolrConfigCommon
11
-
12
- config_param :core, :string, default: 'collection1'
13
-
14
- def initialize
15
- require 'net/http'
16
- require 'uri'
17
- require 'time'
18
- super
19
- @localtime = true
20
- end
21
-
22
- def configure(conf)
23
- if conf['utc']
24
- @localtime = false
25
- elsif conf['localtime']
3
+ module Fluent
4
+ # Solr output plugin for Fluent
5
+ class SolrOutput < Fluent::BufferedOutput
6
+ Fluent::Plugin.register_output('solr', self)
7
+
8
+ require 'fluent/plugin/solr_util'
9
+ include SolrUtil
10
+ require 'fluent/plugin/solr_config_common'
11
+ include SolrConfigCommon
12
+
13
+ config_param :core, :string, default: 'collection1'
14
+
15
+ def initialize
16
+ require 'net/http'
17
+ require 'uri'
18
+ require 'time'
19
+ super
26
20
  @localtime = true
27
21
  end
28
- super
29
- end
30
22
 
31
- def start
32
- super
33
- end
23
+ def configure(conf)
24
+ if conf['utc']
25
+ @localtime = false
26
+ elsif conf['localtime']
27
+ @localtime = true
28
+ end
29
+ super
30
+ end
34
31
 
35
- def format(tag, time, record)
36
- [tag, time, record].to_msgpack
37
- end
32
+ def start
33
+ super
34
+ end
38
35
 
39
- def shutdown
40
- super
41
- end
36
+ def format(tag, time, record)
37
+ [tag, time, record].to_msgpack
38
+ end
42
39
 
43
- def write(chunk)
44
- update_core(chunk, @core)
40
+ def shutdown
41
+ super
42
+ end
43
+
44
+ def write(chunk)
45
+ update_core(chunk, @core)
46
+ end
45
47
  end
46
48
  end
@@ -1,57 +1,59 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ module Fluent
3
4
  # Solr output plugin for Fluent
4
- class Fluent::SolrTimeSlicedOutput < Fluent::TimeSlicedOutput
5
- Fluent::Plugin.register_output('solr_time_sliced', self)
5
+ class SolrTimeSlicedOutput < Fluent::TimeSlicedOutput
6
+ Fluent::Plugin.register_output('solr_time_sliced', self)
6
7
 
7
- require 'fluent/plugin/solr_util'
8
- include SolrUtil
9
- require 'fluent/plugin/solr_config_common'
10
- include SolrConfigCommon
8
+ require 'fluent/plugin/solr_util'
9
+ include SolrUtil
10
+ require 'fluent/plugin/solr_config_common'
11
+ include SolrConfigCommon
11
12
 
12
- config_set_default :buffer_type, 'memory'
13
- config_set_default :time_slice_format, '%Y%m%d'
13
+ config_set_default :buffer_type, 'memory'
14
+ config_set_default :time_slice_format, '%Y%m%d'
14
15
 
15
- config_param :core, :string, default: 'log-%Y%m%d'
16
+ config_param :core, :string, default: 'log-%Y%m%d'
16
17
 
17
- def initialize
18
- require 'net/http'
19
- require 'uri'
20
- require 'time'
21
- super
22
- @localtime = true
23
- end
18
+ def initialize
19
+ require 'net/http'
20
+ require 'uri'
21
+ require 'time'
22
+ super
23
+ @localtime = true
24
+ end
24
25
 
25
- def configure(conf)
26
- if conf['core']
27
- if conf['core'].index('%S')
28
- conf['time_slice_format'] = '%Y%m%d%H%M%S'
29
- elsif conf['core'].index('%M')
30
- conf['time_slice_format'] = '%Y%m%d%H%M'
31
- elsif conf['core'].index('%H')
32
- conf['time_slice_format'] = '%Y%m%d%H'
26
+ def configure(conf)
27
+ if conf['core']
28
+ if conf['core'].index('%S')
29
+ conf['time_slice_format'] = '%Y%m%d%H%M%S'
30
+ elsif conf['core'].index('%M')
31
+ conf['time_slice_format'] = '%Y%m%d%H%M'
32
+ elsif conf['core'].index('%H')
33
+ conf['time_slice_format'] = '%Y%m%d%H'
34
+ end
33
35
  end
36
+ super
34
37
  end
35
- super
36
- end
37
38
 
38
- def start
39
- super
40
- end
39
+ def start
40
+ super
41
+ end
41
42
 
42
- def format(tag, time, record)
43
- [tag, time, record].to_msgpack
44
- end
43
+ def format(tag, time, record)
44
+ [tag, time, record].to_msgpack
45
+ end
45
46
 
46
- def shutdown
47
- super
48
- end
47
+ def shutdown
48
+ super
49
+ end
49
50
 
50
- def core_format(chunk_key)
51
- Time.strptime(chunk_key, @time_slice_format).strftime(@core)
52
- end
51
+ def core_format(chunk_key)
52
+ Time.strptime(chunk_key, @time_slice_format).strftime(@core)
53
+ end
53
54
 
54
- def write(chunk)
55
- update_core(chunk, core_format(chunk.key))
55
+ def write(chunk)
56
+ update_core(chunk, core_format(chunk.key))
57
+ end
56
58
  end
57
59
  end
@@ -6,20 +6,5 @@ MethodLength:
6
6
  CountComments: false # count full line comments?
7
7
  Max: 50
8
8
 
9
- FavorSprintf:
10
- Enabled: false
11
-
12
- MultilineBlocks:
13
- Enabled: false
14
-
15
- AvoidPerlBackrefs:
16
- Enabled: false
17
-
18
- PercentLiterals:
19
- Enabled: false
20
-
21
- BraceAfterPercent:
22
- Enabled: false
23
-
24
9
  ClassLength:
25
10
  Enabled: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-out-solr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - diogo
@@ -10,59 +10,59 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-02 00:00:00.000000000 Z
13
+ date: 2014-04-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rake
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: webmock
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  description: Solr output plugin for Fluent event collector
58
58
  email:
59
- - team@uken.com
60
59
  - haruyama@unixuser.org
61
60
  executables: []
62
61
  extensions: []
63
62
  extra_rdoc_files: []
64
63
  files:
65
- - .gitignore
64
+ - ".gitignore"
65
+ - ".rubocop.yml"
66
66
  - Gemfile
67
67
  - LICENSE.txt
68
68
  - README.md
@@ -86,17 +86,17 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.2.0
99
+ rubygems_version: 2.2.2
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Solr output plugin for Fluent event collector