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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e45899b8d14f77793f2dc9d928f2c2aa6eba0dad
4
- data.tar.gz: 3123ee0afa071eea4db09c3484de7916be2c6529
3
+ metadata.gz: ff6394e1f32776f2d275a0b448ceb968c493967b
4
+ data.tar.gz: 679a63b9dc98ea90c3a5491c59ab86ccf144c6e2
5
5
  SHA512:
6
- metadata.gz: '059806981d7ed7c469a45cda41072dceb8384d1cc5943089f42e766378a444d516a2e728d48e0335eea1da411673053e296ed6cf3c4cf309f4c9f45ccbb2faaf'
7
- data.tar.gz: fde56d7ce57fef6fc0b984cfba695e80e22d63b52d4b258807edabedb3952f2ca5adbcca3510512445a4a90e4361f54c51142318a836e2f6cb8ad0db880d914d
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
- locales = Rails.application.config.respond_to?(:apidae_locales) ? Rails.application.config.apidae_locales : [DEFAULT_LOCALE]
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)
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
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
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-07-06 00:00:00.000000000 Z
11
+ date: 2020-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails