ass 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +8 -8
  2. data/VERSION +1 -1
  3. data/lib/ass/app.rb +14 -10
  4. data/lib/ass/conf.rb +3 -3
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTA5ZjhkMzc5ZjFlNThiNzQ3YjExOGJiMTI4MmJmMDEzNjU3MjFlYg==
4
+ ZmRlNmIzNTQzYWFiNGVmMmE0NDJkMTgzNTY4YWM5NDI0Zjg2OGZmYg==
5
5
  data.tar.gz: !binary |-
6
- NTJjOGI2M2IyMGI2NTUyNTcwYTFiZTNmYjhkODBkZjUxOGVmMWNkZA==
6
+ ZDYxNjViYTY5NmNhNTEyZGUxNTFmNmRhNmZkYzk5NTc5MGEyMjBiNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmFhYjAzNGJmZTA4MmYwOGJkMDU2ZWFiMjMyZWM4YzUwNmZlNTdiYTcyYzk3
10
- MmI5ZjYzMGY3Y2U0MTYwYzI4MWRjYjMxNWNiNTRkYWMxMTU1OTFjMDdkYmRl
11
- MDQ5NmUwNjZiMTZjNGUxMWRmN2UyZjdlOTNiMjkwNWM2YzIxN2E=
9
+ NTcwNTZjMmNmYTc1OTBmOTgxMDhhMGI0OTNmNDYwYWNjNTAwM2M4Mzk1ODUx
10
+ NWE1YWVmZmRjNzVkNjRlYzA2YzFiOTAyM2E5YWMwZmZlYzg3OGIzMDA0ODc2
11
+ MjgzZjM4ZTRlMDA5MmIyMmVmZWU3MWQ2OGEwZjg1N2E0YTRhY2M=
12
12
  data.tar.gz: !binary |-
13
- ZmI4NTFiMDdjNDQ4YTU2Y2ZjYWNiNTA1MDYzYTM1ODZkNWIxNTE2NGFiZTQ0
14
- MTc5NmY1ZGJlYjg4YTViN2RkMTllYjNmNGQ2NjA3YWJlOWNmMTQ4M2U0OGY2
15
- OGJlNjlkYjJkMzI0YjNmZDUxNmNjOGY2MGNkMjVkY2JmZTc4NmQ=
13
+ ZGNmYjY4YWRmM2JiNDJkMTNiYTYwYzk3NzhlYzUyODYwODc1N2Y4NTJkYzVm
14
+ Y2RjMDk4ODY2OTNmZWMyM2ZiNGVmNGViN2RiNWI2NjIwZGQ1MGUyZmZhYjI2
15
+ OWJmN2NlN2E0ZmEyYjhlNzI1MThlNzk5NTkzMzg0YzM5Y2UwN2Y=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.24
1
+ 0.0.25
@@ -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
- if "#{$mode}".strip == 'development' then
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.paginate(page, 20)
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.paginate(page, 20)
244
+ @p << Push.where(:app => app).order(:id).reverse.limit(20)
241
245
  }
242
246
  erb :push
243
247
  else
@@ -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.start_new
158
+ scheduler = Rufus::Scheduler.new
159
159
 
160
160
  unless $timer == 0 then
161
161
  scheduler.every "#{$timer}m" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eiffel Qiu