sitra_client 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjA3NmMzMWIwOTQ0ZTY0NjU4OTRhMjc4NGYyYjdhZjcwNjI2ZDIzOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTEzNWZmNzZiNWE0ODgzZWM2YWFmNmIwZDYzYWFhZDY0ZTBiMTQ3NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mjk5Mjg2YjRjY2RjOTEyNDQ5ODRkNTJiNjkzZmFhNTE2MGQxODljNTUxN2U3
|
10
|
+
ZGI1MGE1N2YxMzY0NTFlZDcwMjQ5YzA1MGQ1NjJmMzMwNTMwOGUzMzc3YjIz
|
11
|
+
MTc5ZThjMjk4OWZiZWM3MDAwNmRkZjdjNWVkMmI5MWIzYjY5Njg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjQzODhiYzQ4NjM5YTc5MTEwMzUzZWUyOTIxZTA4ZTcwNzY3NzZjZTVkODQ1
|
14
|
+
ZThhMjMyYWM2ZDc2OGRkMDFhY2E3YTRlNDQ3OTBhMDVmZWVmZGM0MGY3ODBl
|
15
|
+
NmVkZGVlMDQ3ZGJjYzQ2OWRjMzI4ZjI4ZjM5YjBmNmQ0OTRmMDc=
|
@@ -149,6 +149,7 @@ class TouristicObject
|
|
149
149
|
|
150
150
|
def prestations(prestation_type)
|
151
151
|
presta = {}
|
152
|
+
unless @prestations && @prestations[prestation_type].nil?
|
152
153
|
@prestations && @prestations[prestation_type].each do |i|
|
153
154
|
value = i[@libelle]
|
154
155
|
if i[:familleCritere].nil?
|
@@ -162,6 +163,7 @@ class TouristicObject
|
|
162
163
|
presta.store(key,[value])
|
163
164
|
end
|
164
165
|
end
|
166
|
+
end
|
165
167
|
presta
|
166
168
|
end
|
167
169
|
|
data/lib/sitra_client/version.rb
CHANGED
@@ -171,4 +171,33 @@ class TouristicObjectTest < Test::Unit::TestCase
|
|
171
171
|
should 'populate services data' do
|
172
172
|
|
173
173
|
end
|
174
|
+
|
175
|
+
should 'get key and value for criteria' do
|
176
|
+
|
177
|
+
hash_result = { :services => [ {
|
178
|
+
:libelleFr => "Accès autocar",
|
179
|
+
:familleCritere => { :libelleFr => "Aide au client / transport" }
|
180
|
+
},
|
181
|
+
{
|
182
|
+
:libelleFr => "Location de salles",
|
183
|
+
:familleCritere => { :libelleFr => "Location / Prêt" }
|
184
|
+
},
|
185
|
+
{
|
186
|
+
:libelleFr => "Pension complète",
|
187
|
+
:familleCritere => { :libelleFr => "Formule d'hébergement" }
|
188
|
+
},
|
189
|
+
{
|
190
|
+
:libelleFr => "Petit déjeuner en chambre",
|
191
|
+
:familleCritere => { :libelleFr => "Formule d'hébergement" }
|
192
|
+
},
|
193
|
+
{
|
194
|
+
:libelleFr => "Petit-déjeuner",
|
195
|
+
:familleCritere => { :libelleFr => "Formule d'hébergement" }
|
196
|
+
}]}
|
197
|
+
|
198
|
+
touristic_object = TouristicObject.new(hash_result)
|
199
|
+
resultat = touristic_object.prestations(:services)
|
200
|
+
assert_equal "{}", resultat
|
201
|
+
end
|
202
|
+
|
174
203
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitra_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeanbaptistevilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|