ass 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/lib/ass/app.rb +14 -10
- data/lib/ass/conf.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmRlNmIzNTQzYWFiNGVmMmE0NDJkMTgzNTY4YWM5NDI0Zjg2OGZmYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDYxNjViYTY5NmNhNTEyZGUxNTFmNmRhNmZkYzk5NTc5MGEyMjBiNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTcwNTZjMmNmYTc1OTBmOTgxMDhhMGI0OTNmNDYwYWNjNTAwM2M4Mzk1ODUx
|
10
|
+
NWE1YWVmZmRjNzVkNjRlYzA2YzFiOTAyM2E5YWMwZmZlYzg3OGIzMDA0ODc2
|
11
|
+
MjgzZjM4ZTRlMDA5MmIyMmVmZWU3MWQ2OGEwZjg1N2E0YTRhY2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGNmYjY4YWRmM2JiNDJkMTNiYTYwYzk3NzhlYzUyODYwODc1N2Y4NTJkYzVm
|
14
|
+
Y2RjMDk4ODY2OTNmZWMyM2ZiNGVmNGViN2RiNWI2NjIwZGQ1MGUyZmZhYjI2
|
15
|
+
OWJmN2NlN2E0ZmEyYjhlNzI1MThlNzk5NTkzMzg0YzM5Y2UwN2Y=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.25
|
data/lib/ass/app.rb
CHANGED
@@ -35,8 +35,6 @@ class App < Sinatra::Base
|
|
35
35
|
register Sinatra::Synchrony
|
36
36
|
|
37
37
|
use Rack::MobileDetect
|
38
|
-
|
39
|
-
enable :logging
|
40
38
|
|
41
39
|
LOGGER = Logger.new("ass-#{$mode}.log", 'a+')
|
42
40
|
|
@@ -57,8 +55,18 @@ class App < Sinatra::Base
|
|
57
55
|
|
58
56
|
if "#{$mode}".strip == 'production' then
|
59
57
|
set :environment, :production
|
58
|
+
set :raise_errors, false
|
59
|
+
set :dump_errors, false
|
60
|
+
set :show_exceptions, false
|
61
|
+
set :logging, false
|
62
|
+
set :reload, false
|
60
63
|
else
|
61
|
-
set :environment, :development
|
64
|
+
set :environment, :development
|
65
|
+
set :raise_errors, true
|
66
|
+
set :dump_errors, true
|
67
|
+
set :show_exceptions, true
|
68
|
+
set :logging, true
|
69
|
+
set :reload, true
|
62
70
|
end
|
63
71
|
|
64
72
|
set :root, File.expand_path('../../../', __FILE__)
|
@@ -184,11 +192,7 @@ class App < Sinatra::Base
|
|
184
192
|
end
|
185
193
|
|
186
194
|
before do
|
187
|
-
|
188
|
-
enable :dump_errors, :raise_errors, :show_exceptions
|
189
|
-
else
|
190
|
-
disable :dump_errors, :raise_errors, :show_exceptions
|
191
|
-
end
|
195
|
+
|
192
196
|
end
|
193
197
|
|
194
198
|
get '/' do
|
@@ -231,13 +235,13 @@ class App < Sinatra::Base
|
|
231
235
|
if (db == 'token') then
|
232
236
|
@o = []
|
233
237
|
$apps.each_with_index { |app, index|
|
234
|
-
@o << Token.where(:app => app).order(:id).reverse.
|
238
|
+
@o << Token.where(:app => app).order(:id).reverse.limit(20)
|
235
239
|
}
|
236
240
|
erb :token
|
237
241
|
elsif (db == 'push') then
|
238
242
|
@p = []
|
239
243
|
$apps.each_with_index { |app, index|
|
240
|
-
@p << Push.where(:app => app).order(:id).reverse.
|
244
|
+
@p << Push.where(:app => app).order(:id).reverse.limit(20)
|
241
245
|
}
|
242
246
|
erb :push
|
243
247
|
else
|
data/lib/ass/conf.rb
CHANGED
@@ -145,17 +145,17 @@ else
|
|
145
145
|
end
|
146
146
|
|
147
147
|
class Token < Sequel::Model
|
148
|
-
Sequel.extension :pagination
|
148
|
+
#Sequel.extension :pagination
|
149
149
|
end
|
150
150
|
|
151
151
|
class Push < Sequel::Model
|
152
|
-
Sequel.extension :pagination
|
152
|
+
#Sequel.extension :pagination
|
153
153
|
end
|
154
154
|
|
155
155
|
############################################################
|
156
156
|
## Timer Job Setup
|
157
157
|
############################################################
|
158
|
-
scheduler = Rufus::Scheduler.
|
158
|
+
scheduler = Rufus::Scheduler.new
|
159
159
|
|
160
160
|
unless $timer == 0 then
|
161
161
|
scheduler.every "#{$timer}m" do
|