notified_tail 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/notified_tail.rb +3 -0
- data/notified_tail.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de79d0364ed841a57e4ceda6da11fbd9ae8ab27
|
4
|
+
data.tar.gz: 15fa18f4bd0b73d769f404b5f540da291dfdc6e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfda4eecd072f4e105977d57e8d6243b695aa3551efe895a220929a58dd7bc06041ab6036a0daea8114c39fc5824939a13117a34f02b4733ca87c8ac42bd208b
|
7
|
+
data.tar.gz: cdc766f181af75455dbd6e80313de323fd7c1e300d190c7a5f6604ad3a8d942b9e0679dde230dfc77e3923e6f9122230f10949162ae8b5cd41064488cf3008ab
|
data/lib/notified_tail.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
# Inspired by http://rubyforadmins.com/reading-growing-files
|
3
3
|
class NotifiedTail
|
4
4
|
|
5
|
+
attr_reader :file_path
|
6
|
+
|
5
7
|
# Yields complete lines, one at a time.
|
6
8
|
# Works even if file doesn't exist yet.
|
7
9
|
# @param file_path [String] The file to tail
|
@@ -15,6 +17,7 @@ class NotifiedTail
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def tail(file_path, opts, &on_line)
|
20
|
+
@file_path = file_path
|
18
21
|
@stopped = false
|
19
22
|
seek_end = opts.fetch(:seek_end, true)
|
20
23
|
@force_poll = opts.fetch(:force_poll, false)
|
data/notified_tail.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'notified_tail'
|
7
|
-
spec.version = '0.2.
|
7
|
+
spec.version = '0.2.1'
|
8
8
|
spec.authors = ['Peter Winton']
|
9
9
|
spec.email = ['pwinton@indigobio.com']
|
10
10
|
spec.summary = %q{Low latency file tailing in ruby}
|