apidae 1.4.9 → 1.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/apidae/apidae_data_parser.rb +1 -0
- data/app/models/apidae/obj.rb +2 -1
- data/app/models/apidae/reference.rb +2 -2
- data/config/initializers/constants.rb +1 -1
- data/lib/apidae/version.rb +1 -1
- data/test/dummy/log/development.log +1730 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e76872d44f9682c8a7833f8d51a1418e1869c5c740e8c6786df34c5456b4ee1b
|
4
|
+
data.tar.gz: d51068a42890021698dd500384c070e5e590f64717d79707f886c510bc8a379f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e92ebf91f66cb3cacb21d1d46268c59d9b5306517a51c6f65d919bb25898eb6f899a597b7efaef4ab7f2067c57b6c6f103934dd6b4a07019c46916f6c602a7bc
|
7
|
+
data.tar.gz: cb1ab3ff93737cc7a1b6763940cef06747a10ff28fa0f10e5d65f3c4dfa06db9c5a2997146dd2227b2f4831322513e51e4d597aa35897dac112aac28942268c3
|
data/app/models/apidae/obj.rb
CHANGED
@@ -18,7 +18,8 @@ module Apidae
|
|
18
18
|
store_accessor :type_data, :categories, :themes, :capacity, :classification, :classification_date,
|
19
19
|
:classification_ref, :labels, :chains, :area, :track, :tricky_sections, :products, :audience, :animals,
|
20
20
|
:animals_desc, :extra, :duration, :certifications, :business, :business_equipments, :business_rooms
|
21
|
-
store_accessor :entity_data, :entity_id, :entity_name, :info_entity_id, :info_entity_name, :service_provider_id,
|
21
|
+
store_accessor :entity_data, :entity_id, :entity_name, :info_entity_id, :info_entity_name, :service_provider_id,
|
22
|
+
:is_service_provider, :service_provider_certifications, :legal
|
22
23
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
|
23
24
|
:mobile_website, :shorty_url, :instagram, :contacts
|
24
25
|
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
|
@@ -12,9 +12,9 @@ module Apidae
|
|
12
12
|
def self.import(refs_json)
|
13
13
|
locales = Rails.application.config.respond_to?(:apidae_locales) ? Rails.application.config.apidae_locales : [DEFAULT_LOCALE]
|
14
14
|
locales_map = Hash[locales.map {|loc| ["libelle#{loc.camelize.gsub('-', '')}".to_sym, loc]}]
|
15
|
-
if count == 0 || Time.current > (maximum(:updated_at) + 1.day)
|
15
|
+
if count == 0 || Time.current > (unscoped.maximum(:updated_at) + 1.day)
|
16
16
|
refs_hashes = JSON.parse(refs_json, symbolize_names: true)
|
17
|
-
if refs_hashes.length != where("apidae_type != ?", INTERNAL).count
|
17
|
+
if refs_hashes.length != unscoped.where("apidae_type != ?", INTERNAL).count
|
18
18
|
refs_hashes.each do |ref_data|
|
19
19
|
ref = Reference.unscoped.find_or_initialize_by(apidae_id: ref_data[:id], apidae_type: ref_data[:elementReferenceType])
|
20
20
|
ref.label_data = ref_data.slice(*locales_map.keys).transform_keys {|k| locales_map[k]}
|
@@ -32,5 +32,5 @@ module Apidae
|
|
32
32
|
:google, :facebook, :twitter, :yelp, :trip_advisor, :fax, :mobile_website, :shorty_url, :instagram,
|
33
33
|
:openings, :openings_extra, :rates, :services, :payment_methods, :categories, :themes,
|
34
34
|
:labels, :chains, :classification, :challenged, :environments, :languages, :products,
|
35
|
-
:animals, :equipments, :comfort, :activities, :promo, :internal, :linked]
|
35
|
+
:animals, :equipments, :comfort, :activities, :promo, :internal, :linked, :service_provider_certifications]
|
36
36
|
end
|
data/lib/apidae/version.rb
CHANGED