deimos-ruby 2.1.12 → 2.2.0.pre.beta1
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 +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +13 -6
- data/deimos-ruby.gemspec +1 -0
- data/docs/CONFIGURATION.md +14 -14
- data/lib/deimos/active_record_consume/message_consumption.rb +5 -1
- data/lib/deimos/config/configuration.rb +3 -1
- data/lib/deimos/consume/message_consumption.rb +21 -9
- data/lib/deimos/ext/producer_middleware.rb +25 -4
- data/lib/deimos/ext/schema_route.rb +5 -0
- data/lib/deimos/message.rb +3 -2
- data/lib/deimos/producer.rb +8 -3
- data/lib/deimos/schema_backends/avro_base.rb +9 -0
- data/lib/deimos/schema_backends/avro_schema_registry.rb +1 -1
- data/lib/deimos/schema_backends/base.rb +10 -0
- data/lib/deimos/schema_backends/proto_base.rb +92 -0
- data/lib/deimos/schema_backends/proto_schema_registry.rb +33 -0
- data/lib/deimos/transcoder.rb +6 -2
- data/lib/deimos/version.rb +1 -1
- data/lib/deimos.rb +9 -7
- data/lib/generators/deimos/schema_class_generator.rb +17 -6
- data/spec/gen/sample/v1/sample_pb.rb +20 -0
- data/spec/generators/schema_class/my_schema_with_complex_types_spec.rb +6 -5
- data/spec/protos/sample/v1/sample.proto +24 -0
- data/spec/schema_backends/proto_schema_registry_spec.rb +50 -0
- data/spec/schemas/com/my-namespace/MySchemaWithComplexTypes.avsc +5 -0
- data/spec/schemas/my_namespace/generated.rb +10 -3
- data/spec/schemas/my_namespace/my_schema_with_complex_type.rb +35 -9
- data/spec/snapshots/consumers-no-nest.snap +5 -0
- data/spec/snapshots/consumers.snap +5 -0
- data/spec/snapshots/consumers_and_producers-no-nest.snap +5 -0
- data/spec/snapshots/consumers_and_producers.snap +5 -0
- data/spec/snapshots/consumers_circular-no-nest.snap +5 -0
- data/spec/snapshots/consumers_circular.snap +5 -0
- data/spec/snapshots/consumers_complex_types-no-nest.snap +5 -0
- data/spec/snapshots/consumers_complex_types.snap +5 -0
- data/spec/snapshots/consumers_nested-no-nest.snap +5 -0
- data/spec/snapshots/consumers_nested.snap +5 -0
- data/spec/snapshots/namespace_folders.snap +5 -0
- data/spec/snapshots/namespace_map.snap +5 -0
- data/spec/snapshots/producers_with_key-no-nest.snap +5 -0
- data/spec/snapshots/producers_with_key.snap +5 -0
- metadata +23 -1
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deimos-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0.pre.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
@@ -161,6 +161,20 @@ dependencies:
|
|
161
161
|
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '4.2'
|
164
|
+
- !ruby/object:Gem::Dependency
|
165
|
+
name: proto_turf
|
166
|
+
requirement: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
type: :development
|
172
|
+
prerelease: false
|
173
|
+
version_requirements: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
164
178
|
- !ruby/object:Gem::Dependency
|
165
179
|
name: guard
|
166
180
|
requirement: !ruby/object:Gem::Requirement
|
@@ -483,6 +497,8 @@ files:
|
|
483
497
|
- lib/deimos/schema_backends/base.rb
|
484
498
|
- lib/deimos/schema_backends/mock.rb
|
485
499
|
- lib/deimos/schema_backends/plain.rb
|
500
|
+
- lib/deimos/schema_backends/proto_base.rb
|
501
|
+
- lib/deimos/schema_backends/proto_schema_registry.rb
|
486
502
|
- lib/deimos/schema_class/base.rb
|
487
503
|
- lib/deimos/schema_class/enum.rb
|
488
504
|
- lib/deimos/schema_class/record.rb
|
@@ -539,6 +555,7 @@ files:
|
|
539
555
|
- spec/batch_consumer_spec.rb
|
540
556
|
- spec/consumer_spec.rb
|
541
557
|
- spec/deimos_spec.rb
|
558
|
+
- spec/gen/sample/v1/sample_pb.rb
|
542
559
|
- spec/generators/active_record_generator_spec.rb
|
543
560
|
- spec/generators/schema_class/my_schema_spec.rb
|
544
561
|
- spec/generators/schema_class/my_schema_with_circular_reference_spec.rb
|
@@ -553,12 +570,14 @@ files:
|
|
553
570
|
- spec/logging_spec.rb
|
554
571
|
- spec/message_spec.rb
|
555
572
|
- spec/producer_spec.rb
|
573
|
+
- spec/protos/sample/v1/sample.proto
|
556
574
|
- spec/rake_spec.rb
|
557
575
|
- spec/schema_backends/avro_base_shared.rb
|
558
576
|
- spec/schema_backends/avro_local_spec.rb
|
559
577
|
- spec/schema_backends/avro_schema_registry_spec.rb
|
560
578
|
- spec/schema_backends/avro_validation_spec.rb
|
561
579
|
- spec/schema_backends/base_spec.rb
|
580
|
+
- spec/schema_backends/proto_schema_registry_spec.rb
|
562
581
|
- spec/schemas/com/my-namespace/Generated.avsc
|
563
582
|
- spec/schemas/com/my-namespace/MyNestedSchema.avsc
|
564
583
|
- spec/schemas/com/my-namespace/MySchema.avsc
|
@@ -669,6 +688,7 @@ test_files:
|
|
669
688
|
- spec/batch_consumer_spec.rb
|
670
689
|
- spec/consumer_spec.rb
|
671
690
|
- spec/deimos_spec.rb
|
691
|
+
- spec/gen/sample/v1/sample_pb.rb
|
672
692
|
- spec/generators/active_record_generator_spec.rb
|
673
693
|
- spec/generators/schema_class/my_schema_spec.rb
|
674
694
|
- spec/generators/schema_class/my_schema_with_circular_reference_spec.rb
|
@@ -683,12 +703,14 @@ test_files:
|
|
683
703
|
- spec/logging_spec.rb
|
684
704
|
- spec/message_spec.rb
|
685
705
|
- spec/producer_spec.rb
|
706
|
+
- spec/protos/sample/v1/sample.proto
|
686
707
|
- spec/rake_spec.rb
|
687
708
|
- spec/schema_backends/avro_base_shared.rb
|
688
709
|
- spec/schema_backends/avro_local_spec.rb
|
689
710
|
- spec/schema_backends/avro_schema_registry_spec.rb
|
690
711
|
- spec/schema_backends/avro_validation_spec.rb
|
691
712
|
- spec/schema_backends/base_spec.rb
|
713
|
+
- spec/schema_backends/proto_schema_registry_spec.rb
|
692
714
|
- spec/schemas/com/my-namespace/Generated.avsc
|
693
715
|
- spec/schemas/com/my-namespace/MyNestedSchema.avsc
|
694
716
|
- spec/schemas/com/my-namespace/MySchema.avsc
|