forked from fluent/fluent-plugin-flume
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
57 lines (52 loc) · 1.54 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require 'rake'
require 'rake/testtask'
require 'rake/clean'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "fluent-plugin-flume"
gemspec.summary = "Flume Input/Output plugin for Fluentd event collector"
gemspec.author = "Muga Nishizawa"
gemspec.email = "[email protected]"
gemspec.homepage = "https://github.com/muga/fluent-plugin-flume"
gemspec.has_rdoc = false
gemspec.require_paths = ["lib"]
gemspec.add_dependency "fluentd", "~> 0.10.16"
gemspec.add_dependency "thrift", "~> 0.6.0"
gemspec.test_files = Dir["test/**/*.rb"]
gemspec.files = Dir["bin/**/*", "lib/**/*", "test/**/*.rb"] +
%w[example.conf VERSION AUTHORS Rakefile fluent-plugin-flume.gemspec]
gemspec.executables = ['fluent-flume-remote']
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
task "thrift_gen" do
system "mkdir -p tmp"
system "thrift --gen rb -o tmp lib/fluent/plugin/thrift/flume.thrift"
system "mv tmp/gen-rb/* lib/fluent/plugin/thrift/"
system "rm -fR tmp"
end
Rake::TestTask.new(:test) do |t|
t.test_files = Dir['test/plugin/*.rb']
t.ruby_opts = ['-rubygems'] if defined? Gem
t.ruby_opts << '-I.'
end
#VERSION_FILE = "lib/fluent/version.rb"
#
#file VERSION_FILE => ["VERSION"] do |t|
# version = File.read("VERSION").strip
# File.open(VERSION_FILE, "w") {|f|
# f.write <<EOF
#module Fluent
#
#VERSION = '#{version}'
#
#end
#EOF
# }
#end
#
#task :default => [VERSION_FILE, :build]
task :default => [:build]