fluent-plugin-say 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'fluentd'
4
+ gem 'jeweler'
data/Gemfile.lock ADDED
@@ -0,0 +1,32 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ cool.io (1.1.0)
5
+ iobuffer (>= 1.0.0)
6
+ fluentd (0.10.9)
7
+ cool.io (~> 1.1.0)
8
+ http_parser.rb (~> 0.5.1)
9
+ json (>= 1.4.3)
10
+ msgpack (~> 0.4.4)
11
+ yajl-ruby (~> 1.0.0)
12
+ git (1.2.5)
13
+ http_parser.rb (0.5.3)
14
+ iobuffer (1.0.0)
15
+ jeweler (1.8.3)
16
+ bundler (~> 1.0)
17
+ git (>= 1.2.5)
18
+ rake
19
+ rdoc
20
+ json (1.6.5)
21
+ msgpack (0.4.6)
22
+ rake (0.9.2.2)
23
+ rdoc (3.11)
24
+ json (~> 1.4)
25
+ yajl-ruby (1.0.0)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ fluentd
32
+ jeweler
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Shimpei Makimoto
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,35 @@
1
+ = fluent-plugin-say
2
+
3
+ Fluentd output plugin to say something by using 'say' command
4
+
5
+ == Instration
6
+
7
+ $ fluent-gem install fluent-plugin-say
8
+
9
+ == fluent.conf
10
+
11
+ <match say.**>
12
+ type say
13
+
14
+ voice kyoko
15
+ # system voice (kyoko, alex, etc...)
16
+
17
+ field say
18
+ # field name to say (default: message)
19
+ </match>
20
+
21
+ == Contributing to fluent-plugin-say
22
+
23
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
24
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
25
+ * Fork the project
26
+ * Start a feature/bugfix branch
27
+ * Commit and push until you are happy with your contribution
28
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
29
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
30
+
31
+ == Copyright
32
+
33
+ Copyright (c) 2012 Shimpei Makimoto. See LICENSE.txt for
34
+ further details.
35
+
data/Rakefile ADDED
@@ -0,0 +1,26 @@
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-say"
18
+ gem.homepage = "http://github.com/makimoto/fluent-plugin-say"
19
+ gem.license = "MIT"
20
+ gem.summary = "Fluentd output plugin to say something by using 'say' command"
21
+ gem.description = "Fluentd output plugin to say something by using 'say' command"
22
+ gem.email = "makimoto@tsuyabu.in"
23
+ gem.authors = ["Shimpei Makimoto"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,52 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "fluent-plugin-say"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Shimpei Makimoto"]
12
+ s.date = "2012-02-04"
13
+ s.description = "Fluentd output plugin to say something by using 'say' command"
14
+ s.email = "makimoto@tsuyabu.in"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "fluent-plugin-say.gemspec",
29
+ "lib/fluent/plugin/out_say.rb"
30
+ ]
31
+ s.homepage = "http://github.com/makimoto/fluent-plugin-say"
32
+ s.licenses = ["MIT"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = "1.8.15"
35
+ s.summary = "Fluentd output plugin to say something by using 'say' command"
36
+
37
+ if s.respond_to? :specification_version then
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
+ s.add_runtime_dependency(%q<fluentd>, [">= 0"])
42
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
43
+ else
44
+ s.add_dependency(%q<fluentd>, [">= 0"])
45
+ s.add_dependency(%q<jeweler>, [">= 0"])
46
+ end
47
+ else
48
+ s.add_dependency(%q<fluentd>, [">= 0"])
49
+ s.add_dependency(%q<jeweler>, [">= 0"])
50
+ end
51
+ end
52
+
@@ -0,0 +1,23 @@
1
+ module Fluent
2
+ class SayOutput < Output
3
+ Plugin.register_output('say', self)
4
+
5
+ def configure(conf)
6
+ @field = conf['field'] || 'message'
7
+ @voice = conf['voice']
8
+ end
9
+
10
+ def emit(tag, es, chain)
11
+ es.each{|time,record|
12
+ message = record[@field]
13
+ @voice = record['voice'] if record['voice']
14
+ next unless message
15
+ args = [ message.to_s ]
16
+ args.push "-v#{@voice}" if @voice
17
+ system('say', *args)
18
+ }
19
+ chain.next
20
+ end
21
+
22
+ end
23
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fluent-plugin-say
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Shimpei Makimoto
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: fluentd
16
+ requirement: &70303964127360 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70303964127360
25
+ - !ruby/object:Gem::Dependency
26
+ name: jeweler
27
+ requirement: &70303964126860 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70303964126860
36
+ description: Fluentd output plugin to say something by using 'say' command
37
+ email: makimoto@tsuyabu.in
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files:
41
+ - LICENSE.txt
42
+ - README.rdoc
43
+ files:
44
+ - .document
45
+ - .rspec
46
+ - Gemfile
47
+ - Gemfile.lock
48
+ - LICENSE.txt
49
+ - README.rdoc
50
+ - Rakefile
51
+ - VERSION
52
+ - fluent-plugin-say.gemspec
53
+ - lib/fluent/plugin/out_say.rb
54
+ homepage: http://github.com/makimoto/fluent-plugin-say
55
+ licenses:
56
+ - MIT
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ segments:
68
+ - 0
69
+ hash: -4154187137830385980
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 1.8.15
79
+ signing_key:
80
+ specification_version: 3
81
+ summary: Fluentd output plugin to say something by using 'say' command
82
+ test_files: []