lifen 1.6.5 → 1.6.6

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
  SHA1:
3
- metadata.gz: 0f7482b071f425af6016a9c130d10f6bb02fa600
4
- data.tar.gz: 3852ce021bd7fbafef57d93259aef0f4b175925a
3
+ metadata.gz: 5a5d353b0280bcda3ac56078d1c0e7b1796b4701
4
+ data.tar.gz: 34c7bb73efdc89f5c5c0c2090f77e91ad2a54943
5
5
  SHA512:
6
- metadata.gz: 7efdc2fc2ccac4672b22535a9f432f2de3c1e83157e271f4404afa5a68eef3c7f8ca5a75c4608916f3455b5cb0d1cc5b6646f71ea7503ce47f226ec22134405c
7
- data.tar.gz: 3c6e77819cd7fe0fe6e6a85ffb088d11562609bb092660850857a4de9f4bf08ff1569a266b3e0d4c00eac633101b18610b9b4c3121de074bbe73b78033194bf9
6
+ metadata.gz: 6cb8551fe23604c092d2bae30eca752d48e159b296e3be4189297d6386fc750a58058514e6260aa01cd5a665dea2265ca1786900d158c5553d9bf436e2b40914
7
+ data.tar.gz: f879c8089bbde34f901297e2a387d241178a1be9ca1af4fbef861c91227b7e2a0a35ef696e75b92931e28ad6262e0e8789f7402f21005ea5c5d3c07a3da52054
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  1.6.5
2
2
  -----
3
3
 
4
+ - Addresses can display multiple lines
5
+
6
+ 1.6.5
7
+ -----
8
+
4
9
  - Added custom addresses creation
5
10
 
6
11
  1.6.4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifen (1.6.5)
4
+ lifen (1.6.6)
5
5
  faraday (>= 0.9)
6
6
  inflecto
7
7
  virtus (>= 1.0)
@@ -19,7 +19,7 @@ module Lifen
19
19
  end
20
20
 
21
21
  def self.from_json(json, type = nil)
22
- new(uuid: json["id"], type: type, value: json["value"] || "#{json["line"][0]}, #{json["postalCode"]} #{json["city"]}")
22
+ new(uuid: json["id"], type: type, value: json["value"] || "#{json["line"].join(", ")}, #{json["postalCode"]} #{json["city"]}")
23
23
  end
24
24
 
25
25
  end
data/lib/lifen/user.rb CHANGED
@@ -152,7 +152,7 @@ module Lifen
152
152
 
153
153
  json = application_client.post("fhir/Practitioner/#{uuid}/$add-address", filtered_params)
154
154
 
155
- channel = Communication::Channel.new(uuid: json["issue"][0]["id"], type: params[:type], value: "#{Array(params[:lines])[0]}, #{params[:postal_code]} #{params[:city]}")
155
+ channel = Communication::Channel.new(uuid: json["issue"][0]["id"], type: params[:type], value: "#{Array(params[:lines]).join(", ")}, #{params[:postal_code]} #{params[:city]}")
156
156
 
157
157
  self.channels << channel
158
158
 
data/lib/lifen/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lifen
2
- VERSION = "1.6.5"
2
+ VERSION = "1.6.6"
3
3
  end
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://develop.lifen.fr/fhir/Practitioner/11e5c85e-9bc0-4c6e-9b29-deb9993a92c0/$add-address
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"resourceType":"Practitioner","address":{"line":["39 rue Aboukir"],"city":"Paris","postalCode":"75002","country":"France"}}'
8
+ string: '{"resourceType":"Practitioner","address":{"line":["Honestica", "39 rue Aboukir"],"city":"Paris","postalCode":"75002","country":"France"}}'
9
9
  headers:
10
10
  User-Agent:
11
11
  - Faraday v0.11.0
@@ -111,6 +111,7 @@ http_interactions:
111
111
  {
112
112
  "id": "11e5c86e-adb9-5453-9b29-deb9993a92c0",
113
113
  "line": [
114
+ "Batiment Nord",
114
115
  "11 RUE CHARLES TELLIER"
115
116
  ],
116
117
  "city": "Paris",
data/spec/users_spec.rb CHANGED
@@ -253,7 +253,7 @@ describe Lifen::User do
253
253
 
254
254
  address = @user.channels.last
255
255
 
256
- expect(address.value).to eq "11 RUE CHARLES TELLIER, 75016 Paris"
256
+ expect(address.value).to eq "Batiment Nord, 11 RUE CHARLES TELLIER, 75016 Paris"
257
257
  end
258
258
 
259
259
 
@@ -265,10 +265,10 @@ describe Lifen::User do
265
265
 
266
266
  it 'creates the channel' do
267
267
  VCR.use_cassette "users/create_channel/valid_attributes" do
268
- @channel = user.create_channel(type: "address", lines: ["39 rue d'Aboukir"], city: "Paris", postal_code: "75002", country: "France")
268
+ @channel = user.create_channel(type: "address", lines: ["Honestica", "39 rue d'Aboukir"], city: "Paris", postal_code: "75002", country: "France")
269
269
  end
270
270
 
271
- expect(@channel.value).to eq "39 rue d'Aboukir, 75002 Paris"
271
+ expect(@channel.value).to eq "Honestica, 39 rue d'Aboukir, 75002 Paris"
272
272
  expect(@channel.uuid).to eq "11e70577-f114-5cde-b13b-0242ac110002"
273
273
  expect(user.channels.size).to eq 1
274
274
  end
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.5
4
+ version: 1.6.6
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-10 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler