sinatra-hexacta 1.7.17 → 1.7.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d01443ebb1b12e1ceb49cbf169aa512cfead5d8cd4115982b1d22e6e15f63497
4
- data.tar.gz: fc8b3a9171e2fcd4ebac49d3cff5282794620137aefd1a4c988a3e24d9de25f4
3
+ metadata.gz: 3e2a48f9974554c9e3d2f4c27c4b0378b301244a4dee41f07fbfc217ce1d450e
4
+ data.tar.gz: 7f208d02ad3db6a73d5a4191f518ee79799d79014ce4afe7e17260bd4fcf7821
5
5
  SHA512:
6
- metadata.gz: 0d5da392906cdf62184f1b8a3733884981b367f8113cd185d8b036df36697375ed7eedf00395f18587dec8d408d1ae492a4da87e8c07a34f74d7e9e42b1558c6
7
- data.tar.gz: 17756b64a15a6024be29f234806df72f1741bb08867d55dc49af2c67520a19045ca450e6996010d6f969f2db060ccd8feec7f1652003a581c66dd8f17daaf223
6
+ metadata.gz: b6e04096184e17f002bd542fd08d173af4af41cd2d0525931d1be2136b244fe23e67bc425834995037a512496cfb7405b7c606ad1080c6a34c1f947020221b5f
7
+ data.tar.gz: c663c87d329a6c49b6915deaa82fa91409ba96ebdbc86f0740d6e6cad8e1eb728389e8656ae5702dd2b8db7e443a64107eab19292406e3ad978058bf75dc7820
@@ -37,7 +37,9 @@ module Sinatra
37
37
  end
38
38
 
39
39
  delete '/notifications/:id' do |id|
40
- Notification.find(:user_id => authenticated(User).id, :id => id).destroy.to_hash.to_json.to_s
40
+ notification = Notification.find(:user_id => authenticated(User).id, :id => id)
41
+ error(404) if notification.nil?
42
+ notification.destroy.to_hash.to_json.to_s
41
43
  end
42
44
 
43
45
  delete '/notifications' do
@@ -60,11 +60,16 @@ module Sinatra
60
60
  end
61
61
 
62
62
  get '/reports/:report_name' do |report_name|
63
- date = Date.parse(params[:date]) unless params[:date].nil?
64
- date ||= Date.today
65
- headers "Content-Disposition" => "attachment;filename=#{report_name}.#{date}.xls",
66
- "Content-Type" => "application/octet-stream"
67
- slim "reports/#{report_name}".to_sym, locals: { :date => date }, :stream => true, :layout => false
63
+ begin
64
+ date = Date.parse(params[:date]) unless params[:date].nil?
65
+ date ||= Date.today
66
+ headers "Content-Disposition" => "attachment;filename=#{report_name}.#{date}.xls",
67
+ "Content-Type" => "application/octet-stream"
68
+ slim "reports/#{report_name}".to_sym, locals: { :date => date }, :stream => true, :layout => false
69
+ rescue Exception => e
70
+ NotificationSender.instance.send_error(authenticated(User),e.message,e.backtrace.join('\n'))
71
+ halt 400, e.message
72
+ end
68
73
  end
69
74
  end
70
75
 
@@ -19,7 +19,7 @@ module Sinatra
19
19
  end
20
20
  end
21
21
 
22
- def schedule_every(time,specific_lock_file)
22
+ def schedule_every(time,specific_lock_file=nil)
23
23
  @@scheduler.every time do
24
24
 
25
25
  unless check_file_locked?(specific_lock_file)
@@ -52,7 +52,7 @@ module Sinatra
52
52
  end
53
53
  end
54
54
 
55
- def schedule_at(cron_expression,specific_lock_file)
55
+ def schedule_at(cron_expression,specific_lock_file=nil)
56
56
  @@scheduler.cron cron_expression do
57
57
 
58
58
  unless check_file_locked?(specific_lock_file)
@@ -49,7 +49,7 @@ body.darkmode #header #menu-trigger .line-wrap .line {
49
49
  }
50
50
 
51
51
  body.darkmode #header input {
52
- border-bottom: 2px solid white !important;
52
+ border-bottom: 0px !important;
53
53
  }
54
54
 
55
55
  #header input::placeholder {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.17
4
+ version: 1.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger