six-updater-web 0.14.8 → 0.14.9
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.
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ class LogviewsController < ApplicationController
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def upd
|
13
|
-
s = Log.find(:last, :select => "id")
|
14
|
-
s =
|
13
|
+
s = Log.find(:last, :select => "id,updated_at")
|
14
|
+
s = Log.new unless s
|
15
15
|
logger.debug "Latest entry: #{s}"
|
16
16
|
|
17
17
|
#session[:logentry] = 0 unless session[:logentry]
|
@@ -25,16 +25,18 @@ class LogviewsController < ApplicationController
|
|
25
25
|
# end
|
26
26
|
|
27
27
|
a = false
|
28
|
-
if session[:logentry]
|
29
|
-
logger.debug "Session entry #{session[:logentry]}"
|
30
|
-
if s != session[:logentry]
|
31
|
-
session[:logentry] = s
|
32
|
-
|
28
|
+
if session[:logentry] && session[:logupdated]
|
29
|
+
logger.debug "Session entry #{session[:logentry]} - #{session[:logupdated]}"
|
30
|
+
if s.id != session[:logentry] || s.updated_at != session[:logupdated]
|
31
|
+
session[:logentry] = s.id
|
32
|
+
session[:logupdated] = s.updated_at
|
33
|
+
logger.debug "New session entry #{session[:logentry]} - #{session[:logupdated]}"
|
33
34
|
a = true
|
34
35
|
end
|
35
36
|
else
|
36
|
-
session[:logentry] = s
|
37
|
-
|
37
|
+
session[:logentry] = s.id
|
38
|
+
session[:logupdated] = s.updated_at
|
39
|
+
logger.debug "New session entry #{session[:logentry]} - #{session[:logupdated]}"
|
38
40
|
a = true
|
39
41
|
end
|
40
42
|
|
@@ -136,25 +136,15 @@ class Sixconfig < ActiveRecord::Base
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def self.process_msg(msg, messages, ses, previous_r = nil)
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
entry = Log.new :logsession_id => ses, :content => msg
|
143
|
-
previous_r = nil
|
144
|
-
else
|
145
|
-
if previous_r
|
146
|
-
# Overwrite previous log entry
|
147
|
-
entry = previous_r
|
148
|
-
else
|
149
|
-
# Create new log entry
|
150
|
-
entry = Log.new :logsession_id => ses
|
151
|
-
previous_r = entry
|
152
|
-
end
|
153
|
-
entry.content = msg
|
154
|
-
end
|
155
|
-
# Add back into messages even when used before, as the content might be changed anyway, but dont add it if still in queue for nect cycle
|
156
|
-
messages << entry unless messages.include?(entry)
|
139
|
+
# Create new logentry when no previous_r is found
|
140
|
+
entry = previous_r ? previous_r : Log.new(:logsession_id => ses)
|
141
|
+
entry.content = msg
|
157
142
|
#p [msg, entry]
|
143
|
+
|
144
|
+
# Set new previous_r unless last message had return
|
145
|
+
previous_r = msg[/\n$/] ? nil : entry #&& ! msg[/.+\r\n$/]
|
146
|
+
|
147
|
+
messages << entry unless messages.include?(entry)
|
158
148
|
previous_r
|
159
149
|
end
|
160
150
|
|
@@ -11,9 +11,10 @@
|
|
11
11
|
= javascript_include_tag :defaults
|
12
12
|
= record_select_includes
|
13
13
|
= active_scaffold_includes
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
- if Goldberg.user
|
15
|
+
%script
|
16
|
+
stop_polling_logo = false;
|
17
|
+
= periodically_call_remote(:url => '/main/test', :frequency => '1', :condition => 'stop_polling_logo == false')
|
17
18
|
%body
|
18
19
|
#mainContainerBg
|
19
20
|
#mainContainer
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 14
|
8
|
-
-
|
9
|
-
version: 0.14.
|
8
|
+
- 9
|
9
|
+
version: 0.14.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sickboy
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-03 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|