apidae 1.2.28 → 1.2.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02b8f4d3c4d713d8fc47e92c07456104e1b05d769ebdb01bc59671e942720828
4
- data.tar.gz: dd7d5a3f0bd190e7b4c0b03b75e113a11550f4d6c903772f9de6a60ce62da775
3
+ metadata.gz: 8acf5c12e537372c888d4e7215ae6d42a0d1bfada156cb4c09df72d3425d4119
4
+ data.tar.gz: bd8ec42eaf3fef49e27ec4895766509530223da0d78cc1859efca72d13059146
5
5
  SHA512:
6
- metadata.gz: 0ae60a8ea8f42931b011efd426d2603185650787c8a827eb2ecc0f1122e734ab04d00c25a0708126698a125ba0f8f0b41e1469665a57858be18b1a30751b45cc
7
- data.tar.gz: f680e4fae89857c3039d1974b16f403dd8a60599ba86bd462c170446852df14f65005e623158dd0c89a9852317475d4abee51ce31ad649e65819ac36f8509fd3
6
+ metadata.gz: eff2ace093426266867157949dfb8eeaf55b49476bbeb7422c1967bfada14ebbe3037b441fb51e4649bc2159c3cdbc3656f06527546556cf639c64f3e502d9a8
7
+ data.tar.gz: 5ad0b4798062f938ecc02f8971ac2cb65c8e8f3d9aeca31f9c407fb31123eadfa88ea1b5c2a9c4f10be6214cb173da0a658b5144a3fe10e9e832a65513156d7b
@@ -101,10 +101,15 @@ module Apidae
101
101
  {title: node_value(data_hash, :nom, *locales)}
102
102
  end
103
103
 
104
- def self.parse_owner_data(data_hash)
104
+ def self.parse_owner_data(data_hash, polls_data)
105
+ owner_data = {}
105
106
  unless data_hash.blank?
106
- {owner_name: data_hash[:nom], owner_id: data_hash[:id]}
107
+ owner_data.merge!({owner_name: data_hash[:nom], owner_id: data_hash[:id]})
107
108
  end
109
+ unless polls_data.blank?
110
+ owner_data.merge!({polls: polls_data[:enquetes] || []})
111
+ end
112
+ owner_data
108
113
  end
109
114
 
110
115
  def self.parse_desc_data(data_hash, private_data, *locales)
@@ -217,7 +222,7 @@ module Apidae
217
222
  computed_address << address_hash[:adresse3] unless address_hash[:adresse3].blank?
218
223
  end
219
224
  loc_data.merge!({address: computed_address})
220
- loc_data.merge!({place: type_data_hash[:nomLieu]}) if type_data_hash
225
+ loc_data.merge!({place: (type_data_hash ? type_data_hash[:nomLieu] : nil) || address_hash[:nomDuLieu]})
221
226
  geoloc_details = location_hash[:geolocalisation]
222
227
  if geoloc_details && geoloc_details[:valide] && geoloc_details[:geoJson]
223
228
  loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
@@ -10,7 +10,7 @@ module Apidae
10
10
  attr_accessor :obj_versions
11
11
 
12
12
  store_accessor :title_data, :title
13
- store_accessor :owner_data, :owner_name, :owner_id
13
+ store_accessor :owner_data, :owner_name, :owner_id, :polls
14
14
  store_accessor :description_data, :short_desc, :long_desc, :theme_desc, :private_desc
15
15
  store_accessor :pictures_data, :pictures
16
16
  store_accessor :attachments_data, :attachments
@@ -175,7 +175,7 @@ module Apidae
175
175
  def self.populate_fields(apidae_obj, object_data, locales)
176
176
  type_fields = TYPES_DATA[object_data[:type]]
177
177
  apidae_obj.last_update = DateTime.parse(object_data[:gestion][:dateModification]) unless object_data[:gestion].blank?
178
- apidae_obj.owner_data = ApidaeDataParser.parse_owner_data(object_data[:gestion][:membreProprietaire]) unless object_data[:gestion].blank?
178
+ apidae_obj.owner_data = ApidaeDataParser.parse_owner_data(object_data[:gestion][:membreProprietaire], object_data[:enquete]) unless (object_data[:gestion].blank? && object_data[:enquete].blank?)
179
179
  apidae_obj.apidae_type = object_data[:type]
180
180
  apidae_obj.apidae_subtype = ApidaeDataParser.node_id(object_data[type_fields[:node]], type_fields[:subtype])
181
181
  apidae_obj.title_data = ApidaeDataParser.parse_title(object_data, *locales)
@@ -219,7 +219,7 @@ module Apidae
219
219
  def get_response(args)
220
220
  response = ''
221
221
  query = JSON.generate args.except(:url)
222
- logger.info "Apidae API query : #{args[:url]}?query=#{query}"
222
+ logger.debug "Apidae API query : #{args[:url]}?query=#{query}"
223
223
  open("#{args[:url]}?query=#{CGI.escape query}") { |f|
224
224
  f.each_line {|line| response += line if line}
225
225
  }
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.2.28"
2
+ VERSION = "1.2.30"
3
3
  end
@@ -67,6 +67,150 @@ callback this way:
67
67
  That block runs when the application boots, and every time there is a reload.
68
68
  For historical reasons, it may run twice, so it has to be idempotent.
69
69
 
70
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
71
+ Rails autoloads and reloads.
72
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
73
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
74
+
75
+ Being able to do this is deprecated. Autoloading during initialization is going
76
+ to be an error condition in future versions of Rails.
77
+
78
+ Reloading does not reboot the application, and therefore code executed during
79
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
80
+ the expected changes won't be reflected in that stale Module object.
81
+
82
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
83
+
84
+ In order to autoload safely at boot time, please wrap your code in a reloader
85
+ callback this way:
86
+
87
+ Rails.application.reloader.to_prepare do
88
+ # Autoload classes and modules needed at boot time here.
89
+ end
90
+
91
+ That block runs when the application boots, and every time there is a reload.
92
+ For historical reasons, it may run twice, so it has to be idempotent.
93
+
94
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
95
+ Rails autoloads and reloads.
96
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
97
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
98
+
99
+ Being able to do this is deprecated. Autoloading during initialization is going
100
+ to be an error condition in future versions of Rails.
101
+
102
+ Reloading does not reboot the application, and therefore code executed during
103
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
104
+ the expected changes won't be reflected in that stale Module object.
105
+
106
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
107
+
108
+ In order to autoload safely at boot time, please wrap your code in a reloader
109
+ callback this way:
110
+
111
+ Rails.application.reloader.to_prepare do
112
+ # Autoload classes and modules needed at boot time here.
113
+ end
114
+
115
+ That block runs when the application boots, and every time there is a reload.
116
+ For historical reasons, it may run twice, so it has to be idempotent.
117
+
118
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
119
+ Rails autoloads and reloads.
120
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
121
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
122
+
123
+ Being able to do this is deprecated. Autoloading during initialization is going
124
+ to be an error condition in future versions of Rails.
125
+
126
+ Reloading does not reboot the application, and therefore code executed during
127
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
128
+ the expected changes won't be reflected in that stale Module object.
129
+
130
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
131
+
132
+ In order to autoload safely at boot time, please wrap your code in a reloader
133
+ callback this way:
134
+
135
+ Rails.application.reloader.to_prepare do
136
+ # Autoload classes and modules needed at boot time here.
137
+ end
138
+
139
+ That block runs when the application boots, and every time there is a reload.
140
+ For historical reasons, it may run twice, so it has to be idempotent.
141
+
142
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
143
+ Rails autoloads and reloads.
144
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
145
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
146
+
147
+ Being able to do this is deprecated. Autoloading during initialization is going
148
+ to be an error condition in future versions of Rails.
149
+
150
+ Reloading does not reboot the application, and therefore code executed during
151
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
152
+ the expected changes won't be reflected in that stale Module object.
153
+
154
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
155
+
156
+ In order to autoload safely at boot time, please wrap your code in a reloader
157
+ callback this way:
158
+
159
+ Rails.application.reloader.to_prepare do
160
+ # Autoload classes and modules needed at boot time here.
161
+ end
162
+
163
+ That block runs when the application boots, and every time there is a reload.
164
+ For historical reasons, it may run twice, so it has to be idempotent.
165
+
166
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
167
+ Rails autoloads and reloads.
168
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
169
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
170
+
171
+ Being able to do this is deprecated. Autoloading during initialization is going
172
+ to be an error condition in future versions of Rails.
173
+
174
+ Reloading does not reboot the application, and therefore code executed during
175
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
176
+ the expected changes won't be reflected in that stale Module object.
177
+
178
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
179
+
180
+ In order to autoload safely at boot time, please wrap your code in a reloader
181
+ callback this way:
182
+
183
+ Rails.application.reloader.to_prepare do
184
+ # Autoload classes and modules needed at boot time here.
185
+ end
186
+
187
+ That block runs when the application boots, and every time there is a reload.
188
+ For historical reasons, it may run twice, so it has to be idempotent.
189
+
190
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
191
+ Rails autoloads and reloads.
192
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
193
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
194
+
195
+ Being able to do this is deprecated. Autoloading during initialization is going
196
+ to be an error condition in future versions of Rails.
197
+
198
+ Reloading does not reboot the application, and therefore code executed during
199
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
200
+ the expected changes won't be reflected in that stale Module object.
201
+
202
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
203
+
204
+ In order to autoload safely at boot time, please wrap your code in a reloader
205
+ callback this way:
206
+
207
+ Rails.application.reloader.to_prepare do
208
+ # Autoload classes and modules needed at boot time here.
209
+ end
210
+
211
+ That block runs when the application boots, and every time there is a reload.
212
+ For historical reasons, it may run twice, so it has to be idempotent.
213
+
70
214
  Check the "Autoloading and Reloading Constants" guide to learn more about how
71
215
  Rails autoloads and reloads.
72
216
  (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
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.28
4
+ version: 1.2.30
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-03-29 00:00:00.000000000 Z
11
+ date: 2022-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails