onc_certification_g10_test_kit 6.0.1 → 6.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5babf8413662a8280eac15f50f5cb634bfa2e2cdd637982c7dfb123817f2dfa
|
4
|
+
data.tar.gz: 36f285e6677cfd7114695620898d0bfe1cc304325dae63055f5fc12ade27b4b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed759baf8f19a6c2ad5afe841219c087d17c363efa3fbdb1385e214cf350d1a4d4ef886eaccb4586d960540b1f8125ae0065aeeb05318dd6bc7d3af5542ee734
|
7
|
+
data.tar.gz: f0c151db9d23d5b89a8f48d5f7953d6ca568f79e1f36b7e86f2a5f041b6e7f3abcf12731b5fd1363e70b0c6a83d59f1b50f2b7a46e714b3c982fa3a751df858a
|
@@ -16,14 +16,40 @@ module ONCCertificationG10TestKit
|
|
16
16
|
id :g10_patient_scope
|
17
17
|
input :received_scopes
|
18
18
|
|
19
|
+
def scope_version
|
20
|
+
config.options[:scope_version]
|
21
|
+
end
|
22
|
+
|
19
23
|
run do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
expected_scopes =
|
25
|
+
if scope_version == :v2
|
26
|
+
[
|
27
|
+
Regexp.new(scope_regex_string('patient/Patient.rs').gsub('.rs', '.r?s')),
|
28
|
+
Regexp.new(scope_regex_string('patient/Patient.rs').gsub('.rs', '.rs?'))
|
29
|
+
]
|
30
|
+
else
|
31
|
+
[Regexp.new(scope_regex_string('patient/Patient.read'))]
|
32
|
+
end
|
33
|
+
|
34
|
+
received_scopes = self.received_scopes.split
|
35
|
+
|
36
|
+
unmatched_scopes =
|
37
|
+
expected_scopes.reject do |expected_scope|
|
38
|
+
received_scopes.any? { |received_scope| received_scope.match? expected_scope }
|
39
|
+
end
|
40
|
+
|
41
|
+
assert unmatched_scopes.blank?,
|
42
|
+
"No scope matching the following was received: `#{unmatched_scopes_string(unmatched_scopes)}`"
|
43
|
+
end
|
44
|
+
|
45
|
+
def scope_regex_string(scope)
|
46
|
+
"\\A#{Regexp.quote(scope)}\\z"
|
47
|
+
end
|
48
|
+
|
49
|
+
def unmatched_scopes_string(unmatched_scopes)
|
50
|
+
unmatched_scopes
|
51
|
+
.map { |scope| "`#{scope.source}`" }
|
52
|
+
.join(', ')
|
27
53
|
end
|
28
54
|
end
|
29
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onc_certification_g10_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen MacVicar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bloomer
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.8.
|
145
|
+
version: 0.8.1
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.8.
|
152
|
+
version: 0.8.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: database_cleaner-sequel
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|