fhir_dstu2_models 1.0.9 → 1.1.1

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: fd41102947c0d7e7151892a789fd419412fa433eb0ee3a91f841e15961a45a34
4
- data.tar.gz: 34e5accb5acd29c429ab9ccf9439e44dfd2fe16cfe7c07391e3fdf3549d0de71
3
+ metadata.gz: 462b42211e55bec43f9ad69c1d6c2788c885b245227c46f465e786c36e6cc3d7
4
+ data.tar.gz: b8a8daa098f2a9413e11d910f645d72004a60c52a0f30bc506e84e41c9398162
5
5
  SHA512:
6
- metadata.gz: 37c027b675101361a92734713d155a55de44276c5539485af4d764ecc259709aad86ab46c076be6ee8a0d5a195305465b8d24f89dc24f0141ddaabc1be510888
7
- data.tar.gz: 346ea406536a52f82fa5d61864ec875bd348be9acd3465be4a7a3575790798d23bae0feffd61cb6e081d53c6bc173146dc044f7aad6e5156e53bdabf56d65459
6
+ metadata.gz: 1b04b32a4cd9b9a1e735d927e3468308b8a5db637b36c58661195c7b836ca47232925aae8b7ce4bb91cc96d16d2d32f89ed8ca136fcaba78e588356ef5754bfd
7
+ data.tar.gz: 7a01df6b4c7e339d605232b77167b226a0633d8be26ac9d40817c1dde0027ea9a4d26625fea2656ea357617eb6cdf0be1d511e4e151cc624159038fd30bc5ca3
data/.codeclimate.yml CHANGED
@@ -9,6 +9,7 @@ engines:
9
9
  enabled: true
10
10
  rubocop:
11
11
  enabled: true
12
+ channel: rubocop-0-80
12
13
  ratings:
13
14
  paths:
14
15
  - "**.inc"
@@ -0,0 +1,26 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['2.6', '2.7']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby-version }}
22
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23
+ - name: Run tests
24
+ run: bundle exec rake
25
+ - name: Rubocop
26
+ run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,17 +1,25 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
  AllCops:
3
- TargetRubyVersion: 2.4
3
+ TargetRubyVersion: 2.7
4
4
  Exclude:
5
5
  - 'test/**/*'
6
6
  - 'spec/**/*'
7
- - 'lib/fhir_dstu2_models/fhir/**/*'
8
- - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
7
+ - 'lib/fhir_stu3_models/fhir/**/*'
8
+ - 'lib/fhir_stu3_models/fluentpath/evaluate.rb'
9
+ - 'lib/**/*.rake'
9
10
  - 'tmp/**/*'
10
11
  - '*.gemspec'
11
12
  - 'bin/*'
12
- - 'vendor/**/*'
13
- Metrics/LineLength:
13
+ Layout/LineLength:
14
14
  Enabled: false
15
-
16
15
  Style/FrozenStringLiteralComment:
17
16
  Enabled: false
17
+ Style/HashEachMethods:
18
+ Enabled: true
19
+ Style/HashTransformKeys:
20
+ Enabled: true
21
+ Style/HashTransformValues:
22
+ Enabled: true
23
+ inherit_mode:
24
+ merge:
25
+ - Exclude
data/.rubocop_todo.yml CHANGED
@@ -1,67 +1,178 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-03-28 10:35:44 -0400 using RuboCop version 0.52.1.
3
+ # on 2021-03-30 17:40:28 -0400 using RuboCop version 0.80.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 40
9
+ # Offense count: 23
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: IndentationWidth.
12
+ Layout/AssignmentIndentation:
13
+ Enabled: false
14
+
15
+ # Offense count: 55
16
+ # Cop supports --auto-correct.
17
+ Layout/EmptyLineAfterGuardClause:
18
+ Exclude:
19
+ - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
20
+ - 'lib/fhir_dstu2_models/bootstrap/generator.rb'
21
+ - 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
22
+ - 'lib/fhir_dstu2_models/bootstrap/model.rb'
23
+ - 'lib/fhir_dstu2_models/bootstrap/preprocess.rb'
24
+ - 'lib/fhir_dstu2_models/bootstrap/xml.rb'
25
+ - 'lib/fhir_dstu2_models/deprecate.rb'
26
+ - 'lib/fhir_dstu2_models/fhir_ext/element_definition.rb'
27
+ - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
28
+ - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
29
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
30
+ - 'lib/fhir_dstu2_models/fluentpath/parse.rb'
31
+
32
+ # Offense count: 1
33
+ # Cop supports --auto-correct.
34
+ Layout/EmptyLines:
35
+ Exclude:
36
+ - 'lib/fhir_dstu2_models/fhir/resources/ClaimResponse.rb'
37
+
38
+ # Offense count: 1
39
+ # Cop supports --auto-correct.
40
+ # Configuration parameters: EnforcedStyle.
41
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
42
+ Layout/EmptyLinesAroundClassBody:
43
+ Exclude:
44
+ - 'lib/fhir_dstu2_models/fhir/resources/ClaimResponse.rb'
45
+
46
+ # Offense count: 2
47
+ # Cop supports --auto-correct.
48
+ # Configuration parameters: EnforcedStyle.
49
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
50
+ Layout/EmptyLinesAroundModuleBody:
51
+ Exclude:
52
+ - 'lib/fhir_dstu2_models/fhir/metadata.rb'
53
+
54
+ # Offense count: 1
55
+ # Cop supports --auto-correct.
56
+ Layout/RescueEnsureAlignment:
57
+ Exclude:
58
+ - 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
59
+
60
+ # Offense count: 19223
61
+ # Cop supports --auto-correct.
62
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
63
+ # SupportedStylesForExponentOperator: space, no_space
64
+ Layout/SpaceAroundOperators:
65
+ Enabled: false
66
+
67
+ # Offense count: 10414
68
+ # Cop supports --auto-correct.
69
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
70
+ # SupportedStyles: space, no_space, compact
71
+ # SupportedStylesForEmptyBraces: space, no_space
72
+ Layout/SpaceInsideHashLiteralBraces:
73
+ Enabled: false
74
+
75
+ # Offense count: 120
76
+ # Cop supports --auto-correct.
77
+ # Configuration parameters: EnforcedStyle.
78
+ # SupportedStyles: final_newline, final_blank_line
79
+ Layout/TrailingEmptyLines:
80
+ Enabled: false
81
+
82
+ # Offense count: 23
83
+ # Cop supports --auto-correct.
84
+ # Configuration parameters: AllowInHeredoc.
85
+ Layout/TrailingWhitespace:
86
+ Enabled: false
87
+
88
+ # Offense count: 6
89
+ # Cop supports --auto-correct.
90
+ Lint/NonDeterministicRequireOrder:
91
+ Exclude:
92
+ - 'lib/fhir_dstu2_models.rb'
93
+
94
+ # Offense count: 2
95
+ # Cop supports --auto-correct.
96
+ Lint/ToJSON:
97
+ Exclude:
98
+ - 'lib/fhir_dstu2_models/bootstrap/json.rb'
99
+ - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_finding.rb'
100
+
101
+ # Offense count: 41
10
102
  Metrics/AbcSize:
11
- Max: 423
103
+ Max: 461
12
104
 
13
- # Offense count: 9
105
+ # Offense count: 10
14
106
  # Configuration parameters: CountComments, ExcludedMethods.
107
+ # ExcludedMethods: refine
15
108
  Metrics/BlockLength:
16
- Max: 108
109
+ Max: 131
17
110
 
18
- # Offense count: 15
111
+ # Offense count: 45
19
112
  # Configuration parameters: CountBlocks.
20
113
  Metrics/BlockNesting:
21
- Max: 5
114
+ Max: 6
22
115
 
23
- # Offense count: 6
116
+ # Offense count: 7
24
117
  # Configuration parameters: CountComments.
25
118
  Metrics/ClassLength:
26
- Max: 327
119
+ Max: 470
27
120
 
28
- # Offense count: 27
121
+ # Offense count: 30
29
122
  Metrics/CyclomaticComplexity:
30
- Max: 69
123
+ Max: 142
31
124
 
32
- # Offense count: 46
33
- # Configuration parameters: CountComments.
125
+ # Offense count: 48
126
+ # Configuration parameters: CountComments, ExcludedMethods.
34
127
  Metrics/MethodLength:
35
- Max: 120
128
+ Max: 463
36
129
 
37
- # Offense count: 1
130
+ # Offense count: 2
38
131
  # Configuration parameters: CountComments.
39
132
  Metrics/ModuleLength:
40
- Max: 114
133
+ Max: 520
41
134
 
42
- # Offense count: 25
135
+ # Offense count: 28
43
136
  Metrics/PerceivedComplexity:
44
- Max: 72
137
+ Max: 145
45
138
 
46
- # Offense count: 3
47
- Performance/Caller:
139
+ # Offense count: 118
140
+ # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
141
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
142
+ Naming/FileName:
143
+ Enabled: false
144
+
145
+ # Offense count: 96
146
+ # Configuration parameters: EnforcedStyle, IgnoredPatterns.
147
+ # SupportedStyles: snake_case, camelCase
148
+ Naming/MethodName:
149
+ Enabled: false
150
+
151
+ # Offense count: 4
152
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
153
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
154
+ Naming/MethodParameterName:
48
155
  Exclude:
49
- - 'lib/fhir_dstu2_models/bootstrap/model.rb'
50
- - 'lib/fhir_dstu2_models/deprecate.rb'
156
+ - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
51
157
 
52
- # Offense count: 3
158
+ # Offense count: 2
53
159
  # Cop supports --auto-correct.
54
- # Configuration parameters: AutoCorrect.
55
- Performance/HashEachMethods:
160
+ # Configuration parameters: PreferredName.
161
+ Naming/RescuedExceptionsVariableName:
56
162
  Exclude:
57
- - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
58
- - 'lib/fhir_dstu2_models/bootstrap/model.rb'
59
- - 'lib/fhir_dstu2_models/bootstrap/preprocess.rb'
163
+ - 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
60
164
 
61
- # Offense count: 15
165
+ # Offense count: 1
166
+ # Configuration parameters: .
167
+ # SupportedStyles: inline, group
168
+ Style/AccessModifierDeclarations:
169
+ EnforcedStyle: inline
170
+
171
+ # Offense count: 19
62
172
  Style/ClassVars:
63
173
  Exclude:
64
174
  - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
175
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
65
176
  - 'lib/fhir_dstu2_models/fluentpath/parse.rb'
66
177
 
67
178
  # Offense count: 6
@@ -70,27 +181,25 @@ Style/CommentedKeyword:
70
181
  - 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
71
182
  - 'lib/fhir_dstu2_models/bootstrap/model.rb'
72
183
 
73
- # Offense count: 14
184
+ # Offense count: 1
185
+ # Cop supports --auto-correct.
186
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
187
+ # SupportedStyles: assign_to_condition, assign_inside_condition
188
+ Style/ConditionalAssignment:
189
+ Exclude:
190
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
191
+
192
+ # Offense count: 358
74
193
  Style/Documentation:
194
+ Enabled: false
195
+
196
+ # Offense count: 16
197
+ # Configuration parameters: MinBodyLength.
198
+ Style/GuardClause:
75
199
  Exclude:
76
- - 'spec/**/*'
77
- - 'test/**/*'
78
- - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
79
- - 'lib/fhir_dstu2_models/bootstrap/field.rb'
80
- - 'lib/fhir_dstu2_models/bootstrap/generator.rb'
81
- - 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
82
- - 'lib/fhir_dstu2_models/bootstrap/json.rb'
83
- - 'lib/fhir_dstu2_models/bootstrap/model.rb'
84
- - 'lib/fhir_dstu2_models/bootstrap/preprocess.rb'
85
- - 'lib/fhir_dstu2_models/bootstrap/template.rb'
86
- - 'lib/fhir_dstu2_models/bootstrap/xml.rb'
87
- - 'lib/fhir_dstu2_models/fhir.rb'
88
- - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
89
- - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_finding.rb'
90
- - 'lib/fhir_dstu2_models/fluentpath/expression.rb'
91
- - 'lib/fhir_dstu2_models/fluentpath/parse.rb'
200
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
92
201
 
93
- # Offense count: 29
202
+ # Offense count: 31
94
203
  # Cop supports --auto-correct.
95
204
  Style/IfUnlessModifier:
96
205
  Exclude:
@@ -101,6 +210,7 @@ Style/IfUnlessModifier:
101
210
  - 'lib/fhir_dstu2_models/bootstrap/xml.rb'
102
211
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
103
212
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
213
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
104
214
 
105
215
  # Offense count: 1
106
216
  # Cop supports --auto-correct.
@@ -119,18 +229,36 @@ Style/LambdaCall:
119
229
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
120
230
 
121
231
  # Offense count: 1
122
- Style/MethodMissing:
232
+ Style/MethodMissingSuper:
123
233
  Exclude:
124
234
  - 'lib/fhir_dstu2_models/bootstrap/model.rb'
125
235
 
126
- # Offense count: 2
236
+ # Offense count: 1
237
+ Style/MissingRespondToMissing:
238
+ Exclude:
239
+ - 'lib/fhir_dstu2_models/bootstrap/model.rb'
240
+
241
+ # Offense count: 3
242
+ Style/MultipleComparison:
243
+ Exclude:
244
+ - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
245
+
246
+ # Offense count: 494
247
+ # Cop supports --auto-correct.
248
+ # Configuration parameters: EnforcedStyle.
249
+ # SupportedStyles: literals, strict
250
+ Style/MutableConstant:
251
+ Enabled: false
252
+
253
+ # Offense count: 3
127
254
  # Cop supports --auto-correct.
128
- # Configuration parameters: AutoCorrect, EnforcedStyle.
255
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
129
256
  # SupportedStyles: predicate, comparison
130
257
  Style/NumericPredicate:
131
258
  Exclude:
132
259
  - 'spec/**/*'
133
260
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
261
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
134
262
 
135
263
  # Offense count: 1
136
264
  # Cop supports --auto-correct.
@@ -138,7 +266,19 @@ Style/OrAssignment:
138
266
  Exclude:
139
267
  - 'lib/fhir_dstu2_models/bootstrap/generator.rb'
140
268
 
141
- # Offense count: 17
269
+ # Offense count: 1
270
+ # Cop supports --auto-correct.
271
+ Style/RedundantBegin:
272
+ Exclude:
273
+ - 'lib/fhir_dstu2_models/fluentpath/expression.rb'
274
+
275
+ # Offense count: 6
276
+ # Cop supports --auto-correct.
277
+ Style/RescueModifier:
278
+ Exclude:
279
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
280
+
281
+ # Offense count: 18
142
282
  # Cop supports --auto-correct.
143
283
  # Configuration parameters: EnforcedStyle.
144
284
  # SupportedStyles: implicit, explicit
@@ -152,15 +292,19 @@ Style/RescueStandardError:
152
292
  - 'lib/fhir_dstu2_models/fhir.rb'
153
293
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
154
294
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition_finding.rb'
295
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
155
296
  - 'lib/fhir_dstu2_models/fluentpath/expression.rb'
156
297
  - 'lib/fhir_dstu2_models/fluentpath/parse.rb'
157
298
 
158
- # Offense count: 2
299
+ # Offense count: 4
159
300
  # Cop supports --auto-correct.
160
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil.
301
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
302
+ # AllowedMethods: present?, blank?, presence, try, try!
161
303
  Style/SafeNavigation:
162
304
  Exclude:
163
305
  - 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
306
+ - 'lib/fhir_dstu2_models/bootstrap/xml.rb'
307
+ - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
164
308
 
165
309
  # Offense count: 1
166
310
  # Cop supports --auto-correct.
@@ -170,8 +314,24 @@ Style/StabbyLambdaParentheses:
170
314
  Exclude:
171
315
  - 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
172
316
 
173
- # Offense count: 309
174
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
175
- # URISchemes: http, https
176
- Metrics/LineLength:
177
- Max: 292
317
+ # Offense count: 6
318
+ # Cop supports --auto-correct.
319
+ # Configuration parameters: .
320
+ # SupportedStyles: percent, brackets
321
+ Style/SymbolArray:
322
+ EnforcedStyle: percent
323
+ MinSize: 13
324
+
325
+ # Offense count: 1
326
+ # Cop supports --auto-correct.
327
+ Style/WhileUntilModifier:
328
+ Exclude:
329
+ - 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
330
+
331
+ # Offense count: 624
332
+ # Cop supports --auto-correct.
333
+ # Configuration parameters: WordRegex.
334
+ # SupportedStyles: percent, brackets
335
+ Style/WordArray:
336
+ EnforcedStyle: percent
337
+ MinSize: 6402
data/Gemfile.lock CHANGED
@@ -1,26 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fhir_dstu2_models (1.0.9)
4
+ fhir_dstu2_models (1.1.1)
5
5
  bcp47 (>= 0.3)
6
6
  date_time_precision (>= 0.8)
7
7
  mime-types (>= 3.0)
8
- nokogiri (>= 1.8.5)
8
+ nokogiri (>= 1.11.4)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- ast (2.4.0)
13
+ ast (2.4.2)
14
14
  bcp47 (0.3.3)
15
15
  i18n
16
- codeclimate-test-reporter (1.0.7)
17
- simplecov
18
16
  coderay (1.1.2)
19
- concurrent-ruby (1.1.5)
17
+ concurrent-ruby (1.1.9)
20
18
  date_time_precision (0.8.1)
21
19
  diff-lcs (1.3)
22
- docile (1.3.1)
23
- ffi (1.10.0)
20
+ docile (1.1.5)
21
+ ffi (1.11.1)
24
22
  formatador (0.2.5)
25
23
  guard (2.15.0)
26
24
  formatador (>= 0.2.4)
@@ -39,81 +37,84 @@ GEM
39
37
  guard-test (2.0.8)
40
38
  guard-compat (~> 1.2)
41
39
  test-unit (~> 3.0)
42
- i18n (1.6.0)
40
+ i18n (1.8.10)
43
41
  concurrent-ruby (~> 1.0)
44
- json (2.2.0)
42
+ jaro_winkler (1.5.4)
43
+ json (2.3.1)
45
44
  listen (3.1.5)
46
45
  rb-fsevent (~> 0.9, >= 0.9.4)
47
46
  rb-inotify (~> 0.9, >= 0.9.7)
48
47
  ruby_dep (~> 1.2)
49
48
  lumberjack (1.0.13)
50
49
  method_source (0.9.2)
51
- mime-types (3.2.2)
50
+ mime-types (3.3.1)
52
51
  mime-types-data (~> 3.2015)
53
- mime-types-data (3.2019.0331)
54
- mini_portile2 (2.4.0)
52
+ mime-types-data (3.2021.0901)
53
+ mini_portile2 (2.5.3)
55
54
  nenv (0.3.0)
56
- nokogiri (1.10.3)
57
- mini_portile2 (~> 2.4.0)
55
+ nokogiri (1.11.7)
56
+ mini_portile2 (~> 2.5.0)
57
+ racc (~> 1.4)
58
58
  nokogiri-diff (0.2.0)
59
59
  nokogiri (~> 1.5)
60
60
  tdiff (~> 0.3, >= 0.3.2)
61
- notiffany (0.1.1)
61
+ notiffany (0.1.3)
62
62
  nenv (~> 0.1)
63
63
  shellany (~> 0.0)
64
- parallel (1.17.0)
65
- parser (2.6.2.1)
66
- ast (~> 2.4.0)
67
- power_assert (1.1.4)
68
- powerpack (0.1.2)
64
+ parallel (1.20.1)
65
+ parser (3.0.0.0)
66
+ ast (~> 2.4.1)
67
+ power_assert (1.1.5)
69
68
  pry (0.12.2)
70
69
  coderay (~> 1.1.0)
71
70
  method_source (~> 0.9.0)
71
+ racc (1.5.2)
72
72
  rainbow (3.0.0)
73
- rake (12.3.2)
73
+ rake (12.3.3)
74
74
  rb-fsevent (0.10.3)
75
75
  rb-inotify (0.10.0)
76
76
  ffi (~> 1.0)
77
+ rexml (3.2.5)
77
78
  rspec (3.8.0)
78
79
  rspec-core (~> 3.8.0)
79
80
  rspec-expectations (~> 3.8.0)
80
81
  rspec-mocks (~> 3.8.0)
81
- rspec-core (3.8.0)
82
+ rspec-core (3.8.2)
82
83
  rspec-support (~> 3.8.0)
83
- rspec-expectations (3.8.3)
84
+ rspec-expectations (3.8.4)
84
85
  diff-lcs (>= 1.2.0, < 2.0)
85
86
  rspec-support (~> 3.8.0)
86
- rspec-mocks (3.8.0)
87
+ rspec-mocks (3.8.1)
87
88
  diff-lcs (>= 1.2.0, < 2.0)
88
89
  rspec-support (~> 3.8.0)
89
- rspec-support (3.8.0)
90
- rubocop (0.52.1)
90
+ rspec-support (3.8.2)
91
+ rubocop (0.80.0)
92
+ jaro_winkler (~> 1.5.1)
91
93
  parallel (~> 1.10)
92
- parser (>= 2.4.0.2, < 3.0)
93
- powerpack (~> 0.1)
94
+ parser (>= 2.7.0.1)
94
95
  rainbow (>= 2.2.2, < 4.0)
96
+ rexml
95
97
  ruby-progressbar (~> 1.7)
96
- unicode-display_width (~> 1.0, >= 1.0.1)
97
- ruby-progressbar (1.10.0)
98
+ unicode-display_width (>= 1.4.0, < 1.7)
99
+ ruby-progressbar (1.11.0)
98
100
  ruby_dep (1.5.0)
99
101
  shellany (0.0.1)
100
- simplecov (0.16.1)
101
- docile (~> 1.1)
102
+ simplecov (0.13.0)
103
+ docile (~> 1.1.0)
102
104
  json (>= 1.8, < 3)
103
105
  simplecov-html (~> 0.10.0)
104
106
  simplecov-html (0.10.2)
105
107
  tdiff (0.3.4)
106
- test-unit (3.3.2)
108
+ test-unit (3.3.3)
107
109
  power_assert
108
110
  thor (0.20.3)
109
- unicode-display_width (1.5.0)
111
+ unicode-display_width (1.6.1)
110
112
 
111
113
  PLATFORMS
112
114
  ruby
113
115
 
114
116
  DEPENDENCIES
115
117
  bundler
116
- codeclimate-test-reporter
117
118
  fhir_dstu2_models!
118
119
  guard-rspec
119
120
  guard-test
@@ -121,12 +122,12 @@ DEPENDENCIES
121
122
  pry
122
123
  rake
123
124
  rspec
124
- rubocop (= 0.52.1)
125
+ rubocop (= 0.80)
125
126
  simplecov
126
127
  test-unit
127
128
 
128
129
  RUBY VERSION
129
- ruby 2.5.1p57
130
+ ruby 2.7.2p137
130
131
 
131
132
  BUNDLED WITH
132
- 2.0.1
133
+ 2.2.17
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md CHANGED
@@ -51,6 +51,16 @@ obs.valueQuantity = FHIR::DSTU2::Quantity.new(
51
51
  )
52
52
  ```
53
53
 
54
+ Iterating over all elements in a resource, including nested elements...
55
+ ```ruby
56
+ patient.each_element do |value, metadata, path|
57
+ puts "Info for #{path}:"
58
+ puts "- value: #{value}"
59
+ puts "- type: #{metadata['type']}"
60
+ puts "- cardinality: #{metadata['min']}..#{metadata['max']}"
61
+ end
62
+ ```
63
+
54
64
  ### Validation
55
65
 
56
66
  Using built in validation...
@@ -69,7 +79,7 @@ puts sd.warnings
69
79
  ```
70
80
  # License
71
81
 
72
- Copyright 2014-2018 The MITRE Corporation
82
+ Copyright 2014-2021 The MITRE Corporation
73
83
 
74
84
  Licensed under the Apache License, Version 2.0 (the "License");
75
85
  you may not use this file except in compliance with the License.
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = FHIR::DSTU2::Models::VERSION
9
9
  spec.authors = ['Jason Walonoski', 'Andre Quina', "Michael O'Keefe", 'Robert Scanlon']
10
10
  spec.email = ['jwalonoski@mitre.org']
11
+ spec.licenses = ['Apache-2.0']
11
12
 
12
13
  spec.summary = %q{A Gem for handling FHIR DSTU2 models in ruby}
13
14
  spec.description = %q{A Gem for handling FHIR DSTU2 models in ruby}
@@ -20,7 +21,7 @@ Gem::Specification.new do |spec|
20
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
22
  spec.require_paths = ['lib']
22
23
 
23
- spec.add_dependency 'nokogiri', '>= 1.8.5'
24
+ spec.add_dependency 'nokogiri', '>= 1.11.4'
24
25
  spec.add_dependency 'date_time_precision', '>= 0.8'
25
26
  spec.add_dependency 'bcp47', '>= 0.3'
26
27
  spec.add_dependency 'mime-types', '>= 3.0'
@@ -32,8 +33,7 @@ Gem::Specification.new do |spec|
32
33
  spec.add_development_dependency 'rspec'
33
34
  spec.add_development_dependency 'simplecov'
34
35
  spec.add_development_dependency 'nokogiri-diff'
35
- spec.add_development_dependency 'rubocop', '0.52.1'
36
- spec.add_development_dependency 'codeclimate-test-reporter'
36
+ spec.add_development_dependency 'rubocop', '0.80'
37
37
  spec.add_development_dependency 'guard-rspec'
38
38
  spec.add_development_dependency 'guard-test'
39
39
  end
@@ -183,7 +183,7 @@ module FHIR
183
183
  field.path = element['path'].gsub(path_type, type_name)
184
184
  field.type = data_type
185
185
  field.type = 'Extension' if field.path.end_with?('extension')
186
- field.type_profiles = profiles if %w[Reference Extension].include?(datatype)
186
+ field.type_profiles = profiles if %w[Reference Extension].include?(data_type)
187
187
  field.min = element['min']
188
188
  field.max = element['max']
189
189
  field.max = field.max.to_i
@@ -1,3 +1,5 @@
1
+ require 'json'
2
+
1
3
  module FHIR
2
4
  module DSTU2
3
5
  module Json
@@ -56,7 +56,7 @@ module FHIR
56
56
  return ext.first.value.nil? ? ext.first : ext.first.value
57
57
  end
58
58
  end
59
- raise NoMethodError.new("undefined method `#{method}' for #{inspect}", method)
59
+ raise NoMethodError.new("undefined method `#{method}' for #{self.class.name}", method)
60
60
  end
61
61
 
62
62
  def to_reference
@@ -302,6 +302,27 @@ module FHIR
302
302
  valid
303
303
  end
304
304
 
305
+ def each_element(path = nil, &block)
306
+ self.class::METADATA.each do |element_name, metadata|
307
+ local_name = metadata.fetch :local_name, element_name
308
+ values = [instance_variable_get("@#{local_name}")].flatten.compact
309
+ next if values.empty?
310
+
311
+ values.each_with_index do |value, i|
312
+ child_path =
313
+ if path.nil?
314
+ element_name
315
+ else
316
+ "#{path}.#{element_name}"
317
+ end
318
+ child_path += "[#{i}]" if metadata['max'] > 1
319
+ yield value, metadata, child_path
320
+ value.each_element child_path, &block unless FHIR::DSTU2::PRIMITIVES.include? metadata['type']
321
+ end
322
+ end
323
+ self
324
+ end
325
+
305
326
  private :validate_reference_type, :check_binding_uri, :validate_field
306
327
  end
307
328
  end
@@ -1,7 +1,7 @@
1
1
  module FHIR
2
2
  module DSTU2
3
3
  module Models
4
- VERSION = '1.0.9'.freeze
4
+ VERSION = '1.1.1'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fhir_dstu2_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Walonoski
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2019-04-22 00:00:00.000000000 Z
14
+ date: 2021-09-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.8.5
22
+ version: 1.11.4
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.8.5
29
+ version: 1.11.4
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: date_time_precision
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -173,28 +173,14 @@ dependencies:
173
173
  requirements:
174
174
  - - '='
175
175
  - !ruby/object:Gem::Version
176
- version: 0.52.1
176
+ version: '0.80'
177
177
  type: :development
178
178
  prerelease: false
179
179
  version_requirements: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - '='
182
182
  - !ruby/object:Gem::Version
183
- version: 0.52.1
184
- - !ruby/object:Gem::Dependency
185
- name: codeclimate-test-reporter
186
- requirement: !ruby/object:Gem::Requirement
187
- requirements:
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- version: '0'
191
- type: :development
192
- prerelease: false
193
- version_requirements: !ruby/object:Gem::Requirement
194
- requirements:
195
- - - ">="
196
- - !ruby/object:Gem::Version
197
- version: '0'
183
+ version: '0.80'
198
184
  - !ruby/object:Gem::Dependency
199
185
  name: guard-rspec
200
186
  requirement: !ruby/object:Gem::Requirement
@@ -231,15 +217,16 @@ extensions: []
231
217
  extra_rdoc_files: []
232
218
  files:
233
219
  - ".codeclimate.yml"
220
+ - ".github/workflows/ruby.yml"
234
221
  - ".gitignore"
235
222
  - ".rspec"
236
223
  - ".rubocop.yml"
237
224
  - ".rubocop_todo.yml"
238
225
  - ".simplecov"
239
- - ".travis.yml"
240
226
  - Gemfile
241
227
  - Gemfile.lock
242
228
  - Guardfile
229
+ - LICENSE
243
230
  - README.md
244
231
  - Rakefile
245
232
  - bin/console
@@ -2119,7 +2106,8 @@ files:
2119
2106
  - lib/fhir_dstu2_models/tasks/tasks.rake
2120
2107
  - lib/fhir_dstu2_models/version.rb
2121
2108
  homepage: https://github.com/fhir-crucible/fhir_dstu2_models
2122
- licenses: []
2109
+ licenses:
2110
+ - Apache-2.0
2123
2111
  metadata: {}
2124
2112
  post_install_message:
2125
2113
  rdoc_options: []
@@ -2136,8 +2124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2136
2124
  - !ruby/object:Gem::Version
2137
2125
  version: '0'
2138
2126
  requirements: []
2139
- rubyforge_project:
2140
- rubygems_version: 2.7.7
2127
+ rubygems_version: 3.1.6
2141
2128
  signing_key:
2142
2129
  specification_version: 4
2143
2130
  summary: A Gem for handling FHIR DSTU2 models in ruby
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- language: ruby
2
- env:
3
- - TESTMEMORY=0 GCDELAY=2.0
4
- rvm:
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- script:
9
- - bundle exec rake
10
- - bundle exec codeclimate-test-reporter
11
- notifications:
12
- email:
13
- recipients:
14
- - fhir-testing-list@lists.mitre.org
15
- on_failure: change
16
- addons:
17
- code_climate:
18
- repo_token: 0230b3379581b30743b7b4355d7394e427648e604d19a2aba987956201eee290
19
- before_install:
20
- - gem update --system
21
- - gem install bundler