fluent-plugin-dstat 0.2.5 → 0.3.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: 874c87a821fe33c500caf3a277cf2108983c1b2f
4
- data.tar.gz: d4f9d613b08268b7b24b5e5d70a78dd091ae4217
3
+ metadata.gz: 9dbc37ebe465f4c0ae08e6c2f54af6c9e5717d0e
4
+ data.tar.gz: 1c24595a4c2d5680dca8523fdbe01e798f2e5508
5
5
  SHA512:
6
- metadata.gz: bf5cf53459c1d7ffa86064b9acaee372554087fe6d83283828d99c591c0cefb694d18e63a0a501bb5d5214613f2e0d060e0b18e302c78ae8c3c77a703b720727
7
- data.tar.gz: 0ffc82d3d8c3a0e26021af5324c10d34ac20a1f956d72a22a58e8745e1c1a6eb0416f0210ef637cf0dc890b4b20d7fdb426a078a7ffd7a7d74691d547d8e54d4
6
+ metadata.gz: 1f56f8c4b7317d97d267c5bbe111f210eddf8b2756a715fd5e0f6edd7c4148c082ec74e82bc2d249c1b54b32d4b9c6db1b94e1257bab1d7259d595386356e285
7
+ data.tar.gz: 55a7d544584cc6d0c07f7e7ef286185da7adc3fb8aa1bdc1f9deef0e0f626fa36128e00e11b3c7bc8abb206b477f2951a478ad97097040104f1479bad284c5f8
data/Gemfile CHANGED
@@ -1,16 +1,4 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "shoulda", ">= 0"
10
- gem "bundler", "~> 1.0"
11
- gem "jeweler", "~> 2.0.1"
12
- end
3
+ gemspec
13
4
 
14
- gem 'fluent-mixin-rewrite-tag-name'
15
- gem "fluentd", "~> 0.10.7"
16
- gem "rdoc"
data/Rakefile CHANGED
@@ -1,43 +1 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "fluent-plugin-dstat"
18
- gem.homepage = "http://github.com/shun0102/fluent-plugin-dstat"
19
- gem.summary = "Dstat Input plugin for Fluent event collector"
20
- gem.email = "shun0102@gmail.com"
21
- gem.authors = ["Shunsuke Mikami"]
22
- # dependencies defined in Gemfile
23
- end
24
- Jeweler::RubygemsDotOrgTasks.new
25
-
26
- require 'rake/testtask'
27
- Rake::TestTask.new(:test) do |test|
28
- test.libs << 'lib' << 'test'
29
- test.pattern = 'test/**/test_*.rb'
30
- test.verbose = true
31
- end
32
-
33
- task :default => :test
34
-
35
- require 'rdoc/task'
36
- Rake::RDocTask.new do |rdoc|
37
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
38
-
39
- rdoc.rdoc_dir = 'rdoc'
40
- rdoc.title = "fluent-plugin-dstat #{version}"
41
- rdoc.rdoc_files.include('README*')
42
- rdoc.rdoc_files.include('lib/**/*.rb')
43
- end
1
+ require "bundler/gem_tasks"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.3.1
@@ -1,17 +1,14 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
5
- # stub: fluent-plugin-dstat 0.2.5 ruby lib
2
+ # stub: fluent-plugin-dstat 0.3.0 ruby lib
6
3
 
7
4
  Gem::Specification.new do |s|
8
5
  s.name = "fluent-plugin-dstat"
9
- s.version = "0.2.5"
6
+ s.version = "0.3.1"
10
7
 
11
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
9
  s.require_paths = ["lib"]
13
10
  s.authors = ["Shunsuke Mikami"]
14
- s.date = "2014-02-12"
11
+ s.date = "2015-08-15"
15
12
  s.email = "shun0102@gmail.com"
16
13
  s.extra_rdoc_files = [
17
14
  "LICENSE.txt",
@@ -31,7 +28,7 @@ Gem::Specification.new do |s|
31
28
  "test/plugin/test_in_dstat.rb"
32
29
  ]
33
30
  s.homepage = "http://github.com/shun0102/fluent-plugin-dstat"
34
- s.rubygems_version = "2.2.0"
31
+ s.rubygems_version = "2.4.5"
35
32
  s.summary = "Dstat Input plugin for Fluent event collector"
36
33
 
37
34
  if s.respond_to? :specification_version then
@@ -39,26 +36,23 @@ Gem::Specification.new do |s|
39
36
 
40
37
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
38
  s.add_runtime_dependency(%q<fluent-mixin-rewrite-tag-name>, [">= 0"])
42
- s.add_runtime_dependency(%q<fluentd>, ["~> 0.10.7"])
39
+ s.add_runtime_dependency(%q<fluentd>, [">= 0.10.7", "< 2"])
43
40
  s.add_runtime_dependency(%q<rdoc>, [">= 0"])
44
- s.add_development_dependency(%q<shoulda>, [">= 0"])
41
+ s.add_development_dependency(%q<test-unit>, [">= 3.0.0"])
45
42
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
46
- s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
47
43
  else
48
- s.add_dependency(%q<fluent-mixin-rewrite-tag-name>, [">= 0"])
49
- s.add_dependency(%q<fluentd>, ["~> 0.10.7"])
50
- s.add_dependency(%q<rdoc>, [">= 0"])
51
- s.add_dependency(%q<shoulda>, [">= 0"])
44
+ s.add_runtime_dependency(%q<fluent-mixin-rewrite-tag-name>, [">= 0"])
45
+ s.add_runtime_dependency(%q<fluentd>, [">= 0.10.7", "< 2"])
46
+ s.add_runtime_dependency(%q<rdoc>, [">= 0"])
47
+ s.add_dependency(%q<test-unit>, [">= 3.0.0"])
52
48
  s.add_dependency(%q<bundler>, ["~> 1.0"])
53
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
54
49
  end
55
50
  else
56
- s.add_dependency(%q<fluent-mixin-rewrite-tag-name>, [">= 0"])
57
- s.add_dependency(%q<fluentd>, ["~> 0.10.7"])
58
- s.add_dependency(%q<rdoc>, [">= 0"])
59
- s.add_dependency(%q<shoulda>, [">= 0"])
51
+ s.add_runtime_dependency(%q<fluent-mixin-rewrite-tag-name>, [">= 0"])
52
+ s.add_runtime_dependency(%q<fluentd>, [">= 0.10.7", "< 2"])
53
+ s.add_runtime_dependency(%q<rdoc>, [">= 0"])
54
+ s.add_dependency(%q<test-unit>, [">= 3.0.0"])
60
55
  s.add_dependency(%q<bundler>, ["~> 1.0"])
61
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
62
56
  end
63
57
  end
64
58
 
@@ -104,6 +104,8 @@ module Fluent
104
104
  @first_keys.each_with_index do |key, index|
105
105
  if key.nil? || key == ""
106
106
  @first_keys[index] = pre_key
107
+ else
108
+ @first_keys[index] = @first_keys[index].gsub(/\s/, '_')
107
109
  end
108
110
  pre_key = @first_keys[index]
109
111
  end
@@ -127,7 +129,7 @@ module Fluent
127
129
  }
128
130
  emit_tag = @tag.dup
129
131
  filter_record(emit_tag, Engine.now, record)
130
- Engine.emit(emit_tag, Engine.now, record)
132
+ router.emit(emit_tag, Engine.now, record)
131
133
  end
132
134
 
133
135
  if (@line_number % @max_lines) == (@max_lines - 1)
@@ -156,6 +158,8 @@ module Fluent
156
158
  end
157
159
 
158
160
  def on_change(prev, cur)
161
+ return if cur.size < @pos
162
+
159
163
  buffer = @io.read(cur.size - @pos)
160
164
  @pos = cur.size
161
165
  lines = []
data/test/helper.rb CHANGED
@@ -8,7 +8,6 @@ rescue Bundler::BundlerError => e
8
8
  exit e.status_code
9
9
  end
10
10
  require 'test/unit'
11
- require 'shoulda'
12
11
 
13
12
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
13
  $LOAD_PATH.unshift(File.dirname(__FILE__))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-dstat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shunsuke Mikami
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2015-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluent-mixin-rewrite-tag-name
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: fluentd
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.10.7
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: 0.10.7
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rdoc
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +59,19 @@ dependencies:
53
59
  - !ruby/object:Gem::Version
54
60
  version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
- name: shoulda
62
+ name: test-unit
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - ">="
60
66
  - !ruby/object:Gem::Version
61
- version: '0'
67
+ version: 3.0.0
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - ">="
67
73
  - !ruby/object:Gem::Version
68
- version: '0'
74
+ version: 3.0.0
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: bundler
71
77
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +86,6 @@ dependencies:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
88
  version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: jeweler
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 2.0.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 2.0.1
97
89
  description:
98
90
  email: shun0102@gmail.com
99
91
  executables: []
@@ -132,8 +124,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
124
  version: '0'
133
125
  requirements: []
134
126
  rubyforge_project:
135
- rubygems_version: 2.2.0
127
+ rubygems_version: 2.4.5
136
128
  signing_key:
137
129
  specification_version: 4
138
130
  summary: Dstat Input plugin for Fluent event collector
139
131
  test_files: []
132
+ has_rdoc: