super_tailer 0.0.1 → 0.0.2
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/super_tailer/base.rb +3 -2
- data/lib/super_tailer/expire_when_idle.rb +1 -1
- data/lib/super_tailer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 837a44a964c0912fd0ee847cb59aeb05291b5ac4
|
4
|
+
data.tar.gz: 21b93923f54d4aa28fe669fa5e4f4ebe8fecc254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74c866af65c35b5039069951ebae961f4b85a90c110cf5bd59c57bbde33982fb2e54d281b21a54b0f808c60f3b75b89c9b84fbaf1dca81582f28ddd9dcde57ea
|
7
|
+
data.tar.gz: 8b61dffaa8d2ec80200e965f2ba09f7a6183030e634bad95673ad415dc798166c060adb3984280f60f0a02ec103ebab7cf32c9d63d02e85568223aa51586270a
|
data/lib/super_tailer/base.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module SuperTailer
|
2
2
|
class Base
|
3
3
|
attr_accessor :origin
|
4
|
+
attr_accessor :seek_start
|
4
5
|
attr_accessor :sleep_interval
|
5
6
|
|
6
|
-
def initialize(file, sleep_interval = 0.1)
|
7
|
+
def initialize(file, sleep_interval = 0.1, seek_start = File::SEEK_END)
|
7
8
|
self.origin = initialize_origin(file)
|
8
9
|
self.sleep_interval = sleep_interval
|
9
10
|
end
|
@@ -12,7 +13,7 @@ module SuperTailer
|
|
12
13
|
|
13
14
|
def initialize_origin(file_path)
|
14
15
|
File.new(file_path).tap do |file|
|
15
|
-
file.seek(0,
|
16
|
+
file.seek(0, seek_start)
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
data/lib/super_tailer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_tailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andrerocker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timers
|