apidae 1.3.9 → 1.3.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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da5768b591408dcf9f2fdadd5ab979b69ef1fcdb0de84c3a9c9eccb5ca11f744
|
|
4
|
+
data.tar.gz: 4fca91b7f71cc833947426fcd31390c8f94bf7bdff8d196cc176f9bf37c64cf5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a980dbfb064064fed555cf9f6a58a73ae25d44c1c41b604a0a5afaad67982d3cf58468e2816079ff4d2a158c0c50c3920ac463df538146cf388499eb97c1058a
|
|
7
|
+
data.tar.gz: efb3d85c63fe98fdc066d3f9b73fcbe2c9c058d0669fc579324c874cdac1b6eeb07e4aadb2bc265904b8878a3004a32c6c6bec6703374edefc4eed990d4c7958
|
|
@@ -286,8 +286,8 @@ module Apidae
|
|
|
286
286
|
tricky_sections: apidae_obj.apidae_type == Obj::EQU ? node_value(data_hash[:itineraire], :passagesDelicats, *locales) : nil,
|
|
287
287
|
products: lists_ids(data_hash[:typesProduit], data_hash[:aopAocIgps], data_hash[:specialites]),
|
|
288
288
|
audience: lists_ids(prestations_hash[:typesClientele]),
|
|
289
|
-
animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES',
|
|
290
|
-
fee: prestations_hash[:animauxAcceptesSupplement] == 'AVEC_SUPPLEMENT'},
|
|
289
|
+
animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES', unknown: prestations_hash[:animauxAcceptes] == 'NON_DISPONIBLE',
|
|
290
|
+
desc: node_value(prestations_hash, :descriptifAnimauxAcceptes, *locales), fee: prestations_hash[:animauxAcceptesSupplement] == 'AVEC_SUPPLEMENT'},
|
|
291
291
|
extra: apidae_obj.apidae_type == Obj::SPA ? node_value(data_hash, :formuleHebergement, *locales) : node_value(prestations_hash, :complementAccueil, *locales),
|
|
292
292
|
duration: apidae_obj.apidae_type == Obj::SPA ? {days: data_hash[:nombreJours], nights: data_hash[:nombreNuits]} : data_hash[:dureeSeance],
|
|
293
293
|
certifications: data_hash[:agrements].blank? ? [] : data_hash[:agrements].map {|a| {id: a[:type][:id], identifier: a[:numero]}},
|
|
@@ -370,7 +370,11 @@ module Apidae
|
|
|
370
370
|
end
|
|
371
371
|
|
|
372
372
|
def self.node_id(node, key)
|
|
373
|
-
|
|
373
|
+
if node && node[key]
|
|
374
|
+
node[key].is_a?(Array) ? node[key][0][:id] : node[key][:id]
|
|
375
|
+
else
|
|
376
|
+
nil
|
|
377
|
+
end
|
|
374
378
|
end
|
|
375
379
|
|
|
376
380
|
private
|
data/app/models/apidae/export.rb
CHANGED
|
@@ -5,6 +5,7 @@ module Apidae
|
|
|
5
5
|
class Export < ActiveRecord::Base
|
|
6
6
|
|
|
7
7
|
PENDING = 'pending'
|
|
8
|
+
IN_PROGRESS = 'in_progress'
|
|
8
9
|
COMPLETE = 'complete'
|
|
9
10
|
CANCELLED = 'cancelled'
|
|
10
11
|
|
|
@@ -24,6 +25,10 @@ module Apidae
|
|
|
24
25
|
where(remote_status: 'SUCCESS', status: PENDING).order(:id)
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
def self.in_progress
|
|
29
|
+
where(remote_status: 'SUCCESS', status: IN_PROGRESS)
|
|
30
|
+
end
|
|
31
|
+
|
|
27
32
|
def import_data
|
|
28
33
|
success = true
|
|
29
34
|
begin
|
data/app/models/apidae/obj.rb
CHANGED
|
@@ -80,11 +80,10 @@ module Apidae
|
|
|
80
80
|
STR = 'STRUCTURE'
|
|
81
81
|
TER = 'TERRITOIRE'
|
|
82
82
|
|
|
83
|
-
# Todo : subtype for DEG shoud be :statutsExploitant (double check and fix in 1.2 and master)
|
|
84
83
|
TYPES_DATA = {
|
|
85
84
|
ACT => {node: :informationsActivite, subtype: :activiteType},
|
|
86
85
|
COS => {node: :informationsCommerceEtService, subtype: :commerceEtServiceType},
|
|
87
|
-
DEG => {node: :informationsDegustation, subtype: :
|
|
86
|
+
DEG => {node: :informationsDegustation, subtype: :statutsExploitant},
|
|
88
87
|
DOS => {node: :informationsDomaineSkiable, subtype: :domaineSkiableType},
|
|
89
88
|
EQU => {node: :informationsEquipement, subtype: :rubrique},
|
|
90
89
|
FEM => {node: :informationsFeteEtManifestation, subtype: :feteEtManifestationType},
|
data/lib/apidae/version.rb
CHANGED
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.3.
|
|
4
|
+
version: 1.3.12
|
|
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: 2022-
|
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|