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 +4 -4
- data/README.rdoc +5 -4
- data/fluent-plugin-serialport.gemspec +1 -1
- data/lib/fluent/plugin/in_serialport.rb +4 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba4f2e4c7d56244479db582ef6965d322b4c725a
|
4
|
+
data.tar.gz: bdec7475b49599dfe44509de28a2d3dd73ed796e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
=
|
25
|
+
= Contributors
|
26
26
|
|
27
|
-
|
28
|
-
|
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
|
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
|
-
|
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
|
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:
|
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.
|
120
|
+
rubygems_version: 2.5.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: fluentd plugin for serial port
|