lifen 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/lifen/app_authenticated_client.rb +6 -0
- data/lib/lifen/communication/attachment.rb +3 -1
- data/lib/lifen/communication/request.rb +0 -2
- data/lib/lifen/version.rb +1 -1
- data/spec/requests_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f8ad711f52a3c7ea7051e1165ba4ec557fc8b6a
|
4
|
+
data.tar.gz: 0b824bd0e7b250b28b8982a2b395f38eee594088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f5aa4da5f5e42b8f46a395490ed7592a0ebb448d4eb6c9a1c5181b6f92dcabbaaef5d8d7a56e94767c74f93c729dd95dfa3ffa116a946f37ce38d8c53c96e6
|
7
|
+
data.tar.gz: a5cad04cfa04a73d0d2296ef97fd1fea70eb1b77e0ab438685a7f76c595104eb36eda38030a119124744b3e6f3682c719798172b0bac5f0c4807664564a51e08
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -15,6 +15,12 @@ module Lifen
|
|
15
15
|
raise UserAlreadyExistingError, "Error 403, User already existing, #{response_error(response, params)}"
|
16
16
|
when 404
|
17
17
|
raise Error, "Error 404, Page not found, #{response_error(response, params)}"
|
18
|
+
when 422
|
19
|
+
json = JSON.parse response.body
|
20
|
+
|
21
|
+
diagnostic = json["issue"][0]["diagnostics"]
|
22
|
+
|
23
|
+
raise Error, "Error 422, Unprocessable Entity, Diagnostic: '#{diagnostic}', #{response_error(response, params)}"
|
18
24
|
end
|
19
25
|
|
20
26
|
end
|
@@ -4,12 +4,14 @@ module Lifen
|
|
4
4
|
|
5
5
|
attribute :title, String
|
6
6
|
attribute :path, String
|
7
|
+
attribute :content_type, String
|
7
8
|
|
8
9
|
def fhir_payload
|
9
10
|
{
|
10
11
|
contentAttachment: {
|
11
12
|
data: base_64_encoded_content,
|
12
|
-
title: title
|
13
|
+
title: title,
|
14
|
+
contentType: "{#{content_type}}"
|
13
15
|
}
|
14
16
|
}
|
15
17
|
end
|
data/lib/lifen/version.rb
CHANGED
data/spec/requests_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe Lifen::Communication::Request do
|
|
8
8
|
let(:sender) { Lifen::User.new(uuid: "valid_sender_uuid") }
|
9
9
|
let(:recipient) { Lifen::User.new(uuid: "valid_recipient_uuid") }
|
10
10
|
|
11
|
-
let(:attachment) { Lifen::Communication::Attachment.new(title: "Master Plan", path: File.dirname(__FILE__) + "/support/master_plan.pdf") }
|
11
|
+
let(:attachment) { Lifen::Communication::Attachment.new(title: "Master Plan", path: File.dirname(__FILE__) + "/support/master_plan.pdf", content_type: "application/pdf") }
|
12
12
|
|
13
13
|
describe ':send' do
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lifen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Etienne Depaulis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project:
|
232
|
-
rubygems_version: 2.
|
232
|
+
rubygems_version: 2.6.8
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Lifen JSON API ruby client
|