tucana 0.0.41 → 0.0.43
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 -2
- data/lib/tucana/generated/shared/shared.flow_definition_pb.rb +1 -2
- data/lib/tucana/generated/shared/shared.runtime_function_pb.rb +1 -2
- data/lib/tucana/shared/shared.data_type.rb +19 -24
- data/lib/tucana/version.rb +1 -1
- metadata +1 -2
- data/lib/tucana/generated/shared/shared.version_pb.rb +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad2b8adba035959f46fd54dfba8ee5a40c4cad5f1811dda9d05a2dc60d86e8c5
|
|
4
|
+
data.tar.gz: af94fb21fb79e822306e2fe70dddd1e4562fba4fc0a8004e778fd2de0e1685f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7d7720ad3496cb4b36cd5fd1cbef84d88699e23c381ff102615020fd212f688a124db27cb0326f82e959d15106491279d4cc029c16ba7a41e9a694fcdcc5181
|
|
7
|
+
data.tar.gz: 1e70d6aa672386186512388c09bb611f982e266197083f62d2d23c73831a708b4226440c4c959d18faf8aa267e1f9fb65f86f320b0f10d7bbe9def0a582fddc6
|
|
@@ -6,10 +6,9 @@ require 'google/protobuf'
|
|
|
6
6
|
|
|
7
7
|
require_relative '../shared/shared.struct_pb'
|
|
8
8
|
require_relative '../shared/shared.translation_pb'
|
|
9
|
-
require_relative '../shared/shared.version_pb'
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
descriptor_data = "\n\x16shared.data_type.proto\x12\x06shared\x1a\x13shared.struct.proto\x1a\x18shared.translation.proto\
|
|
11
|
+
descriptor_data = "\n\x16shared.data_type.proto\x12\x06shared\x1a\x13shared.struct.proto\x1a\x18shared.translation.proto\"\x93\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\x0f\n\x07version\x18\x08 \x01(\t\"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
12
|
|
|
14
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
14
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -6,10 +6,9 @@ require 'google/protobuf'
|
|
|
6
6
|
|
|
7
7
|
require_relative '../shared/shared.translation_pb'
|
|
8
8
|
require_relative '../shared/shared.struct_pb'
|
|
9
|
-
require_relative '../shared/shared.version_pb'
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
descriptor_data = "\n\x1cshared.flow_definition.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x13shared.struct.proto\
|
|
11
|
+
descriptor_data = "\n\x1cshared.flow_definition.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x13shared.struct.proto\"\xb5\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\x0f\n\x07version\x18\x0b \x01(\tB\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
12
|
|
|
14
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
14
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -7,10 +7,9 @@ require 'google/protobuf'
|
|
|
7
7
|
require_relative '../shared/shared.translation_pb'
|
|
8
8
|
require_relative '../shared/shared.data_type_pb'
|
|
9
9
|
require_relative '../shared/shared.struct_pb'
|
|
10
|
-
require_relative '../shared/shared.version_pb'
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
descriptor_data = "\n\x1dshared.runtime_function.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x16shared.data_type.proto\x1a\x13shared.struct.proto\
|
|
12
|
+
descriptor_data = "\n\x1dshared.runtime_function.proto\x12\x06shared\x1a\x18shared.translation.proto\x1a\x16shared.data_type.proto\x1a\x13shared.struct.proto\"\x92\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\x0f\n\x07version\x18\x0c \x01(\tB\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
13
|
|
|
15
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
16
15
|
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
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tucana
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.43
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Niklas van Schrick
|
|
@@ -103,7 +103,6 @@ files:
|
|
|
103
103
|
- lib/tucana/generated/shared/shared.runtime_function_pb.rb
|
|
104
104
|
- lib/tucana/generated/shared/shared.struct_pb.rb
|
|
105
105
|
- lib/tucana/generated/shared/shared.translation_pb.rb
|
|
106
|
-
- lib/tucana/generated/shared/shared.version_pb.rb
|
|
107
106
|
- lib/tucana/shared/shared.data_type.rb
|
|
108
107
|
- lib/tucana/shared/shared.struct.rb
|
|
109
108
|
- lib/tucana/version.rb
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# source: shared.version.proto
|
|
4
|
-
|
|
5
|
-
require 'google/protobuf'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
descriptor_data = "\n\x14shared.version.proto\x12\x06shared\"6\n\x07Version\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\x42\x11\xea\x02\x0eTucana::Sharedb\x06proto3"
|
|
9
|
-
|
|
10
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
-
pool.add_serialized_file(descriptor_data)
|
|
12
|
-
|
|
13
|
-
module Tucana
|
|
14
|
-
module Shared
|
|
15
|
-
Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("shared.Version").msgclass
|
|
16
|
-
end
|
|
17
|
-
end
|