renalware-core 2.0.0.pre.rc7 → 2.0.0.pre.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{lib → app/models/renalware/feeds/files/practices}/xml_parser.rb +46 -34
- data/app/models/renalware/letters/delivery/practice_email.rb +1 -2
- data/app/models/renalware/zip_archive.rb +1 -1
- data/lib/renalware/configuration.rb +1 -1
- data/lib/renalware/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d927fd26b8733bc5ec33cdc73b99b5dfffd2153a0ad5d2cad076f94594faefd1
|
4
|
+
data.tar.gz: bf774fb154de01725b0322f3a149a40d691dfe81eb6d38880f72f1329ad48303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d0501d2a554f92f4f97048b46d52800e5a0eceaed4cbf0476114f650e628de804879ed4b71fd79c7e3bea794d1b1063af800819dc173392d50f75e897c83eb
|
7
|
+
data.tar.gz: 1cff8fa1d608fbdd588d63632001490c149dd2ef7d1e9d84784c6db6366996a248c86a5f23b5c00bc1c61255411a23ba3954c34560bb1716f3c5f4e9cf965eb7
|
@@ -35,50 +35,62 @@
|
|
35
35
|
# If tags are encountered multiple times, their blocks will be called multiple times.
|
36
36
|
|
37
37
|
require "nokogiri"
|
38
|
+
require_dependency "renalware/feeds"
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
@node = node
|
42
|
-
@node.each do
|
43
|
-
self.instance_eval(&block)
|
44
|
-
end
|
45
|
-
end
|
40
|
+
# Note I moved XmlParse into this namespace as I was getting strange
|
41
|
+
# 'uninitialised constant XmlParser' errors in production when it was in /lib
|
46
42
|
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
module Renalware
|
44
|
+
module Feeds
|
45
|
+
module Files
|
46
|
+
module Practices
|
47
|
+
class XmlParser
|
48
|
+
def initialize(node, &block)
|
49
|
+
@node = node
|
50
|
+
@node.each do
|
51
|
+
self.instance_eval(&block)
|
52
|
+
end
|
53
|
+
end
|
50
54
|
|
51
|
-
|
52
|
-
|
53
|
-
|
55
|
+
def name
|
56
|
+
@node.name
|
57
|
+
end
|
54
58
|
|
55
|
-
|
56
|
-
|
57
|
-
|
59
|
+
def inner_xml
|
60
|
+
@node.inner_xml.strip
|
61
|
+
end
|
58
62
|
|
59
|
-
|
60
|
-
|
61
|
-
|
63
|
+
def is_start?
|
64
|
+
@node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT
|
65
|
+
end
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
def is_end?
|
68
|
+
@node.node_type == Nokogiri::XML::Reader::TYPE_END_ELEMENT
|
69
|
+
end
|
66
70
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
def attribute(attribute)
|
72
|
+
@node.attribute(attribute)
|
73
|
+
end
|
74
|
+
|
75
|
+
def for_element(name, &block)
|
76
|
+
return unless self.name == name and is_start?
|
77
|
+
self.instance_eval(&block)
|
78
|
+
end
|
71
79
|
|
72
|
-
|
73
|
-
|
74
|
-
|
80
|
+
def inside_element(name=nil, &block)
|
81
|
+
return if @node.self_closing?
|
82
|
+
return unless name.nil? or (self.name == name and is_start?)
|
75
83
|
|
76
|
-
|
77
|
-
|
84
|
+
name = @node.name
|
85
|
+
depth = @node.depth
|
78
86
|
|
79
|
-
|
80
|
-
|
81
|
-
|
87
|
+
@node.each do
|
88
|
+
return if self.name == name and is_end? and @node.depth == depth
|
89
|
+
self.instance_eval(&block)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
82
94
|
end
|
83
95
|
end
|
84
96
|
end
|
@@ -18,8 +18,7 @@ module Renalware
|
|
18
18
|
if config.allow_external_mail
|
19
19
|
practice&.email # nil is acceptable
|
20
20
|
else
|
21
|
-
|
22
|
-
user_email.presence || config.fallback_email_address_for_test_messages
|
21
|
+
config.fallback_email_address_for_test_messages
|
23
22
|
end
|
24
23
|
end
|
25
24
|
end
|
@@ -47,7 +47,7 @@ module Renalware
|
|
47
47
|
config_accessor(:fallback_email_address_for_test_messages) do
|
48
48
|
ENV["FALLBACK_EMAIL_ADDRESS_FOR_TEST_MESSAGES"]
|
49
49
|
end
|
50
|
-
config_accessor(:ukrdc_sending_facility_name) { "
|
50
|
+
config_accessor(:ukrdc_sending_facility_name) { ENV["UKRDC_SENDING_FACILITY_NAME"] }
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.config
|
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.0.pre.
|
4
|
+
version: 2.0.0.pre.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1345,6 +1345,7 @@ files:
|
|
1345
1345
|
- app/models/renalware/feeds/files/practices/csv_organisation.rb
|
1346
1346
|
- app/models/renalware/feeds/files/practices/import_csv.rb
|
1347
1347
|
- app/models/renalware/feeds/files/practices/import_job.rb
|
1348
|
+
- app/models/renalware/feeds/files/practices/xml_parser.rb
|
1348
1349
|
- app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
|
1349
1350
|
- app/models/renalware/feeds/files/primary_care_physicians/import_job.rb
|
1350
1351
|
- app/models/renalware/feeds/files/tissue_typing/import.rb
|
@@ -3218,7 +3219,6 @@ files:
|
|
3218
3219
|
- lib/test_support/ajax_helpers.rb
|
3219
3220
|
- lib/test_support/autocomplete_helpers.rb
|
3220
3221
|
- lib/test_support/text_editor_helpers.rb
|
3221
|
-
- lib/xml_parser.rb
|
3222
3222
|
- spec/factories/accesses/patients.rb
|
3223
3223
|
- spec/factories/accesses/plans.rb
|
3224
3224
|
- spec/factories/accesses/plans_types.rb
|