daioikachan 0.0.7 → 0.0.8

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: b7bc6743f996cd1aba3737b4ffd2d70df22d8534
4
- data.tar.gz: 7e0d2ad5a81b76796c85e565ac26aa4963474c10
3
+ metadata.gz: 919e02f5442f21a687fd13b8f1bbaf2230d8ce28
4
+ data.tar.gz: 8bdaab505ce3d64bbba674216f34e731f2a8bbfd
5
5
  SHA512:
6
- metadata.gz: b7a1a5b10a3351490f27ec907690447e407f278a95dd5aba03e40784f401871d7a2b9d6e87153fff2172bd2796e947c143d719b81e75eb9fd656a000fd3bbbb7
7
- data.tar.gz: fd04bac4e80c5f6fbfbe9685ea0c950ecb644b96ee8a9b5ab145b48bec0c8af5bd8e74857332fab236b7f5c5f33cdbe61add27540a4d1f2ca5b6c28d82bf3b10
6
+ metadata.gz: 65ee4ead37057dea7007c10f0be0d6576cb409eb5da7eb9ca7b1f402f5269052d4ec33614d23a5fd091d994bb74e0be3e7b99a293e39c2aec7a8fb3294ecd6fc
7
+ data.tar.gz: fe9d1377a03718dd4c2dd53be207056c6dfeaf8c024b98c1ec21049082187e5979530d1f8204c608bcf88305e16b6b9e4ae0dd538fccdcba9a8be20ff6135ab1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.0.8 (2015/05/08)
2
+
3
+ Enhancements
4
+
5
+ * Add `filter_slack_quote`
6
+
1
7
  # 0.0.7 (2015/04/02)
2
8
 
3
9
  Fixes:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -0,0 +1,38 @@
1
+ <source>
2
+ type daioikachan
3
+ bind 0.0.0.0
4
+ port 4979
5
+ min_threads 0
6
+ max_threads 4
7
+ backlog 1024
8
+ @label @raw
9
+ </source>
10
+
11
+ <label @raw>
12
+ <match **>
13
+ type copy
14
+ <store>
15
+ type stdout
16
+ </store>
17
+ <store>
18
+ type relabel
19
+ @label @slack
20
+ </store>
21
+ </match>
22
+ </label>
23
+
24
+ <label @slack>
25
+ <filter **>
26
+ type string_irc_slack # convert IRC color code to slack preformat ``
27
+ </filter>
28
+ <filter **>
29
+ type slack_quote # Add `> ` to the head of each line
30
+ </filter>
31
+ <match **>
32
+ type slack
33
+ slackbot_url "#{ENV['SLACKBOT_URL']}"
34
+ channel %s
35
+ channel_keys channel
36
+ flush_interval 1s # slack API has limit as a post / sec
37
+ </match>
38
+ </label>
@@ -0,0 +1,25 @@
1
+ module Fluent
2
+ class SlackQuoteFilter < Filter
3
+ Plugin.register_filter('slack_quote', self)
4
+
5
+ def configure(conf)
6
+ super
7
+ end
8
+
9
+ def start
10
+ super
11
+ end
12
+
13
+ def shutdown
14
+ super
15
+ end
16
+
17
+ def filter(tag, time, record)
18
+ if message = record['message']
19
+ filtered_message = "> #{message}"
20
+ record = record.dup.tap {|r| r['message'] = filtered_message }
21
+ end
22
+ record
23
+ end
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daioikachan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -170,6 +170,8 @@ files:
170
170
  - daioikachan.gemspec
171
171
  - examples/example.conf
172
172
  - examples/multi_slack.conf
173
+ - examples/slackbot.conf
174
+ - lib/fluent/plugin/filter_slack_quote.rb
173
175
  - lib/fluent/plugin/filter_string_irc_slack.rb
174
176
  - lib/fluent/plugin/in_daioikachan.rb
175
177
  - test.sh