fluent-plugin-redis 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c3ea8b3fcc23f186826e6d99e3e172d9cbd59585
4
+ data.tar.gz: 27f1d63f6cb52276fb56f9d867bdba34b5d84c54
5
+ SHA512:
6
+ metadata.gz: d0661155c6258417afece07b73b1754887391304f3ba881fd228519da7bcee309a1af691d9026f2c1a8281a5a1ceeca3eca6a769a275bdab2b637604351360c3
7
+ data.tar.gz: 6fa9867c2bede27d7089bc571b832b5bc949694f4efb7f8bf20f6fdfabc0dbba58010a39824d00b4f80a8a8daa9cddca278f0e6e6b2d6f804ffbb823506b0fc1
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ services:
3
+ - redis-server
4
+ rvm:
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3.3
8
+ before_install:
9
+ - gem update bundler
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.2.1
2
+
3
+ * Use config_param to clarify supported/default parameters.
4
+ * Use log instead of $log if avaliable.
5
+
6
+ ## 0.2.0
7
+
8
+ * Support Fluentd v0.10.
9
+
1
10
  ## 0.1.3
2
11
 
3
12
  * Colored the log message added on v0.1.2.
data/README.rdoc CHANGED
@@ -10,7 +10,7 @@ What you have to do is only installing like this:
10
10
 
11
11
  Then fluent automatically loads the plugin installed.
12
12
 
13
- == Configuratin
13
+ == Configuration
14
14
 
15
15
  <match redis.**>
16
16
  type redis
data/Rakefile CHANGED
@@ -1,2 +1,10 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+ Rake::TestTask.new(:test) do |test|
5
+ test.libs << 'lib' << 'test'
6
+ test.pattern = 'test/**/test_*.rb'
7
+ test.verbose = true
8
+ end
9
+
10
+ task :default => :test
@@ -3,11 +3,11 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-redis"
6
- s.version = "0.2.0"
6
+ s.version = "0.2.1"
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = ["Yuki Nishijima"]
9
- s.date = %q{2011-09-30}
10
- s.email = "mail@yukinishijima.net"
8
+ s.authors = ["Yuki Nishijima", "Hiroshi Hatake", "Kenji Okimoto"]
9
+ s.date = %q{2016-10-25}
10
+ s.email = ["mail@yukinishijima.net", "fluent@clear-code.com"]
11
11
  s.homepage = "http://github.com/yuki24/fluent-plugin-redis"
12
12
  s.summary = "Redis output plugin for Fluent"
13
13
 
@@ -16,6 +16,9 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ["lib"]
18
18
 
19
- s.add_dependency %q<fluentd>, ["~> 0.10.0"]
19
+ s.add_dependency %q<fluentd>, [">= 0.10.0", "< 2"]
20
20
  s.add_dependency %q<redis>, ["~> 2.2.2"]
21
+ s.add_development_dependency %q<rake>, [">= 11.3.0"]
22
+ s.add_development_dependency %q<bundler>
23
+ s.add_development_dependency %q<test-unit>, ["~> 3.1.0"]
21
24
  end
@@ -1,7 +1,16 @@
1
1
  module Fluent
2
2
  class RedisOutput < BufferedOutput
3
3
  Fluent::Plugin.register_output('redis', self)
4
- attr_reader :host, :port, :db_number, :redis
4
+ attr_reader :redis
5
+
6
+ config_param :host, :string, :default => 'localhost'
7
+ config_param :port, :integer, :default => 6379
8
+ config_param :db_number, :integer, :default => 0
9
+
10
+ # To support log_level option implemented by Fluentd v0.10.43
11
+ unless method_defined?(:log)
12
+ define_method("log") { $log }
13
+ end
5
14
 
6
15
  def initialize
7
16
  super
@@ -12,12 +21,8 @@ module Fluent
12
21
  def configure(conf)
13
22
  super
14
23
 
15
- @host = conf.has_key?('host') ? conf['host'] : 'localhost'
16
- @port = conf.has_key?('port') ? conf['port'].to_i : 6379
17
- @db_number = conf.has_key?('db_number') ? conf['db_number'].to_i : nil
18
-
19
24
  if conf.has_key?('namespace')
20
- $log.warn "namespace option has been removed from fluent-plugin-redis 0.1.3. Please add or remove the namespace '#{conf['namespace']}' manually."
25
+ log.warn "namespace option has been removed from fluent-plugin-redis 0.1.3. Please add or remove the namespace '#{conf['namespace']}' manually."
21
26
  end
22
27
  end
23
28
 
@@ -30,6 +35,7 @@ module Fluent
30
35
 
31
36
  def shutdown
32
37
  @redis.quit
38
+ super
33
39
  end
34
40
 
35
41
  def format(tag, time, record)
@@ -1,4 +1,5 @@
1
1
  require 'fluent/test'
2
+ require 'fluent/plugin/out_redis'
2
3
 
3
4
  class FileOutputTest < Test::Unit::TestCase
4
5
  def setup
metadata CHANGED
@@ -1,49 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redis
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Yuki Nishijima
8
+ - Hiroshi Hatake
9
+ - Kenji Okimoto
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
-
13
- date: 2011-09-30 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
13
+ date: 2016-10-25 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
16
  name: fluentd
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
23
21
  version: 0.10.0
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '2'
24
25
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: redis
28
26
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.10.0
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '2'
35
+ - !ruby/object:Gem::Dependency
36
+ name: redis
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
34
41
  version: 2.2.2
35
42
  type: :runtime
36
- version_requirements: *id002
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 2.2.2
49
+ - !ruby/object:Gem::Dependency
50
+ name: rake
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 11.3.0
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 11.3.0
63
+ - !ruby/object:Gem::Dependency
64
+ name: bundler
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ - !ruby/object:Gem::Dependency
78
+ name: test-unit
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 3.1.0
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 3.1.0
37
91
  description:
38
- email: mail@yukinishijima.net
92
+ email:
93
+ - mail@yukinishijima.net
94
+ - fluent@clear-code.com
39
95
  executables: []
40
-
41
96
  extensions: []
42
-
43
97
  extra_rdoc_files: []
44
-
45
- files:
46
- - .gitignore
98
+ files:
99
+ - ".gitignore"
100
+ - ".travis.yml"
47
101
  - CHANGELOG.md
48
102
  - Gemfile
49
103
  - README.rdoc
@@ -51,33 +105,29 @@ files:
51
105
  - VERSION
52
106
  - fluent-plugin-redis.gemspec
53
107
  - lib/fluent/plugin/out_redis.rb
54
- - test/plugin/out_redis.rb
108
+ - test/plugin/test_out_redis.rb
55
109
  homepage: http://github.com/yuki24/fluent-plugin-redis
56
110
  licenses: []
57
-
111
+ metadata: {}
58
112
  post_install_message:
59
113
  rdoc_options: []
60
-
61
- require_paths:
114
+ require_paths:
62
115
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
64
- none: false
65
- requirements:
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ requirements:
66
118
  - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
69
- required_rubygems_version: !ruby/object:Gem::Requirement
70
- none: false
71
- requirements:
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
72
123
  - - ">="
73
- - !ruby/object:Gem::Version
74
- version: "0"
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
75
126
  requirements: []
76
-
77
127
  rubyforge_project:
78
- rubygems_version: 1.8.10
128
+ rubygems_version: 2.5.1
79
129
  signing_key:
80
- specification_version: 3
130
+ specification_version: 4
81
131
  summary: Redis output plugin for Fluent
82
- test_files: []
83
-
132
+ test_files:
133
+ - test/plugin/test_out_redis.rb