foobara 0.2.7 → 0.4.1
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/CHANGELOG.md +15 -0
- data/README.md +35 -118
- data/lib/foobara/all.rb +22 -0
- data/projects/command/lib/foobara/command.rb +6 -3
- data/projects/command/src/command_pattern_implementation/concerns/namespace.rb +0 -2
- data/projects/command/src/command_pattern_implementation/concerns/reflection.rb +0 -2
- data/projects/command/src/command_pattern_implementation/concerns/subcommands.rb +3 -1
- data/projects/command/src/command_pattern_implementation/concerns/transactions.rb +2 -0
- data/projects/command/src/extensions/domain/domain_module_extension.rb +16 -0
- data/projects/command/src/extensions/domain/domain_module_extension_extension.rb +22 -0
- data/projects/command/src/extensions/foobara.rb +7 -0
- data/projects/command_connectors/Guardfile +6 -0
- data/projects/command_connectors/lib/foobara/command_connectors.rb +1 -1
- data/projects/command_connectors/spec/ambiguous_lookups_spec.rb +143 -0
- data/projects/command_connectors/spec/command_connector_spec.rb +2443 -0
- data/projects/command_connectors/spec/command_registry_spec.rb +9 -0
- data/projects/command_connectors/spec/commands/describe_spec.rb +83 -0
- data/projects/command_connectors/spec/commands/ping_spec.rb +14 -0
- data/projects/command_connectors/spec/commands/query_git_commit_info_spec.rb +55 -0
- data/projects/command_connectors/spec/fixtures/command_connectors/manifest_with_errors_with_missing_command_parents.yaml +1662 -0
- data/projects/command_connectors/spec/not_found_error_spec.rb +17 -0
- data/projects/command_connectors/spec/pre_commit_transformers/load_atoms_pre_commit_transformer_spec.rb +105 -0
- data/projects/command_connectors/spec/request_spec.rb +95 -0
- data/projects/command_connectors/spec/serializer_spec.rb +9 -0
- data/projects/command_connectors/spec/serializers/aggregate_serializer_spec.rb +45 -0
- data/projects/command_connectors/spec/serializers/atomic_serializer_spec.rb +68 -0
- data/projects/command_connectors/spec/serializers/entities_to_primary_keys_serializer_spec.rb +36 -0
- data/projects/command_connectors/spec/serializers/json_serializer_spec.rb +22 -0
- data/projects/command_connectors/spec/serializers/noop_serializer_spec.rb +22 -0
- data/projects/command_connectors/spec/serializers/yaml_serializer_spec.rb +22 -0
- data/projects/command_connectors/spec/spec_helper.rb +51 -0
- data/projects/command_connectors/spec/support/rubyprof.rb +32 -0
- data/projects/command_connectors/spec/support/term_trap.rb +6 -0
- data/projects/command_connectors/spec/transformers/entity_to_primary_key_inputs_transformer_spec.rb +119 -0
- data/projects/command_connectors/src/command_connector/commands/describe.rb +4 -2
- data/projects/command_connectors/src/command_connector/concerns/reflection.rb +187 -0
- data/projects/command_connectors/src/command_connector.rb +139 -264
- data/projects/command_connectors/src/command_registry/exposed_command.rb +6 -4
- data/projects/command_connectors/src/command_registry.rb +50 -48
- data/projects/command_connectors/src/transformed_command.rb +166 -114
- data/projects/command_connectors/src/transformers/load_atoms_transformer.rb +2 -0
- data/projects/command_connectors/src/transformers/load_delegated_attributes_entities_pre_commit_transformer.rb +2 -0
- data/projects/domain_mapper/lib/foobara/domain_mapper.rb +4 -0
- data/projects/domain_mapper/src/domain_mapper.rb +2 -0
- data/projects/{detached_entity → entities/projects/detached_entity}/lib/foobara/detached_entity.rb +4 -0
- data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/primary_key.rb +3 -1
- data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/types.rb +9 -1
- data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/builtin_types/detached_entity/validators/model_instance_is_valid.rb +1 -1
- data/projects/{entity → entities/projects/entity}/lib/foobara/entity.rb +4 -0
- data/projects/{entity → entities/projects/entity}/src/concerns/callbacks.rb +2 -0
- data/projects/{entity → entities/projects/entity}/src/concerns/transactions.rb +1 -5
- data/projects/entities/projects/entity/src/extensions/domain/domain_module_extension.rb +111 -0
- data/projects/{entity → entities/projects/entity}/src/not_found_error.rb +11 -1
- data/projects/{in_memory_crud_driver → entities/projects/in_memory_crud_driver}/lib/foobara/in_memory_crud_driver.rb +4 -0
- data/projects/entities/projects/in_memory_crud_driver_minimal/lib/foobara/in_memory_crud_driver_minimal.rb +6 -0
- data/projects/{in_memory_crud_driver_minimal → entities/projects/in_memory_crud_driver_minimal}/src/in_memory_minimal.rb +6 -4
- data/projects/{model → entities/projects/model}/lib/foobara/model.rb +4 -0
- data/projects/{model → entities/projects/model}/src/concerns/classes.rb +1 -1
- data/projects/{model → entities/projects/model}/src/concerns/types.rb +4 -2
- data/projects/entities/projects/model/src/extensions/domain/module_extension.rb +20 -0
- data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/to_type_transformer.rb +8 -3
- data/projects/{model → entities/projects/model}/src/model.rb +25 -1
- data/projects/{model_attribute_helpers → entities/projects/model_attribute_helpers}/lib/foobara/model_attribute_helpers.rb +2 -0
- data/projects/{model_attribute_helpers → entities/projects/model_attribute_helpers}/src/attribute_helper_aliases.rb +1 -1
- data/projects/{model_attribute_helpers → entities/projects/model_attribute_helpers}/src/attribute_helpers.rb +4 -4
- data/projects/{nested_transactionable → entities/projects/nested_transactionable}/lib/foobara/nested_transactionable.rb +2 -2
- data/projects/{persistence → entities/projects/persistence}/lib/foobara/persistence.rb +4 -0
- data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction/concerns/transaction_tracking.rb +2 -0
- data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction/state_machine.rb +2 -0
- data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction_table/concerns/record_tracking.rb +2 -0
- data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction_table.rb +2 -2
- data/projects/entities/projects/weak_object_set/lib/foobara/weak_object_set.rb +6 -0
- data/projects/entities/spec/builtin_types/detached_entity_spec.rb +300 -0
- data/projects/entities/spec/builtin_types/entity_spec.rb +501 -0
- data/projects/entities/spec/builtin_types/model_spec.rb +420 -0
- data/projects/entities/spec/detached_entity/casting_spec.rb +31 -0
- data/projects/entities/spec/entity/concerns/associations_spec.rb +73 -0
- data/projects/entities/spec/entity/concerns/attribute_helpers_spec.rb +220 -0
- data/projects/entities/spec/entity/concerns/callbacks_spec.rb +61 -0
- data/projects/entities/spec/entity/concerns/initialization_spec.rb +213 -0
- data/projects/entities/spec/entity/concerns/mutations_spec.rb +38 -0
- data/projects/entities/spec/entity/concerns/queries_spec.rb +184 -0
- data/projects/entities/spec/entity/entity_spec.rb +240 -0
- data/projects/entities/spec/entity/extending_existing_spec.rb +137 -0
- data/projects/entities/spec/entity/extensions/domain_module_extension_spec.rb +42 -0
- data/projects/entities/spec/entity/from_type_declaration_spec.rb +34 -0
- data/projects/entities/spec/entity/that_owns_spec.rb +243 -0
- data/projects/entities/spec/entity/weak_object_set_spec.rb +91 -0
- data/projects/entities/spec/model/model_spec.rb +135 -0
- data/projects/entities/spec/model/types_spec.rb +393 -0
- data/projects/entities/spec/nested_transactionable/nested_transactionable_spec.rb +67 -0
- data/projects/entities/spec/persistence/entity_attributes_crud_drivers/in_memory_minimal_spec.rb +13 -0
- data/projects/entities/spec/persistence/entity_base/transaction_spec.rb +509 -0
- data/projects/entities/spec/persistence/entity_base/transaction_table_spec.rb +58 -0
- data/projects/entities/spec/persistence/persistence_spec.rb +148 -0
- data/projects/entities/spec/spec_helper.rb +52 -0
- data/projects/entities/spec/support/rubyprof.rb +32 -0
- data/projects/entities/spec/support/term_trap.rb +6 -0
- data/projects/entities/spec/type_declarations/sensitive_type_removers_spec.rb +90 -0
- data/projects/manifest/lib/foobara/manifest.rb +2 -0
- data/projects/manifest/spec/manifest_spec.rb +378 -0
- data/projects/manifest/spec/model_spec.rb +74 -0
- data/projects/manifest/spec/spec_helper.rb +50 -0
- data/projects/manifest/spec/type_declaration_spec.rb +39 -0
- data/projects/manifest/src/{foobara/manifest/array.rb → array.rb} +1 -1
- data/projects/manifest/src/{foobara/manifest/attributes.rb → attributes.rb} +1 -1
- data/projects/manifest/src/{foobara/manifest/base_manifest.rb → base_manifest.rb} +14 -6
- data/projects/manifest/src/{foobara/manifest/command.rb → command.rb} +3 -3
- data/projects/manifest/src/{foobara/manifest/detached_entity.rb → detached_entity.rb} +1 -1
- data/projects/manifest/src/{foobara/manifest/model.rb → model.rb} +1 -1
- data/projects/manifest/src/{foobara/manifest/possible_error.rb → possible_error.rb} +2 -0
- data/projects/manifest/src/{foobara/manifest/type.rb → type.rb} +4 -4
- data/projects/manifest/src/{foobara/manifest/type_declaration.rb → type_declaration.rb} +5 -5
- data/projects/model_plumbing/lib/foobara/model_plumbing.rb +13 -0
- data/projects/{namespace/lib/foobara/namespace.rb → model_plumbing/src/model_plumbing.rb} +1 -1
- data/projects/{builtin_types → typesystem/projects/builtin_types}/lib/foobara/builtin_types.rb +5 -0
- data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_processors/element_type_declarations.rb +1 -3
- data/projects/{builtin_types → typesystem/projects/builtin_types}/src/builtin_types.rb +7 -5
- data/projects/{builtin_types → typesystem/projects/builtin_types}/src/email/transformers/downcase.rb +0 -2
- data/projects/typesystem/projects/callback/lib/foobara/callback.rb +3 -0
- data/projects/{callback → typesystem/projects/callback}/src/block/concerns/keyword_argumentable_block.rb +2 -0
- data/projects/{callback → typesystem/projects/callback}/src/block/concerns/type.rb +2 -0
- data/projects/{callback → typesystem/projects/callback}/src/set.rb +3 -1
- data/projects/{common → typesystem/projects/common}/lib/foobara/common.rb +2 -0
- data/projects/{common → typesystem/projects/common}/src/data_path.rb +1 -1
- data/projects/{common → typesystem/projects/common}/src/error.rb +33 -9
- data/projects/{common → typesystem/projects/common}/src/error_key.rb +1 -1
- data/projects/{common → typesystem/projects/common}/src/outcome.rb +9 -5
- data/projects/typesystem/projects/concerns/lib/foobara/concerns.rb +3 -0
- data/projects/typesystem/projects/delegate/lib/foobara/delegate.rb +6 -0
- data/projects/{delegate → typesystem/projects/delegate}/src/extensions/module.rb +4 -0
- data/projects/{domain → typesystem/projects/domain}/lib/foobara/domain.rb +2 -0
- data/projects/{domain → typesystem/projects/domain}/src/domain.rb +35 -7
- data/projects/{domain → typesystem/projects/domain}/src/domain_module_extension.rb +5 -155
- data/projects/{domain → typesystem/projects/domain}/src/extensions/foobara.rb +0 -10
- data/projects/{domain → typesystem/projects/domain}/src/global_domain.rb +1 -0
- data/projects/{domain → typesystem/projects/domain}/src/global_organization.rb +1 -0
- data/projects/{domain → typesystem/projects/domain}/src/is_manifestable.rb +1 -0
- data/projects/{domain → typesystem/projects/domain}/src/manifestable.rb +1 -0
- data/projects/{domain → typesystem/projects/domain}/src/module_extension.rb +14 -10
- data/projects/typesystem/projects/enumerated/lib/foobara/enumerated.rb +3 -0
- data/projects/{enumerated → typesystem/projects/enumerated}/src/accessors.rb +2 -0
- data/projects/typesystem/projects/namespace/lib/foobara/namespace.rb +6 -0
- data/projects/{namespace → typesystem/projects/namespace}/src/is_namespace.rb +1 -1
- data/projects/{namespace → typesystem/projects/namespace}/src/namespace/lookup_mode.rb +6 -0
- data/projects/{namespace → typesystem/projects/namespace}/src/namespace.rb +2 -0
- data/projects/{namespace → typesystem/projects/namespace}/src/namespace_helpers.rb +1 -0
- data/projects/typesystem/projects/project/lib/foobara/project.rb +10 -0
- data/projects/{foobara → typesystem/projects/project}/src/foobara.rb +1 -6
- data/projects/{foobara → typesystem/projects/project}/src/project.rb +3 -0
- data/projects/typesystem/projects/state_machine/lib/foobara/state_machine.rb +3 -0
- data/projects/{state_machine → typesystem/projects/state_machine}/src/callbacks.rb +37 -8
- data/projects/{state_machine → typesystem/projects/state_machine}/src/sugar.rb +2 -0
- data/projects/{state_machine → typesystem/projects/state_machine}/src/transition_log.rb +2 -0
- data/projects/{type_declarations → typesystem/projects/type_declarations}/lib/foobara/type_declarations.rb +10 -7
- data/projects/{type_declarations → typesystem/projects/type_declarations}/src/dsl/attributes.rb +2 -0
- data/projects/{type_declarations → typesystem/projects/type_declarations}/src/error_extension.rb +9 -1
- data/projects/{type_declarations → typesystem/projects/type_declarations}/src/lazy_element_types/array.rb +2 -0
- data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declaration_handler.rb +21 -5
- data/projects/{type_declarations → typesystem/projects/type_declarations}/src/with_registries.rb +31 -8
- data/projects/{types → typesystem/projects/types}/lib/foobara/types.rb +2 -0
- data/projects/{types → typesystem/projects/types}/src/type/concerns/supported_processor_registration.rb +2 -0
- data/projects/{types → typesystem/projects/types}/src/type.rb +72 -68
- data/projects/typesystem/projects/value/lib/foobara/value.rb +12 -0
- data/projects/{value → typesystem/projects/value}/src/processor.rb +19 -6
- data/projects/typesystem/spec/builtin_types/allow_nil_spec.rb +138 -0
- data/projects/typesystem/spec/builtin_types/array_spec.rb +140 -0
- data/projects/typesystem/spec/builtin_types/associative_array_spec.rb +228 -0
- data/projects/typesystem/spec/builtin_types/attributes_spec.rb +453 -0
- data/projects/typesystem/spec/builtin_types/big_decimal_spec.rb +42 -0
- data/projects/typesystem/spec/builtin_types/boolean_spec.rb +43 -0
- data/projects/typesystem/spec/builtin_types/class_type_desugarizer_spec.rb +17 -0
- data/projects/typesystem/spec/builtin_types/custom_type_spec.rb +430 -0
- data/projects/typesystem/spec/builtin_types/date_spec.rb +37 -0
- data/projects/typesystem/spec/builtin_types/datetime_spec.rb +49 -0
- data/projects/typesystem/spec/builtin_types/email_spec.rb +44 -0
- data/projects/typesystem/spec/builtin_types/float_spec.rb +59 -0
- data/projects/typesystem/spec/builtin_types/instance_of_spec.rb +75 -0
- data/projects/typesystem/spec/builtin_types/one_of_spec.rb +73 -0
- data/projects/typesystem/spec/builtin_types/string_spec.rb +117 -0
- data/projects/typesystem/spec/builtin_types/symbol_spec.rb +24 -0
- data/projects/typesystem/spec/builtin_types/tuple_spec.rb +125 -0
- data/projects/typesystem/spec/callback/callback_spec.rb +155 -0
- data/projects/typesystem/spec/callback/registry/conditioned_spec.rb +152 -0
- data/projects/typesystem/spec/callback/registry/multiple_action_spec.rb +144 -0
- data/projects/typesystem/spec/callback/registry/single_action_spec.rb +114 -0
- data/projects/typesystem/spec/common/data_path_spec.rb +270 -0
- data/projects/typesystem/spec/common/error_collection_spec.rb +77 -0
- data/projects/typesystem/spec/common/error_key_spec.rb +56 -0
- data/projects/typesystem/spec/common/outcome_spec.rb +65 -0
- data/projects/typesystem/spec/common/possible_error_spec.rb +17 -0
- data/projects/typesystem/spec/concerns/concern_spec.rb +122 -0
- data/projects/typesystem/spec/enumerated/accessors_spec.rb +182 -0
- data/projects/typesystem/spec/enumerated/enumerated_spec.rb +32 -0
- data/projects/typesystem/spec/enumerated/values_spec.rb +67 -0
- data/projects/typesystem/spec/foobara/foobara_spec.rb +45 -0
- data/projects/typesystem/spec/namespace/ambiguous_registry_spec.rb +70 -0
- data/projects/typesystem/spec/namespace/foobara_simulation_spec.rb +254 -0
- data/projects/typesystem/spec/namespace/is_namespace_spec.rb +103 -0
- data/projects/typesystem/spec/namespace/namespace_helpers_spec.rb +67 -0
- data/projects/typesystem/spec/namespace/namespace_spec.rb +335 -0
- data/projects/typesystem/spec/namespace/prefixless_registry_spec.rb +30 -0
- data/projects/typesystem/spec/namespace/unambiguous_registry_spec.rb +50 -0
- data/projects/typesystem/spec/spec_helper.rb +50 -0
- data/projects/typesystem/spec/state_machine/callbacks_spec.rb +144 -0
- data/projects/typesystem/spec/state_machine/state_machine_spec.rb +224 -0
- data/projects/typesystem/spec/state_machine/target_attribute_spec.rb +46 -0
- data/projects/typesystem/spec/support/rubyprof.rb +32 -0
- data/projects/typesystem/spec/support/term_trap.rb +6 -0
- data/projects/typesystem/spec/type_declarations/attributes_spec.rb +14 -0
- data/projects/typesystem/spec/type_declarations/attributes_transformer_spec.rb +95 -0
- data/projects/typesystem/spec/type_declarations/dsl/attributes_spec.rb +107 -0
- data/projects/typesystem/spec/type_declarations/handlers/extend_registered_type_declaration_spec.rb +13 -0
- data/projects/typesystem/spec/type_declarations/sensitive_type_removers_spec.rb +210 -0
- data/projects/typesystem/spec/type_declarations/type_builder_spec.rb +47 -0
- data/projects/typesystem/spec/type_declarations/type_declaration_spec.rb +252 -0
- data/projects/typesystem/spec/type_declarations/type_declarations_spec.rb +11 -0
- data/projects/typesystem/spec/type_declarations/typed_transformer_spec.rb +65 -0
- data/projects/typesystem/spec/types/sensitive_spec.rb +36 -0
- data/projects/typesystem/spec/types/type_spec.rb +102 -0
- data/projects/typesystem/spec/value/caster_spec.rb +23 -0
- data/projects/typesystem/spec/value/processor/runner_spec.rb +34 -0
- data/projects/typesystem/spec/value/processor/selection_spec.rb +71 -0
- data/projects/typesystem/spec/value/processor_spec.rb +76 -0
- data/projects/typesystem/spec/value/transformer_spec.rb +27 -0
- data/version.rb +1 -1
- metadata +488 -365
- data/projects/callback/lib/foobara/callback.rb +0 -1
- data/projects/concerns/lib/foobara/concerns.rb +0 -1
- data/projects/delegate/lib/foobara/delegate.rb +0 -1
- data/projects/entity/src/extensions/domain/domain_module_extension.rb +0 -15
- data/projects/enumerated/lib/foobara/enumerated.rb +0 -1
- data/projects/foobara/lib/foobara/all.rb +0 -48
- data/projects/in_memory_crud_driver_minimal/lib/foobara/in_memory_crud_driver_minimal.rb +0 -1
- data/projects/state_machine/lib/foobara/state_machine.rb +0 -1
- data/projects/value/lib/foobara/value.rb +0 -7
- data/projects/weak_object_set/lib/foobara/weak_object_set.rb +0 -3
- /data/{projects/foobara/lib → lib}/foobara.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/aliases.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/associations.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/attributes.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/equality.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/initialization.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/persistence.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/reflection.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/concerns/serialize.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/detached_entity.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/detached_entity_type.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/builtin_types/detached_entity/casters/hash.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/builtin_types/detached_entity/casters/primary_key.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/builtin_types/detached_entity.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/attributes_handler_desugarizer.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/model_class_desugarizer.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/validate_primary_key_is_symbol.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/validate_primary_key_present.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/validate_primary_key_references_attribute.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/remove_sensitive_values_transformer_extensions.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/sensitive_type_removers/detached_entity.rb +0 -0
- /data/projects/{detached_entity → entities/projects/detached_entity}/src/sensitive_value_removers/detached_entity.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/association_depth.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/attributes.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/initialization.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/mutations.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/persistence.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/queries.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/concerns/types.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/entity.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity/casters/hash.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity/casters/primary_key.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity/casters/record_from_closed_transaction.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity/casters/record_from_current_transaction.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity/validators/model_instance_is_valid.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/builtin_types/entity.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/attributes_handler_desugarizer.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/primary_key_desugarizer.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/validate_primary_key_is_symbol.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/validate_primary_key_present.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration/validate_primary_key_references_attribute.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/extensions/type_declarations/handlers/extend_entity_type_declaration.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/new_prepend.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/sensitive_type_removers/entity.rb +0 -0
- /data/projects/{entity → entities/projects/entity}/src/sensitive_value_removers/entity.rb +0 -0
- /data/projects/{in_memory_crud_driver → entities/projects/in_memory_crud_driver}/src/in_memory.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/concerns/aliases.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/concerns/reflection.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/builtin_types/model/casters/hash.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/builtin_types/model/supported_transformers/mutable.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/builtin_types/model/validators/model_instance_is_valid.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/array_with_symbolic_elements.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/attributes_handler_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/delegates_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/delegates_validator.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/model_class_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/move_private_from_element_types_to_root.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/symbolize_private.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration/valid_attribute_names.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_model_type_declaration.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/model_class_type_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/mutable_validator.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/normalize_mutable_attributes_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/handlers/registered_type_declaration/model_class_desugarizer.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/extensions/type_declarations/lazy_element_types/model.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/sensitive_type_removers/extended_model.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/sensitive_type_removers/model.rb +0 -0
- /data/projects/{model → entities/projects/model}/src/sensitive_value_removers/model.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_attributes_crud_driver.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base/table.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction/concerns/entity_callback_handling.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction/concerns/state_transitions.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base/transaction_table/concerns/queries.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/entity_base.rb +0 -0
- /data/projects/{persistence → entities/projects/persistence}/src/persistence.rb +0 -0
- /data/projects/{weak_object_set → entities/projects/weak_object_set}/src/weak_object_set.rb +0 -0
- /data/projects/manifest/src/{foobara/manifest/domain.rb → domain.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/entity.rb → entity.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/error.rb → error.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/organization.rb → organization.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/processor.rb → processor.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/processor_class.rb → processor_class.rb} +0 -0
- /data/projects/manifest/src/{foobara/manifest/root_manifest.rb → root_manifest.rb} +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/README.md +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/array/casters/arrayable.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/array/supported_processors/element_type_declaration.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/array/supported_validators/size.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/associative_array/casters/array.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/associative_array/supported_processors/key_type_declaration.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/associative_array/supported_processors/value_type_declaration.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/atomic_duck.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/casters/array.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/casters/hash.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_transformers/defaults/type_declaration_extension/extend_attributes_type_declaration/desugarizers/move_defaults_from_element_types_to_root.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_transformers/defaults/type_declaration_extension/extend_attributes_type_declaration/desugarizers/symbolize_defaults.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_transformers/defaults/type_declaration_extension/extend_attributes_type_declaration/type_declaration_validators/hash_with_symbolic_keys.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_transformers/defaults/type_declaration_extension/extend_attributes_type_declaration/type_declaration_validators/valid_attribute_names.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_transformers/defaults.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_validators/required/type_declaration_extension/extend_attributes_type_declaration/desugarizers/alphabetize_required.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_validators/required/type_declaration_extension/extend_attributes_type_declaration/desugarizers/move_required_from_element_types_to_root.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_validators/required/type_declaration_extension/extend_attributes_type_declaration/type_declaration_validators/array_of_symbols.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_validators/required/type_declaration_extension/extend_attributes_type_declaration/type_declaration_validators/array_with_valid_attribute_names.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/supported_validators/required.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/attributes/transformers/remove_unexpected_attributes.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/big_decimal/casters/integer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/big_decimal/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/boolean/casters/numeric.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/boolean/casters/string_or_symbol.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/date/casters/hash.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/date/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/datetime/casters/date.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/datetime/casters/hash.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/datetime/casters/seconds_since_epoch.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/datetime/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_casters/allow_nil.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/class_desugarizer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/class_type_desugarizer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/instance_of_class_desugarizer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/instance_of_symbol_desugarizer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of/type_declaration_extension/extend_registered_type_declaration/type_declaration_validators/is_valid_class.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/instance_of.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/one_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/cast_one_of.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/one_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/module_desugarizer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck/supported_validators/one_of.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duck.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/duckture.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/email/validator_base.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/float/casters/integer.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/float/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/integer/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/number/supported_validators/max.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/number/supported_validators/min.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/string/casters/numeric.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/string/casters/symbol.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/string/supported_transformers/downcase.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/string/supported_validators/matches.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/string/supported_validators/max_length.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/symbol/casters/string.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/type_declaration_validators/size_matches.rb +0 -0
- /data/projects/{builtin_types → typesystem/projects/builtin_types}/src/tuple/supported_processors/element_type_declarations.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/after.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/around.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/before.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/concerns/block_parameter_not_allowed.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/concerns/block_parameter_required.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/concerns/single_argument_block.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block/error.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/block.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/base.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/chained_conditioned.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/chained_multiple_action.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/conditioned.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/joined_conditioned.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/multiple_action.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/registry/single_action.rb +0 -0
- /data/projects/{callback → typesystem/projects/callback}/src/runner.rb +0 -0
- /data/projects/{common → typesystem/projects/common}/src/error_collection.rb +0 -0
- /data/projects/{common → typesystem/projects/common}/src/possible_error.rb +0 -0
- /data/projects/{common → typesystem/projects/common}/src/runtime_error.rb +0 -0
- /data/projects/{concerns → typesystem/projects/concerns}/src/concern.rb +0 -0
- /data/projects/{domain → typesystem/projects/domain}/src/organization.rb +0 -0
- /data/projects/{domain → typesystem/projects/domain}/src/organization_module_extension.rb +0 -0
- /data/projects/{enumerated → typesystem/projects/enumerated}/src/enumerated.rb +0 -0
- /data/projects/{enumerated → typesystem/projects/enumerated}/src/values.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/ambiguous_registry.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/base_registry.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/extensions/module.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/prefixless_registry.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/scoped.rb +0 -0
- /data/projects/{namespace → typesystem/projects/namespace}/src/unambiguous_registry.rb +0 -0
- /data/projects/{state_machine → typesystem/projects/state_machine}/src/log_entry.rb +0 -0
- /data/projects/{state_machine → typesystem/projects/state_machine}/src/state_machine.rb +0 -0
- /data/projects/{state_machine → typesystem/projects/state_machine}/src/transitions.rb +0 -0
- /data/projects/{state_machine → typesystem/projects/state_machine}/src/validations.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes_transformers/from_yaml.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes_transformers/only.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes_transformers/reject.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes_transformers/set.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/attributes_transformers.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/caster.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/desugarizer_pipeline.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/element_processor.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_array_type_declaration/array_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_array_type_declaration/element_type_declaration_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_array_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_array_type_declaration/type_set_to_array_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_array_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_associative_array_type_declaration/key_type_declaration_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_associative_array_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_associative_array_type_declaration/value_type_declaration_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_associative_array_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_attributes_type_declaration/element_type_declarations_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_attributes_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_attributes_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_attributes_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_registered_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_registered_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_tuple_type_declaration/array_desugarizer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_tuple_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/extend_tuple_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/registered_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/handlers/registered_type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/lazy_element_types/attributes.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/lazy_element_types/hash.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/lazy_element_types/tuple.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/processor.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/remove_sensitive_values_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/sensitive_type_remover.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/sensitive_type_removers/array.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/sensitive_type_removers/attributes.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/sensitive_value_removers/array.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/sensitive_value_removers/attributes.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/to_type_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_builder.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declaration.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declaration_error.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declaration_handler_registry.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declaration_validator.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/type_declarations.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/typed_transformer.rb +0 -0
- /data/projects/{type_declarations → typesystem/projects/type_declarations}/src/validator.rb +0 -0
- /data/projects/{types → typesystem/projects/types}/src/element_processor.rb +0 -0
- /data/projects/{types → typesystem/projects/types}/src/extensions/error.rb +0 -0
- /data/projects/{types → typesystem/projects/types}/src/type/concerns/reflection.rb +0 -0
- /data/projects/{types → typesystem/projects/types}/src/types.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/caster.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/data_error.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/mutator.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/processor/casting.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/processor/multi.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/processor/pipeline.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/processor/runner.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/processor/selection.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/transformer.rb +0 -0
- /data/projects/{value → typesystem/projects/value}/src/validator.rb +0 -0
|
@@ -32,45 +32,11 @@ module Foobara
|
|
|
32
32
|
create_exposed_command(command_class, **)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def create_exposed_command(command_class, **)
|
|
36
|
-
full_domain_name = command_class.domain.scoped_full_name
|
|
37
|
-
exposed_domain = foobara_lookup_domain(full_domain_name,
|
|
38
|
-
mode: Namespace::LookupMode::ABSOLUTE_SINGLE_NAMESPACE) ||
|
|
39
|
-
build_and_register_exposed_domain(full_domain_name)
|
|
40
|
-
|
|
41
|
-
exposed_command = create_exposed_command_without_domain(command_class, **)
|
|
42
|
-
|
|
43
|
-
exposed_domain.foobara_register(exposed_command)
|
|
44
|
-
|
|
45
|
-
exposed_command
|
|
46
|
-
end
|
|
47
|
-
|
|
48
35
|
# TODO: eliminate this method
|
|
49
36
|
def create_exposed_command_without_domain(command_class, **)
|
|
50
37
|
ExposedCommand.new(command_class, **apply_defaults(**))
|
|
51
38
|
end
|
|
52
39
|
|
|
53
|
-
def apply_defaults(
|
|
54
|
-
inputs_transformers: nil,
|
|
55
|
-
result_transformers: nil,
|
|
56
|
-
errors_transformers: nil,
|
|
57
|
-
pre_commit_transformers: nil,
|
|
58
|
-
serializers: nil,
|
|
59
|
-
allowed_rule: default_allowed_rule,
|
|
60
|
-
authenticator: nil,
|
|
61
|
-
**opts
|
|
62
|
-
)
|
|
63
|
-
opts.merge(
|
|
64
|
-
inputs_transformers: [*inputs_transformers, *default_inputs_transformers],
|
|
65
|
-
result_transformers: [*result_transformers, *default_result_transformers],
|
|
66
|
-
errors_transformers: [*errors_transformers, *default_errors_transformers],
|
|
67
|
-
pre_commit_transformers: [*pre_commit_transformers, *default_pre_commit_transformers],
|
|
68
|
-
serializers: [*serializers, *default_serializers],
|
|
69
|
-
allowed_rule: allowed_rule && to_allowed_rule(allowed_rule),
|
|
70
|
-
authenticator: authenticator || self.authenticator
|
|
71
|
-
)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
40
|
def build_and_register_exposed_domain(domain_full_name)
|
|
75
41
|
domain_module = if domain_full_name.to_s == ""
|
|
76
42
|
GlobalDomain
|
|
@@ -211,6 +177,37 @@ module Foobara
|
|
|
211
177
|
default_serializers << serializer
|
|
212
178
|
end
|
|
213
179
|
|
|
180
|
+
def transformed_command_from_name(name)
|
|
181
|
+
foobara_lookup_command(name, mode: Namespace::LookupMode::RELAXED)&.transformed_command_class
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def all_transformed_command_classes
|
|
185
|
+
foobara_all_command.map(&:transformed_command_class)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def each_transformed_command_class(&)
|
|
189
|
+
foobara_all_command.map(&:transformed_command_class).each(&)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
def size
|
|
193
|
+
foobara_all_command.size
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
private
|
|
197
|
+
|
|
198
|
+
def create_exposed_command(command_class, **)
|
|
199
|
+
full_domain_name = command_class.domain.scoped_full_name
|
|
200
|
+
exposed_domain = foobara_lookup_domain(full_domain_name,
|
|
201
|
+
mode: Namespace::LookupMode::ABSOLUTE_SINGLE_NAMESPACE) ||
|
|
202
|
+
build_and_register_exposed_domain(full_domain_name)
|
|
203
|
+
|
|
204
|
+
exposed_command = create_exposed_command_without_domain(command_class, **)
|
|
205
|
+
|
|
206
|
+
exposed_domain.foobara_register(exposed_command)
|
|
207
|
+
|
|
208
|
+
exposed_command
|
|
209
|
+
end
|
|
210
|
+
|
|
214
211
|
def to_allowed_rule(*args)
|
|
215
212
|
symbol, object = case args.size
|
|
216
213
|
when 1
|
|
@@ -289,20 +286,25 @@ module Foobara
|
|
|
289
286
|
end
|
|
290
287
|
end
|
|
291
288
|
|
|
292
|
-
def
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
289
|
+
def apply_defaults(
|
|
290
|
+
inputs_transformers: nil,
|
|
291
|
+
result_transformers: nil,
|
|
292
|
+
errors_transformers: nil,
|
|
293
|
+
pre_commit_transformers: nil,
|
|
294
|
+
serializers: nil,
|
|
295
|
+
allowed_rule: default_allowed_rule,
|
|
296
|
+
authenticator: nil,
|
|
297
|
+
**opts
|
|
298
|
+
)
|
|
299
|
+
opts.merge(
|
|
300
|
+
inputs_transformers: [*inputs_transformers, *default_inputs_transformers],
|
|
301
|
+
result_transformers: [*result_transformers, *default_result_transformers],
|
|
302
|
+
errors_transformers: [*errors_transformers, *default_errors_transformers],
|
|
303
|
+
pre_commit_transformers: [*pre_commit_transformers, *default_pre_commit_transformers],
|
|
304
|
+
serializers: [*serializers, *default_serializers],
|
|
305
|
+
allowed_rule: allowed_rule && to_allowed_rule(allowed_rule),
|
|
306
|
+
authenticator: authenticator || self.authenticator
|
|
307
|
+
)
|
|
306
308
|
end
|
|
307
309
|
end
|
|
308
310
|
end
|
|
@@ -61,7 +61,17 @@ module Foobara
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
def domain
|
|
65
|
+
# :nocov:
|
|
66
|
+
command_class.domain
|
|
67
|
+
# :nocov:
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def organization
|
|
71
|
+
# :nocov:
|
|
72
|
+
command_class.organization
|
|
73
|
+
# :nocov:
|
|
74
|
+
end
|
|
65
75
|
|
|
66
76
|
def description
|
|
67
77
|
command_class.description
|
|
@@ -425,52 +435,6 @@ module Foobara
|
|
|
425
435
|
manifest
|
|
426
436
|
end
|
|
427
437
|
|
|
428
|
-
def processors_to_manifest_symbols(processors)
|
|
429
|
-
return nil if processors.nil? || processors.empty?
|
|
430
|
-
|
|
431
|
-
to_include = TypeDeclarations.foobara_manifest_context_to_include || Set.new
|
|
432
|
-
include_processors = TypeDeclarations.include_processors?
|
|
433
|
-
|
|
434
|
-
processors.map do |processor|
|
|
435
|
-
if processor.respond_to?(:scoped_path_set?) && processor.scoped_path_set?
|
|
436
|
-
if include_processors
|
|
437
|
-
to_include << processor
|
|
438
|
-
end
|
|
439
|
-
processor.foobara_manifest_reference
|
|
440
|
-
elsif processor.is_a?(Value::Processor)
|
|
441
|
-
klass = processor.class
|
|
442
|
-
|
|
443
|
-
if klass.scoped_path_set?
|
|
444
|
-
if include_processors
|
|
445
|
-
to_include << klass
|
|
446
|
-
end
|
|
447
|
-
klass.foobara_manifest_reference
|
|
448
|
-
# TODO: Delete this nocov block
|
|
449
|
-
# TODO: make anonymous scoped path's have better names instead of random hexadecimal
|
|
450
|
-
# :nocov:
|
|
451
|
-
elsif processor.respond_to?(:symbol) && processor.symbol
|
|
452
|
-
processor.symbol
|
|
453
|
-
else
|
|
454
|
-
name = klass.name
|
|
455
|
-
|
|
456
|
-
while name.nil?
|
|
457
|
-
klass = klass.superclass
|
|
458
|
-
name = klass.name
|
|
459
|
-
end
|
|
460
|
-
|
|
461
|
-
"Anonymous#{Util.non_full_name(name)}"
|
|
462
|
-
# :nocov:
|
|
463
|
-
end
|
|
464
|
-
elsif processor.is_a?(::Proc)
|
|
465
|
-
"Proc"
|
|
466
|
-
else
|
|
467
|
-
# :nocov:
|
|
468
|
-
"Unknown"
|
|
469
|
-
# :nocov:
|
|
470
|
-
end
|
|
471
|
-
end
|
|
472
|
-
end
|
|
473
|
-
|
|
474
438
|
def inputs_transformer
|
|
475
439
|
return @inputs_transformer if defined?(@inputs_transformer)
|
|
476
440
|
|
|
@@ -581,6 +545,54 @@ module Foobara
|
|
|
581
545
|
end
|
|
582
546
|
end
|
|
583
547
|
end
|
|
548
|
+
|
|
549
|
+
private
|
|
550
|
+
|
|
551
|
+
def processors_to_manifest_symbols(processors)
|
|
552
|
+
return nil if processors.nil? || processors.empty?
|
|
553
|
+
|
|
554
|
+
to_include = TypeDeclarations.foobara_manifest_context_to_include || Set.new
|
|
555
|
+
include_processors = TypeDeclarations.include_processors?
|
|
556
|
+
|
|
557
|
+
processors.map do |processor|
|
|
558
|
+
if processor.respond_to?(:scoped_path_set?) && processor.scoped_path_set?
|
|
559
|
+
if include_processors
|
|
560
|
+
to_include << processor
|
|
561
|
+
end
|
|
562
|
+
processor.foobara_manifest_reference
|
|
563
|
+
elsif processor.is_a?(Value::Processor)
|
|
564
|
+
klass = processor.class
|
|
565
|
+
|
|
566
|
+
if klass.scoped_path_set?
|
|
567
|
+
if include_processors
|
|
568
|
+
to_include << klass
|
|
569
|
+
end
|
|
570
|
+
klass.foobara_manifest_reference
|
|
571
|
+
# TODO: Delete this nocov block
|
|
572
|
+
# TODO: make anonymous scoped path's have better names instead of random hexadecimal
|
|
573
|
+
# :nocov:
|
|
574
|
+
elsif processor.respond_to?(:symbol) && processor.symbol
|
|
575
|
+
processor.symbol
|
|
576
|
+
else
|
|
577
|
+
name = klass.name
|
|
578
|
+
|
|
579
|
+
while name.nil?
|
|
580
|
+
klass = klass.superclass
|
|
581
|
+
name = klass.name
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
"Anonymous#{Util.non_full_name(name)}"
|
|
585
|
+
# :nocov:
|
|
586
|
+
end
|
|
587
|
+
elsif processor.is_a?(::Proc)
|
|
588
|
+
"Proc"
|
|
589
|
+
else
|
|
590
|
+
# :nocov:
|
|
591
|
+
"Unknown"
|
|
592
|
+
# :nocov:
|
|
593
|
+
end
|
|
594
|
+
end
|
|
595
|
+
end
|
|
584
596
|
end
|
|
585
597
|
|
|
586
598
|
attr_accessor :command, :untransformed_inputs, :transformed_inputs, :outcome, :request
|
|
@@ -592,19 +604,57 @@ module Foobara
|
|
|
592
604
|
construct_command
|
|
593
605
|
end
|
|
594
606
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
607
|
+
def full_command_name
|
|
608
|
+
# :nocov:
|
|
609
|
+
self.class.full_command_name
|
|
610
|
+
# :nocov:
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
def command_name
|
|
614
|
+
# :nocov:
|
|
615
|
+
self.class.command_name
|
|
616
|
+
# :nocov:
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
def command_class
|
|
620
|
+
self.class.command_class
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
def capture_unknown_error
|
|
624
|
+
self.class.capture_unknown_error
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
def inputs_transformers
|
|
628
|
+
# :nocov:
|
|
629
|
+
self.class.inputs_transformers
|
|
630
|
+
# :nocov:
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
def result_transformers
|
|
634
|
+
# :nocov:
|
|
635
|
+
self.class.result_transformers
|
|
636
|
+
# :nocov:
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
def errors_transformers
|
|
640
|
+
self.class.errors_transformers
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
def pre_commit_transformers
|
|
644
|
+
self.class.pre_commit_transformers
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
def serializers
|
|
648
|
+
self.class.serializers
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
def allowed_rule
|
|
652
|
+
self.class.allowed_rule
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
def authenticator
|
|
656
|
+
self.class.authenticator
|
|
657
|
+
end
|
|
608
658
|
|
|
609
659
|
def run
|
|
610
660
|
apply_allowed_rule
|
|
@@ -626,23 +676,6 @@ module Foobara
|
|
|
626
676
|
request.authenticated_credential
|
|
627
677
|
end
|
|
628
678
|
|
|
629
|
-
def transform_inputs
|
|
630
|
-
transformer = self.class.inputs_transformer
|
|
631
|
-
|
|
632
|
-
self.transformed_inputs = if transformer&.applicable?(untransformed_inputs)
|
|
633
|
-
outcome = transformer.process_value(untransformed_inputs)
|
|
634
|
-
|
|
635
|
-
if outcome.success?
|
|
636
|
-
outcome.result
|
|
637
|
-
else
|
|
638
|
-
self.outcome = outcome
|
|
639
|
-
untransformed_inputs
|
|
640
|
-
end
|
|
641
|
-
else
|
|
642
|
-
untransformed_inputs
|
|
643
|
-
end
|
|
644
|
-
end
|
|
645
|
-
|
|
646
679
|
def inputs
|
|
647
680
|
return @inputs if defined?(@inputs)
|
|
648
681
|
|
|
@@ -727,6 +760,60 @@ module Foobara
|
|
|
727
760
|
end
|
|
728
761
|
end
|
|
729
762
|
|
|
763
|
+
def result
|
|
764
|
+
outcome.result
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
def errors
|
|
768
|
+
outcome.errors
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# TODO: kill this
|
|
772
|
+
def serialize_result(body)
|
|
773
|
+
if serializer
|
|
774
|
+
serializer.process_value!(body)
|
|
775
|
+
else
|
|
776
|
+
body
|
|
777
|
+
end
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
def raw_inputs
|
|
781
|
+
untransformed_inputs
|
|
782
|
+
end
|
|
783
|
+
|
|
784
|
+
def method_missing(method_name, ...)
|
|
785
|
+
if command.respond_to?(method_name)
|
|
786
|
+
command.send(method_name, ...)
|
|
787
|
+
else
|
|
788
|
+
# :nocov:
|
|
789
|
+
super
|
|
790
|
+
# :nocov:
|
|
791
|
+
end
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
def respond_to_missing?(method_name, private = false)
|
|
795
|
+
command.respond_to?(method_name, private) || super
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
private
|
|
799
|
+
|
|
800
|
+
def transform_inputs
|
|
801
|
+
transformer = self.class.inputs_transformer
|
|
802
|
+
|
|
803
|
+
self.transformed_inputs = if transformer&.applicable?(untransformed_inputs)
|
|
804
|
+
outcome = transformer.process_value(untransformed_inputs)
|
|
805
|
+
|
|
806
|
+
if outcome.success?
|
|
807
|
+
outcome.result
|
|
808
|
+
else
|
|
809
|
+
self.outcome = outcome
|
|
810
|
+
untransformed_inputs
|
|
811
|
+
end
|
|
812
|
+
else
|
|
813
|
+
untransformed_inputs
|
|
814
|
+
end
|
|
815
|
+
end
|
|
816
|
+
|
|
730
817
|
def construct_command
|
|
731
818
|
self.command = command_class.new(transformed_inputs)
|
|
732
819
|
end
|
|
@@ -804,18 +891,6 @@ module Foobara
|
|
|
804
891
|
end
|
|
805
892
|
end
|
|
806
893
|
|
|
807
|
-
def result
|
|
808
|
-
outcome.result
|
|
809
|
-
end
|
|
810
|
-
|
|
811
|
-
def errors
|
|
812
|
-
outcome.errors
|
|
813
|
-
end
|
|
814
|
-
|
|
815
|
-
def flush_transactions
|
|
816
|
-
request.opened_transactions&.reverse&.each(&:flush!)
|
|
817
|
-
end
|
|
818
|
-
|
|
819
894
|
def transform_outcome
|
|
820
895
|
if outcome.success?
|
|
821
896
|
# can we do this while still in the transaction of the command???
|
|
@@ -825,31 +900,8 @@ module Foobara
|
|
|
825
900
|
end
|
|
826
901
|
end
|
|
827
902
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
if serializer
|
|
831
|
-
serializer.process_value!(body)
|
|
832
|
-
else
|
|
833
|
-
body
|
|
834
|
-
end
|
|
835
|
-
end
|
|
836
|
-
|
|
837
|
-
def raw_inputs
|
|
838
|
-
untransformed_inputs
|
|
839
|
-
end
|
|
840
|
-
|
|
841
|
-
def method_missing(method_name, ...)
|
|
842
|
-
if command.respond_to?(method_name)
|
|
843
|
-
command.send(method_name, ...)
|
|
844
|
-
else
|
|
845
|
-
# :nocov:
|
|
846
|
-
super
|
|
847
|
-
# :nocov:
|
|
848
|
-
end
|
|
849
|
-
end
|
|
850
|
-
|
|
851
|
-
def respond_to_missing?(method_name, private = false)
|
|
852
|
-
command.respond_to?(method_name, private) || super
|
|
903
|
+
def flush_transactions
|
|
904
|
+
request.opened_transactions&.reverse&.each(&:flush!)
|
|
853
905
|
end
|
|
854
906
|
end
|
|
855
907
|
end
|
|
@@ -4,7 +4,15 @@ module Foobara
|
|
|
4
4
|
module Types
|
|
5
5
|
include Concern
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
def full_entity_name
|
|
8
|
+
# :nocov:
|
|
9
|
+
self.class.full_entity_name
|
|
10
|
+
# :nocov:
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def entity_name
|
|
14
|
+
self.class.entity_name
|
|
15
|
+
end
|
|
8
16
|
|
|
9
17
|
module ClassMethods
|
|
10
18
|
def entity_type
|
|
@@ -5,7 +5,7 @@ module Foobara
|
|
|
5
5
|
class ModelInstanceIsValid < Model::Validators::ModelInstanceIsValid
|
|
6
6
|
# Why is this here in entity/ instead of in model/?
|
|
7
7
|
def possible_errors
|
|
8
|
-
return
|
|
8
|
+
return EMPTY_ARRAY if parent_declaration_data == expected_type_symbol
|
|
9
9
|
|
|
10
10
|
# TODO: we should also ask the class if it is mutable...
|
|
11
11
|
mutable = parent_declaration_data.key?(:mutable) ? parent_declaration_data[:mutable] : false
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require "foobara/detached_entity"
|
|
2
|
+
|
|
1
3
|
module Foobara
|
|
2
4
|
# TODO: I think we should have a configuration that indicates if created records can have primary keys passed to them
|
|
3
5
|
# or not. That is, do primary keys get issued by the database upon insertion? Or are they generated externally
|
|
@@ -29,3 +31,5 @@ module Foobara
|
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
end
|
|
34
|
+
|
|
35
|
+
Foobara.project("entity", project_path: "#{__dir__}/../..")
|
|
@@ -17,11 +17,7 @@ module Foobara
|
|
|
17
17
|
if skip_dependent_transactions
|
|
18
18
|
entity_base.transaction(mode, &)
|
|
19
19
|
else
|
|
20
|
-
Foobara::Persistence.transaction(
|
|
21
|
-
self, *deep_depends_on,
|
|
22
|
-
mode:,
|
|
23
|
-
&
|
|
24
|
-
)
|
|
20
|
+
Foobara::Persistence.transaction(self, *deep_depends_on, mode:, &)
|
|
25
21
|
end
|
|
26
22
|
end
|
|
27
23
|
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
module Foobara
|
|
2
|
+
module Domain
|
|
3
|
+
module DomainModuleExtension
|
|
4
|
+
module ClassMethods
|
|
5
|
+
attr_reader :foobara_default_entity_base
|
|
6
|
+
|
|
7
|
+
def foobara_set_entity_base(*, name: nil, table_prefix: nil)
|
|
8
|
+
name ||= Util.underscore(scoped_full_name).gsub("::", "_")
|
|
9
|
+
base = Persistence.register_base(*, name:, table_prefix:)
|
|
10
|
+
@foobara_default_entity_base = base
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def foobara_register_and_deanonymize_entity(name, *, &)
|
|
14
|
+
entity_class = foobara_register_entity(name, *, &)
|
|
15
|
+
Foobara::Model.deanonymize_class(entity_class)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# TODO: kill this off
|
|
19
|
+
def foobara_register_entity(name, *args, &block)
|
|
20
|
+
# TODO: introduce a Namespace#scope method to simplify this a bit
|
|
21
|
+
Foobara::Namespace.use self do
|
|
22
|
+
if block
|
|
23
|
+
args = [
|
|
24
|
+
TypeDeclarations::Dsl::Attributes.to_declaration(&block).declaration_data,
|
|
25
|
+
*args
|
|
26
|
+
]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attributes_type_declaration, *args = args
|
|
30
|
+
|
|
31
|
+
model_base_class, description = case args.size
|
|
32
|
+
when 0
|
|
33
|
+
[]
|
|
34
|
+
when 1, 2
|
|
35
|
+
arg, other = args
|
|
36
|
+
|
|
37
|
+
if args.first.is_a?(::String)
|
|
38
|
+
[other, arg]
|
|
39
|
+
else
|
|
40
|
+
args
|
|
41
|
+
end
|
|
42
|
+
else
|
|
43
|
+
# :nocov:
|
|
44
|
+
raise ArgumentError, "Too many arguments"
|
|
45
|
+
# :nocov:
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
if model_base_class
|
|
49
|
+
attributes_type_declaration = TypeDeclarations::Attributes.merge(
|
|
50
|
+
model_base_class.attributes_type.declaration_data,
|
|
51
|
+
attributes_type_declaration
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
handler = foobara_type_builder.handler_for_class(
|
|
56
|
+
Foobara::TypeDeclarations::Handlers::ExtendAttributesTypeDeclaration
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
attributes_type = handler.type_for_declaration(attributes_type_declaration)
|
|
60
|
+
|
|
61
|
+
# TODO: reuse the model_base_class primary key if it has one...
|
|
62
|
+
primary_key = attributes_type.element_types.keys.first
|
|
63
|
+
|
|
64
|
+
model_module = unless scoped_full_path.empty?
|
|
65
|
+
scoped_full_name
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
declaration = TypeDeclaration.new(
|
|
69
|
+
Util.remove_blank(
|
|
70
|
+
type: :entity,
|
|
71
|
+
name:,
|
|
72
|
+
model_base_class:,
|
|
73
|
+
model_module:,
|
|
74
|
+
attributes_declaration: attributes_type_declaration,
|
|
75
|
+
primary_key:,
|
|
76
|
+
description:
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
declaration.is_absolutified = true
|
|
81
|
+
declaration.is_duped = true
|
|
82
|
+
|
|
83
|
+
entity_type = foobara_type_builder.type_for_declaration(declaration)
|
|
84
|
+
|
|
85
|
+
entity_type.target_class
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def foobara_register_and_deanonymize_entities(entity_names_to_attributes)
|
|
90
|
+
entities = []
|
|
91
|
+
|
|
92
|
+
entity_names_to_attributes.each_pair do |entity_name, attributes_declaration|
|
|
93
|
+
entities << foobara_register_and_deanonymize_entity(entity_name, attributes_declaration)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
entities
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def foobara_register_entities(entity_names_to_attributes)
|
|
100
|
+
entities = []
|
|
101
|
+
|
|
102
|
+
entity_names_to_attributes.each_pair do |entity_name, attributes_type_declaration|
|
|
103
|
+
entities << foobara_register_entity(entity_name, attributes_type_declaration)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
entities
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|