apidae 1.2.7 → 1.2.8
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 +7 -2
- data/app/models/apidae/obj.rb +2 -2
- data/config/initializers/constants.rb +2 -1
- data/config/locales/apidae.fr.yml +1 -0
- data/lib/apidae/version.rb +1 -1
- 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: 60d30181c595dde4d2f63e3389cfab37de03ba14
|
|
4
|
+
data.tar.gz: c4f2dc5189846f3068537fa832735bdedee85cc1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 259771713e098dcfee2c5e20f1c42ec5209dc976a38177b43cb7580eb5a4bec5b6d6e3cdbc790a8ef1f1c37e4af2b55d3d1cc40401ad6da95f8cea60d9e05b20
|
|
7
|
+
data.tar.gz: 95a7109af9633d25cba07aaf58268905c51bcb9dc72387e0a13ab1b0a60868fa1e2cf32bfb1a1c38e00cf84b97a60ef8ad3582f4330c4aadce427cc877178a62
|
|
@@ -336,10 +336,15 @@ module Apidae
|
|
|
336
336
|
end
|
|
337
337
|
end
|
|
338
338
|
|
|
339
|
-
def self.parse_entity_fields(information_hash, type_data_hash)
|
|
339
|
+
def self.parse_entity_fields(information_hash, type_data_hash, sp_hash)
|
|
340
|
+
entity_hash = {}
|
|
340
341
|
if information_hash && information_hash[:structureGestion]
|
|
341
|
-
{entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)}
|
|
342
|
+
entity_hash.merge!({entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)})
|
|
342
343
|
end
|
|
344
|
+
if sp_hash && sp_hash[:prestataireActivites]
|
|
345
|
+
entity_hash[:is_service_provider] = true
|
|
346
|
+
end
|
|
347
|
+
entity_hash
|
|
343
348
|
end
|
|
344
349
|
|
|
345
350
|
def self.node_id(node, key)
|
data/app/models/apidae/obj.rb
CHANGED
|
@@ -16,7 +16,7 @@ module Apidae
|
|
|
16
16
|
store_accessor :attachments_data, :attachments
|
|
17
17
|
store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
|
|
18
18
|
:products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
|
|
19
|
-
store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id
|
|
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
22
|
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
|
|
@@ -190,7 +190,7 @@ module Apidae
|
|
|
190
190
|
object_data[:tourismeAffaires], *locales)
|
|
191
191
|
apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
|
|
192
192
|
apidae_obj.attachments_data = ApidaeDataParser.parse_attachments_data(object_data[:multimedias], *locales)
|
|
193
|
-
apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]])
|
|
193
|
+
apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]], object_data[:informationsPrestataireActivites])
|
|
194
194
|
apidae_obj.service_data = ApidaeDataParser.parse_service_data(object_data[:prestations], object_data[type_fields[:node]])
|
|
195
195
|
apidae_obj.tags_data = ApidaeDataParser.parse_tags_data(object_data[:presentation], object_data[:criteresInternes], object_data[:liens])
|
|
196
196
|
apidae_obj.meta_data = object_data[:metadonnees]
|
|
@@ -8,9 +8,10 @@ module Apidae
|
|
|
8
8
|
LOCALE_ZH = 'zh'
|
|
9
9
|
LOCALE_ES = 'es'
|
|
10
10
|
LOCALE_PT_BR = 'pt-BR'
|
|
11
|
+
LOCALE_JP = 'jp'
|
|
11
12
|
|
|
12
13
|
DEFAULT_LOCALE = LOCALE_FR
|
|
13
|
-
ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_ES, LOCALE_PT_BR]
|
|
14
|
+
ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_ES, LOCALE_PT_BR, LOCALE_JP]
|
|
14
15
|
|
|
15
16
|
STANDARD_VERSION = 'STANDARD'
|
|
16
17
|
WINTER_VERSION = 'HIVER'
|
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.2.
|
|
4
|
+
version: 1.2.8
|
|
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-
|
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|