deimos-ruby 1.13.2 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +6 -0
  4. data/deimos-ruby.gemspec +1 -0
  5. data/lib/deimos/active_record_consume/message_consumption.rb +2 -1
  6. data/lib/deimos/config/configuration.rb +4 -0
  7. data/lib/deimos/schema_backends/avro_base.rb +1 -1
  8. data/lib/deimos/schema_class/base.rb +17 -0
  9. data/lib/deimos/test_helpers.rb +1 -1
  10. data/lib/deimos/version.rb +1 -1
  11. data/lib/generators/deimos/active_record/templates/migration.rb.tt +5 -3
  12. data/lib/generators/deimos/active_record_generator.rb +1 -1
  13. data/lib/generators/deimos/schema_class/templates/schema_class.rb.tt +0 -7
  14. data/lib/generators/deimos/schema_class/templates/schema_record.rb.tt +10 -1
  15. data/lib/generators/deimos/schema_class_generator.rb +19 -7
  16. data/spec/active_record_consumer_spec.rb +21 -0
  17. data/spec/generators/active_record_generator_spec.rb +4 -2
  18. data/spec/generators/schema_class/my_schema_with_complex_types_spec.rb +37 -24
  19. data/spec/generators/schema_class_generator_spec.rb +93 -55
  20. data/spec/producer_spec.rb +1 -1
  21. data/spec/schemas/com/my-namespace/MySchemaId_key.avsc +12 -0
  22. data/spec/schemas/generated.rb +159 -0
  23. data/spec/schemas/my_nested_schema.rb +117 -0
  24. data/spec/{schema_classes → schemas}/my_schema.rb +1 -0
  25. data/spec/{schema_classes → schemas}/my_schema_key.rb +1 -0
  26. data/spec/schemas/my_schema_with_circular_reference.rb +77 -0
  27. data/spec/schemas/my_schema_with_complex_type.rb +239 -0
  28. data/spec/{schema_classes/generated.rb → snapshots/consumers-no-nest.snap} +20 -1
  29. data/spec/snapshots/consumers.snap +161 -0
  30. data/spec/snapshots/consumers_and_producers-no-nest.snap +397 -0
  31. data/spec/snapshots/consumers_and_producers.snap +377 -0
  32. data/spec/{schema_classes/my_schema_with_circular_reference.rb → snapshots/consumers_circular-no-nest.snap} +37 -26
  33. data/spec/snapshots/consumers_circular.snap +79 -0
  34. data/spec/{schema_classes/my_schema_with_complex_types.rb → snapshots/consumers_complex_types-no-nest.snap} +57 -22
  35. data/spec/snapshots/consumers_complex_types.snap +241 -0
  36. data/spec/{schema_classes/my_nested_schema.rb → snapshots/consumers_nested-no-nest.snap} +12 -1
  37. data/spec/snapshots/consumers_nested.snap +119 -0
  38. data/spec/snapshots/producers_with_key-no-nest.snap +95 -0
  39. data/spec/snapshots/producers_with_key.snap +95 -0
  40. data/spec/spec_helper.rb +4 -1
  41. metadata +54 -14
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.2
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-07 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf
@@ -302,6 +302,20 @@ dependencies:
302
302
  - - "~>"
303
303
  - !ruby/object:Gem::Version
304
304
  version: '4'
305
+ - !ruby/object:Gem::Dependency
306
+ name: rspec-snapshot
307
+ requirement: !ruby/object:Gem::Requirement
308
+ requirements:
309
+ - - "~>"
310
+ - !ruby/object:Gem::Version
311
+ version: '2.0'
312
+ type: :development
313
+ prerelease: false
314
+ version_requirements: !ruby/object:Gem::Requirement
315
+ requirements:
316
+ - - "~>"
317
+ - !ruby/object:Gem::Version
318
+ version: '2.0'
305
319
  - !ruby/object:Gem::Dependency
306
320
  name: rubocop
307
321
  requirement: !ruby/object:Gem::Requirement
@@ -481,16 +495,11 @@ files:
481
495
  - spec/schema_backends/avro_schema_registry_spec.rb
482
496
  - spec/schema_backends/avro_validation_spec.rb
483
497
  - spec/schema_backends/base_spec.rb
484
- - spec/schema_classes/generated.rb
485
- - spec/schema_classes/my_nested_schema.rb
486
- - spec/schema_classes/my_schema.rb
487
- - spec/schema_classes/my_schema_key.rb
488
- - spec/schema_classes/my_schema_with_circular_reference.rb
489
- - spec/schema_classes/my_schema_with_complex_types.rb
490
498
  - spec/schemas/com/my-namespace/Generated.avsc
491
499
  - spec/schemas/com/my-namespace/MyNestedSchema.avsc
492
500
  - spec/schemas/com/my-namespace/MySchema.avsc
493
501
  - spec/schemas/com/my-namespace/MySchemaCompound_key.avsc
502
+ - spec/schemas/com/my-namespace/MySchemaId_key.avsc
494
503
  - spec/schemas/com/my-namespace/MySchemaWithBooleans.avsc
495
504
  - spec/schemas/com/my-namespace/MySchemaWithCircularReference.avsc
496
505
  - spec/schemas/com/my-namespace/MySchemaWithComplexTypes.avsc
@@ -507,6 +516,24 @@ files:
507
516
  - spec/schemas/com/my-namespace/response/CreateTopic.avsc
508
517
  - spec/schemas/com/my-namespace/response/Index.avsc
509
518
  - spec/schemas/com/my-namespace/response/UpdateResponse.avsc
519
+ - spec/schemas/generated.rb
520
+ - spec/schemas/my_nested_schema.rb
521
+ - spec/schemas/my_schema.rb
522
+ - spec/schemas/my_schema_key.rb
523
+ - spec/schemas/my_schema_with_circular_reference.rb
524
+ - spec/schemas/my_schema_with_complex_type.rb
525
+ - spec/snapshots/consumers-no-nest.snap
526
+ - spec/snapshots/consumers.snap
527
+ - spec/snapshots/consumers_and_producers-no-nest.snap
528
+ - spec/snapshots/consumers_and_producers.snap
529
+ - spec/snapshots/consumers_circular-no-nest.snap
530
+ - spec/snapshots/consumers_circular.snap
531
+ - spec/snapshots/consumers_complex_types-no-nest.snap
532
+ - spec/snapshots/consumers_complex_types.snap
533
+ - spec/snapshots/consumers_nested-no-nest.snap
534
+ - spec/snapshots/consumers_nested.snap
535
+ - spec/snapshots/producers_with_key-no-nest.snap
536
+ - spec/snapshots/producers_with_key.snap
510
537
  - spec/spec_helper.rb
511
538
  - spec/utils/db_poller_spec.rb
512
539
  - spec/utils/db_producer_spec.rb
@@ -575,16 +602,11 @@ test_files:
575
602
  - spec/schema_backends/avro_schema_registry_spec.rb
576
603
  - spec/schema_backends/avro_validation_spec.rb
577
604
  - spec/schema_backends/base_spec.rb
578
- - spec/schema_classes/generated.rb
579
- - spec/schema_classes/my_nested_schema.rb
580
- - spec/schema_classes/my_schema.rb
581
- - spec/schema_classes/my_schema_key.rb
582
- - spec/schema_classes/my_schema_with_circular_reference.rb
583
- - spec/schema_classes/my_schema_with_complex_types.rb
584
605
  - spec/schemas/com/my-namespace/Generated.avsc
585
606
  - spec/schemas/com/my-namespace/MyNestedSchema.avsc
586
607
  - spec/schemas/com/my-namespace/MySchema.avsc
587
608
  - spec/schemas/com/my-namespace/MySchemaCompound_key.avsc
609
+ - spec/schemas/com/my-namespace/MySchemaId_key.avsc
588
610
  - spec/schemas/com/my-namespace/MySchemaWithBooleans.avsc
589
611
  - spec/schemas/com/my-namespace/MySchemaWithCircularReference.avsc
590
612
  - spec/schemas/com/my-namespace/MySchemaWithComplexTypes.avsc
@@ -601,6 +623,24 @@ test_files:
601
623
  - spec/schemas/com/my-namespace/response/CreateTopic.avsc
602
624
  - spec/schemas/com/my-namespace/response/Index.avsc
603
625
  - spec/schemas/com/my-namespace/response/UpdateResponse.avsc
626
+ - spec/schemas/generated.rb
627
+ - spec/schemas/my_nested_schema.rb
628
+ - spec/schemas/my_schema.rb
629
+ - spec/schemas/my_schema_key.rb
630
+ - spec/schemas/my_schema_with_circular_reference.rb
631
+ - spec/schemas/my_schema_with_complex_type.rb
632
+ - spec/snapshots/consumers-no-nest.snap
633
+ - spec/snapshots/consumers.snap
634
+ - spec/snapshots/consumers_and_producers-no-nest.snap
635
+ - spec/snapshots/consumers_and_producers.snap
636
+ - spec/snapshots/consumers_circular-no-nest.snap
637
+ - spec/snapshots/consumers_circular.snap
638
+ - spec/snapshots/consumers_complex_types-no-nest.snap
639
+ - spec/snapshots/consumers_complex_types.snap
640
+ - spec/snapshots/consumers_nested-no-nest.snap
641
+ - spec/snapshots/consumers_nested.snap
642
+ - spec/snapshots/producers_with_key-no-nest.snap
643
+ - spec/snapshots/producers_with_key.snap
604
644
  - spec/spec_helper.rb
605
645
  - spec/utils/db_poller_spec.rb
606
646
  - spec/utils/db_producer_spec.rb