apidae 0.9.35 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -153,29 +153,6 @@ module Apidae
153
153
  assert_equal 0, Selection.count
154
154
  end
155
155
 
156
- test "object deletion cancelled if used by another project" do
157
- proj = Project.create(apidae_id: 123)
158
- other_proj = Project.create(apidae_id: 456)
159
- sel = Selection.create(apidae_id: 49063, apidae_project_id: proj.id, label: 'Sélection 2', reference: 'selection-2')
160
- other_sel = Selection.create(apidae_id: 49999, apidae_project_id: other_proj.id, label: 'Sélection 99', reference: 'selection-99')
161
- sel.objects << Obj.create(apidae_id: 503, title: 'Société des violoncellistes aixois')
162
- sel.objects << Obj.create(apidae_id: 504, title: 'Société des contrebassistes aixois')
163
- other_sel.objects << Obj.find_by_apidae_id(504)
164
-
165
- assert_equal 2, sel.objects.count
166
- assert_equal 1, other_sel.objects.count
167
-
168
- selections_json = File.read('test/data/shared_selections.json')
169
- FileImport.add_or_update_selections(proj, selections_json, @result)
170
- deletion_json = File.read('test/data/deletion.json')
171
- FileImport.delete_objects(deletion_json, @result)
172
-
173
- assert_equal 2, Obj.count
174
- assert_equal({created: 0, updated: 0, deleted: 1, selections:
175
- [{:apidae_id=>49063, :reference=>"selection-2", :objects=>1}]}, @result)
176
- assert_equal 1, other_sel.objects.count
177
- end
178
-
179
156
  test "full import process" do
180
157
  Obj.create(apidae_id: 123, title: 'Objet à supprimer')
181
158
  Obj.create(apidae_id: 4826186, title: 'Objet à mettre à jour')
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: 0.9.35
4
+ version: 0.10.0
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: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2020-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -194,7 +194,6 @@ files:
194
194
  - test/data/hot_fr_en.json
195
195
  - test/data/json_export.zip
196
196
  - test/data/selections.json
197
- - test/data/shared_selections.json
198
197
  - test/data/structure.json
199
198
  - test/data/update_selections.json
200
199
  - test/dummy/README.rdoc
@@ -231,7 +230,6 @@ files:
231
230
  - test/dummy/config/secrets.yml
232
231
  - test/dummy/db/schema.rb
233
232
  - test/dummy/log/development.log
234
- - test/dummy/log/test.log
235
233
  - test/dummy/public/404.html
236
234
  - test/dummy/public/422.html
237
235
  - test/dummy/public/500.html
@@ -270,7 +268,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
268
  - !ruby/object:Gem::Version
271
269
  version: '0'
272
270
  requirements: []
273
- rubygems_version: 3.1.6
271
+ rubyforge_project:
272
+ rubygems_version: 2.6.13
274
273
  signing_key:
275
274
  specification_version: 4
276
275
  summary: A Ruby on Rails engine for projects that involve Apidae data
@@ -311,7 +310,6 @@ test_files:
311
310
  - test/dummy/public/500.html
312
311
  - test/dummy/public/404.html
313
312
  - test/dummy/db/schema.rb
314
- - test/dummy/log/test.log
315
313
  - test/dummy/log/development.log
316
314
  - test/dummy/README.rdoc
317
315
  - test/integration/navigation_test.rb
@@ -336,7 +334,6 @@ test_files:
336
334
  - test/controllers/apidae/dashboard_controller_test.rb
337
335
  - test/controllers/apidae/references_controller_test.rb
338
336
  - test/controllers/apidae/import_controller_test.rb
339
- - test/data/shared_selections.json
340
337
  - test/data/equ_groups.json
341
338
  - test/data/update_selections.json
342
339
  - test/data/json_export.zip
@@ -1,15 +0,0 @@
1
- [
2
- {
3
- "id": 49063,
4
- "libelle": {
5
- "libelleFr": "Sélection 2"
6
- },
7
- "nom": "Sélection 2",
8
- "objetsTouristiques": [
9
- {
10
- "type": "STRUCTURE",
11
- "id": 503
12
- }
13
- ]
14
- }
15
- ]