fluent-plugin-script 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 681833251ac110f795a5275712827c905b91893b
4
- data.tar.gz: 7c6ae71bc32bb20f1898bb67671258d0b3f60d1e
3
+ metadata.gz: dd0f3318b8be11adfea93814dc46c222a5214485
4
+ data.tar.gz: 1f02ae651ed80d7b4cff79a12ed0cb592d4556c4
5
5
  SHA512:
6
- metadata.gz: 4c52aa57a97b6de84bc69e3fb070e667ee3fca33a6e62e979be5eb849f83c048a0067f4d2313d1690a94887e178593b933c08d2e1dba809b2241a1f1e5ab08ea
7
- data.tar.gz: 6f27a5df442fd52707e17592b5e59bc4aa6855f01645751cedbd56fec9c860cb9fd1ac4dafb4026b325e431dab1b82fbc3f184631e67f3fd2fefd0158897a74a
6
+ metadata.gz: 27fc19b54cb472e9f5bb0f29af6d30c4113547beac5196204c8d186a6970a724c5081535f58f30340877651e551243650cef40eec01d8d6659d357e2f81ebd2f
7
+ data.tar.gz: 53d6ee44f4c8f80eee2cd04d9744b5f898ea48068eafbd5a655600afe49000561414b2ef1052e0dbc83b7f121bfcf67e51361ebd8be917d4fb009e2e60bf5afd
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # fluent-plugin-script
2
2
 
3
- Fluent filter plugin to external ruby script
3
+ Fluent filter plugin to external ruby script.
4
+
5
+ [![Build Status](https://travis-ci.org/SNakano/fluent-plugin-script.svg)](https://travis-ci.org/SNakano/fluent-plugin-script)
4
6
 
5
7
  ## install
6
8
 
@@ -8,7 +10,7 @@ Fluent filter plugin to external ruby script
8
10
  gem install fluent-plugin-filter-script
9
11
  ``
10
12
 
11
- ## Configuration Example
13
+ ## Configuration
12
14
 
13
15
  #### fluent.conf
14
16
  ```
@@ -18,6 +20,32 @@ gem install fluent-plugin-filter-script
18
20
  </filter>
19
21
  ```
20
22
 
23
+ #### external ruby script
24
+
25
+ ```
26
+ def start
27
+ super
28
+ # This is the first method to be called when it starts running
29
+ # Use it to allocate resources, etc.
30
+ end
31
+
32
+ def shutdown
33
+ super
34
+ # This method is called when Fluentd is shutting down.
35
+ # Use it to free up resources, etc.
36
+ end
37
+
38
+ def filter(tag, time, record)
39
+ # This method implements the filtering logic for individual filters
40
+ record
41
+ end
42
+
43
+ ```
44
+
45
+ ref. http://docs.fluentd.org/articles/plugin-development#filter-plugins
46
+
47
+ ## Example
48
+
21
49
  #### example.rb
22
50
 
23
51
  ```ruby
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fluent-plugin-script"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.licenses = ["MIT"]
5
5
  s.summary = "Fluentd filter plugin to external ruby script"
6
6
  s.description = s.summary
@@ -5,6 +5,7 @@ module Fluent
5
5
  config_param :path, :string
6
6
 
7
7
  def configure(conf)
8
+ super
8
9
  load_script_file(conf['path'].to_s)
9
10
  end
10
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - SNakano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.4.5
93
+ rubygems_version: 2.5.1
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Fluentd filter plugin to external ruby script