apidae 1.0.3 → 1.0.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0603f295a6946a070d13d9a70813840de04bc155
|
4
|
+
data.tar.gz: 9e15a59b156bad347b5d0cec0625fdb6ddca2c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 960c0cc9dcbbca0b5a290b4d44b60ca10b81271b55050d27ac6d279680d77233221720e117f5b2d7193824856e75d8cf842880625cda9d6b7a29fc94bde2b05b
|
7
|
+
data.tar.gz: 4dacb5596fad4f0824c76e1a2f4fd9f124f12399fbd753401e5ff3deea084b12ca087e83985dea9e7c5e9e3ee0725a315af69417a205ae7d8f9a186734b1e871
|
@@ -210,7 +210,8 @@ module Apidae
|
|
210
210
|
openings_desc: node_value(openings_hash, :periodeEnClair, *locales),
|
211
211
|
openings_desc_mode: openings_hash[:periodeEnClairGenerationMode] == 'AUTOMATIQUE' ? MODE_AUTO : MODE_MANUAL,
|
212
212
|
openings: build_openings(openings_hash, *locales),
|
213
|
-
time_periods: lists_ids(openings_hash[:indicationsPeriode])
|
213
|
+
time_periods: lists_ids(openings_hash[:indicationsPeriode]),
|
214
|
+
openings_extra: lists_ids(openings_hash[:ouverturesComplementaires])
|
214
215
|
}
|
215
216
|
end
|
216
217
|
end
|
data/app/models/apidae/obj.rb
CHANGED
@@ -18,7 +18,7 @@ module Apidae
|
|
18
18
|
store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id
|
19
19
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :contacts
|
20
20
|
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
|
21
|
-
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods
|
21
|
+
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
|
22
22
|
store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes
|
23
23
|
store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
|
24
24
|
store_accessor :booking_data, :booking_desc, :booking_entities
|
@@ -5,6 +5,10 @@ module Apidae
|
|
5
5
|
|
6
6
|
store_accessor :meta_data, :category, :parent
|
7
7
|
|
8
|
+
def self.default_scope
|
9
|
+
where(is_active: true)
|
10
|
+
end
|
11
|
+
|
8
12
|
def self.import(refs_json)
|
9
13
|
locales = Rails.application.config.respond_to?(:apidae_locales) ? Rails.application.config.apidae_locales : [DEFAULT_LOCALE]
|
10
14
|
locales_map = Hash[locales.map {|loc| ["libelle#{loc.camelize.gsub('-', '')}".to_sym, loc]}]
|
@@ -15,6 +19,7 @@ module Apidae
|
|
15
19
|
ref.label_data = ref_data.slice(*locales_map.keys).transform_keys {|k| locales_map[k]}
|
16
20
|
ref.parent = ref_data[:parent][:id] if ref_data[:parent]
|
17
21
|
ref.category = ref_data[:familleCritere] ? ref_data[:familleCritere][:id] : (ref_data[:typeLabel] ? ref_data[:typeLabel][:id] : nil)
|
22
|
+
ref.is_active = ref_data[:actif]
|
18
23
|
ref.save!
|
19
24
|
end
|
20
25
|
end
|
data/lib/apidae/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apidae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- db/migrate/20200312150008_add_version_data_to_apidae_objs.rb
|
179
179
|
- db/migrate/20200312150904_add_version_index_on_apidae_objs.rb
|
180
180
|
- db/migrate/20200522124205_rename_objs_contact_to_contact_data.rb
|
181
|
+
- db/migrate/20200528101957_add_is_active_to_apidae_references.rb
|
181
182
|
- lib/apidae.rb
|
182
183
|
- lib/apidae/engine.rb
|
183
184
|
- lib/apidae/version.rb
|