Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
783bd850
Commit
783bd850
authored
Jul 18, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "extends Tail in pure coffee"
This reverts commit
21db8f2e
.
parent
82558ba5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
debomatic-webui/lib/tail.coffee
debomatic-webui/lib/tail.coffee
+23
-16
No files found.
debomatic-webui/lib/tail.coffee
View file @
783bd850
"use strict"
fs
=
require
(
"fs"
)
Tail
=
require
(
"tail"
).
Tail
Tail
::
watchEvent
=
(
e
)
->
_this
=
this
if
e
is
"change"
fs
.
stat
@
filename
,
(
err
,
stats
)
->
if
err
_this
.
emit
"error"
,
err
return
_this
.
pos
=
stats
.
size
if
stats
.
size
<
_this
.
pos
if
stats
.
size
>
_this
.
pos
_this
.
queue
.
push
start
:
_this
.
pos
end
:
stats
.
size
class
MyTail
extends
Tail
_this
.
pos
=
stats
.
size
_this
.
internalDispatcher
.
emit
"next"
if
_this
.
queue
.
length
is
1
watchEvent
:
(
e
)
->
if
e
is
'change'
stats
=
fs
.
statSync
(
@
filename
)
@
pos
=
stats
.
size
if
stats
.
size
<
@
pos
#scenario where texts is not appended but it's actually a w+
if
stats
.
size
>
@
pos
@
queue
.
push
({
start
:
@
pos
,
end
:
stats
.
size
})
@
pos
=
stats
.
size
@
internalDispatcher
.
emit
(
"next"
)
if
@
queue
.
length
is
1
else
if
e
is
'rename'
else
if
e
is
"rename"
@
unwatch
()
@
emit
"error"
,
"File "
+
@
filename
+
" deleted."
_this
.
emit
"error"
,
"File "
+
@
filename
+
" deleted."
return
close
:
()
->
Tail
::
close
=
->
@
unwatch
()
return
module
.
exports
=
My
Tail
module
.
exports
=
Tail
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment