fluent-plugin-serialport 0.0.3 → 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: 8c912ae5e6293bd0c0606e37e73c03abc48d4f6f
4
- data.tar.gz: 5e67795e3d6520a52695ef0d4d850082af91a2f9
3
+ metadata.gz: ba4f2e4c7d56244479db582ef6965d322b4c725a
4
+ data.tar.gz: bdec7475b49599dfe44509de28a2d3dd73ed796e
5
5
  SHA512:
6
- metadata.gz: b62b32d6b67e3903abfc4bb7d95509dfbf812475fc88665339ec0b5b21163fde031b5d0cdd39bba907c2eada41ce5bafca1ee581ca75f48cc1bd8a8e7ab28b29
7
- data.tar.gz: 59d84bcf7fba1131bcc9a922019717874fd814878b6599da33e63e319de8a369b831e9497108b8647f64e4452bf2e723bae44cf7b583217341608903b7bbbf02
6
+ metadata.gz: dd753c46fc9106340bd8f5bb052403d9a4ca28c1c2c12ab787031572ebb9698b3680cf91678d968449c0561b8a6394da61d8cb974e7a9057e98bd842f02a8e11
7
+ data.tar.gz: fc41a0f672b0151b4d21ae5bc35bc66ce7b8feeb54e156903b91775ad46e5930da9c1b30dbba7c7411fde8e145d0a57f6d79b25544d0ea5abaf87b11ed650ec4
data/README.rdoc CHANGED
@@ -16,16 +16,17 @@ or
16
16
  === Input Configuration
17
17
 
18
18
  <source>
19
- type serialport
19
+ @type serialport
20
20
  com_port /path/to/comport
21
21
  tag serial.sensor
22
22
  baud_rate 9600
23
23
  </source>
24
24
 
25
- = TODO
25
+ = Contributors
26
26
 
27
- - gems
28
- - test
27
+ {@frankkursters}[https://github.com/frankkusters]
28
+
29
+ {@nidcode}[https://github.com/nidcode]
29
30
 
30
31
  = Copyright
31
32
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-serialport"
6
- s.version = "0.0.3"
6
+ s.version = "0.1.0"
7
7
  s.authors = ["MATSUMOTO Katsuyoshi"]
8
8
  s.email = ["github@katsyoshi.org"]
9
9
  s.homepage = "https://github.com/katsyoshi/fluent-plugin-serialport"
@@ -1,3 +1,4 @@
1
+ require 'fluent/input'
1
2
  module Fluent
2
3
  class SerialPortInput < Input
3
4
  Plugin.register_input('serialport', self)
@@ -7,6 +8,8 @@ class SerialPortInput < Input
7
8
  config_param :eol, :string, :default => $/
8
9
  config_param :include_time, :bool, :default => false
9
10
 
11
+ define_method("router") { Fluent::Engine } unless method_defined?(:router)
12
+
10
13
  def initialize
11
14
  require 'serialport'
12
15
  super
@@ -33,7 +36,7 @@ class SerialPortInput < Input
33
36
  begin
34
37
  timenow = @include_time ? Time.now.to_s << ' ' : ''
35
38
  data = {@device => timenow << @serial.readline(@eol)}
36
- Engine.emit(@tag, Engine.now, data)
39
+ router.emit(@tag, Engine.now, data)
37
40
  rescue
38
41
  STDERR.puts caller()
39
42
  break
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-serialport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MATSUMOTO Katsuyoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2016-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.4.5
120
+ rubygems_version: 2.5.2
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: fluentd plugin for serial port