global-registry-bindings 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +126 -0
  4. data/lib/global_registry_bindings.rb +8 -0
  5. data/lib/global_registry_bindings/entity/delete_entity_methods.rb +22 -0
  6. data/lib/global_registry_bindings/entity/entity_methods.rb +62 -0
  7. data/lib/global_registry_bindings/entity/entity_type_methods.rb +54 -0
  8. data/lib/global_registry_bindings/entity/mdm_methods.rb +43 -0
  9. data/lib/global_registry_bindings/entity/push_entity_methods.rb +78 -0
  10. data/lib/global_registry_bindings/entity/push_relationship_methods.rb +81 -0
  11. data/lib/global_registry_bindings/entity/relationship_type_methods.rb +59 -0
  12. data/lib/global_registry_bindings/exceptions.rb +9 -0
  13. data/lib/global_registry_bindings/global_registry_bindings.rb +71 -0
  14. data/lib/global_registry_bindings/options.rb +80 -0
  15. data/lib/global_registry_bindings/options/class_options.rb +58 -0
  16. data/lib/global_registry_bindings/options/instance_options.rb +61 -0
  17. data/lib/global_registry_bindings/railtie.rb +19 -0
  18. data/lib/global_registry_bindings/version.rb +7 -0
  19. data/lib/global_registry_bindings/workers/delete_gr_entity_worker.rb +22 -0
  20. data/lib/global_registry_bindings/workers/pull_mdm_id_worker.rb +30 -0
  21. data/lib/global_registry_bindings/workers/push_gr_entity_worker.rb +21 -0
  22. data/lib/global_registry_bindings/workers/push_relationship_worker.rb +21 -0
  23. data/spec/acceptance/global_registry_bindings_spec.rb +74 -0
  24. data/spec/factories/factories.rb +37 -0
  25. data/spec/fixtures/get_entities_person.json +8 -0
  26. data/spec/fixtures/get_entities_person_mdm.json +13 -0
  27. data/spec/fixtures/get_entities_person_relationship.json +32 -0
  28. data/spec/fixtures/get_entity_types.json +9 -0
  29. data/spec/fixtures/get_entity_types_address.json +59 -0
  30. data/spec/fixtures/get_entity_types_address_partial.json +43 -0
  31. data/spec/fixtures/get_entity_types_fancy_org.json +43 -0
  32. data/spec/fixtures/get_entity_types_fancy_org_partial.json +35 -0
  33. data/spec/fixtures/get_entity_types_person.json +42 -0
  34. data/spec/fixtures/get_entity_types_person_partial.json +34 -0
  35. data/spec/fixtures/get_relationship_types.json +9 -0
  36. data/spec/fixtures/get_relationship_types_person_fancy_org.json +41 -0
  37. data/spec/fixtures/get_relationship_types_person_fancy_org_partial.json +33 -0
  38. data/spec/fixtures/post_entities_fancy_org.json +8 -0
  39. data/spec/fixtures/post_entities_fancy_org_parent.json +8 -0
  40. data/spec/fixtures/post_entities_person.json +8 -0
  41. data/spec/fixtures/post_entity_types_address.json +9 -0
  42. data/spec/fixtures/post_entity_types_fancy_org.json +9 -0
  43. data/spec/fixtures/post_entity_types_person.json +9 -0
  44. data/spec/fixtures/post_relationship_types_person_fancy_org.json +16 -0
  45. data/spec/fixtures/put_entities_address.json +20 -0
  46. data/spec/fixtures/put_entities_person_relationship.json +29 -0
  47. data/spec/fixtures/put_entities_relationship.json +8 -0
  48. data/spec/fixtures/put_relationship_types_fields.json +33 -0
  49. data/spec/internal/app/models/address.rb +11 -0
  50. data/spec/internal/app/models/application_record.rb +5 -0
  51. data/spec/internal/app/models/assignment.rb +10 -0
  52. data/spec/internal/app/models/default.rb +6 -0
  53. data/spec/internal/app/models/namespaced/person.rb +18 -0
  54. data/spec/internal/app/models/organization.rb +12 -0
  55. data/spec/internal/config/database.yml +4 -0
  56. data/spec/internal/config/initializers/global_registry.rb +8 -0
  57. data/spec/internal/config/routes.rb +5 -0
  58. data/spec/internal/db/schema.rb +41 -0
  59. data/spec/internal/log/test.log +35717 -0
  60. data/spec/models/address_spec.rb +228 -0
  61. data/spec/models/assignment_spec.rb +200 -0
  62. data/spec/models/organization_spec.rb +127 -0
  63. data/spec/models/person_spec.rb +247 -0
  64. data/spec/spec_helper.rb +55 -0
  65. data/spec/workers/delete_gr_entity_worker_spec.rb +33 -0
  66. data/spec/workers/pull_mdm_id_worker_spec.rb +71 -0
  67. data/spec/workers/push_gr_entity_worker_spec.rb +27 -0
  68. data/spec/workers/push_relationship_worker_spec.rb +27 -0
  69. metadata +458 -0
metadata ADDED
@@ -0,0 +1,458 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: global-registry-bindings
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Brian Zoetewey
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-06-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 4.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 4.0.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
33
+ - !ruby/object:Gem::Dependency
34
+ name: global_registry
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '2'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '2'
53
+ - !ruby/object:Gem::Dependency
54
+ name: sidekiq
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '4.0'
60
+ - - "<"
61
+ - !ruby/object:Gem::Version
62
+ version: '6'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '4.0'
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '6'
73
+ - !ruby/object:Gem::Dependency
74
+ name: sidekiq-unique-jobs
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '4.0'
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '6'
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '6'
93
+ - !ruby/object:Gem::Dependency
94
+ name: combustion
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: 0.6.0
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: 0.6.0
107
+ - !ruby/object:Gem::Dependency
108
+ name: rails
109
+ requirement: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '4.2'
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 4.2.2
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '4.2'
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 4.2.2
127
+ - !ruby/object:Gem::Dependency
128
+ name: bundler
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '1.14'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '1.14'
141
+ - !ruby/object:Gem::Dependency
142
+ name: rake
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '12'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '12'
155
+ - !ruby/object:Gem::Dependency
156
+ name: rspec-rails
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: '3.5'
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 3.5.0
165
+ type: :development
166
+ prerelease: false
167
+ version_requirements: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '3.5'
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: 3.5.0
175
+ - !ruby/object:Gem::Dependency
176
+ name: webmock
177
+ requirement: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '3.0'
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: 3.0.0
185
+ type: :development
186
+ prerelease: false
187
+ version_requirements: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - "~>"
190
+ - !ruby/object:Gem::Version
191
+ version: '3.0'
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 3.0.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: factory_girl
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '4.8'
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 4.8.0
205
+ type: :development
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - "~>"
210
+ - !ruby/object:Gem::Version
211
+ version: '4.8'
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: 4.8.0
215
+ - !ruby/object:Gem::Dependency
216
+ name: rubocop
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - "~>"
220
+ - !ruby/object:Gem::Version
221
+ version: '0.48'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - "~>"
227
+ - !ruby/object:Gem::Version
228
+ version: '0.48'
229
+ - !ruby/object:Gem::Dependency
230
+ name: database_cleaner
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - "~>"
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - "~>"
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ - !ruby/object:Gem::Dependency
244
+ name: sqlite3
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - "~>"
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - "~>"
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ - !ruby/object:Gem::Dependency
258
+ name: mock_redis
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - "~>"
262
+ - !ruby/object:Gem::Version
263
+ version: 0.17.0
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - "~>"
269
+ - !ruby/object:Gem::Version
270
+ version: 0.17.0
271
+ - !ruby/object:Gem::Dependency
272
+ name: simplecov
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - "~>"
276
+ - !ruby/object:Gem::Version
277
+ version: 0.14.0
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - "~>"
283
+ - !ruby/object:Gem::Version
284
+ version: 0.14.0
285
+ - !ruby/object:Gem::Dependency
286
+ name: pry
287
+ requirement: !ruby/object:Gem::Requirement
288
+ requirements:
289
+ - - "~>"
290
+ - !ruby/object:Gem::Version
291
+ version: '0'
292
+ type: :development
293
+ prerelease: false
294
+ version_requirements: !ruby/object:Gem::Requirement
295
+ requirements:
296
+ - - "~>"
297
+ - !ruby/object:Gem::Version
298
+ version: '0'
299
+ - !ruby/object:Gem::Dependency
300
+ name: pry-byebug
301
+ requirement: !ruby/object:Gem::Requirement
302
+ requirements:
303
+ - - "~>"
304
+ - !ruby/object:Gem::Version
305
+ version: '0'
306
+ type: :development
307
+ prerelease: false
308
+ version_requirements: !ruby/object:Gem::Requirement
309
+ requirements:
310
+ - - "~>"
311
+ - !ruby/object:Gem::Version
312
+ version: '0'
313
+ description: Provides a common interface for mapping ActiveRecord models to Global
314
+ Registry entities and relationships.
315
+ email:
316
+ - brian.zoetewey@cru.org
317
+ executables: []
318
+ extensions: []
319
+ extra_rdoc_files: []
320
+ files:
321
+ - MIT-LICENSE
322
+ - README.md
323
+ - lib/global_registry_bindings.rb
324
+ - lib/global_registry_bindings/entity/delete_entity_methods.rb
325
+ - lib/global_registry_bindings/entity/entity_methods.rb
326
+ - lib/global_registry_bindings/entity/entity_type_methods.rb
327
+ - lib/global_registry_bindings/entity/mdm_methods.rb
328
+ - lib/global_registry_bindings/entity/push_entity_methods.rb
329
+ - lib/global_registry_bindings/entity/push_relationship_methods.rb
330
+ - lib/global_registry_bindings/entity/relationship_type_methods.rb
331
+ - lib/global_registry_bindings/exceptions.rb
332
+ - lib/global_registry_bindings/global_registry_bindings.rb
333
+ - lib/global_registry_bindings/options.rb
334
+ - lib/global_registry_bindings/options/class_options.rb
335
+ - lib/global_registry_bindings/options/instance_options.rb
336
+ - lib/global_registry_bindings/railtie.rb
337
+ - lib/global_registry_bindings/version.rb
338
+ - lib/global_registry_bindings/workers/delete_gr_entity_worker.rb
339
+ - lib/global_registry_bindings/workers/pull_mdm_id_worker.rb
340
+ - lib/global_registry_bindings/workers/push_gr_entity_worker.rb
341
+ - lib/global_registry_bindings/workers/push_relationship_worker.rb
342
+ - spec/acceptance/global_registry_bindings_spec.rb
343
+ - spec/factories/factories.rb
344
+ - spec/fixtures/get_entities_person.json
345
+ - spec/fixtures/get_entities_person_mdm.json
346
+ - spec/fixtures/get_entities_person_relationship.json
347
+ - spec/fixtures/get_entity_types.json
348
+ - spec/fixtures/get_entity_types_address.json
349
+ - spec/fixtures/get_entity_types_address_partial.json
350
+ - spec/fixtures/get_entity_types_fancy_org.json
351
+ - spec/fixtures/get_entity_types_fancy_org_partial.json
352
+ - spec/fixtures/get_entity_types_person.json
353
+ - spec/fixtures/get_entity_types_person_partial.json
354
+ - spec/fixtures/get_relationship_types.json
355
+ - spec/fixtures/get_relationship_types_person_fancy_org.json
356
+ - spec/fixtures/get_relationship_types_person_fancy_org_partial.json
357
+ - spec/fixtures/post_entities_fancy_org.json
358
+ - spec/fixtures/post_entities_fancy_org_parent.json
359
+ - spec/fixtures/post_entities_person.json
360
+ - spec/fixtures/post_entity_types_address.json
361
+ - spec/fixtures/post_entity_types_fancy_org.json
362
+ - spec/fixtures/post_entity_types_person.json
363
+ - spec/fixtures/post_relationship_types_person_fancy_org.json
364
+ - spec/fixtures/put_entities_address.json
365
+ - spec/fixtures/put_entities_person_relationship.json
366
+ - spec/fixtures/put_entities_relationship.json
367
+ - spec/fixtures/put_relationship_types_fields.json
368
+ - spec/internal/app/models/address.rb
369
+ - spec/internal/app/models/application_record.rb
370
+ - spec/internal/app/models/assignment.rb
371
+ - spec/internal/app/models/default.rb
372
+ - spec/internal/app/models/namespaced/person.rb
373
+ - spec/internal/app/models/organization.rb
374
+ - spec/internal/config/database.yml
375
+ - spec/internal/config/initializers/global_registry.rb
376
+ - spec/internal/config/routes.rb
377
+ - spec/internal/db/schema.rb
378
+ - spec/internal/log/test.log
379
+ - spec/models/address_spec.rb
380
+ - spec/models/assignment_spec.rb
381
+ - spec/models/organization_spec.rb
382
+ - spec/models/person_spec.rb
383
+ - spec/spec_helper.rb
384
+ - spec/workers/delete_gr_entity_worker_spec.rb
385
+ - spec/workers/pull_mdm_id_worker_spec.rb
386
+ - spec/workers/push_gr_entity_worker_spec.rb
387
+ - spec/workers/push_relationship_worker_spec.rb
388
+ homepage: https://github.com/CruGlobal/global-registry-bindings
389
+ licenses:
390
+ - MIT
391
+ metadata: {}
392
+ post_install_message:
393
+ rdoc_options: []
394
+ require_paths:
395
+ - lib
396
+ required_ruby_version: !ruby/object:Gem::Requirement
397
+ requirements:
398
+ - - ">="
399
+ - !ruby/object:Gem::Version
400
+ version: 2.3.0
401
+ required_rubygems_version: !ruby/object:Gem::Requirement
402
+ requirements:
403
+ - - ">="
404
+ - !ruby/object:Gem::Version
405
+ version: '0'
406
+ requirements: []
407
+ rubyforge_project:
408
+ rubygems_version: 2.5.2
409
+ signing_key:
410
+ specification_version: 4
411
+ summary: ActiveRecord bindings for Global Registry
412
+ test_files:
413
+ - spec/acceptance/global_registry_bindings_spec.rb
414
+ - spec/factories/factories.rb
415
+ - spec/fixtures/get_entities_person.json
416
+ - spec/fixtures/get_entities_person_mdm.json
417
+ - spec/fixtures/get_entities_person_relationship.json
418
+ - spec/fixtures/get_entity_types.json
419
+ - spec/fixtures/get_entity_types_address.json
420
+ - spec/fixtures/get_entity_types_address_partial.json
421
+ - spec/fixtures/get_entity_types_fancy_org.json
422
+ - spec/fixtures/get_entity_types_fancy_org_partial.json
423
+ - spec/fixtures/get_entity_types_person.json
424
+ - spec/fixtures/get_entity_types_person_partial.json
425
+ - spec/fixtures/get_relationship_types.json
426
+ - spec/fixtures/get_relationship_types_person_fancy_org.json
427
+ - spec/fixtures/get_relationship_types_person_fancy_org_partial.json
428
+ - spec/fixtures/post_entities_fancy_org.json
429
+ - spec/fixtures/post_entities_fancy_org_parent.json
430
+ - spec/fixtures/post_entities_person.json
431
+ - spec/fixtures/post_entity_types_address.json
432
+ - spec/fixtures/post_entity_types_fancy_org.json
433
+ - spec/fixtures/post_entity_types_person.json
434
+ - spec/fixtures/post_relationship_types_person_fancy_org.json
435
+ - spec/fixtures/put_entities_address.json
436
+ - spec/fixtures/put_entities_person_relationship.json
437
+ - spec/fixtures/put_entities_relationship.json
438
+ - spec/fixtures/put_relationship_types_fields.json
439
+ - spec/internal/app/models/address.rb
440
+ - spec/internal/app/models/application_record.rb
441
+ - spec/internal/app/models/assignment.rb
442
+ - spec/internal/app/models/default.rb
443
+ - spec/internal/app/models/namespaced/person.rb
444
+ - spec/internal/app/models/organization.rb
445
+ - spec/internal/config/database.yml
446
+ - spec/internal/config/initializers/global_registry.rb
447
+ - spec/internal/config/routes.rb
448
+ - spec/internal/db/schema.rb
449
+ - spec/internal/log/test.log
450
+ - spec/models/address_spec.rb
451
+ - spec/models/assignment_spec.rb
452
+ - spec/models/organization_spec.rb
453
+ - spec/models/person_spec.rb
454
+ - spec/spec_helper.rb
455
+ - spec/workers/delete_gr_entity_worker_spec.rb
456
+ - spec/workers/pull_mdm_id_worker_spec.rb
457
+ - spec/workers/push_gr_entity_worker_spec.rb
458
+ - spec/workers/push_relationship_worker_spec.rb