renalware-core 2.0.68 → 2.0.69

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c551c17f27d4ce7093dcacaa92bb5936b9d9131ecc452fabb288b11a409c42e8
4
- data.tar.gz: ce9f5588b3f29e82f900ac88d89ace8e11e0535c113b3479edf3d0745dd6d578
3
+ metadata.gz: 163a7c7878bbd1480f5900ac489915e6f6b9616d3e5c7bbe70f3b0df53d103da
4
+ data.tar.gz: 29b152cce1ee8bd3948ab72ea17ae5c09b0bbeb8885d2b1a805c3d2be2334b56
5
5
  SHA512:
6
- metadata.gz: f0e617fd1c72cd5162a23f853647d568296a3dbeb32a023daeadc3b517abee63bc7fe30adc06d8a2328ab0099526afc06a0b98f2a5cc74d942a6db570cf4bce3
7
- data.tar.gz: 3b90fa1559317b7a89d94b879b147723b2aa47f87d46b84a0360025e49765934b6462ccfe6655fc5f52b22aee5c022555dfd81632126622aeb872751e1880fdb
6
+ metadata.gz: f8eecf19c3c134d811c20990f3a91e718242fd98a82ead06628ddb50075a84e522d8724eee3723b785c045d89fced233a41c0a13d8c0490bb9455d22337361c8
7
+ data.tar.gz: 929e42ec1986252c87388dc0367d289d02061aeb87a003ebfd08b7bf4b570878e57cc1c4976d5c6c6cec2ccda5b70687dd63583f8449402fd0c18a22f3bc5357
@@ -51,9 +51,9 @@ module Renalware
51
51
  @weekly_diary ||= begin
52
52
  FindOrCreateDiaryByWeekQuery.new(
53
53
  relation: WeeklyDiary.eager_load(
54
- slots: [:patient, :station, :diurnal_period_code],
55
- master_diary: { slots: [:patient, :station, :diurnal_period_code] }
56
- ),
54
+ slots: [:patient, :station, :diurnal_period_code],
55
+ master_diary: { slots: [:patient, :station, :diurnal_period_code] }
56
+ ),
57
57
  unit_id: unit_id,
58
58
  week_period: week_period,
59
59
  by: current_user
@@ -126,8 +126,7 @@ module Renalware
126
126
  prescription_administrations_attributes: [
127
127
  :id, :hd_session_id, :prescription_id, :administered, :notes
128
128
  ],
129
- document: []
130
- ]
129
+ document: []]
131
130
  end
132
131
 
133
132
  def document_attributes
@@ -86,7 +86,8 @@ module Renalware
86
86
  :system_id, :last_fill_volume, :additional_manual_exchange_volume,
87
87
  bags_attributes: [
88
88
  :id, :regime_id, :bag_type_id, :volume, :role, :capd_overnight_bag, :per_week,
89
- :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :_destroy]
89
+ :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :_destroy
90
+ ]
90
91
  )
91
92
  end
92
93
 
@@ -55,7 +55,7 @@ module Renalware
55
55
  private
56
56
 
57
57
  def snippets_for_author(author)
58
- user = (author == :me) ? current_user : nil
58
+ user = author == :me ? current_user : nil
59
59
  SnippetQuery.new(author: user).call
60
60
  end
61
61
 
@@ -48,7 +48,7 @@ module Renalware
48
48
  # In our form, we need to use to "check" the contacts to be
49
49
  # assigned as CC's (not to destroy them). So we therefore convert
50
50
  # the "_keep" flag to a "_destroy" one.
51
- params[:_destroy] = (params[:_keep] == "1") ? "0" : "1"
51
+ params[:_destroy] = params[:_keep] == "1" ? "0" : "1"
52
52
  params.except(:_keep)
53
53
  end
54
54
 
@@ -33,8 +33,8 @@ module Renalware
33
33
  #
34
34
  class ObservationsGroupedByDateQuery
35
35
  attr_reader :patient, :observation_descriptions, :page, :limit
36
- alias :current_page :page
37
- alias :limit_value :limit
36
+ alias current_page page
37
+ alias limit_value limit
38
38
 
39
39
  def initialize(patient:, observation_descriptions:, page: 1, per_page: 50)
40
40
  @patient = patient
@@ -28,7 +28,8 @@ module Renalware
28
28
  enumerize :anaesthetist, in: %i(consultant fellow_senior_registrar other)
29
29
  enumerize :nephrectomy_type, in: %i(
30
30
  open_transperitoneal open_loin_with_resection open_loin_without_resection
31
- open_extraperitoneal laparoscropic_intra laparoscropic_extra other)
31
+ open_extraperitoneal laparoscropic_intra laparoscropic_extra other
32
+ )
32
33
  enumerize :donor_splenectomy_peri_or_post_operatively, in: %i(yes no unknown)
33
34
 
34
35
  validates :performed_on, presence: true
@@ -9,11 +9,11 @@ module Renalware
9
9
  attr_reader :template, :xsd_path, :locals, :errors
10
10
 
11
11
  class Success < Renalware::Success
12
- alias_method :xml, :object
12
+ alias xml object
13
13
  end
14
14
 
15
15
  class Failure < Renalware::Failure
16
- alias_method :validation_errors, :object
16
+ alias validation_errors object
17
17
  end
18
18
 
19
19
  def initialize(template: nil, xsd_path: nil, locals: {})
@@ -9,7 +9,7 @@ module Renalware
9
9
  def edit?
10
10
  false
11
11
  end
12
- alias_method :update?, :edit?
12
+ alias update? edit?
13
13
  end
14
14
  end
15
15
  end
@@ -8,7 +8,7 @@ module Renalware
8
8
  def edit?
9
9
  true
10
10
  end
11
- alias_method :update?, :edit?
11
+ alias update? edit?
12
12
  end
13
13
  end
14
14
  end
@@ -74,9 +74,7 @@ module CoreExtensions
74
74
  found = true
75
75
  end
76
76
  end
77
- unless found
78
- raise "Cannot file #{filename} in #{paths.join(', ')}"
79
- end
77
+ raise "Cannot file #{filename} in #{paths.join(', ')}" unless found
80
78
  end
81
79
 
82
80
  # Make sure to look in the host Rails app as well as in the engine
@@ -24,7 +24,7 @@ module CoreExtensions
24
24
  def translate(key, options = {})
25
25
  super(key, options.merge({ cascade: { offset: 2, skip_root: false } }))
26
26
  end
27
- alias :t :translate
27
+ alias t translate
28
28
  end
29
29
  end
30
30
  end
@@ -6,7 +6,7 @@ module CoreExtensions
6
6
  def localize(object, options = nil)
7
7
  object.blank? ? "" : super
8
8
  end
9
- alias :l :localize
9
+ alias l localize
10
10
  end
11
11
  end
12
12
  end
@@ -56,9 +56,7 @@ require "rails-assets-foundation-datepicker"
56
56
  require "rails-assets-select2"
57
57
  require "rails-assets-moment"
58
58
  require "rails-assets-mousetrap"
59
- if ENV["RAILS_ENV"] == "development"
60
- require "byebug"
61
- end
59
+ require "byebug" if ENV["RAILS_ENV"] == "development"
62
60
 
63
61
  module Renalware
64
62
  # Don't have prefix method return anything.
@@ -181,9 +179,7 @@ module Renalware
181
179
  app.config.time_zone = "London"
182
180
  app.config.active_record.time_zone_aware_types = [:datetime]
183
181
  app.config.active_record.dump_schemas = :all
184
- unless Rails.env.development?
185
- app.config.exceptions_app = Engine.routes
186
- end
182
+ app.config.exceptions_app = Engine.routes unless Rails.env.development?
187
183
  app.config.action_mailer.preview_path = Engine.root.join("app", "mailers", "renalware")
188
184
  app.config.action_mailer.deliver_later_queue_name = "mailers"
189
185
  app.config.active_job.queue_adapter = :delayed_job
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.68"
4
+ VERSION = "2.0.69"
5
5
  end
@@ -45,9 +45,7 @@ module Renalware
45
45
  end
46
46
 
47
47
  def validate_year
48
- if year <= 2000
49
- raise(ArgumentError, "invalid date year must be >= 2000")
50
- end
48
+ raise(ArgumentError, "invalid date year must be >= 2000") if year <= 2000
51
49
  end
52
50
 
53
51
  def to_h
@@ -6,11 +6,11 @@ FactoryBot.define do
6
6
  accountable
7
7
 
8
8
  trait :practices do
9
- association :file_type, factory: [:feed_file_type, :practices]
9
+ association :file_type, factory: %i(feed_file_type practices)
10
10
  end
11
11
 
12
12
  trait :primary_care_physicians do
13
- association :file_type, factory: [:feed_file_type, :primary_care_physicians]
13
+ association :file_type, factory: %i(feed_file_type primary_care_physicians)
14
14
  end
15
15
  end
16
16
  end
@@ -26,9 +26,7 @@ FactoryBot.define do
26
26
  end
27
27
 
28
28
  after(:create) do |user, obj|
29
- if obj.role.present?
30
- user.roles << create(:role, obj.role)
31
- end
29
+ user.roles << create(:role, obj.role) if obj.role.present?
32
30
  end
33
31
 
34
32
  trait :unapproved do
@@ -2,7 +2,7 @@
2
2
 
3
3
  module DatabaseFunctionsSpecHelper
4
4
  def toggle_all_triggers(option)
5
- arg = (option == :off) ? "replica" : "DEFAULT"
5
+ arg = option == :off ? "replica" : "DEFAULT"
6
6
  ActiveRecord::Base.connection.execute("SET session_replication_role = #{arg};")
7
7
  end
8
8
  end
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.68
4
+ version: 2.0.69
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-09 00:00:00.000000000 Z
11
+ date: 2019-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_type