apidae 1.3.15 → 1.3.17
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: c2dc14def4a5ccba14984b121294b512f2974f03f5e404864e6c8cd2e439e260
|
|
4
|
+
data.tar.gz: 7030d0d62645128f239702bbcf7553995168b72656afbafbc4ac9596640bb061
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99bafa98550f2800639d48ffc5c22c44f810c12d1298d2b7b0453d1b96c20e5adb60217c0c51db5af35efcc81619a8a4cdf1f6890ec2e4f44c01d5df6cd595d5
|
|
7
|
+
data.tar.gz: b5ca9bd5f07c12658e93ececba16a282629c0e78949658e3a2a38b53de45f872b843c5c8ab49d70e4a5b2f2d2878c107899506fbeb4a2c7375a776b85b88511f
|
|
@@ -39,7 +39,7 @@ module Apidae
|
|
|
39
39
|
Export.pending.each do |e|
|
|
40
40
|
logger.info "Running import for Apidae export #{e.id} - Project #{e.project_id}"
|
|
41
41
|
e.update(status: Export::IN_PROGRESS)
|
|
42
|
-
success
|
|
42
|
+
success = e.import_data && success
|
|
43
43
|
logger.info "Apidae export #{e.id} import run complete - Project #{e.project_id}"
|
|
44
44
|
end
|
|
45
45
|
success ? head(:ok) : head(:internal_server_error)
|
|
@@ -233,7 +233,7 @@ module Apidae
|
|
|
233
233
|
end
|
|
234
234
|
|
|
235
235
|
# Note : use internal format for openings storage (ideally Apihours one, to merge data from both sources)
|
|
236
|
-
def self.parse_openings(openings_hash, *locales)
|
|
236
|
+
def self.parse_openings(openings_hash, opening_days, *locales)
|
|
237
237
|
if openings_hash && openings_hash[:periodeEnClair]
|
|
238
238
|
{
|
|
239
239
|
openings_desc: node_value(openings_hash, :periodeEnClair, *locales),
|
|
@@ -241,7 +241,8 @@ module Apidae
|
|
|
241
241
|
openings: build_openings(openings_hash, *locales),
|
|
242
242
|
all_year_long: openings_hash[:ouvertTouteLAnnee] == 'OUVERT_TOUTE_L_ANNEE' ? 'true' : 'false',
|
|
243
243
|
time_periods: lists_ids(openings_hash[:indicationsPeriode]),
|
|
244
|
-
openings_extra: lists_ids(openings_hash[:ouverturesComplementaires])
|
|
244
|
+
openings_extra: lists_ids(openings_hash[:ouverturesComplementaires]),
|
|
245
|
+
opening_days: opening_days
|
|
245
246
|
}
|
|
246
247
|
end
|
|
247
248
|
end
|
|
@@ -174,7 +174,7 @@ module Apidae
|
|
|
174
174
|
SelectionObject.where(apidae_selection_id: apidae_selection_ids).delete_all
|
|
175
175
|
Selection.where(id: apidae_selection_ids).delete_all
|
|
176
176
|
selections_hashes.each do |selection_data|
|
|
177
|
-
logger.
|
|
177
|
+
logger.debug "Updating selection #{selection_data[:id]}"
|
|
178
178
|
Selection.add_or_update(selection_data, project.id)
|
|
179
179
|
end
|
|
180
180
|
result[:selections] = Selection.where(apidae_project_id: project.id)
|
data/app/models/apidae/obj.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Apidae
|
|
|
21
21
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
|
|
22
22
|
:mobile_website, :shorty_url, :contacts
|
|
23
23
|
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
|
|
24
|
-
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
|
|
24
|
+
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra, :opening_days
|
|
25
25
|
store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra, :tax_included
|
|
26
26
|
store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
|
|
27
27
|
store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc, :visits_duration, :visits_services
|
|
@@ -184,7 +184,7 @@ module Apidae
|
|
|
184
184
|
apidae_obj.location_data = ApidaeDataParser.parse_location_data(object_data[:localisation], object_data[type_fields[:node]],
|
|
185
185
|
object_data[:territoires])
|
|
186
186
|
apidae_obj.town = ApidaeDataParser.parse_town(object_data[:localisation])
|
|
187
|
-
apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], *locales)
|
|
187
|
+
apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], object_data[:datesOuverture], *locales)
|
|
188
188
|
apidae_obj.rates_data = ApidaeDataParser.parse_rates(object_data[:descriptionTarif], *locales)
|
|
189
189
|
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], object_data[:visites], *locales)
|
|
190
190
|
apidae_obj.type_data = ApidaeDataParser.parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
|
|
@@ -53,7 +53,7 @@ module Apidae
|
|
|
53
53
|
.select("COUNT(id), apidae_object_id, ARRAY_AGG(id) AS so_ids")
|
|
54
54
|
.having("COUNT(id) > ?", 1).map {|so| so.so_ids}
|
|
55
55
|
dups_count = apidae_selection_objects.where(id: dups.map {|d| d.sort[1..-1]}.flatten).delete_all
|
|
56
|
-
logger.
|
|
56
|
+
logger.debug "Cleaned up #{dups_count} duplicate selection-objects associations for selection #{apidae_id}"
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def results(where_clause, offset, size)
|
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.17
|
|
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-09-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|