deimos-ruby 1.23.3 → 1.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/docs/CONFIGURATION.md +2 -1
- data/lib/deimos/config/configuration.rb +7 -1
- data/lib/deimos/utils/schema_class.rb +18 -3
- data/lib/deimos/version.rb +1 -1
- data/lib/generators/deimos/schema_class_generator.rb +9 -2
- data/regenerate_test_schema_classes.rb +13 -2
- data/spec/active_record_batch_consumer_spec.rb +1 -1
- data/spec/active_record_consumer_spec.rb +1 -1
- data/spec/active_record_producer_spec.rb +1 -1
- data/spec/batch_consumer_spec.rb +1 -1
- data/spec/consumer_spec.rb +2 -2
- data/spec/generators/schema_class_generator_spec.rb +18 -1
- data/spec/schemas/com/my-namespace/my-suborg/MyLongNamespaceSchema.avsc +18 -0
- data/spec/schemas/my_namespace/generated.rb +1 -1
- data/spec/schemas/my_namespace/my_long_namespace_schema.rb +48 -0
- data/spec/schemas/my_namespace/my_nested_schema.rb +1 -1
- data/spec/schemas/my_namespace/my_schema.rb +1 -1
- data/spec/schemas/my_namespace/my_schema_with_circular_reference.rb +1 -1
- data/spec/schemas/my_namespace/my_schema_with_complex_type.rb +2 -2
- data/spec/schemas/my_namespace/my_updated_schema.rb +2 -1
- data/spec/schemas/{request → my_namespace/request}/create_topic.rb +2 -2
- data/spec/schemas/{request → my_namespace/request}/index.rb +2 -2
- data/spec/schemas/{request → my_namespace/request}/update_request.rb +2 -2
- data/spec/schemas/{response → my_namespace/response}/create_topic.rb +2 -2
- data/spec/schemas/{response → my_namespace/response}/index.rb +2 -2
- data/spec/schemas/{response → my_namespace/response}/update_response.rb +2 -2
- data/spec/snapshots/consumers-no-nest.snap +44 -0
- data/spec/snapshots/consumers.snap +44 -0
- data/spec/snapshots/consumers_and_producers-no-nest.snap +44 -0
- data/spec/snapshots/consumers_and_producers.snap +44 -0
- data/spec/snapshots/consumers_circular-no-nest.snap +44 -0
- data/spec/snapshots/consumers_circular.snap +44 -0
- data/spec/snapshots/consumers_complex_types-no-nest.snap +44 -0
- data/spec/snapshots/consumers_complex_types.snap +44 -0
- data/spec/snapshots/consumers_nested-no-nest.snap +44 -0
- data/spec/snapshots/consumers_nested.snap +44 -0
- data/spec/snapshots/namespace_folders.snap +254 -210
- data/spec/snapshots/namespace_map.snap +1450 -0
- data/spec/snapshots/producers_with_key-no-nest.snap +44 -0
- data/spec/snapshots/producers_with_key.snap +44 -0
- metadata +20 -14
@@ -234,6 +234,50 @@ module Schemas
|
|
234
234
|
end
|
235
235
|
|
236
236
|
|
237
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
238
|
+
# frozen_string_literal: true
|
239
|
+
|
240
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
241
|
+
module Schemas
|
242
|
+
### Primary Schema Class ###
|
243
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
244
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
245
|
+
|
246
|
+
### Attribute Accessors ###
|
247
|
+
# @return [String]
|
248
|
+
attr_accessor :test_id
|
249
|
+
# @return [Integer]
|
250
|
+
attr_accessor :some_int
|
251
|
+
|
252
|
+
# @override
|
253
|
+
def initialize(test_id: nil,
|
254
|
+
some_int: nil)
|
255
|
+
super
|
256
|
+
self.test_id = test_id
|
257
|
+
self.some_int = some_int
|
258
|
+
end
|
259
|
+
|
260
|
+
# @override
|
261
|
+
def schema
|
262
|
+
'MyLongNamespaceSchema'
|
263
|
+
end
|
264
|
+
|
265
|
+
# @override
|
266
|
+
def namespace
|
267
|
+
'com.my-namespace.my-suborg'
|
268
|
+
end
|
269
|
+
|
270
|
+
# @override
|
271
|
+
def as_json(_opts={})
|
272
|
+
{
|
273
|
+
'test_id' => @test_id,
|
274
|
+
'some_int' => @some_int
|
275
|
+
}
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
|
237
281
|
spec/app/lib/schema_classes/my_nested_schema.rb:
|
238
282
|
# frozen_string_literal: true
|
239
283
|
|
@@ -260,6 +260,50 @@ module Schemas
|
|
260
260
|
end
|
261
261
|
|
262
262
|
|
263
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
264
|
+
# frozen_string_literal: true
|
265
|
+
|
266
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
267
|
+
module Schemas
|
268
|
+
### Primary Schema Class ###
|
269
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
270
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
271
|
+
|
272
|
+
### Attribute Accessors ###
|
273
|
+
# @return [String]
|
274
|
+
attr_accessor :test_id
|
275
|
+
# @return [Integer]
|
276
|
+
attr_accessor :some_int
|
277
|
+
|
278
|
+
# @override
|
279
|
+
def initialize(test_id: nil,
|
280
|
+
some_int: nil)
|
281
|
+
super
|
282
|
+
self.test_id = test_id
|
283
|
+
self.some_int = some_int
|
284
|
+
end
|
285
|
+
|
286
|
+
# @override
|
287
|
+
def schema
|
288
|
+
'MyLongNamespaceSchema'
|
289
|
+
end
|
290
|
+
|
291
|
+
# @override
|
292
|
+
def namespace
|
293
|
+
'com.my-namespace.my-suborg'
|
294
|
+
end
|
295
|
+
|
296
|
+
# @override
|
297
|
+
def as_json(_opts={})
|
298
|
+
{
|
299
|
+
'test_id' => @test_id,
|
300
|
+
'some_int' => @some_int
|
301
|
+
}
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
|
263
307
|
spec/app/lib/schema_classes/my_nested_record.rb:
|
264
308
|
# frozen_string_literal: true
|
265
309
|
|
@@ -227,6 +227,50 @@ module Schemas
|
|
227
227
|
end
|
228
228
|
|
229
229
|
|
230
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
231
|
+
# frozen_string_literal: true
|
232
|
+
|
233
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
234
|
+
module Schemas
|
235
|
+
### Primary Schema Class ###
|
236
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
237
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
238
|
+
|
239
|
+
### Attribute Accessors ###
|
240
|
+
# @return [String]
|
241
|
+
attr_accessor :test_id
|
242
|
+
# @return [Integer]
|
243
|
+
attr_accessor :some_int
|
244
|
+
|
245
|
+
# @override
|
246
|
+
def initialize(test_id: nil,
|
247
|
+
some_int: nil)
|
248
|
+
super
|
249
|
+
self.test_id = test_id
|
250
|
+
self.some_int = some_int
|
251
|
+
end
|
252
|
+
|
253
|
+
# @override
|
254
|
+
def schema
|
255
|
+
'MyLongNamespaceSchema'
|
256
|
+
end
|
257
|
+
|
258
|
+
# @override
|
259
|
+
def namespace
|
260
|
+
'com.my-namespace.my-suborg'
|
261
|
+
end
|
262
|
+
|
263
|
+
# @override
|
264
|
+
def as_json(_opts={})
|
265
|
+
{
|
266
|
+
'test_id' => @test_id,
|
267
|
+
'some_int' => @some_int
|
268
|
+
}
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
|
230
274
|
spec/app/lib/schema_classes/my_nested_schema.rb:
|
231
275
|
# frozen_string_literal: true
|
232
276
|
|
@@ -260,6 +260,50 @@ module Schemas
|
|
260
260
|
end
|
261
261
|
|
262
262
|
|
263
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
264
|
+
# frozen_string_literal: true
|
265
|
+
|
266
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
267
|
+
module Schemas
|
268
|
+
### Primary Schema Class ###
|
269
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
270
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
271
|
+
|
272
|
+
### Attribute Accessors ###
|
273
|
+
# @return [String]
|
274
|
+
attr_accessor :test_id
|
275
|
+
# @return [Integer]
|
276
|
+
attr_accessor :some_int
|
277
|
+
|
278
|
+
# @override
|
279
|
+
def initialize(test_id: nil,
|
280
|
+
some_int: nil)
|
281
|
+
super
|
282
|
+
self.test_id = test_id
|
283
|
+
self.some_int = some_int
|
284
|
+
end
|
285
|
+
|
286
|
+
# @override
|
287
|
+
def schema
|
288
|
+
'MyLongNamespaceSchema'
|
289
|
+
end
|
290
|
+
|
291
|
+
# @override
|
292
|
+
def namespace
|
293
|
+
'com.my-namespace.my-suborg'
|
294
|
+
end
|
295
|
+
|
296
|
+
# @override
|
297
|
+
def as_json(_opts={})
|
298
|
+
{
|
299
|
+
'test_id' => @test_id,
|
300
|
+
'some_int' => @some_int
|
301
|
+
}
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
|
263
307
|
spec/app/lib/schema_classes/my_nested_record.rb:
|
264
308
|
# frozen_string_literal: true
|
265
309
|
|
@@ -227,6 +227,50 @@ module Schemas
|
|
227
227
|
end
|
228
228
|
|
229
229
|
|
230
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
231
|
+
# frozen_string_literal: true
|
232
|
+
|
233
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
234
|
+
module Schemas
|
235
|
+
### Primary Schema Class ###
|
236
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
237
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
238
|
+
|
239
|
+
### Attribute Accessors ###
|
240
|
+
# @return [String]
|
241
|
+
attr_accessor :test_id
|
242
|
+
# @return [Integer]
|
243
|
+
attr_accessor :some_int
|
244
|
+
|
245
|
+
# @override
|
246
|
+
def initialize(test_id: nil,
|
247
|
+
some_int: nil)
|
248
|
+
super
|
249
|
+
self.test_id = test_id
|
250
|
+
self.some_int = some_int
|
251
|
+
end
|
252
|
+
|
253
|
+
# @override
|
254
|
+
def schema
|
255
|
+
'MyLongNamespaceSchema'
|
256
|
+
end
|
257
|
+
|
258
|
+
# @override
|
259
|
+
def namespace
|
260
|
+
'com.my-namespace.my-suborg'
|
261
|
+
end
|
262
|
+
|
263
|
+
# @override
|
264
|
+
def as_json(_opts={})
|
265
|
+
{
|
266
|
+
'test_id' => @test_id,
|
267
|
+
'some_int' => @some_int
|
268
|
+
}
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
|
230
274
|
spec/app/lib/schema_classes/my_nested_schema.rb:
|
231
275
|
# frozen_string_literal: true
|
232
276
|
|
@@ -260,6 +260,50 @@ module Schemas
|
|
260
260
|
end
|
261
261
|
|
262
262
|
|
263
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
264
|
+
# frozen_string_literal: true
|
265
|
+
|
266
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
267
|
+
module Schemas
|
268
|
+
### Primary Schema Class ###
|
269
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
270
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
271
|
+
|
272
|
+
### Attribute Accessors ###
|
273
|
+
# @return [String]
|
274
|
+
attr_accessor :test_id
|
275
|
+
# @return [Integer]
|
276
|
+
attr_accessor :some_int
|
277
|
+
|
278
|
+
# @override
|
279
|
+
def initialize(test_id: nil,
|
280
|
+
some_int: nil)
|
281
|
+
super
|
282
|
+
self.test_id = test_id
|
283
|
+
self.some_int = some_int
|
284
|
+
end
|
285
|
+
|
286
|
+
# @override
|
287
|
+
def schema
|
288
|
+
'MyLongNamespaceSchema'
|
289
|
+
end
|
290
|
+
|
291
|
+
# @override
|
292
|
+
def namespace
|
293
|
+
'com.my-namespace.my-suborg'
|
294
|
+
end
|
295
|
+
|
296
|
+
# @override
|
297
|
+
def as_json(_opts={})
|
298
|
+
{
|
299
|
+
'test_id' => @test_id,
|
300
|
+
'some_int' => @some_int
|
301
|
+
}
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
|
263
307
|
spec/app/lib/schema_classes/my_nested_record.rb:
|
264
308
|
# frozen_string_literal: true
|
265
309
|
|
@@ -227,6 +227,50 @@ module Schemas
|
|
227
227
|
end
|
228
228
|
|
229
229
|
|
230
|
+
spec/app/lib/schema_classes/my_long_namespace_schema.rb:
|
231
|
+
# frozen_string_literal: true
|
232
|
+
|
233
|
+
# This file is autogenerated by Deimos, Do NOT modify
|
234
|
+
module Schemas
|
235
|
+
### Primary Schema Class ###
|
236
|
+
# Autogenerated Schema for Record at com.my-namespace.my-suborg.MyLongNamespaceSchema
|
237
|
+
class MyLongNamespaceSchema < Deimos::SchemaClass::Record
|
238
|
+
|
239
|
+
### Attribute Accessors ###
|
240
|
+
# @return [String]
|
241
|
+
attr_accessor :test_id
|
242
|
+
# @return [Integer]
|
243
|
+
attr_accessor :some_int
|
244
|
+
|
245
|
+
# @override
|
246
|
+
def initialize(test_id: nil,
|
247
|
+
some_int: nil)
|
248
|
+
super
|
249
|
+
self.test_id = test_id
|
250
|
+
self.some_int = some_int
|
251
|
+
end
|
252
|
+
|
253
|
+
# @override
|
254
|
+
def schema
|
255
|
+
'MyLongNamespaceSchema'
|
256
|
+
end
|
257
|
+
|
258
|
+
# @override
|
259
|
+
def namespace
|
260
|
+
'com.my-namespace.my-suborg'
|
261
|
+
end
|
262
|
+
|
263
|
+
# @override
|
264
|
+
def as_json(_opts={})
|
265
|
+
{
|
266
|
+
'test_id' => @test_id,
|
267
|
+
'some_int' => @some_int
|
268
|
+
}
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
|
230
274
|
spec/app/lib/schema_classes/my_nested_schema.rb:
|
231
275
|
# frozen_string_literal: true
|
232
276
|
|