apidae 1.2.4 → 1.2.5
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 +1 -0
- data/app/models/apidae/reference.rb +1 -1
- data/app/models/apidae/selection.rb +2 -2
- 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: ff6394e1f32776f2d275a0b448ceb968c493967b
|
|
4
|
+
data.tar.gz: 679a63b9dc98ea90c3a5491c59ab86ccf144c6e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ee076bdd66bdf41487cd6be15d7ac4239724e004ff1304835f8c362f6b4f681d94681d289b3cb227f6dcae20ec02c7990338f9f4260d9a429a97bfc00e148ed
|
|
7
|
+
data.tar.gz: c2a9f335d0ec0bdcd58f639024431d1d78388c7c21140da2ab523bf72c520bc83d243f28ce26ef216bbc61e1e566893a4964a065bc31e27ee268695b9996aaa5
|
|
@@ -236,6 +236,7 @@ module Apidae
|
|
|
236
236
|
openings_desc: node_value(openings_hash, :periodeEnClair, *locales),
|
|
237
237
|
openings_desc_mode: openings_hash[:periodeEnClairGenerationMode] == 'AUTOMATIQUE' ? MODE_AUTO : MODE_MANUAL,
|
|
238
238
|
openings: build_openings(openings_hash, *locales),
|
|
239
|
+
all_year_long: openings_hash[:ouvertTouteLAnnee] == 'OUVERT_TOUTE_L_ANNEE' ? 'true' : 'false',
|
|
239
240
|
time_periods: lists_ids(openings_hash[:indicationsPeriode]),
|
|
240
241
|
openings_extra: lists_ids(openings_hash[:ouverturesComplementaires])
|
|
241
242
|
}
|
|
@@ -10,7 +10,7 @@ module Apidae
|
|
|
10
10
|
end
|
|
11
11
|
|
|
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
15
|
refs_hashes = JSON.parse(refs_json, symbolize_names: true)
|
|
16
16
|
if refs_hashes.length != where("apidae_type != ?", INTERNAL).count
|
|
@@ -92,9 +92,9 @@ module Apidae
|
|
|
92
92
|
query_api(query_args, true, false)
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
def add_or_refresh_obj(apidae_obj_id)
|
|
95
|
+
def add_or_refresh_obj(apidae_obj_id, fields = ["@all"])
|
|
96
96
|
if valid_api?
|
|
97
|
-
res = api_object(apidae_obj_id)
|
|
97
|
+
res = api_object(apidae_obj_id, fields)
|
|
98
98
|
if res[:results] && res[:results].length == 1
|
|
99
99
|
obj_data = res[:results].first.deep_symbolize_keys
|
|
100
100
|
add_or_refresh(obj_data)
|
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.5
|
|
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-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|