tucana 0.0.40 → 0.0.42
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/lib/tucana/generated/shared/shared.data_type_pb.rb +1 -1
- data/lib/tucana/generated/shared/shared.flow_definition_pb.rb +1 -1
- data/lib/tucana/generated/shared/shared.runtime_function_pb.rb +1 -1
- data/lib/tucana/shared/shared.data_type.rb +19 -24
- data/lib/tucana/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: add586d464b13411b6d92c081e32e4fdd378c70507025c0c36bdfc749f05fee1
|
|
4
|
+
data.tar.gz: 484c0a0e5dc2b84491666d48f30d65dbd095f7777cd501bfe084f06389b49ef8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b58936817c15d06f6b583fac36a3f98d440482c5024c9bf0ba6ccd117ff3736694410b995fa0f64193e1afdee2a33604a9ad9108b3109cbe1139f6c9f1f8d08
|
|
7
|
+
data.tar.gz: 985702518c6936fa15c18cd00db66694fa2491c31f3b318b77f8cdc2538929ddcea200edef78053eb2ac29ed03338ad944699e806e15cf47cf6630adde6e04f0
|
|
@@ -9,7 +9,7 @@ require_relative '../shared/shared.translation_pb'
|
|
|
9
9
|
require_relative '../shared/shared.version_pb'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
descriptor_data = "\n\x16shared.data_type.proto\x12\x06shared\x1a\x13shared.struct.proto\x1a\x18shared.translation.proto\x1a\x14shared.version.proto\"\
|
|
12
|
+
descriptor_data = "\n\x16shared.data_type.proto\x12\x06shared\x1a\x13shared.struct.proto\x1a\x18shared.translation.proto\x1a\x14shared.version.proto\"\xa4\x03\n\x12\x44\x65\x66initionDataType\x12\x33\n\x07variant\x18\x01 \x01(\x0e\x32\".shared.DefinitionDataType.Variant\x12\x12\n\nidentifier\x18\x02 \x01(\t\x12!\n\x04name\x18\x03 \x03(\x0b\x32\x13.shared.Translation\x12,\n\x0f\x64isplay_message\x18\x04 \x03(\x0b\x32\x13.shared.Translation\x12\"\n\x05\x61lias\x18\x05 \x03(\x0b\x32\x13.shared.Translation\x12-\n\x05rules\x18\x06 \x03(\x0b\x32\x1e.shared.DefinitionDataTypeRule\x12\x14\n\x0cgeneric_keys\x18\x07 \x03(\t\x12 \n\x07version\x18\x08 \x01(\x0b\x32\x0f.shared.Version\"i\n\x07Variant\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tPRIMITIVE\x10\x01\x12\x08\n\x04TYPE\x10\x02\x12\n\n\x06OBJECT\x10\x03\x12\x0c\n\x08\x44\x41TATYPE\x10\x04\x12\t\n\x05\x41RRAY\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\x08\n\x04NODE\x10\x07\"U\n\x11\x45xecutionDataType\x12\x12\n\nidentifier\x18\x01 \x01(\t\x12,\n\x05rules\x18\x02 \x03(\x0b\x32\x1d.shared.ExecutionDataTypeRule\"\xc6\x04\n\x16\x44\x65\x66initionDataTypeRule\x12G\n\x0c\x63ontains_key\x18\x01 \x01(\x0b\x32/.shared.DefinitionDataTypeContainsKeyRuleConfigH\x00\x12I\n\rcontains_type\x18\x02 \x01(\x0b\x32\x30.shared.DefinitionDataTypeContainsTypeRuleConfigH\x00\x12H\n\x12item_of_collection\x18\x03 \x01(\x0b\x32*.shared.DataTypeItemOfCollectionRuleConfigH\x00\x12=\n\x0cnumber_range\x18\x04 \x01(\x0b\x32%.shared.DataTypeNumberRangeRuleConfigH\x00\x12\x30\n\x05regex\x18\x05 \x01(\x0b\x32\x1f.shared.DataTypeRegexRuleConfigH\x00\x12\x45\n\x0binput_types\x18\x06 \x01(\x0b\x32..shared.DefinitionDataTypeInputTypesRuleConfigH\x00\x12\x45\n\x0breturn_type\x18\x07 \x01(\x0b\x32..shared.DefinitionDataTypeReturnTypeRuleConfigH\x00\x12\x45\n\x0bparent_type\x18\x08 \x01(\x0b\x32..shared.DefinitionDataTypeParentTypeRuleConfigH\x00\x42\x08\n\x06\x63onfig\"\xee\x02\n\x15\x45xecutionDataTypeRule\x12\x46\n\x0c\x63ontains_key\x18\x01 \x01(\x0b\x32..shared.ExecutionDataTypeContainsKeyRuleConfigH\x00\x12H\n\rcontains_type\x18\x02 \x01(\x0b\x32/.shared.ExecutionDataTypeContainsTypeRuleConfigH\x00\x12H\n\x12item_of_collection\x18\x03 \x01(\x0b\x32*.shared.DataTypeItemOfCollectionRuleConfigH\x00\x12=\n\x0cnumber_range\x18\x04 \x01(\x0b\x32%.shared.DataTypeNumberRangeRuleConfigH\x00\x12\x30\n\x05regex\x18\x05 \x01(\x0b\x32\x1f.shared.DataTypeRegexRuleConfigH\x00\x42\x08\n\x06\x63onfig\"Y\n&DefinitionDataTypeParentTypeRuleConfig\x12/\n\x0bparent_type\x18\x01 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\"p\n\'DefinitionDataTypeContainsKeyRuleConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x14\x64\x61ta_type_identifier\x18\x02 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\"S\n&ExecutionDataTypeContainsKeyRuleConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1c\n\x14\x64\x61ta_type_identifier\x18\x02 \x01(\t\"d\n(DefinitionDataTypeContainsTypeRuleConfig\x12\x38\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\"G\n\'ExecutionDataTypeContainsTypeRuleConfig\x12\x1c\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\t\"B\n\"DataTypeItemOfCollectionRuleConfig\x12\x1c\n\x05items\x18\x01 \x03(\x0b\x32\r.shared.Value\"W\n\x1d\x44\x61taTypeNumberRangeRuleConfig\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x03\x12\n\n\x02to\x18\x02 \x01(\x03\x12\x12\n\x05steps\x18\x03 \x01(\x03H\x00\x88\x01\x01\x42\x08\n\x06_steps\"*\n\x17\x44\x61taTypeRegexRuleConfig\x12\x0f\n\x07pattern\x18\x01 \x01(\t\"\xe8\x01\n&DefinitionDataTypeInputTypesRuleConfig\x12U\n\x0binput_types\x18\x01 \x03(\x0b\x32@.shared.DefinitionDataTypeInputTypesRuleConfig.DataTypeInputType\x1ag\n\x11\x44\x61taTypeInputType\x12\x38\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\x12\x18\n\x10input_identifier\x18\x02 \x01(\t\"b\n&DefinitionDataTypeReturnTypeRuleConfig\x12\x38\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\"\x80\x01\n\x12\x44\x61taTypeIdentifier\x12\x1e\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\tH\x00\x12+\n\x0cgeneric_type\x18\x02 \x01(\x0b\x32\x13.shared.GenericTypeH\x00\x12\x15\n\x0bgeneric_key\x18\x03 \x01(\tH\x00\x42\x06\n\x04type\"[\n\x0bGenericType\x12\x1c\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\t\x12.\n\x0fgeneric_mappers\x18\x02 \x03(\x0b\x32\x15.shared.GenericMapper\"\xd7\x01\n\rGenericMapper\x12*\n\x06source\x18\x01 \x03(\x0b\x32\x1a.shared.DataTypeIdentifier\x12\x0e\n\x06target\x18\x02 \x01(\t\x12N\n\x14generic_combinations\x18\x03 \x03(\x0e\x32\x30.shared.GenericMapper.GenericCombinationStrategy\":\n\x1aGenericCombinationStrategy\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x12\x06\n\x02OR\x10\x02\x42\x11\xea\x02\x0eTucana::Sharedb\x06proto3"
|
|
13
13
|
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
15
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -9,7 +9,7 @@ require_relative '../shared/shared.struct_pb'
|
|
|
9
9
|
require_relative '../shared/shared.version_pb'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
descriptor_data = "\n\x1cshared.flow_definition.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x13shared.struct.proto\x1a\x14shared.version.proto\"\
|
|
12
|
+
descriptor_data = "\n\x1cshared.flow_definition.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x13shared.struct.proto\x1a\x14shared.version.proto\"\xc6\x03\n\x08\x46lowType\x12\x12\n\nidentifier\x18\x01 \x01(\t\x12)\n\x08settings\x18\x02 \x03(\x0b\x32\x17.shared.FlowTypeSetting\x12\"\n\x15input_type_identifier\x18\x03 \x01(\tH\x00\x88\x01\x01\x12#\n\x16return_type_identifier\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08\x65\x64itable\x18\x05 \x01(\x08\x12!\n\x04name\x18\x06 \x03(\x0b\x32\x13.shared.Translation\x12(\n\x0b\x64\x65scription\x18\x07 \x03(\x0b\x32\x13.shared.Translation\x12*\n\rdocumentation\x18\x08 \x03(\x0b\x32\x13.shared.Translation\x12,\n\x0f\x64isplay_message\x18\t \x03(\x0b\x32\x13.shared.Translation\x12\"\n\x05\x61lias\x18\n \x03(\x0b\x32\x13.shared.Translation\x12 \n\x07version\x18\x0b \x01(\x0b\x32\x0f.shared.VersionB\x18\n\x16_input_type_identifierB\x19\n\x17_return_type_identifier\"\xdd\x01\n\x0f\x46lowTypeSetting\x12\x12\n\nidentifier\x18\x01 \x01(\t\x12\x0e\n\x06unique\x18\x02 \x01(\x08\x12\x1c\n\x14\x64\x61ta_type_identifier\x18\x03 \x01(\t\x12)\n\rdefault_value\x18\x04 \x01(\x0b\x32\r.shared.ValueH\x00\x88\x01\x01\x12!\n\x04name\x18\x05 \x03(\x0b\x32\x13.shared.Translation\x12(\n\x0b\x64\x65scription\x18\x06 \x03(\x0b\x32\x13.shared.TranslationB\x10\n\x0e_default_valueB\x11\xea\x02\x0eTucana::Sharedb\x06proto3"
|
|
13
13
|
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
15
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -10,7 +10,7 @@ require_relative '../shared/shared.struct_pb'
|
|
|
10
10
|
require_relative '../shared/shared.version_pb'
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
descriptor_data = "\n\x1dshared.runtime_function.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x16shared.data_type.proto\x1a\x13shared.struct.proto\x1a\x14shared.version.proto\"\
|
|
13
|
+
descriptor_data = "\n\x1dshared.runtime_function.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x16shared.data_type.proto\x1a\x13shared.struct.proto\x1a\x14shared.version.proto\"\xa3\x04\n\x19RuntimeFunctionDefinition\x12\x14\n\x0cruntime_name\x18\x01 \x01(\t\x12I\n\x1druntime_parameter_definitions\x18\x02 \x03(\x0b\x32\".shared.RuntimeParameterDefinition\x12?\n\x16return_type_identifier\x18\x03 \x01(\x0b\x32\x1a.shared.DataTypeIdentifierH\x00\x88\x01\x01\x12\x14\n\x0cthrows_error\x18\x04 \x01(\x08\x12\x14\n\x0cgeneric_keys\x18\x05 \x03(\t\x12!\n\x04name\x18\x06 \x03(\x0b\x32\x13.shared.Translation\x12(\n\x0b\x64\x65scription\x18\x07 \x03(\x0b\x32\x13.shared.Translation\x12*\n\rdocumentation\x18\x08 \x03(\x0b\x32\x13.shared.Translation\x12\x30\n\x13\x64\x65precation_message\x18\t \x03(\x0b\x32\x13.shared.Translation\x12,\n\x0f\x64isplay_message\x18\n \x03(\x0b\x32\x13.shared.Translation\x12\"\n\x05\x61lias\x18\x0b \x03(\x0b\x32\x13.shared.Translation\x12 \n\x07version\x18\x0c \x01(\x0b\x32\x0f.shared.VersionB\x19\n\x17_return_type_identifier\"\xa2\x02\n\x1aRuntimeParameterDefinition\x12\x38\n\x14\x64\x61ta_type_identifier\x18\x01 \x01(\x0b\x32\x1a.shared.DataTypeIdentifier\x12\x14\n\x0cruntime_name\x18\x02 \x01(\t\x12)\n\rdefault_value\x18\x03 \x01(\x0b\x32\r.shared.ValueH\x00\x88\x01\x01\x12!\n\x04name\x18\x04 \x03(\x0b\x32\x13.shared.Translation\x12(\n\x0b\x64\x65scription\x18\x05 \x03(\x0b\x32\x13.shared.Translation\x12*\n\rdocumentation\x18\x06 \x03(\x0b\x32\x13.shared.TranslationB\x10\n\x0e_default_valueB\x11\xea\x02\x0eTucana::Sharedb\x06proto3"
|
|
14
14
|
|
|
15
15
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
16
16
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -177,11 +177,13 @@ module Tucana
|
|
|
177
177
|
|
|
178
178
|
DataTypeIdentifier.class_eval do
|
|
179
179
|
def to_h
|
|
180
|
-
|
|
181
|
-
data_type_identifier: self.data_type_identifier
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
if !self.data_type_identifier.empty?
|
|
181
|
+
return { data_type_identifier: self.data_type_identifier }
|
|
182
|
+
elsif !self.generic_type.nil?
|
|
183
|
+
return { generic_type: self.generic_type.to_h }
|
|
184
|
+
elsif !self.generic_key.nil?
|
|
185
|
+
return { generic_key: self.generic_key }
|
|
186
|
+
end
|
|
185
187
|
end
|
|
186
188
|
|
|
187
189
|
def from_hash(config)
|
|
@@ -210,18 +212,18 @@ module Tucana
|
|
|
210
212
|
GenericType.class_eval do
|
|
211
213
|
def to_h
|
|
212
214
|
{
|
|
213
|
-
data_type_identifier: self.data_type_identifier
|
|
214
|
-
|
|
215
|
+
data_type_identifier: self.data_type_identifier,
|
|
216
|
+
generic_mappers: self.generic_mappers.map(&:to_h),
|
|
215
217
|
}
|
|
216
218
|
end
|
|
217
219
|
|
|
218
220
|
def from_hash(config)
|
|
219
221
|
if config.key?(:data_type_identifier)
|
|
220
|
-
self.data_type_identifier =
|
|
222
|
+
self.data_type_identifier = config.fetch(:data_type_identifier)
|
|
221
223
|
end
|
|
222
224
|
|
|
223
|
-
if config.key?(:
|
|
224
|
-
self.
|
|
225
|
+
if config.key?(:generic_mappers)
|
|
226
|
+
self.generic_mappers = config.fetch(:generic_mappers).map { |mapper_config| GenericMapper.from_hash(mapper_config) }
|
|
225
227
|
end
|
|
226
228
|
|
|
227
229
|
self
|
|
@@ -235,24 +237,17 @@ module Tucana
|
|
|
235
237
|
GenericMapper.class_eval do
|
|
236
238
|
def to_h
|
|
237
239
|
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
target: self.target,
|
|
241
|
+
source: self.source.to_h,
|
|
242
|
+
generic_combinations: self.generic_combinations.map(&:to_h),
|
|
241
243
|
}
|
|
242
244
|
end
|
|
243
245
|
|
|
244
246
|
def from_hash(config)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if config.key?(:data_type_identifier)
|
|
250
|
-
self.data_type_identifier = DataTypeIdentifier.from_hash(config.fetch(:data_type_identifier))
|
|
251
|
-
elsif config.key?(:generic_key)
|
|
252
|
-
self.generic_key = config.fetch(:generic_key)
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
self.source = config[:source]
|
|
247
|
+
self.target = config[:target]
|
|
248
|
+
self.source = DataTypeIdentifier.from_hash(config.fetch(:source))
|
|
249
|
+
self.generic_combinations = config.fetch(:generic_combinations, [])
|
|
250
|
+
self
|
|
256
251
|
end
|
|
257
252
|
|
|
258
253
|
def self.from_hash(config)
|
data/lib/tucana/version.rb
CHANGED