eventmachine-tail 0.1.2775 → 0.1.2781
Sign up to get free protection for your applications and to get access to all the features.
- data/samples/glob-tail.rb +16 -1
- metadata +2 -2
data/samples/glob-tail.rb
CHANGED
@@ -1,7 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Sample that uses eventmachine-tail to watch a file or set of files.
|
4
|
+
# Basically, this example implements 'tail -f' but can accept globs
|
5
|
+
# that are also watched.
|
6
|
+
#
|
7
|
+
# For example, '/var/log/*.log' will be periodically watched for new
|
8
|
+
# matching files which will additionally be watched.
|
9
|
+
#
|
10
|
+
# Usage example:
|
11
|
+
# glob-tail.rb "/var/log/*.log" "/var/log/httpd/*.log"
|
12
|
+
#
|
13
|
+
# (Important to use quotes or otherwise escape the '*' chars, otherwise
|
14
|
+
# your shell will interpret them)
|
15
|
+
|
1
16
|
require "rubygems"
|
2
17
|
require "eventmachine"
|
3
18
|
require "eventmachine-tail"
|
4
|
-
require "ap"
|
19
|
+
require "ap" # from rubygem awesome_print
|
5
20
|
|
6
21
|
class Reader < EventMachine::FileTail
|
7
22
|
def initialize(*args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventmachine-tail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2781
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Sissel
|
@@ -36,7 +36,7 @@ files:
|
|
36
36
|
- lib/em/globwatcher.rb
|
37
37
|
- samples/glob-tail.rb
|
38
38
|
has_rdoc: true
|
39
|
-
homepage: http://code.google.com/p/semicomplete/wiki/
|
39
|
+
homepage: http://code.google.com/p/semicomplete/wiki/EventMachineTail
|
40
40
|
licenses: []
|
41
41
|
|
42
42
|
post_install_message:
|