renalware-core 2.0.17 → 2.0.18
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 +4 -4
- data/app/mailers/renalware/letters/delivery/practice_mailer.rb +1 -1
- data/app/models/null_exception_notifier.rb +11 -0
- data/app/models/renalware/feeds/message_processor.rb +1 -1
- data/app/models/renalware/letters/delivery/email_letter_to_practice.rb +1 -2
- data/app/models/renalware/null_user.rb +7 -0
- data/app/views/renalware/admin/users/_filters.html.slim +1 -1
- data/config/routes.rb +1 -1
- data/lib/renalware/engine.rb +11 -0
- data/lib/renalware/version.rb +1 -1
- metadata +4 -3
- data/app/models/exception_notifier.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8f98055c0ba3c1fa08f211f731247951b6b819e62c828e743e96962ce7968c6
|
4
|
+
data.tar.gz: 6e1bce7c200282e59707e523523f11de57cc8291abf707775fa3a33268c7c136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1c3dca6e10fc4e86ea191ed1331c9aff394599238db64850c3a0b50cbfa5f530f0551a239d0bfb62393bf431f40e79970c96719f9066f772434132fa9eb9910
|
7
|
+
data.tar.gz: ca427a97413003d6eaf1992ca8dcbd72b7fb74949232aed5714e3555ae2907439162a09af54de3e13951600b347864685aaea692ee00e9d368f67ba20944ac15
|
@@ -8,7 +8,7 @@ module Renalware
|
|
8
8
|
module Letters
|
9
9
|
module Delivery
|
10
10
|
class PracticeMailer < ApplicationMailer
|
11
|
-
def patient_letter(letter:, to
|
11
|
+
def patient_letter(letter:, to:)
|
12
12
|
validate_letter(letter)
|
13
13
|
letter_presenter = LetterPresenterFactory.new(letter)
|
14
14
|
attachments["letter.pdf"] = Letters::PdfRenderer.call(letter_presenter)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The host app can supply a handler for logging errors in background jobs, like so
|
4
|
+
# Renalware::Engine.exception_notifier = MyExceptionNotifier.new
|
5
|
+
# where the supplied instance must respond to .notify(exception, **params).
|
6
|
+
# Where a handler is not supplied we default to using this null handler.
|
7
|
+
class NullExceptionNotifier
|
8
|
+
def notify(exception, **_params)
|
9
|
+
# noop
|
10
|
+
end
|
11
|
+
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
.row
|
5
5
|
.small-9.large-4.columns
|
6
6
|
= f.label "Name or username contains"
|
7
|
-
= f.search_field :
|
7
|
+
= f.search_field :family_name_or_given_name_or_username_or_email_cont
|
8
8
|
.small-3.large-4.columns.actions.end
|
9
9
|
= f.submit t("helpers.submit.filter"), class: "button"
|
10
10
|
span= " or "
|
data/config/routes.rb
CHANGED
@@ -21,7 +21,7 @@ Renalware::Engine.routes.draw do
|
|
21
21
|
get "/session_timed_out" => "session_timeout#has_user_timed_out", as: "session_timed_out"
|
22
22
|
|
23
23
|
super_admin_constraint = lambda do |request|
|
24
|
-
current_user = request.env["warden"].user ||
|
24
|
+
current_user = request.env["warden"].user || Renalware::NullUser.new
|
25
25
|
current_user.has_role?(:super_admin)
|
26
26
|
end
|
27
27
|
|
data/lib/renalware/engine.rb
CHANGED
@@ -65,6 +65,17 @@ module Renalware
|
|
65
65
|
class Engine < ::Rails::Engine
|
66
66
|
isolate_namespace Renalware
|
67
67
|
|
68
|
+
# Define a attr on the Engine's eigenclass so a host application
|
69
|
+
# can set an exception handler instance. It must accept a .notify(excetion) method.
|
70
|
+
# We use the exception handler when logging errors in background jobs only.
|
71
|
+
# Errors in the UI are bubbled up and handled in the host app in the usual way.
|
72
|
+
class << self
|
73
|
+
attr_writer :exception_notifier
|
74
|
+
def exception_notifier
|
75
|
+
@exception_notifier ||= NullExceptionNotifier.new
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
68
79
|
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
69
80
|
config.autoload_paths += %W(#{config.root}/app/validators/concerns)
|
70
81
|
|
data/lib/renalware/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renalware-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_type
|
@@ -1300,7 +1300,7 @@ files:
|
|
1300
1300
|
- app/models/concerns/renalware/personable.rb
|
1301
1301
|
- app/models/concerns/renalware/string_logging.rb
|
1302
1302
|
- app/models/concerns/renalware/supersedeable.rb
|
1303
|
-
- app/models/
|
1303
|
+
- app/models/null_exception_notifier.rb
|
1304
1304
|
- app/models/renalware.rb
|
1305
1305
|
- app/models/renalware/accesses.rb
|
1306
1306
|
- app/models/renalware/accesses/assessment.rb
|
@@ -1532,6 +1532,7 @@ files:
|
|
1532
1532
|
- app/models/renalware/modalities/modality.rb
|
1533
1533
|
- app/models/renalware/modalities/pd_to_haemodialysis.rb
|
1534
1534
|
- app/models/renalware/modalities/reason.rb
|
1535
|
+
- app/models/renalware/null_user.rb
|
1535
1536
|
- app/models/renalware/pathology.rb
|
1536
1537
|
- app/models/renalware/pathology/all_observation_codes.rb
|
1537
1538
|
- app/models/renalware/pathology/clinic.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Responsible for wrapping a third-party exception notification client. This
|
4
|
-
# wrapper allows us to switch notification service without affecting the
|
5
|
-
# rest of the application.
|
6
|
-
#
|
7
|
-
class ExceptionNotifier
|
8
|
-
def notify(exception)
|
9
|
-
# TODO: add implementation here
|
10
|
-
end
|
11
|
-
end
|