apidae 1.2.8 → 1.2.13

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: 60d30181c595dde4d2f63e3389cfab37de03ba14
4
- data.tar.gz: c4f2dc5189846f3068537fa832735bdedee85cc1
3
+ metadata.gz: d44db939b2c69c3821b8c82b9e38441b69e63ab7
4
+ data.tar.gz: 5762520b0275479d67ce316d177c3f750c7519e1
5
5
  SHA512:
6
- metadata.gz: 259771713e098dcfee2c5e20f1c42ec5209dc976a38177b43cb7580eb5a4bec5b6d6e3cdbc790a8ef1f1c37e4af2b55d3d1cc40401ad6da95f8cea60d9e05b20
7
- data.tar.gz: 95a7109af9633d25cba07aaf58268905c51bcb9dc72387e0a13ab1b0a60868fa1e2cf32bfb1a1c38e00cf84b97a60ef8ad3582f4330c4aadce427cc877178a62
6
+ metadata.gz: 12d44dcf49f4b3288ed04381405fc0188adb8715aa49cd2586b80a3bdab572780ba47470dfcab7d0033b21c05ebb5a42583ab346cd64c309d62b64d0da92aa3f
7
+ data.tar.gz: 63edb21d44e5997086a883570ac71de38e3910f85d39c322cbe37acdf377bbb2d764f08af339e1b1703f2279b29543259107610942de3b64830ee828940657ed
@@ -44,7 +44,7 @@ module Apidae
44
44
  'LUNDI' => MONDAY,
45
45
  'MARDI' => TUESDAY,
46
46
  'MERCREDI' => WEDNESDAY,
47
- 'JEUD' => THURSDAY,
47
+ 'JEUDI' => THURSDAY,
48
48
  'VENDREDI' => FRIDAY,
49
49
  'SAMEDI' => SATURDAY,
50
50
  'DIMANCHE' => SUNDAY
@@ -151,6 +151,7 @@ module Apidae
151
151
  name: localized_value(att, :nom, locale),
152
152
  url: att[:traductionFichiers][0][:url].gsub('http:', 'https:'),
153
153
  type: att[:type],
154
+ link: att[:link],
154
155
  description: localized_value(att, :legende, locale)
155
156
  }
156
157
  end
@@ -222,6 +223,7 @@ module Apidae
222
223
  loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
223
224
  loc_data[:longitude] = geoloc_details[:geoJson][:coordinates][0]
224
225
  end
226
+ loc_data[:altitude] = geoloc_details[:altitude] if geoloc_details
225
227
  loc_data[:access] = node_value(geoloc_details, :complement) if geoloc_details
226
228
  loc_data[:environments] = location_hash[:environnements].map {|e| e[:id]} if location_hash[:environnements]
227
229
  end
@@ -276,7 +278,8 @@ module Apidae
276
278
  (node_id(data_hash, :typeLabel) ? [node_id(data_hash, :typeLabel)] : []),
277
279
  chains: lists_ids(data_hash[:chaines]) + nodes_ids(data_hash[:chaineEtLabel]),
278
280
  area: apidae_obj.apidae_type == Obj::DOS ? data_hash.except(:classification) : node_value(data_hash, :lieuDePratique),
279
- track: apidae_obj.apidae_type == Obj::EQU ? data_hash[:itineraire] : nil,
281
+ track: apidae_obj.apidae_type == Obj::EQU ? (data_hash[:itineraire] || {}).except(:passagesDelicats) : nil,
282
+ tricky_sections: apidae_obj.apidae_type == Obj::EQU ? data_hash.dig(:itineraire, :passagesDelicats) : nil,
280
283
  products: lists_ids(data_hash[:typesProduit], data_hash[:aopAocIgps], data_hash[:specialites]),
281
284
  audience: lists_ids(prestations_hash[:typesClientele]),
282
285
  animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES', desc: node_value(prestations_hash, :descriptifAnimauxAcceptes, *locales),
@@ -318,13 +321,17 @@ module Apidae
318
321
  tags
319
322
  end
320
323
 
321
- def self.parse_booking(reservation_hash, *locales)
324
+ def self.parse_booking(reservation_hash, visits_hash, *locales)
325
+ booking_hash = {}
322
326
  if reservation_hash
323
- {
324
- booking_desc: node_value(reservation_hash, :complement, *locales),
325
- booking_entities: reservation_hash[:organismes]
326
- }
327
+ booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
328
+ booking_hash[:booking_entities] = reservation_hash[:organismes]
329
+ end
330
+ if visits_hash
331
+ booking_hash[:visits_allowed] = visits_hash[:visitable] == true
332
+ booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
327
333
  end
334
+ booking_hash
328
335
  end
329
336
 
330
337
  def self.parse_town(location_hash)
@@ -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
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
 
@@ -84,7 +84,7 @@ module Apidae
84
84
  COS => {node: :informationsCommerceEtService, subtype: :commerceEtServiceType},
85
85
  DEG => {node: :informationsDegustation, subtype: :degustationType},
86
86
  DOS => {node: :informationsDomaineSkiable, subtype: :domaineSkiableType},
87
- EQU => {node: :informationsEquipement, subtype: :equipementType},
87
+ EQU => {node: :informationsEquipement, subtype: :rubrique},
88
88
  FEM => {node: :informationsFeteEtManifestation, subtype: :feteEtManifestationType},
89
89
  HCO => {node: :informationsHebergementCollectif, subtype: :hebergementCollectifType},
90
90
  HLO => {node: :informationsHebergementLocatif, subtype: :hebergementLocatifType},
@@ -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)
@@ -29,7 +29,7 @@ module Apidae
29
29
  :openings_desc, :rates_desc, :includes, :excludes, :extra, :booking_desc]
30
30
  ALL_FIELDS = LOCALIZED_FIELDS + [:theme_desc, :private_desc, :capacity, :telephone, :email, :website,
31
31
  :google, :facebook, :twitter, :yelp, :trip_advisor, :fax, :mobile_website, :shorty_url,
32
- :openings, :rates, :services, :payment_methods, :categories, :themes, :labels, :chains,
33
- :classification, :challenged, :environments, :languages, :products, :animals,
34
- :equipments, :comfort, :activities, :promo, :internal, :linked]
32
+ :openings, :openings_extra, :rates, :services, :payment_methods, :categories, :themes,
33
+ :labels, :chains, :classification, :challenged, :environments, :languages, :products,
34
+ :animals, :equipments, :comfort, :activities, :promo, :internal, :linked]
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.2.8"
2
+ VERSION = "1.2.13"
3
3
  end
@@ -65,3 +65,5 @@ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
65
65
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
66
66
  Apidae::Obj Load (26.8ms) SELECT 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)
67
67
  Apidae::Obj Load (2.4ms) SELECT 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)
68
+ Apidae::Obj Load (0.8ms) SELECT "apidae_objs".* FROM "apidae_objs" ORDER BY "apidae_objs"."id" ASC LIMIT $1 [["LIMIT", 1]]
69
+  (3.4ms) SELECT COUNT(*) FROM "apidae_objs"
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.8
4
+ version: 1.2.13
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: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails