apidae 1.4.0 → 1.4.2

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: acfd5f037ca1ba885ab7fc2d2ed11618947a96e8bb8847e051baee377a0181ec
4
- data.tar.gz: 8f6a40a4382092ab12d4d356d0b8ca5a6d991a164ce8ce30fbbae5b48818f5c5
3
+ metadata.gz: d92dc099fdc8a2db216b64bc67748b47389b1288acbbe022bba48939fd3d1f38
4
+ data.tar.gz: 7b2b5197ccedd323f884d3bde5b160c37d1a059a3ab0e75c2938a0e31939bd71
5
5
  SHA512:
6
- metadata.gz: 56a436f4892053be5b30c06535d95da37534986ce4c0283d3de0306a5184a96dbbd5a431589d1971b85a29fb27b9bac4482f99e946a3cefac1aa47fcbcb4df9e
7
- data.tar.gz: 54df029782ed8fa2a7550702459f976b5768d2e8f01983e67a7bdb99d638094f6d195101b30e8e1eded29b77e115d6e1f6433a5105cb60e328a74419e6ee8a2e
6
+ metadata.gz: 8becb5d521d51399edb4ff5dbd51ecc5e30ee6bce5469ecb1fcdce4866bea774e88e62f34b8a8582c174cbe3cf5fb36b03f63a2d7655a8d03896f19b550ed7bb
7
+ data.tar.gz: 5f021e8d243e7ccedbcdf7e08a872bda1ae7ce0c5b65ad6601e0413490847ae369de2666f9470f8f5d4ec244511a6eb3b2595481feeb4581090458a1c14dfd5a
@@ -130,13 +130,15 @@ module Apidae
130
130
  l.each do |locale|
131
131
  pics_data[locale] = []
132
132
  pictures_array.select { |p| p.is_a?(Hash) && !p[:traductionFichiers].blank? }.each do |pic|
133
+ pic_file = pic[:traductionFichiers][0]
133
134
  pics_data[locale] << {
134
135
  id: pic[:identifiant],
135
136
  name: localized_value(pic, :nom, locale),
136
- url: pic[:traductionFichiers][0][:url].gsub('http:', 'https:'),
137
+ url: pic_file[:url].gsub('http:', 'https:'),
137
138
  description: localized_value(pic, :legende, locale),
138
139
  credits: localized_value(pic, :copyright, locale),
139
- expiration_date: pic[:dateLimiteDePublication] || ''
140
+ expiration_date: pic[:dateLimiteDePublication] || '',
141
+ properties: {size: pic_file[:taille], width: pic_file[:largeur], height: pic_file[:hauteur]}
140
142
  }
141
143
  end
142
144
  end
@@ -8,6 +8,7 @@ module Apidae
8
8
  attr_accessor :locale
9
9
  attr_accessor :obj_version
10
10
  attr_accessor :obj_versions
11
+ attr_accessor :skip_archiving
11
12
 
12
13
  store_accessor :title_data, :title
13
14
  store_accessor :owner_data, :owner_name, :owner_id, :polls
@@ -152,7 +153,7 @@ module Apidae
152
153
  self.prev_data ||= {}
153
154
  ignored_root_attributes = ['prev_data', 'updated_at']
154
155
  changed_attributes.each_pair do |attr, prev_value|
155
- unless ignored_root_attributes.include?(attr)
156
+ unless ignored_root_attributes.include?(attr) || skip_archiving
156
157
  if prev_value.is_a?(Hash)
157
158
  archive_hash_value(prev_value)
158
159
  else
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.2"
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.4.0
4
+ version: 1.4.2
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: 2023-02-17 00:00:00.000000000 Z
11
+ date: 2023-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails