apidae 1.2.10 → 1.2.15
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 +4 -4
- data/app/models/apidae/apidae_data_parser.rb +14 -7
- data/app/models/apidae/obj.rb +4 -4
- data/lib/apidae/version.rb +1 -1
- data/test/dummy/log/development.log +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b3849f9d44a0958ff3c66c50d7b88a11eb91ccf
|
|
4
|
+
data.tar.gz: ae55b5a634ab91442210a71828722263822ae78c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3aa2d82b715fe8511f0c50bfc6d5c5c6fe747962aafd6fc52c7a0793f43f96fa78a28226f25bb0d509369ae9a535cb54937eedff10f03d1ed3fea34d47bbc373
|
|
7
|
+
data.tar.gz: 6bbe568e7412727e8dc7fc68602e013a5ed0e48a534925c64fbec23bce47e54d5f27ca3da4ae35d832e59f15824a8359aedef5950f006c7200ded8c93617eb6a
|
|
@@ -44,7 +44,7 @@ module Apidae
|
|
|
44
44
|
'LUNDI' => MONDAY,
|
|
45
45
|
'MARDI' => TUESDAY,
|
|
46
46
|
'MERCREDI' => WEDNESDAY,
|
|
47
|
-
'
|
|
47
|
+
'JEUDI' => THURSDAY,
|
|
48
48
|
'VENDREDI' => FRIDAY,
|
|
49
49
|
'SAMEDI' => SATURDAY,
|
|
50
50
|
'DIMANCHE' => SUNDAY
|
|
@@ -223,6 +223,8 @@ module Apidae
|
|
|
223
223
|
loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
|
|
224
224
|
loc_data[:longitude] = geoloc_details[:geoJson][:coordinates][0]
|
|
225
225
|
end
|
|
226
|
+
loc_data[:map_reference] = geoloc_details[:reperePlan]
|
|
227
|
+
loc_data[:altitude] = geoloc_details[:altitude] if geoloc_details
|
|
226
228
|
loc_data[:access] = node_value(geoloc_details, :complement) if geoloc_details
|
|
227
229
|
loc_data[:environments] = location_hash[:environnements].map {|e| e[:id]} if location_hash[:environnements]
|
|
228
230
|
end
|
|
@@ -277,7 +279,8 @@ module Apidae
|
|
|
277
279
|
(node_id(data_hash, :typeLabel) ? [node_id(data_hash, :typeLabel)] : []),
|
|
278
280
|
chains: lists_ids(data_hash[:chaines]) + nodes_ids(data_hash[:chaineEtLabel]),
|
|
279
281
|
area: apidae_obj.apidae_type == Obj::DOS ? data_hash.except(:classification) : node_value(data_hash, :lieuDePratique),
|
|
280
|
-
track: apidae_obj.apidae_type == Obj::EQU ? data_hash[:itineraire] : nil,
|
|
282
|
+
track: apidae_obj.apidae_type == Obj::EQU ? (data_hash[:itineraire] || {}).except(:passagesDelicats) : nil,
|
|
283
|
+
tricky_sections: apidae_obj.apidae_type == Obj::EQU ? node_value(data_hash[:itineraire], :passagesDelicats, *locales) : nil,
|
|
281
284
|
products: lists_ids(data_hash[:typesProduit], data_hash[:aopAocIgps], data_hash[:specialites]),
|
|
282
285
|
audience: lists_ids(prestations_hash[:typesClientele]),
|
|
283
286
|
animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES', desc: node_value(prestations_hash, :descriptifAnimauxAcceptes, *locales),
|
|
@@ -319,13 +322,17 @@ module Apidae
|
|
|
319
322
|
tags
|
|
320
323
|
end
|
|
321
324
|
|
|
322
|
-
def self.parse_booking(reservation_hash, *locales)
|
|
325
|
+
def self.parse_booking(reservation_hash, visits_hash, *locales)
|
|
326
|
+
booking_hash = {}
|
|
323
327
|
if reservation_hash
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
|
|
329
|
+
booking_hash[:booking_entities] = reservation_hash[:organismes]
|
|
330
|
+
end
|
|
331
|
+
if visits_hash
|
|
332
|
+
booking_hash[:visits_allowed] = visits_hash[:visitable] == true
|
|
333
|
+
booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
|
|
328
334
|
end
|
|
335
|
+
booking_hash
|
|
329
336
|
end
|
|
330
337
|
|
|
331
338
|
def self.parse_town(location_hash)
|
data/app/models/apidae/obj.rb
CHANGED
|
@@ -15,15 +15,15 @@ module Apidae
|
|
|
15
15
|
store_accessor :pictures_data, :pictures
|
|
16
16
|
store_accessor :attachments_data, :attachments
|
|
17
17
|
store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
|
|
18
|
-
:products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
|
|
18
|
+
:tricky_sections, :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
|
|
19
19
|
store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider
|
|
20
20
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
|
|
21
21
|
:mobile_website, :shorty_url, :contacts
|
|
22
|
-
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
|
|
22
|
+
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
|
|
23
23
|
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
|
|
24
24
|
store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra
|
|
25
25
|
store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
|
|
26
|
-
store_accessor :booking_data, :booking_desc, :booking_entities
|
|
26
|
+
store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc
|
|
27
27
|
store_accessor :tags_data, :promo, :internal, :linked
|
|
28
28
|
store_accessor :version_data, :versioned_fields
|
|
29
29
|
|
|
@@ -185,7 +185,7 @@ module Apidae
|
|
|
185
185
|
apidae_obj.town = ApidaeDataParser.parse_town(object_data[:localisation])
|
|
186
186
|
apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], *locales)
|
|
187
187
|
apidae_obj.rates_data = ApidaeDataParser.parse_rates(object_data[:descriptionTarif], *locales)
|
|
188
|
-
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], *locales)
|
|
188
|
+
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], object_data[:visites], *locales)
|
|
189
189
|
apidae_obj.type_data = ApidaeDataParser.parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
|
|
190
190
|
object_data[:tourismeAffaires], *locales)
|
|
191
191
|
apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
|
data/lib/apidae/version.rb
CHANGED
|
@@ -65,3 +65,5 @@ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
|
|
|
65
65
|
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
|
66
66
|
[1m[36mApidae::Obj Load (26.8ms)[0m [1m[34mSELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)[0m
|
|
67
67
|
[1m[36mApidae::Obj Load (2.4ms)[0m [1m[34mSELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)[0m
|
|
68
|
+
[1m[36mApidae::Obj Load (0.8ms)[0m [1m[34mSELECT "apidae_objs".* FROM "apidae_objs" ORDER BY "apidae_objs"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
|
69
|
+
[1m[35m (3.4ms)[0m [1m[34mSELECT COUNT(*) FROM "apidae_objs"[0m
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apidae
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean-Baptiste Vilain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|