woodchuck 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Gemfile +30 -0
- data/Guardfile +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +42 -0
- data/Rakefile +20 -0
- data/bin/woodchuck +8 -0
- data/lib/woodchuck.rb +18 -0
- data/lib/woodchuck/agent.rb +48 -0
- data/lib/woodchuck/config.rb +3 -0
- data/lib/woodchuck/event.rb +46 -0
- data/lib/woodchuck/logger.rb +14 -0
- data/lib/woodchuck/output.rb +14 -0
- data/lib/woodchuck/output/redis.rb +23 -0
- data/lib/woodchuck/output/stdout.rb +12 -0
- data/lib/woodchuck/output/zeromq.rb +12 -0
- data/lib/woodchuck/runner.rb +44 -0
- data/lib/woodchuck/version.rb +3 -0
- data/lib/woodchuck/watcher.rb +35 -0
- data/spec/.fixtures/13469547385549766486/foo/bar +0 -0
- data/spec/.fixtures/13469550171330562865/foo/bar +0 -0
- data/spec/spec_helper.rb +36 -0
- data/spec/support/fixtures_helper.rb +34 -0
- data/spec/woodchuck/agent_spec.rb +49 -0
- data/spec/woodchuck/watcher_spec.rb +38 -0
- data/woodchuck.gemspec +34 -0
- metadata +262 -0
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format doc
|
data/Gemfile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in woodchuck.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :test do
|
7
|
+
gem 'rake'
|
8
|
+
end
|
9
|
+
|
10
|
+
group :doc do
|
11
|
+
gem 'yard', '~> 0.8.2.1'
|
12
|
+
gem 'redcarpet', '~> 2.1.1'
|
13
|
+
end
|
14
|
+
|
15
|
+
group :test do
|
16
|
+
gem 'guard', '~> 1.3.2'
|
17
|
+
gem 'guard-rspec', '~> 1.2.1'
|
18
|
+
gem 'guard-spork', '~> 1.1.0'
|
19
|
+
gem 'rb-fsevent', '~> 0.9.1'
|
20
|
+
gem 'growl', '~> 1.0.3'
|
21
|
+
gem 'simplecov', '~> 0.6.4'
|
22
|
+
gem 'timecop', '~> 0.4.6'
|
23
|
+
end
|
24
|
+
|
25
|
+
# JSON
|
26
|
+
# gem 'json', :platform => :jruby
|
27
|
+
gem 'yajl-ruby', :platform => [ :ruby_18, :ruby_19 ]
|
28
|
+
|
29
|
+
# OpenSSL
|
30
|
+
gem 'jruby-openssl', :platform => :jruby
|
data/Guardfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
ignore %r{^spec/fixtures/}
|
2
|
+
|
3
|
+
guard 'rspec', :version => 2, :cli => "--color --format doc" do
|
4
|
+
watch(%r{^spec/.+_spec\.rb$})
|
5
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
6
|
+
watch('spec/spec_helper.rb') { "spec" }
|
7
|
+
watch(%r{^spec/support/.+.rb$}) { "spec" }
|
8
|
+
end
|
9
|
+
|
10
|
+
guard 'spork' do
|
11
|
+
watch('spec/spec_helper.rb')
|
12
|
+
watch(%r{^spec/support/.+.rb$}) { "spec" }
|
13
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Dan Ryan
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Woodchuck
|
2
|
+
|
3
|
+
A lightweight log shipper for logstash written in Ruby.
|
4
|
+
|
5
|
+
Inspired by [beaver](https://github.com/josegonzalez/beaver) and [logstash](https://github.com/logstash/logstash) itself. Fair warning, it's a work in progress ;)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install as a gem:
|
10
|
+
|
11
|
+
$ gem install woodchuck
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ woodchuck
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
```bash
|
19
|
+
woodchuck --files /var/log/syslog,/var/log/apache/**/*,/var/log/nginx/*.log --output redis
|
20
|
+
```
|
21
|
+
|
22
|
+
### Options
|
23
|
+
```
|
24
|
+
* -h, --help - Help!
|
25
|
+
* -l, --log-level - Log verbosity. [ debug, warn, info, error, fatal ]
|
26
|
+
* -p, --paths - A comma-separated list of files to watch for changes (file globbing is accepted).
|
27
|
+
* -o, --output - The output to send to [ stdout, redis ]
|
28
|
+
```
|
29
|
+
## Coming soon
|
30
|
+
|
31
|
+
* Handy config format for multiple files and outputs
|
32
|
+
* regular expressions (why not!)
|
33
|
+
* ZeroMQ and TCP output support
|
34
|
+
* Performance enhancements
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
desc "Run specs"
|
5
|
+
RSpec::Core::RakeTask.new(:spec) {|t|}
|
6
|
+
|
7
|
+
namespace :spec do
|
8
|
+
desc "Clean up rbx compiled files and run spec suite"
|
9
|
+
RSpec::Core::RakeTask.new(:ci) { |t| Dir.glob("**/*.rbc").each {|f| FileUtils.rm_f(f) } }
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Run guard"
|
13
|
+
task :guard do
|
14
|
+
sh %{bundle exec guard start}
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run spork"
|
18
|
+
task :spork do
|
19
|
+
sh %{bundle exec spork}
|
20
|
+
end
|
data/bin/woodchuck
ADDED
data/lib/woodchuck.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
|
3
|
+
require 'woodchuck/version'
|
4
|
+
|
5
|
+
require 'woodchuck/logger'
|
6
|
+
require 'woodchuck/agent'
|
7
|
+
require 'woodchuck/watcher'
|
8
|
+
require 'woodchuck/event'
|
9
|
+
require 'woodchuck/output'
|
10
|
+
require 'woodchuck/output/stdout'
|
11
|
+
require 'woodchuck/output/redis'
|
12
|
+
require 'woodchuck/output/zeromq'
|
13
|
+
|
14
|
+
require 'woodchuck/runner'
|
15
|
+
|
16
|
+
module Woodchuck
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'yajl'
|
2
|
+
require 'socket'
|
3
|
+
require 'thread'
|
4
|
+
|
5
|
+
require 'woodchuck/output'
|
6
|
+
|
7
|
+
class Woodchuck::Agent
|
8
|
+
|
9
|
+
attr_accessor :logger, :watcher, :watcher_thread, :paths, :output
|
10
|
+
|
11
|
+
def initialize(options={})
|
12
|
+
@paths = options[:paths]
|
13
|
+
@logger = Woodchuck::Logger.new(::STDOUT)
|
14
|
+
@mutex = Mutex.new
|
15
|
+
@output = case options[:output]
|
16
|
+
when :stdout
|
17
|
+
Woodchuck::Output::STDOUT.new
|
18
|
+
when :zeromq
|
19
|
+
Woodchuck::Output::ZeroMQ.new
|
20
|
+
when :redis
|
21
|
+
Woodchuck::Output::Redis.new
|
22
|
+
else
|
23
|
+
Woodchuck::Output::STDOUT.new
|
24
|
+
end
|
25
|
+
@watcher = Woodchuck::Watcher.new(self, @paths)
|
26
|
+
end
|
27
|
+
|
28
|
+
def start(blocking=false)
|
29
|
+
@mutex.synchronize do
|
30
|
+
return if @stop == false
|
31
|
+
@stop = false
|
32
|
+
end
|
33
|
+
@watcher_thread = Thread.new { @watcher.start }
|
34
|
+
@watcher_thread.join if blocking
|
35
|
+
end
|
36
|
+
|
37
|
+
def stop
|
38
|
+
@mutex.synchronize do
|
39
|
+
return if @stop == true
|
40
|
+
@stop = true
|
41
|
+
end
|
42
|
+
Thread.kill(@watcher_thread) if @watcher_thread
|
43
|
+
end
|
44
|
+
|
45
|
+
def inspect
|
46
|
+
to_s
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'woodchuck/logger'
|
2
|
+
|
3
|
+
class Woodchuck::Event
|
4
|
+
|
5
|
+
attr_accessor :path, :line, :host, :timestamp, :source, :message, :fields, :tags
|
6
|
+
|
7
|
+
def initialize(path, line)
|
8
|
+
@path = path
|
9
|
+
@line = line
|
10
|
+
@host = Socket.gethostname
|
11
|
+
@timestamp = Time.now.utc.iso8601(6)
|
12
|
+
@source = Addressable::URI.new(:scheme => 'file', :host => host, :path => path)
|
13
|
+
@message = line.strip
|
14
|
+
@fields = {}
|
15
|
+
@tags = []
|
16
|
+
end
|
17
|
+
|
18
|
+
def method_missing(symbol, *args, &block)
|
19
|
+
if to_hash.has_key?(symbol)
|
20
|
+
to_hash
|
21
|
+
else
|
22
|
+
super(symbol, *args, &block)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def to_hash
|
27
|
+
{
|
28
|
+
'@source' => source.to_s,
|
29
|
+
'@type' => source.scheme,
|
30
|
+
'@tags' => tags,
|
31
|
+
'@fields' => fields,
|
32
|
+
'@timestamp' => timestamp,
|
33
|
+
'@source_host' => host,
|
34
|
+
'@source_path' => path,
|
35
|
+
'@message' => message
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_json(*args)
|
40
|
+
to_hash.to_json(*args)
|
41
|
+
end
|
42
|
+
|
43
|
+
def to_s
|
44
|
+
to_json
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'redis'
|
2
|
+
require 'redis/namespace'
|
3
|
+
|
4
|
+
class Woodchuck::Output::Redis < Woodchuck::Output
|
5
|
+
attr_accessor :url, :host, :port, :db, :namespace
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
super
|
9
|
+
@type = :redis
|
10
|
+
@url = Addressable::URI.parse(ENV['REDIS_URL'] || 'redis://localhost:6379/9')
|
11
|
+
@namespace = ENV['REDIS_NAMESPACE'] || 'logstash:woodchuck'
|
12
|
+
end
|
13
|
+
|
14
|
+
def redis
|
15
|
+
client = ::Redis.new(:url => url)
|
16
|
+
::Redis::Namespace.new(namespace, :redis => client)
|
17
|
+
end
|
18
|
+
|
19
|
+
def handle(event)
|
20
|
+
redis.lpush("events", event.to_json)
|
21
|
+
@logger.info "Logging event to Redis", event.to_hash
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'fallen'
|
2
|
+
|
3
|
+
module Woodchuck::Runner
|
4
|
+
extend Fallen
|
5
|
+
# extend Fallen::CLI
|
6
|
+
extend self
|
7
|
+
|
8
|
+
def logger
|
9
|
+
@logger ||= Woodchuck::Logger.new(STDOUT)
|
10
|
+
end
|
11
|
+
|
12
|
+
def logger=(log)
|
13
|
+
@logger = log
|
14
|
+
end
|
15
|
+
|
16
|
+
def read(args=ARGV)
|
17
|
+
options = {}
|
18
|
+
|
19
|
+
optparse = OptionParser.new do |opts|
|
20
|
+
opts.on('-l', '--log-level [LOG_LEVEL]', [:debug, :warn, :info, :error, :fatal], 'set the log level') do |level|
|
21
|
+
options[:log_level] = level.to_sym
|
22
|
+
end
|
23
|
+
opts.on('-o', '--output [OUTPUT]', 'set the output') do |output|
|
24
|
+
options[:output] = output.to_sym
|
25
|
+
end
|
26
|
+
opts.on('-p', '--paths [PATHS]', Array, 'A list of file paths to watch') do |paths|
|
27
|
+
options[:paths] = paths
|
28
|
+
end
|
29
|
+
end
|
30
|
+
optparse.parse!(args)
|
31
|
+
options
|
32
|
+
end
|
33
|
+
|
34
|
+
def run(options={})
|
35
|
+
puts options.inspect
|
36
|
+
agent = Woodchuck::Agent.new(options)
|
37
|
+
agent.start(true)
|
38
|
+
Signal.trap('INT') do
|
39
|
+
@logger.warn :signal => signal
|
40
|
+
agent.stop
|
41
|
+
exit 0
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'filewatch/tail'
|
2
|
+
require 'addressable/uri'
|
3
|
+
require 'yajl'
|
4
|
+
require 'socket'
|
5
|
+
require 'time'
|
6
|
+
require 'thread'
|
7
|
+
require 'forwardable'
|
8
|
+
|
9
|
+
class Woodchuck::Watcher
|
10
|
+
extend Forwardable
|
11
|
+
|
12
|
+
attr_accessor :tailer, :paths, :logger, :events, :agent
|
13
|
+
def_delegator :@agent, :output, :output
|
14
|
+
|
15
|
+
def initialize(agent, *paths)
|
16
|
+
@agent = agent
|
17
|
+
@logger = Woodchuck::Logger.new(::STDOUT)
|
18
|
+
@tailer = FileWatch::Tail.new
|
19
|
+
@paths = paths.flatten
|
20
|
+
end
|
21
|
+
|
22
|
+
def start
|
23
|
+
paths.each do |path|
|
24
|
+
tailer.tail(path)
|
25
|
+
end
|
26
|
+
tailer.subscribe do |path, line|
|
27
|
+
event = Woodchuck::Event.new(path, line)
|
28
|
+
output.handle(event)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def inspect
|
33
|
+
to_s
|
34
|
+
end
|
35
|
+
end
|
File without changes
|
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'spork'
|
3
|
+
|
4
|
+
Spork.prefork do
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.require
|
9
|
+
|
10
|
+
require 'rspec'
|
11
|
+
require 'timecop'
|
12
|
+
# require 'fakefs'
|
13
|
+
require 'fileutils'
|
14
|
+
|
15
|
+
require 'woodchuck'
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.before do
|
19
|
+
Timecop.freeze
|
20
|
+
# FakeFS.activate!
|
21
|
+
end
|
22
|
+
config.after do
|
23
|
+
Timecop.return
|
24
|
+
# FakeFS.deactivate!
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Spork.each_run do
|
30
|
+
# This code will be run each time you run your specs.
|
31
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
# Crash loud in tests!
|
36
|
+
Thread.abort_on_exception = true
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'tmpdir'
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
# stolen with love from the Listen gem
|
6
|
+
include FileUtils
|
7
|
+
|
8
|
+
# Prepares temporary fixture-directories and
|
9
|
+
# cleans them afterwards.
|
10
|
+
#
|
11
|
+
# @param [Fixnum] number_of_directories the number of fixture-directories to make
|
12
|
+
#
|
13
|
+
# @yield [path1, path2, ...] the empty fixture-directories
|
14
|
+
# @yieldparam [String] path the path to a fixture directory
|
15
|
+
#
|
16
|
+
|
17
|
+
def fixture_path
|
18
|
+
Pathname.new(File.expand_path(File.join(pwd, "spec/fixtures/#{Time.now.to_f.to_s.sub('.', '') + rand(9999).to_s}")))
|
19
|
+
end
|
20
|
+
|
21
|
+
def fixtures(fixt_path=nil)
|
22
|
+
path = fixt_path || fixture_path
|
23
|
+
current_pwd = pwd
|
24
|
+
|
25
|
+
# Create the path
|
26
|
+
mkdir_p path
|
27
|
+
cd path
|
28
|
+
|
29
|
+
yield(path)
|
30
|
+
|
31
|
+
ensure
|
32
|
+
cd current_pwd
|
33
|
+
rm_rf(path) if File.exists?(path)
|
34
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'tempfile'
|
3
|
+
require 'pp'
|
4
|
+
|
5
|
+
describe Woodchuck::Agent do
|
6
|
+
describe '#initialize' do
|
7
|
+
let(:logfile) { Tempfile.new("foobar") }
|
8
|
+
|
9
|
+
subject { described_class.new }
|
10
|
+
|
11
|
+
it 'sets a logger' do
|
12
|
+
subject.logger.should be_a Woodchuck::Logger
|
13
|
+
end
|
14
|
+
it 'sets a tailer' do
|
15
|
+
subject.watcher.should be_a Woodchuck::Watcher
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#start' do
|
20
|
+
let(:path) { fixture_path }
|
21
|
+
let(:log_dir) { path + "**/*" }
|
22
|
+
let(:log_file) { File.open(path + 'foo', 'w+') }
|
23
|
+
let(:timestamp) { Time.now.utc.iso8601(6) }
|
24
|
+
|
25
|
+
subject { described_class.new(log_dir.to_s) }
|
26
|
+
|
27
|
+
before do
|
28
|
+
Socket.stub(:gethostname).and_return("example.com")
|
29
|
+
|
30
|
+
fixtures path do
|
31
|
+
touch log_file
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
after do
|
36
|
+
subject.stop
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'gets a list of events' do
|
40
|
+
subject.start
|
41
|
+
log_file.write("a message!\n")
|
42
|
+
log_file.flush
|
43
|
+
# subject.watcher.events.size.should == 1
|
44
|
+
end
|
45
|
+
# it do
|
46
|
+
# subject.events.size.should == 1
|
47
|
+
# end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'tempfile'
|
3
|
+
|
4
|
+
describe Woodchuck::Watcher do
|
5
|
+
describe '#initialize' do
|
6
|
+
let(:logfile) { Tempfile.new("foobar") }
|
7
|
+
|
8
|
+
subject { described_class.new(logfile) }
|
9
|
+
|
10
|
+
it 'sets a logger' do
|
11
|
+
subject.logger.should be_a Woodchuck::Logger
|
12
|
+
end
|
13
|
+
it 'sets a tailer' do
|
14
|
+
subject.tailer.should be_a FileWatch::Tail
|
15
|
+
end
|
16
|
+
it 'sets the watched paths' do
|
17
|
+
subject.paths.should == [logfile]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# describe '#run' do
|
22
|
+
# let(:logfile) { Tempfile.new("foobar") }
|
23
|
+
# let(:path) { fixture_path }
|
24
|
+
# let(:timestamp) { Time.now.utc.iso8601(6) }
|
25
|
+
# subject { described_class.new(logfile) }
|
26
|
+
#
|
27
|
+
# before do
|
28
|
+
# Socket.stub(:gethostname).and_return("example.com")
|
29
|
+
# # subject.run
|
30
|
+
# # logfile.write("a message!\n")
|
31
|
+
# # logfile.flush
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# # it do
|
35
|
+
# # subject.events.size.should == 1
|
36
|
+
# # end
|
37
|
+
# end
|
38
|
+
end
|
data/woodchuck.gemspec
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'woodchuck/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "woodchuck"
|
8
|
+
gem.version = Woodchuck::VERSION
|
9
|
+
gem.platform = Gem::Platform::RUBY
|
10
|
+
gem.authors = ["Dan Ryan"]
|
11
|
+
gem.email = ["dan@appliedawesome.com"]
|
12
|
+
# gem.description = %q{TODO: Write a gem description}
|
13
|
+
gem.summary = %q{lightweight log shipper for logstash}
|
14
|
+
gem.homepage = "https://github.com/danryan/woodchuck"
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# gem.add_dependency 'listen', '~> 0.5.0'
|
22
|
+
gem.add_dependency 'filewatch', '~> 0.3.4'
|
23
|
+
gem.add_dependency 'yajl-ruby', '~> 1.1.0'
|
24
|
+
gem.add_dependency 'cabin', '~> 0.4.4'
|
25
|
+
gem.add_dependency 'addressable', '~> 2.3.2'
|
26
|
+
gem.add_dependency 'redis', '~> 3.0.1'
|
27
|
+
gem.add_dependency 'redis-namespace', '~> 1.2.1'
|
28
|
+
gem.add_dependency 'fallen', '~> 0.0.1'
|
29
|
+
|
30
|
+
gem.add_development_dependency 'bundler'
|
31
|
+
gem.add_development_dependency 'rspec', '~> 2.11.0'
|
32
|
+
gem.add_development_dependency 'spork', '~> 1.0.0.rc3'
|
33
|
+
gem.add_development_dependency 'timecop', '~> 0.4.6'
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,262 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: woodchuck
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Dan Ryan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: filewatch
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.3.4
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.3.4
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: yajl-ruby
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.1.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: cabin
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.4.4
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.4.4
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: addressable
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 2.3.2
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 2.3.2
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: redis
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 3.0.1
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 3.0.1
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: redis-namespace
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.2.1
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.2.1
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: fallen
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.0.1
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.0.1
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: bundler
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: rspec
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 2.11.0
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 2.11.0
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: spork
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ~>
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 1.0.0.rc3
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.0.0.rc3
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: timecop
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ~>
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 0.4.6
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ~>
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 0.4.6
|
190
|
+
description:
|
191
|
+
email:
|
192
|
+
- dan@appliedawesome.com
|
193
|
+
executables:
|
194
|
+
- woodchuck
|
195
|
+
extensions: []
|
196
|
+
extra_rdoc_files: []
|
197
|
+
files:
|
198
|
+
- .gitignore
|
199
|
+
- .rspec
|
200
|
+
- Gemfile
|
201
|
+
- Guardfile
|
202
|
+
- LICENSE.txt
|
203
|
+
- README.md
|
204
|
+
- Rakefile
|
205
|
+
- bin/woodchuck
|
206
|
+
- lib/woodchuck.rb
|
207
|
+
- lib/woodchuck/agent.rb
|
208
|
+
- lib/woodchuck/config.rb
|
209
|
+
- lib/woodchuck/event.rb
|
210
|
+
- lib/woodchuck/logger.rb
|
211
|
+
- lib/woodchuck/output.rb
|
212
|
+
- lib/woodchuck/output/redis.rb
|
213
|
+
- lib/woodchuck/output/stdout.rb
|
214
|
+
- lib/woodchuck/output/zeromq.rb
|
215
|
+
- lib/woodchuck/runner.rb
|
216
|
+
- lib/woodchuck/version.rb
|
217
|
+
- lib/woodchuck/watcher.rb
|
218
|
+
- spec/.fixtures/13469547385549766486/foo/bar
|
219
|
+
- spec/.fixtures/13469550171330562865/foo/bar
|
220
|
+
- spec/spec_helper.rb
|
221
|
+
- spec/support/fixtures_helper.rb
|
222
|
+
- spec/woodchuck/agent_spec.rb
|
223
|
+
- spec/woodchuck/watcher_spec.rb
|
224
|
+
- woodchuck.gemspec
|
225
|
+
homepage: https://github.com/danryan/woodchuck
|
226
|
+
licenses: []
|
227
|
+
post_install_message:
|
228
|
+
rdoc_options: []
|
229
|
+
require_paths:
|
230
|
+
- lib
|
231
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
232
|
+
none: false
|
233
|
+
requirements:
|
234
|
+
- - ! '>='
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
segments:
|
238
|
+
- 0
|
239
|
+
hash: -4166578108717554715
|
240
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ! '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
246
|
+
segments:
|
247
|
+
- 0
|
248
|
+
hash: -4166578108717554715
|
249
|
+
requirements: []
|
250
|
+
rubyforge_project:
|
251
|
+
rubygems_version: 1.8.24
|
252
|
+
signing_key:
|
253
|
+
specification_version: 3
|
254
|
+
summary: lightweight log shipper for logstash
|
255
|
+
test_files:
|
256
|
+
- spec/.fixtures/13469547385549766486/foo/bar
|
257
|
+
- spec/.fixtures/13469550171330562865/foo/bar
|
258
|
+
- spec/spec_helper.rb
|
259
|
+
- spec/support/fixtures_helper.rb
|
260
|
+
- spec/woodchuck/agent_spec.rb
|
261
|
+
- spec/woodchuck/watcher_spec.rb
|
262
|
+
has_rdoc:
|