roqua-healthy 1.5.13 → 1.6.0

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: 2b61faf958cac88da6cfa1aeb5e5399b304035cdf8b10504032db95a94d69bf3
4
- data.tar.gz: 6ff72116dcf9d778ec6ca08c26f5b14c71efdb000d86813027c39d8f70d531dc
3
+ metadata.gz: 676e3d78e93d705fbf01f1e7eb726ca8c250b64fb7e226262b8bebd9d4ca540d
4
+ data.tar.gz: 5a5eac93225350b7446eaf8c3c22f29d53d3673437488fe04e4c8d8b9ccc25ca
5
5
  SHA512:
6
- metadata.gz: 980c9941379027fd03236735a1ec93ee41e3143e022ed54f76271f71658a69128f1389060ee90ed32286e4396c45d76971d6f3b3560cc096ca18c6eb7c175699
7
- data.tar.gz: 22349d8f91cd0dd30d99aa36c28d6c4280ee61326f168bbc8dd659ea60f6f014a26eaccf0c5b057d1380d07083a2c6082cb2734010dd6578cb75c80bbf020263
6
+ metadata.gz: 7b54a9724e9035399b542b8d034cde91808a32938293c1da699dc1ab9d5ba626bc5a56bc0afc047fc1989b12e307e728562abc87d1d04147691791327f99a01b
7
+ data.tar.gz: d992da02d82847037d5881ead65ee81281ccc1a1eb111f44b5f68600f26c6af31e31f0b5acf2304fba34bf48db98dfe8bf44f9dd90188bbcb972a955ad4509c0
data/.gitlab-ci.yml CHANGED
@@ -1,4 +1,4 @@
1
- image: "registry.roqua.nl/roqua/docker-base-images:ruby-2.6-builder"
1
+ image: "registry.roqua.nl/roqua/docker-base-images:ruby-2.7-builder"
2
2
 
3
3
  cache:
4
4
  paths:
@@ -15,22 +15,6 @@ rubocop:
15
15
  script:
16
16
  - bundle exec rubocop -D
17
17
 
18
- rails41:
19
- script:
20
- - bundle exec appraisal rails41 bundle exec rspec
21
-
22
- rails42:
23
- script:
24
- - bundle exec appraisal rails42 bundle exec rspec
25
-
26
- rails50:
27
- script:
28
- - bundle exec appraisal rails50 bundle exec rspec
29
-
30
- rails51:
31
- script:
32
- - bundle exec appraisal rails51 bundle exec rspec
33
-
34
18
  rails52:
35
19
  script:
36
20
  - bundle exec appraisal rails52 bundle exec rspec
@@ -38,3 +22,7 @@ rails52:
38
22
  rails60:
39
23
  script:
40
24
  - bundle exec appraisal rails60 bundle exec rspec
25
+
26
+ rails61:
27
+ script:
28
+ - bundle exec appraisal rails61 bundle exec rspec
data/.rubocop.yml CHANGED
@@ -27,6 +27,9 @@ SignalException:
27
27
  Layout/EmptyLineAfterMagicComment:
28
28
  Enabled: False
29
29
 
30
+ Layout/EmptyLineBetweenDefs:
31
+ AllowAdjacentOneLineDefs: true
32
+
30
33
  Naming/FileName:
31
34
  Exclude:
32
35
  - Appraisals
data/Appraisals CHANGED
@@ -1,25 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise "rails41" do
4
- gem "activesupport", "4.1"
5
- end
6
-
7
- appraise "rails42" do
8
- gem "activesupport", "4.2"
9
- end
10
-
11
- appraise "rails50" do
12
- gem "activesupport", "5.0"
13
- end
14
-
15
- appraise "rails51" do
16
- gem "activesupport", "5.1"
17
- end
18
-
19
3
  appraise "rails52" do
20
4
  gem "activesupport", "5.2"
5
+ gem "roqua-support", "~> 0.3.0"
21
6
  end
22
7
 
23
8
  appraise "rails60" do
24
9
  gem "activesupport", "6.0"
25
10
  end
11
+
12
+ appraise "rails61" do
13
+ gem "activesupport", "6.1"
14
+ end
data/ChangeLog.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.6.0
2
+
3
+ * ActiveSupport 6.1 support
4
+ * Removed ActiveSupport 4.1, 4.2, 5.0 and 5.1
5
+ * Add roqua_support 0.4 support.
6
+
1
7
  ### 1.5.12
2
8
 
3
9
  * ActiveSupport 6.0 support
@@ -5,5 +5,6 @@ source "https://rubygems.org"
5
5
  gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
6
6
  gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
7
  gem "activesupport", "5.2"
8
+ gem "roqua-support", "~> 0.3.0"
8
9
 
9
10
  gemspec path: "../"
@@ -4,6 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
6
6
  gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "4.1"
7
+ gem "activesupport", "6.1"
8
8
 
9
9
  gemspec path: "../"
@@ -9,8 +9,7 @@ module Roqua
9
9
  module Healthy
10
10
  module A19
11
11
  class Fetcher
12
- attr_reader :patient_id
13
- attr_reader :client
12
+ attr_reader :client, :patient_id
14
13
 
15
14
  def initialize(patient_id, client)
16
15
  @patient_id = patient_id
@@ -28,7 +28,7 @@ module Roqua
28
28
  end
29
29
 
30
30
  def self.strip_non_phone_number_characters(number)
31
- number.gsub(/[-\s\.]/, '')
31
+ number.gsub(/[-\s.]/, '')
32
32
  end
33
33
  end
34
34
  end
@@ -7,9 +7,7 @@ module Roqua
7
7
  class ResponseValidator
8
8
  require 'roqua/healthy/errors'
9
9
 
10
- attr_reader :response_code
11
- attr_reader :parser
12
- attr_reader :patient_id
10
+ attr_reader :parser, :patient_id, :response_code
13
11
 
14
12
  def initialize(response_code, parser, patient_id)
15
13
  @response_code = response_code
@@ -20,41 +18,41 @@ module Roqua
20
18
  def validate
21
19
  case response_code
22
20
  when '200'
23
- validate_200
21
+ validate200
24
22
  when '401', '403'
25
- validate_403
23
+ validate403
26
24
  when '404'
27
- validate_404
25
+ validate404
28
26
  when '500'
29
- validate_500
27
+ validate500
30
28
  else
31
29
  raise ::Roqua::Healthy::UnknownFailure, "Unexpected HTTP response code #{response_code}."
32
30
  end
33
31
  end
34
32
 
35
- def validate_200
33
+ private
34
+
35
+ def validate200
36
36
  parsed_message = parser.fetch("HL7Message")
37
37
  ensure_patient_found(parsed_message)
38
38
  ensure_correct_patient(parsed_message)
39
39
  true
40
40
  end
41
41
 
42
- def validate_403
42
+ def validate403
43
43
  raise ::Roqua::Healthy::AuthenticationFailure
44
44
  end
45
45
 
46
- def validate_404
46
+ def validate404
47
47
  raise ::Roqua::Healthy::PatientNotFound
48
48
  end
49
49
 
50
- def validate_500
50
+ def validate500
51
51
  error = parser.fetch('failure')['error']
52
52
  raise ::Roqua::Healthy::ERRORS[error], error if ::Roqua::Healthy::ERRORS[error]
53
53
  raise ::Roqua::Healthy::UnknownFailure, error
54
54
  end
55
55
 
56
- private
57
-
58
56
  def ensure_patient_found(parsed_message)
59
57
  raise ::Roqua::Healthy::PatientNotFound if parsed_message.key?("ERR") && parsed_message.fetch("ERR").fetch("ERR.1").fetch("ERR.1.4").fetch("ERR.1.4.2") =~ /Patient \(@\) niet gevonden\(.*\)/
60
58
  raise ::Roqua::Healthy::PatientNotFound if parsed_message.key?("QAK") && parsed_message.fetch("QAK").fetch("QAK.2").fetch("QAK.2.1") == "NF"
@@ -2,6 +2,6 @@
2
2
  module Roqua
3
3
  module Healthy
4
4
  # healthy version
5
- VERSION = "1.5.13"
5
+ VERSION = "1.6.0"
6
6
  end
7
7
  end
@@ -20,12 +20,12 @@ Gem::Specification.new do |gem|
20
20
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
21
  gem.require_paths = ['lib']
22
22
 
23
- gem.add_dependency 'activesupport', '>= 3.2', '< 6.1'
23
+ gem.add_dependency 'activesupport', '>= 5.1', '< 6.2'
24
24
  gem.add_dependency 'addressable', '~> 2.3'
25
25
  gem.add_dependency 'builder'
26
26
  gem.add_dependency 'phonelib', '~> 0.6'
27
27
  gem.add_dependency 'rest-client', '>= 2.0.2'
28
- gem.add_dependency 'roqua-support', '~> 0.3.0'
28
+ gem.add_dependency 'roqua-support', '>= 0.3.0', '< 0.5.0'
29
29
 
30
30
  gem.add_development_dependency 'appraisal'
31
31
  gem.add_development_dependency 'bundler'
@@ -38,8 +38,8 @@ Gem::Specification.new do |gem|
38
38
 
39
39
  # Workflow and tools
40
40
  gem.add_development_dependency 'guard', '~> 2.1'
41
- gem.add_development_dependency 'guard-rspec', '~> 4.2.4'
42
- gem.add_development_dependency 'guard-rubocop', '~> 1.2.0'
41
+ gem.add_development_dependency 'guard-rspec', '~> 4.2'
42
+ gem.add_development_dependency 'guard-rubocop', '~> 1.2'
43
43
  gem.add_development_dependency 'listen', '~> 2.1'
44
44
  gem.add_development_dependency 'simplecov'
45
45
 
@@ -30,7 +30,7 @@ RSpec.describe Roqua::Healthy::Oru::Client do
30
30
 
31
31
  let(:subject) { Roqua::Healthy::Oru::Client }
32
32
  let(:oru_url) { 'https://example.com' }
33
- let(:timeout) { 5.seconds }
33
+ let(:timeout) { 5 }
34
34
 
35
35
  def execute_request
36
36
  subject.execute(oru_url, {oru: :data}, timeout: timeout)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-healthy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.13
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-01-27 00:00:00.000000000 Z
14
+ date: 2021-04-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -19,20 +19,20 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: '3.2'
22
+ version: '5.1'
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: '6.1'
25
+ version: '6.2'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '3.2'
32
+ version: '5.1'
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: '6.1'
35
+ version: '6.2'
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: addressable
38
38
  requirement: !ruby/object:Gem::Requirement
@@ -93,16 +93,22 @@ dependencies:
93
93
  name: roqua-support
94
94
  requirement: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - "~>"
96
+ - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: 0.3.0
99
+ - - "<"
100
+ - !ruby/object:Gem::Version
101
+ version: 0.5.0
99
102
  type: :runtime
100
103
  prerelease: false
101
104
  version_requirements: !ruby/object:Gem::Requirement
102
105
  requirements:
103
- - - "~>"
106
+ - - ">="
104
107
  - !ruby/object:Gem::Version
105
108
  version: 0.3.0
109
+ - - "<"
110
+ - !ruby/object:Gem::Version
111
+ version: 0.5.0
106
112
  - !ruby/object:Gem::Dependency
107
113
  name: appraisal
108
114
  requirement: !ruby/object:Gem::Requirement
@@ -207,28 +213,28 @@ dependencies:
207
213
  requirements:
208
214
  - - "~>"
209
215
  - !ruby/object:Gem::Version
210
- version: 4.2.4
216
+ version: '4.2'
211
217
  type: :development
212
218
  prerelease: false
213
219
  version_requirements: !ruby/object:Gem::Requirement
214
220
  requirements:
215
221
  - - "~>"
216
222
  - !ruby/object:Gem::Version
217
- version: 4.2.4
223
+ version: '4.2'
218
224
  - !ruby/object:Gem::Dependency
219
225
  name: guard-rubocop
220
226
  requirement: !ruby/object:Gem::Requirement
221
227
  requirements:
222
228
  - - "~>"
223
229
  - !ruby/object:Gem::Version
224
- version: 1.2.0
230
+ version: '1.2'
225
231
  type: :development
226
232
  prerelease: false
227
233
  version_requirements: !ruby/object:Gem::Requirement
228
234
  requirements:
229
235
  - - "~>"
230
236
  - !ruby/object:Gem::Version
231
- version: 1.2.0
237
+ version: '1.2'
232
238
  - !ruby/object:Gem::Dependency
233
239
  name: listen
234
240
  requirement: !ruby/object:Gem::Requirement
@@ -297,13 +303,9 @@ files:
297
303
  - bin/get_xml_for_patient
298
304
  - bin/parse_local_xml
299
305
  - circle.yml
300
- - gemfiles/rails41.gemfile
301
- - gemfiles/rails42.gemfile
302
- - gemfiles/rails50.gemfile
303
- - gemfiles/rails51.gemfile
304
306
  - gemfiles/rails52.gemfile
305
307
  - gemfiles/rails60.gemfile
306
- - lib/roqua/errors.rb
308
+ - gemfiles/rails61.gemfile
307
309
  - lib/roqua/healthy.rb
308
310
  - lib/roqua/healthy/a19.rb
309
311
  - lib/roqua/healthy/a19/address_parser.rb
@@ -398,7 +400,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
400
  - !ruby/object:Gem::Version
399
401
  version: '0'
400
402
  requirements: []
401
- rubygems_version: 3.0.3
403
+ rubygems_version: 3.1.4
402
404
  signing_key:
403
405
  specification_version: 4
404
406
  summary: Arranges communication between Mirth and RoQua
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
6
- gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "4.2"
8
-
9
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
6
- gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "5.0"
8
-
9
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
6
- gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "5.1"
8
-
9
- gemspec path: "../"
data/lib/roqua/errors.rb DELETED
File without changes