foobara 0.5.10 → 0.6.2
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/.ruby-version +1 -1
- data/CHANGELOG.md +22 -0
- data/lib/foobara/all.rb +4 -2
- data/projects/command/src/command_pattern_implementation/concerns/command_data.rb +3 -3
- data/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb +2 -2
- data/projects/command/src/command_pattern_implementation/concerns/errors.rb +27 -27
- data/projects/command/src/command_pattern_implementation/concerns/errors_type.rb +7 -11
- data/projects/command/src/command_pattern_implementation/concerns/inputs.rb +4 -24
- data/projects/command/src/command_pattern_implementation/concerns/inputs_type.rb +9 -14
- data/projects/command/src/command_pattern_implementation/concerns/reflection.rb +7 -20
- data/projects/command/src/command_pattern_implementation/concerns/runtime.rb +3 -48
- data/projects/command/src/command_pattern_implementation/concerns/subcommands.rb +5 -5
- data/projects/command/src/command_pattern_implementation.rb +0 -1
- data/projects/command_connectors/lib/foobara/command_connectors.rb +1 -1
- data/projects/command_connectors/src/command_connector/concerns/desugarizers.rb +5 -5
- data/projects/command_connectors/src/command_connector/concerns/reflection.rb +63 -17
- data/projects/command_connectors/src/command_connector/request.rb +26 -10
- data/projects/command_connectors/src/command_connector/response.rb +2 -0
- data/projects/command_connectors/src/command_connector.rb +62 -58
- data/projects/command_connectors/src/command_registry/exposed_command.rb +7 -2
- data/projects/command_connectors/src/command_registry.rb +24 -18
- data/projects/command_connectors/src/desugarizer.rb +2 -2
- data/projects/command_connectors/src/desugarizers/attributes.rb +8 -8
- data/projects/command_connectors/src/desugarizers/auth.rb +1 -1
- data/projects/command_connectors/src/desugarizers/set_inputs.rb +3 -3
- data/projects/command_connectors/src/desugarizers/symbols_to_true.rb +2 -2
- data/projects/command_connectors/src/request_mutator.rb +6 -6
- data/projects/command_connectors/src/response_mutator.rb +6 -6
- data/projects/command_connectors/src/transformed_command.rb +39 -36
- data/projects/command_connectors/src/transformers/auth_errors_transformer.rb +2 -2
- data/projects/command_connectors/src/transformers/entity_to_primary_key_inputs_transformer.rb +2 -2
- data/projects/command_connectors/src/transformers/load_delegated_attributes_entities_pre_commit_transformer.rb +1 -1
- data/projects/domain_mapper/src/domain_mapper.rb +4 -4
- data/projects/domain_mapper/src/domain_mapper_lookups.rb +3 -3
- data/projects/entities/projects/detached_entity/lib/foobara/detached_entity.rb +1 -1
- data/projects/entities/projects/detached_entity/src/concerns/associations.rb +18 -18
- data/projects/entities/projects/detached_entity/src/concerns/initialization.rb +2 -2
- data/projects/entities/projects/detached_entity/src/concerns/primary_key.rb +4 -4
- data/projects/entities/projects/detached_entity/src/concerns/types.rb +2 -2
- data/projects/entities/projects/detached_entity/src/detached_entity_type.rb +4 -4
- data/projects/entities/projects/detached_entity/src/extensions/builtin_types/detached_entity/casters/primary_key.rb +1 -1
- data/projects/entities/projects/detached_entity/src/extensions/builtin_types/detached_entity/validators/model_instance_is_valid.rb +2 -2
- data/projects/entities/projects/detached_entity/src/extensions/type_declarations/handlers/registered_type_declaration/validate_primary_key_present.rb +30 -0
- data/projects/entities/projects/detached_entity/src/remove_sensitive_values_transformer_extensions.rb +2 -2
- data/projects/entities/projects/entity/lib/foobara/entity.rb +1 -1
- data/projects/entities/projects/entity/src/concerns/attributes.rb +6 -6
- data/projects/entities/projects/entity/src/concerns/callbacks.rb +1 -1
- data/projects/entities/projects/entity/src/concerns/initialization.rb +8 -8
- data/projects/entities/projects/entity/src/concerns/mutations.rb +4 -4
- data/projects/entities/projects/entity/src/concerns/persistence.rb +3 -3
- data/projects/entities/projects/entity/src/concerns/queries.rb +7 -7
- data/projects/entities/projects/entity/src/extensions/domain/domain_module_extension.rb +4 -4
- data/projects/entities/projects/entity/src/new_prepend.rb +2 -2
- data/projects/entities/projects/entity/src/not_found_error.rb +8 -8
- data/projects/entities/projects/entity/src/sensitive_value_removers/entity.rb +8 -5
- data/projects/entities/projects/in_memory_crud_driver_minimal/src/in_memory_minimal.rb +4 -4
- data/projects/entities/projects/model_attribute_helpers/lib/foobara/model_attribute_helpers.rb +0 -2
- data/projects/entities/projects/model_attribute_helpers/src/attribute_helper_aliases.rb +1 -1
- data/projects/entities/projects/model_attribute_helpers/src/attribute_helpers.rb +2 -2
- data/projects/entities/projects/nested_transactionable/lib/foobara/nested_transactionable.rb +5 -5
- data/projects/entities/projects/persistence/lib/foobara/persistence.rb +1 -1
- data/projects/entities/projects/persistence/src/entity_attributes_crud_driver.rb +35 -37
- data/projects/entities/projects/persistence/src/entity_base/transaction/concerns/entity_callback_handling.rb +25 -25
- data/projects/entities/projects/persistence/src/entity_base/transaction/concerns/state_transitions.rb +8 -8
- data/projects/entities/projects/persistence/src/entity_base/transaction/concerns/transaction_tracking.rb +1 -1
- data/projects/entities/projects/persistence/src/entity_base/transaction.rb +9 -9
- data/projects/entities/projects/persistence/src/entity_base/transaction_table/concerns/record_tracking.rb +4 -4
- data/projects/entities/projects/persistence/src/entity_base/transaction_table.rb +52 -52
- data/projects/entities/projects/persistence/src/entity_base.rb +7 -7
- data/projects/entities/projects/persistence/src/persistence.rb +23 -23
- data/projects/entities/projects/weak_object_set/src/weak_object_set.rb +16 -16
- data/projects/entities_plumbing/lib/foobara/entities_plumbing.rb +6 -2
- data/projects/entities_plumbing/src/extensions/command_pattern_implementation/concerns/entities.rb +21 -5
- data/projects/entities_plumbing/src/extensions/command_pattern_implementation/concerns/entity_errors_type.rb +23 -0
- data/projects/entities_plumbing/src/extensions/command_pattern_implementation/concerns/entity_inputs.rb +33 -0
- data/projects/entities_plumbing/src/extensions/command_pattern_implementation/concerns/entity_reflection.rb +39 -0
- data/projects/entities_plumbing/src/extensions/command_pattern_implementation/concerns/runtime.rb +39 -0
- data/projects/manifest/src/base_manifest.rb +9 -9
- data/projects/manifest/src/model.rb +4 -4
- data/projects/manifest/src/type.rb +3 -3
- data/projects/manifest/src/type_declaration.rb +4 -4
- data/projects/model_plumbing/lib/foobara/model_plumbing.rb +2 -0
- data/projects/model_plumbing/src/extensions/command_pattern_implementation/concerns/model_inputs_type.rb +35 -0
- data/projects/typesystem/projects/builtin_types/lib/foobara/builtin_types.rb +2 -1
- data/projects/typesystem/projects/builtin_types/src/builtin_types.rb +8 -8
- data/projects/typesystem/projects/builtin_types/src/duck/supported_validators/one_of/type_declaration_extension/extend_registered_type_declaration/desugarizers/module_desugarizer.rb +2 -2
- data/projects/typesystem/projects/builtin_types/src/email/validator_base.rb +4 -4
- data/projects/typesystem/projects/callback/src/block/concerns/block_parameter_required.rb +2 -2
- data/projects/typesystem/projects/callback/src/block/concerns/keyword_argumentable_block.rb +2 -2
- data/projects/typesystem/projects/callback/src/block/concerns/single_argument_block.rb +2 -2
- data/projects/typesystem/projects/callback/src/block.rb +4 -4
- data/projects/typesystem/projects/callback/src/registry/base.rb +10 -10
- data/projects/typesystem/projects/callback/src/registry/conditioned.rb +2 -2
- data/projects/typesystem/projects/callback/src/registry/multiple_action.rb +6 -6
- data/projects/typesystem/projects/callback/src/runner.rb +4 -4
- data/projects/typesystem/projects/callback/src/set.rb +4 -4
- data/projects/typesystem/projects/common/src/data_path.rb +14 -14
- data/projects/typesystem/projects/common/src/error.rb +11 -11
- data/projects/typesystem/projects/common/src/error_collection.rb +14 -14
- data/projects/typesystem/projects/common/src/error_key.rb +5 -3
- data/projects/typesystem/projects/common/src/outcome.rb +5 -5
- data/projects/typesystem/projects/common/src/possible_error.rb +2 -2
- data/projects/typesystem/projects/concerns/src/concern.rb +3 -3
- data/projects/typesystem/projects/delegate/src/extensions/module.rb +4 -4
- data/projects/typesystem/projects/domain/lib/foobara/domain.rb +2 -2
- data/projects/typesystem/projects/domain/src/domain.rb +5 -5
- data/projects/typesystem/projects/domain/src/domain_module_extension.rb +22 -22
- data/projects/typesystem/projects/domain/src/extensions/foobara.rb +14 -6
- data/projects/typesystem/projects/domain/src/module_extension.rb +4 -4
- data/projects/typesystem/projects/domain/src/organization.rb +6 -6
- data/projects/typesystem/projects/enumerated/src/accessors.rb +4 -4
- data/projects/typesystem/projects/enumerated/src/values.rb +14 -14
- data/projects/{entities → typesystem}/projects/model/lib/foobara/model.rb +1 -1
- data/projects/{entities → typesystem}/projects/model/src/concerns/classes.rb +4 -4
- data/projects/{entities → typesystem}/projects/model/src/concerns/types.rb +5 -5
- data/projects/{entities → typesystem}/projects/model/src/extensions/builtin_types/model/casters/hash.rb +1 -1
- data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/attributes_handler_desugarizer.rb +2 -2
- data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/model_class_desugarizer.rb +6 -6
- data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/to_type_transformer.rb +4 -4
- data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration.rb +2 -2
- data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/registered_type_declaration/model_class_desugarizer.rb +6 -10
- data/projects/{entities → typesystem}/projects/model/src/model.rb +13 -13
- data/projects/{entities → typesystem}/projects/model/src/sensitive_value_removers/model.rb +1 -1
- data/projects/typesystem/projects/namespace/src/ambiguous_registry.rb +5 -5
- data/projects/typesystem/projects/namespace/src/base_registry.rb +8 -8
- data/projects/typesystem/projects/namespace/src/is_namespace.rb +19 -19
- data/projects/typesystem/projects/namespace/src/namespace/lookup_mode.rb +2 -2
- data/projects/typesystem/projects/namespace/src/namespace.rb +5 -5
- data/projects/typesystem/projects/namespace/src/namespace_helpers.rb +4 -4
- data/projects/typesystem/projects/namespace/src/prefixless_registry.rb +3 -3
- data/projects/typesystem/projects/namespace/src/scoped.rb +7 -7
- data/projects/typesystem/projects/project/src/foobara.rb +13 -7
- data/projects/typesystem/projects/project/src/project.rb +1 -1
- data/projects/typesystem/projects/state_machine/src/callbacks.rb +14 -14
- data/projects/typesystem/projects/state_machine/src/state_machine.rb +2 -2
- data/projects/typesystem/projects/state_machine/src/sugar.rb +3 -3
- data/projects/typesystem/projects/type_declarations/lib/foobara/type_declarations.rb +1 -1
- data/projects/typesystem/projects/type_declarations/src/attributes.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/attributes_transformers/from_yaml.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/attributes_transformers/only.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/attributes_transformers/reject.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/attributes_transformers/set.rb +4 -4
- data/projects/typesystem/projects/type_declarations/src/desugarizer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/dsl/attributes.rb +9 -9
- data/projects/typesystem/projects/type_declarations/src/error_extension.rb +6 -6
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_array_type_declaration/array_desugarizer.rb +3 -3
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_array_type_declaration/element_type_declaration_desugarizer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_array_type_declaration/type_set_to_array_desugarizer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_attributes_type_declaration/element_type_declarations_desugarizer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_registered_type_declaration/to_type_transformer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_registered_type_declaration.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/extend_tuple_type_declaration/array_desugarizer.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/handlers/registered_type_declaration.rb +4 -3
- data/projects/typesystem/projects/type_declarations/src/remove_sensitive_values_transformer.rb +3 -3
- data/projects/typesystem/projects/type_declarations/src/type_builder.rb +5 -5
- data/projects/typesystem/projects/type_declarations/src/type_declaration.rb +7 -1
- data/projects/typesystem/projects/type_declarations/src/type_declaration_handler.rb +13 -13
- data/projects/typesystem/projects/type_declarations/src/type_declaration_handler_registry.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/type_declaration_validator.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/type_declarations.rb +2 -2
- data/projects/typesystem/projects/type_declarations/src/with_registries.rb +2 -2
- data/projects/typesystem/projects/types/lib/foobara/types.rb +0 -2
- data/projects/typesystem/projects/types/src/extensions/error.rb +5 -5
- data/projects/typesystem/projects/types/src/type/concerns/reflection.rb +22 -22
- data/projects/typesystem/projects/types/src/type/concerns/supported_processor_registration.rb +4 -4
- data/projects/typesystem/projects/types/src/type.rb +25 -25
- data/projects/typesystem/projects/value/src/caster.rb +11 -11
- data/projects/typesystem/projects/value/src/data_error.rb +1 -1
- data/projects/typesystem/projects/value/src/mutator.rb +3 -3
- data/projects/typesystem/projects/value/src/processor/casting.rb +6 -6
- data/projects/typesystem/projects/value/src/processor/pipeline.rb +2 -2
- data/projects/typesystem/projects/value/src/processor/runner.rb +1 -1
- data/projects/typesystem/projects/value/src/processor/selection.rb +3 -3
- data/projects/typesystem/projects/value/src/processor.rb +23 -23
- data/projects/typesystem/projects/value/src/transformer.rb +5 -5
- data/projects/typesystem/projects/value/src/validator.rb +3 -3
- data/version.rb +2 -2
- metadata +44 -160
- data/projects/command_connectors/Guardfile +0 -6
- data/projects/command_connectors/spec/allowed_rules_spec.rb +0 -77
- data/projects/command_connectors/spec/ambiguous_lookups_spec.rb +0 -143
- data/projects/command_connectors/spec/auth_mappers_spec.rb +0 -201
- data/projects/command_connectors/spec/command_connector_spec.rb +0 -2460
- data/projects/command_connectors/spec/command_registry_spec.rb +0 -9
- data/projects/command_connectors/spec/commands/describe_spec.rb +0 -83
- data/projects/command_connectors/spec/commands/ping_spec.rb +0 -14
- data/projects/command_connectors/spec/commands/query_git_commit_info_spec.rb +0 -55
- data/projects/command_connectors/spec/fixtures/command_connectors/manifest_with_errors_with_missing_command_parents.yaml +0 -1662
- data/projects/command_connectors/spec/not_found_error_spec.rb +0 -17
- data/projects/command_connectors/spec/pre_commit_transformers/load_atoms_pre_commit_transformer_spec.rb +0 -108
- data/projects/command_connectors/spec/request_spec.rb +0 -118
- data/projects/command_connectors/spec/serializer_spec.rb +0 -9
- data/projects/command_connectors/spec/serializers/aggregate_serializer_spec.rb +0 -45
- data/projects/command_connectors/spec/serializers/atomic_serializer_spec.rb +0 -68
- data/projects/command_connectors/spec/serializers/entities_to_primary_keys_serializer_spec.rb +0 -36
- data/projects/command_connectors/spec/serializers/json_serializer_spec.rb +0 -22
- data/projects/command_connectors/spec/serializers/noop_serializer_spec.rb +0 -22
- data/projects/command_connectors/spec/serializers/yaml_serializer_spec.rb +0 -22
- data/projects/command_connectors/spec/spec_helper.rb +0 -56
- data/projects/command_connectors/spec/support/rubyprof.rb +0 -32
- data/projects/command_connectors/spec/support/term_trap.rb +0 -6
- data/projects/command_connectors/spec/transformers/entity_to_primary_key_inputs_transformer_spec.rb +0 -119
- data/projects/entities/Guardfile +0 -6
- data/projects/entities/spec/builtin_types/detached_entity_spec.rb +0 -300
- data/projects/entities/spec/builtin_types/entity_spec.rb +0 -501
- data/projects/entities/spec/builtin_types/model_spec.rb +0 -420
- data/projects/entities/spec/detached_entity/casting_spec.rb +0 -31
- data/projects/entities/spec/entity/concerns/associations_spec.rb +0 -73
- data/projects/entities/spec/entity/concerns/attribute_helpers_spec.rb +0 -220
- data/projects/entities/spec/entity/concerns/callbacks_spec.rb +0 -61
- data/projects/entities/spec/entity/concerns/initialization_spec.rb +0 -213
- data/projects/entities/spec/entity/concerns/mutations_spec.rb +0 -38
- data/projects/entities/spec/entity/concerns/queries_spec.rb +0 -184
- data/projects/entities/spec/entity/entity_spec.rb +0 -240
- data/projects/entities/spec/entity/extending_existing_spec.rb +0 -137
- data/projects/entities/spec/entity/extensions/domain_module_extension_spec.rb +0 -42
- data/projects/entities/spec/entity/from_type_declaration_spec.rb +0 -34
- data/projects/entities/spec/entity/that_owns_spec.rb +0 -243
- data/projects/entities/spec/entity/weak_object_set_spec.rb +0 -91
- data/projects/entities/spec/model/model_spec.rb +0 -135
- data/projects/entities/spec/model/types_spec.rb +0 -397
- data/projects/entities/spec/nested_transactionable/nested_transactionable_spec.rb +0 -67
- data/projects/entities/spec/persistence/entity_attributes_crud_drivers/in_memory_minimal_spec.rb +0 -13
- data/projects/entities/spec/persistence/entity_base/transaction_spec.rb +0 -509
- data/projects/entities/spec/persistence/entity_base/transaction_table_spec.rb +0 -58
- data/projects/entities/spec/persistence/persistence_spec.rb +0 -148
- data/projects/entities/spec/spec_helper.rb +0 -54
- data/projects/entities/spec/support/rubyprof.rb +0 -32
- data/projects/entities/spec/support/term_trap.rb +0 -6
- data/projects/entities/spec/type_declarations/sensitive_type_removers_spec.rb +0 -90
- data/projects/entities_plumbing/Guardfile +0 -6
- data/projects/entities_plumbing/spec/auth_mappers_spec.rb +0 -159
- data/projects/entities_plumbing/spec/spec_helper.rb +0 -55
- data/projects/entities_plumbing/spec/support/rubyprof.rb +0 -32
- data/projects/entities_plumbing/spec/support/term_trap.rb +0 -6
- data/projects/entities_plumbing/spec/transaction_spec.rb +0 -534
- data/projects/manifest/Guardfile +0 -6
- data/projects/manifest/spec/associations_spec.rb +0 -67
- data/projects/manifest/spec/manifest_spec.rb +0 -382
- data/projects/manifest/spec/model_spec.rb +0 -126
- data/projects/manifest/spec/spec_helper.rb +0 -54
- data/projects/manifest/spec/type_declaration_spec.rb +0 -39
- data/projects/manifest/spec/type_spec.rb +0 -30
- data/projects/typesystem/spec/builtin_types/allow_nil_spec.rb +0 -138
- data/projects/typesystem/spec/builtin_types/array_spec.rb +0 -140
- data/projects/typesystem/spec/builtin_types/associative_array_spec.rb +0 -228
- data/projects/typesystem/spec/builtin_types/attributes_spec.rb +0 -490
- data/projects/typesystem/spec/builtin_types/big_decimal_spec.rb +0 -42
- data/projects/typesystem/spec/builtin_types/boolean_spec.rb +0 -43
- data/projects/typesystem/spec/builtin_types/class_type_desugarizer_spec.rb +0 -17
- data/projects/typesystem/spec/builtin_types/custom_type_spec.rb +0 -430
- data/projects/typesystem/spec/builtin_types/date_spec.rb +0 -37
- data/projects/typesystem/spec/builtin_types/datetime_spec.rb +0 -49
- data/projects/typesystem/spec/builtin_types/email_spec.rb +0 -44
- data/projects/typesystem/spec/builtin_types/float_spec.rb +0 -59
- data/projects/typesystem/spec/builtin_types/instance_of_spec.rb +0 -75
- data/projects/typesystem/spec/builtin_types/one_of_spec.rb +0 -73
- data/projects/typesystem/spec/builtin_types/string_spec.rb +0 -117
- data/projects/typesystem/spec/builtin_types/symbol_spec.rb +0 -24
- data/projects/typesystem/spec/builtin_types/tuple_spec.rb +0 -125
- data/projects/typesystem/spec/callback/callback_spec.rb +0 -155
- data/projects/typesystem/spec/callback/registry/conditioned_spec.rb +0 -152
- data/projects/typesystem/spec/callback/registry/multiple_action_spec.rb +0 -144
- data/projects/typesystem/spec/callback/registry/single_action_spec.rb +0 -114
- data/projects/typesystem/spec/common/data_path_spec.rb +0 -268
- data/projects/typesystem/spec/common/error_collection_spec.rb +0 -77
- data/projects/typesystem/spec/common/error_key_spec.rb +0 -56
- data/projects/typesystem/spec/common/outcome_spec.rb +0 -65
- data/projects/typesystem/spec/common/possible_error_spec.rb +0 -17
- data/projects/typesystem/spec/concerns/concern_spec.rb +0 -122
- data/projects/typesystem/spec/enumerated/accessors_spec.rb +0 -182
- data/projects/typesystem/spec/enumerated/enumerated_spec.rb +0 -32
- data/projects/typesystem/spec/enumerated/values_spec.rb +0 -67
- data/projects/typesystem/spec/foobara/foobara_spec.rb +0 -45
- data/projects/typesystem/spec/namespace/ambiguous_registry_spec.rb +0 -70
- data/projects/typesystem/spec/namespace/foobara_simulation_spec.rb +0 -254
- data/projects/typesystem/spec/namespace/is_namespace_spec.rb +0 -103
- data/projects/typesystem/spec/namespace/namespace_helpers_spec.rb +0 -67
- data/projects/typesystem/spec/namespace/namespace_spec.rb +0 -335
- data/projects/typesystem/spec/namespace/prefixless_registry_spec.rb +0 -30
- data/projects/typesystem/spec/namespace/unambiguous_registry_spec.rb +0 -50
- data/projects/typesystem/spec/spec_helper.rb +0 -52
- data/projects/typesystem/spec/state_machine/callbacks_spec.rb +0 -144
- data/projects/typesystem/spec/state_machine/state_machine_spec.rb +0 -224
- data/projects/typesystem/spec/state_machine/target_attribute_spec.rb +0 -46
- data/projects/typesystem/spec/support/rubyprof.rb +0 -32
- data/projects/typesystem/spec/support/term_trap.rb +0 -6
- data/projects/typesystem/spec/type_declarations/attributes_spec.rb +0 -14
- data/projects/typesystem/spec/type_declarations/attributes_transformer_spec.rb +0 -95
- data/projects/typesystem/spec/type_declarations/dsl/attributes_spec.rb +0 -107
- data/projects/typesystem/spec/type_declarations/handlers/extend_registered_type_declaration_spec.rb +0 -13
- data/projects/typesystem/spec/type_declarations/sensitive_type_removers_spec.rb +0 -210
- data/projects/typesystem/spec/type_declarations/type_builder_spec.rb +0 -47
- data/projects/typesystem/spec/type_declarations/type_declaration_spec.rb +0 -252
- data/projects/typesystem/spec/type_declarations/type_declarations_spec.rb +0 -11
- data/projects/typesystem/spec/type_declarations/typed_transformer_spec.rb +0 -65
- data/projects/typesystem/spec/types/sensitive_spec.rb +0 -36
- data/projects/typesystem/spec/types/type_spec.rb +0 -102
- data/projects/typesystem/spec/value/caster_spec.rb +0 -23
- data/projects/typesystem/spec/value/processor/runner_spec.rb +0 -34
- data/projects/typesystem/spec/value/processor/selection_spec.rb +0 -71
- data/projects/typesystem/spec/value/processor_spec.rb +0 -76
- data/projects/typesystem/spec/value/transformer_spec.rb +0 -27
- /data/projects/{command/src → entities_plumbing/src/extensions}/command_pattern_implementation/concerns/transactions.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/concerns/aliases.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/concerns/reflection.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/builtin_types/model/supported_transformers/mutable.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/builtin_types/model/validators/model_instance_is_valid.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/array_with_symbolic_elements.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/delegates_desugarizer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/delegates_validator.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/move_private_from_element_types_to_root.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/symbolize_private.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/valid_attribute_names.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/hash_desugarizer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/model_class_type_desugarizer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/mutable_validator.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/normalize_mutable_attributes_desugarizer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/extensions/type_declarations/lazy_element_types/model.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/sensitive_type_removers/extended_model.rb +0 -0
- /data/projects/{entities → typesystem}/projects/model/src/sensitive_type_removers/model.rb +0 -0
|
@@ -12,39 +12,39 @@ module Foobara
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def callbacks_for(*, **)
|
|
15
|
-
# :
|
|
15
|
+
# simplecov:disable
|
|
16
16
|
callback_registry.callbacks_for(*, **)
|
|
17
|
-
# :
|
|
17
|
+
# simplecov:enable
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def has_callbacks?(*, **)
|
|
21
|
-
# :
|
|
21
|
+
# simplecov:disable
|
|
22
22
|
callback_registry.has_callbacks?(*, **)
|
|
23
|
-
# :
|
|
23
|
+
# simplecov:enable
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def has_before_callbacks?(*, **)
|
|
27
|
-
# :
|
|
27
|
+
# simplecov:disable
|
|
28
28
|
callback_registry.has_before_callbacks?(*, **)
|
|
29
|
-
# :
|
|
29
|
+
# simplecov:enable
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def has_after_callbacks?(*, **)
|
|
33
|
-
# :
|
|
33
|
+
# simplecov:disable
|
|
34
34
|
callback_registry.has_after_callbacks?(*, **)
|
|
35
|
-
# :
|
|
35
|
+
# simplecov:enable
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def has_around_callbacks?(*, **)
|
|
39
|
-
# :
|
|
39
|
+
# simplecov:disable
|
|
40
40
|
callback_registry.has_around_callbacks?(*, **)
|
|
41
|
-
# :
|
|
41
|
+
# simplecov:enable
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def has_error_callbacks?(*, **)
|
|
45
|
-
# :
|
|
45
|
+
# simplecov:disable
|
|
46
46
|
callback_registry.has_error_callbacks?(*, **)
|
|
47
|
-
# :
|
|
47
|
+
# simplecov:enable
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def register_transition_callback(type, **, &)
|
|
@@ -79,9 +79,9 @@ module Foobara
|
|
|
79
79
|
# 6 before_<transition>_transition_from_<state>
|
|
80
80
|
def create_register_callback_methods
|
|
81
81
|
if register_callback_methods
|
|
82
|
-
# :
|
|
82
|
+
# simplecov:disable
|
|
83
83
|
raise "Do not create register callback methods twice"
|
|
84
|
-
# :
|
|
84
|
+
# simplecov:enable
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
callback_methods = @register_callback_methods = []
|
|
@@ -63,7 +63,7 @@ module Foobara
|
|
|
63
63
|
|
|
64
64
|
def current_state
|
|
65
65
|
if target_attribute
|
|
66
|
-
owner.
|
|
66
|
+
owner.__send__(target_attribute) || self.class.initial_state
|
|
67
67
|
else
|
|
68
68
|
@current_state
|
|
69
69
|
end
|
|
@@ -71,7 +71,7 @@ module Foobara
|
|
|
71
71
|
|
|
72
72
|
def current_state=(state)
|
|
73
73
|
if target_attribute
|
|
74
|
-
owner.
|
|
74
|
+
owner.__send__("#{target_attribute}=", state)
|
|
75
75
|
else
|
|
76
76
|
@current_state = state
|
|
77
77
|
end
|
|
@@ -23,9 +23,9 @@ module Foobara
|
|
|
23
23
|
transitions_for_state = transition_map[state] ||= {}
|
|
24
24
|
|
|
25
25
|
if transitions_for_state.key?(transition)
|
|
26
|
-
# :
|
|
26
|
+
# simplecov:disable
|
|
27
27
|
raise TransitionAlreadyDefinedError, "There's already a #{transition} for #{state}"
|
|
28
|
-
# :
|
|
28
|
+
# simplecov:enable
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
transitions_for_state[transition] = next_state
|
|
@@ -85,7 +85,7 @@ module Foobara
|
|
|
85
85
|
} but should have been one of #{states}"
|
|
86
86
|
end
|
|
87
87
|
else
|
|
88
|
-
self.initial_state = states
|
|
88
|
+
self.initial_state = states[0]
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -43,9 +43,9 @@ module Foobara
|
|
|
43
43
|
invalid_keys = keys_to_keep - valid_keys
|
|
44
44
|
|
|
45
45
|
if invalid_keys.any?
|
|
46
|
-
# :
|
|
46
|
+
# simplecov:disable
|
|
47
47
|
raise ArgumentError, "Invalid keys: #{invalid_keys} expected only #{valid_keys}"
|
|
48
|
-
# :
|
|
48
|
+
# simplecov:enable
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
keys_to_reject = valid_keys - keys_to_keep
|
data/projects/typesystem/projects/type_declarations/src/attributes_transformers/from_yaml.rb
CHANGED
|
@@ -4,9 +4,9 @@ module Foobara
|
|
|
4
4
|
# TODO: dry this up with a .subclass method in AttributesTransformers?
|
|
5
5
|
def from_yaml(*attribute_names)
|
|
6
6
|
if attribute_names.empty?
|
|
7
|
-
# :
|
|
7
|
+
# simplecov:disable
|
|
8
8
|
raise ArgumentError, "You must specify at least one attribute name"
|
|
9
|
-
# :
|
|
9
|
+
# simplecov:enable
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
symbol = symbol_for_attribute_names(attribute_names)
|
|
@@ -3,9 +3,9 @@ module Foobara
|
|
|
3
3
|
class << self
|
|
4
4
|
def only(*attribute_names)
|
|
5
5
|
if attribute_names.empty?
|
|
6
|
-
# :
|
|
6
|
+
# simplecov:disable
|
|
7
7
|
raise ArgumentError, "You must specify at least one attribute name"
|
|
8
|
-
# :
|
|
8
|
+
# simplecov:enable
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
symbol = symbol_for_attribute_names(attribute_names)
|
|
@@ -3,9 +3,9 @@ module Foobara
|
|
|
3
3
|
class << self
|
|
4
4
|
def reject(*attribute_names)
|
|
5
5
|
if attribute_names.empty?
|
|
6
|
-
# :
|
|
6
|
+
# simplecov:disable
|
|
7
7
|
raise ArgumentError, "You must specify at least one attribute name"
|
|
8
|
-
# :
|
|
8
|
+
# simplecov:enable
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
symbol = symbol_for_attribute_names(attribute_names)
|
|
@@ -8,9 +8,9 @@ module Foobara
|
|
|
8
8
|
|
|
9
9
|
def set(attribute_names_to_values)
|
|
10
10
|
if attribute_names_to_values.empty?
|
|
11
|
-
# :
|
|
11
|
+
# simplecov:disable
|
|
12
12
|
raise ArgumentError, "You must specify at least one attribute name/value pair"
|
|
13
|
-
# :
|
|
13
|
+
# simplecov:enable
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
symbol = symbol_for_attribute_names([*attribute_names_to_values.keys, next_index.to_s.to_sym])
|
|
@@ -45,12 +45,12 @@ module Foobara
|
|
|
45
45
|
|
|
46
46
|
def to_type_declaration
|
|
47
47
|
# TODO: test this
|
|
48
|
-
# :
|
|
48
|
+
# simplecov:disable
|
|
49
49
|
if from_type
|
|
50
50
|
from_declaration = from_type.declaration_data
|
|
51
51
|
TypeDeclarations::Attributes.reject(from_declaration, *self.class.attribute_names_to_values.keys)
|
|
52
52
|
end
|
|
53
|
-
# :
|
|
53
|
+
# simplecov:enable
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def from_type_declaration
|
|
@@ -29,9 +29,9 @@ module Foobara
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def respond_to_missing?(...)
|
|
32
|
-
# :
|
|
32
|
+
# simplecov:disable
|
|
33
33
|
false
|
|
34
|
-
# :
|
|
34
|
+
# simplecov:enable
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -54,9 +54,9 @@ module Foobara
|
|
|
54
54
|
|
|
55
55
|
def method_missing(attribute_name, *processor_symbols, **declaration, &block)
|
|
56
56
|
unless respond_to_missing?(attribute_name)
|
|
57
|
-
# :
|
|
57
|
+
# simplecov:disable
|
|
58
58
|
return super
|
|
59
|
-
# :
|
|
59
|
+
# simplecov:enable
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
_disable_method_missing do
|
|
@@ -65,7 +65,7 @@ module Foobara
|
|
|
65
65
|
if block
|
|
66
66
|
# TODO: technically, current namespace might have an overridden :array type so instead we
|
|
67
67
|
# should lookup :array he to see if we get BuiltinTypes[:array] or not (or "::array" or not)
|
|
68
|
-
if processor_symbols
|
|
68
|
+
if processor_symbols[0] == :array
|
|
69
69
|
type, *processor_symbols = processor_symbols
|
|
70
70
|
end
|
|
71
71
|
else
|
|
@@ -89,19 +89,19 @@ module Foobara
|
|
|
89
89
|
description = processor_symbol
|
|
90
90
|
|
|
91
91
|
if declaration.key?(:description)
|
|
92
|
-
# :
|
|
92
|
+
# simplecov:disable
|
|
93
93
|
::Kernel.raise ArgumentError, "Expected only one description but " \
|
|
94
94
|
"got #{description.inspect} and #{declaration[:description].inspect}"
|
|
95
|
-
# :
|
|
95
|
+
# simplecov:enable
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
declaration[:description] = description
|
|
99
99
|
when ::Symbol
|
|
100
100
|
declaration[processor_symbol] = true
|
|
101
101
|
else
|
|
102
|
-
# :
|
|
102
|
+
# simplecov:disable
|
|
103
103
|
::Kernel.raise ArgumentError, "expected a Symbol, got #{processor_symbol.inspect}"
|
|
104
|
-
# :
|
|
104
|
+
# simplecov:enable
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
|
|
@@ -40,17 +40,17 @@ module Foobara
|
|
|
40
40
|
if abstract?
|
|
41
41
|
nil
|
|
42
42
|
else
|
|
43
|
-
# :
|
|
43
|
+
# simplecov:disable
|
|
44
44
|
raise
|
|
45
|
-
# :
|
|
45
|
+
# simplecov:enable
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def context_type_declaration
|
|
51
|
-
# :
|
|
51
|
+
# simplecov:disable
|
|
52
52
|
raise NoContextTypeSetError
|
|
53
|
-
# :
|
|
53
|
+
# simplecov:enable
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -72,9 +72,9 @@ module Foobara
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
def context_type_declaration
|
|
75
|
-
# :
|
|
75
|
+
# simplecov:disable
|
|
76
76
|
self.class.context_type_declaration
|
|
77
|
-
# :
|
|
77
|
+
# simplecov:enable
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
end
|
|
@@ -20,7 +20,7 @@ module Foobara
|
|
|
20
20
|
strict_type_declaration.is_absolutified = true
|
|
21
21
|
|
|
22
22
|
unless sugary_type_declaration.empty?
|
|
23
|
-
element_type_declaration = sugary_type_declaration
|
|
23
|
+
element_type_declaration = sugary_type_declaration[0]
|
|
24
24
|
|
|
25
25
|
element_type_declaration = if element_type_declaration.is_a?(Types::Type)
|
|
26
26
|
element_type_declaration.reference_or_declaration_data
|
|
@@ -29,10 +29,10 @@ module Foobara
|
|
|
29
29
|
|
|
30
30
|
if strict_type_declaration.deep_duped?
|
|
31
31
|
# TODO: probably not worth directly testing this path
|
|
32
|
-
# :
|
|
32
|
+
# simplecov:disable
|
|
33
33
|
declaration.is_deep_duped = true
|
|
34
34
|
declaration.is_duped = true
|
|
35
|
-
# :
|
|
35
|
+
# simplecov:enable
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
handler = type_declaration_handler_for(declaration)
|
|
@@ -26,10 +26,10 @@ module Foobara
|
|
|
26
26
|
|
|
27
27
|
if sugary_type_declaration.deep_duped?
|
|
28
28
|
# TODO: probably not worth directly testing this path
|
|
29
|
-
# :
|
|
29
|
+
# simplecov:disable
|
|
30
30
|
declaration.is_deep_duped = true
|
|
31
31
|
declaration.is_duped = true
|
|
32
|
-
# :
|
|
32
|
+
# simplecov:enable
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
handler = type_declaration_handler_for(declaration)
|
|
@@ -26,10 +26,10 @@ module Foobara
|
|
|
26
26
|
|
|
27
27
|
if sugary_type_declaration.deep_duped?
|
|
28
28
|
# TODO: probably not worth testing this path
|
|
29
|
-
# :
|
|
29
|
+
# simplecov:disable
|
|
30
30
|
strict_type_declaration.is_deep_duped = true
|
|
31
31
|
strict_type_declaration.is_duped = true
|
|
32
|
-
# :
|
|
32
|
+
# simplecov:enable
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
strict_type_declaration = super(strict_type_declaration)
|
|
@@ -18,10 +18,10 @@ module Foobara
|
|
|
18
18
|
|
|
19
19
|
if sugary_type_declaration.deep_duped?
|
|
20
20
|
# TODO: probably not worth directly testing this path
|
|
21
|
-
# :
|
|
21
|
+
# simplecov:disable
|
|
22
22
|
declaration.is_deep_duped = true
|
|
23
23
|
declaration.is_duped = true
|
|
24
|
-
# :
|
|
24
|
+
# simplecov:enable
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
handler = type_declaration_handler_for(declaration)
|
|
@@ -37,9 +37,9 @@ module Foobara
|
|
|
37
37
|
element_processors
|
|
38
38
|
else
|
|
39
39
|
# TODO: add validator that these are all fine so we don't have to bother here...
|
|
40
|
-
# :
|
|
40
|
+
# simplecov:disable
|
|
41
41
|
raise "Not sure where to put #{processor}"
|
|
42
|
-
# :
|
|
42
|
+
# simplecov:enable
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
category << processor
|
|
@@ -6,9 +6,9 @@ module Foobara
|
|
|
6
6
|
class ExtendRegisteredTypeDeclaration < RegisteredTypeDeclaration
|
|
7
7
|
def applicable?(sugary_type_declaration)
|
|
8
8
|
strict_type_declaration = if sugary_type_declaration.strict?
|
|
9
|
-
# :
|
|
9
|
+
# simplecov:disable
|
|
10
10
|
sugary_type_declaration
|
|
11
|
-
# :
|
|
11
|
+
# simplecov:enable
|
|
12
12
|
else
|
|
13
13
|
desugarize(sugary_type_declaration.clone)
|
|
14
14
|
end
|
|
@@ -19,10 +19,10 @@ module Foobara
|
|
|
19
19
|
declaration = TypeDeclaration.new(element_type_declaration)
|
|
20
20
|
if sugary_type_declaration.deep_duped?
|
|
21
21
|
# TODO: probably not worth directly testing this path
|
|
22
|
-
# :
|
|
22
|
+
# simplecov:disable
|
|
23
23
|
declaration.is_deep_duped = true
|
|
24
24
|
declaration.is_duped = true
|
|
25
|
-
# :
|
|
25
|
+
# simplecov:enable
|
|
26
26
|
end
|
|
27
27
|
handler = type_declaration_handler_for(declaration)
|
|
28
28
|
handler.desugarize(declaration).declaration_data
|
data/projects/typesystem/projects/type_declarations/src/handlers/registered_type_declaration.rb
CHANGED
|
@@ -3,7 +3,6 @@ require_relative "../type_declaration_handler"
|
|
|
3
3
|
module Foobara
|
|
4
4
|
module TypeDeclarations
|
|
5
5
|
module Handlers
|
|
6
|
-
# TODO: we should just use the symbol instead of {type: symbol} to save space and simplify some stuff...
|
|
7
6
|
class RegisteredTypeDeclaration < TypeDeclarationHandler
|
|
8
7
|
def applicable?(sugary_type_declaration)
|
|
9
8
|
return true if sugary_type_declaration.type
|
|
@@ -19,11 +18,13 @@ module Foobara
|
|
|
19
18
|
desugarize(sugary_type_declaration.clone)
|
|
20
19
|
end
|
|
21
20
|
|
|
21
|
+
return true if strict_type_declaration.claimed_but_error?
|
|
22
|
+
|
|
22
23
|
if strict_type_declaration.reference?
|
|
23
24
|
unless strict_type_declaration.type
|
|
24
|
-
# :
|
|
25
|
+
# simplecov:disable
|
|
25
26
|
strict_type_declaration.handle_symbolic_declaration
|
|
26
|
-
# :
|
|
27
|
+
# simplecov:enable
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
unless sugary_type_declaration.equal?(strict_type_declaration)
|
|
@@ -28,19 +28,19 @@ module Foobara
|
|
|
28
28
|
|
|
29
29
|
type_declaration
|
|
30
30
|
else
|
|
31
|
-
# :
|
|
31
|
+
# simplecov:disable
|
|
32
32
|
raise ArgumentError, "Cannot provide both block and declaration of #{args}"
|
|
33
|
-
# :
|
|
33
|
+
# simplecov:enable
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
else
|
|
37
37
|
case args.size
|
|
38
38
|
when 0
|
|
39
|
-
# :
|
|
39
|
+
# simplecov:disable
|
|
40
40
|
raise ArgumentError, "expected 1 argument or a block but got 0 arguments and no block"
|
|
41
|
-
# :
|
|
41
|
+
# simplecov:enable
|
|
42
42
|
when 1
|
|
43
|
-
arg = args
|
|
43
|
+
arg = args[0]
|
|
44
44
|
|
|
45
45
|
if arg.is_a?(TypeDeclaration)
|
|
46
46
|
arg
|
|
@@ -9,7 +9,8 @@ module Foobara
|
|
|
9
9
|
:is_absolutified,
|
|
10
10
|
:reference_checked,
|
|
11
11
|
:type,
|
|
12
|
-
:base_type
|
|
12
|
+
:base_type,
|
|
13
|
+
:is_claimed_but_error
|
|
13
14
|
|
|
14
15
|
# TODO: we should be able to delete absolutified opt once strict declarations
|
|
15
16
|
# use `:ref` instead of `{type: :ref}` format.
|
|
@@ -289,10 +290,15 @@ module Foobara
|
|
|
289
290
|
strict? && declaration_data.is_a?(::Symbol)
|
|
290
291
|
end
|
|
291
292
|
|
|
293
|
+
def claimed_but_error!
|
|
294
|
+
self.is_claimed_but_error = true
|
|
295
|
+
end
|
|
296
|
+
|
|
292
297
|
alias absolutified? is_absolutified
|
|
293
298
|
alias duped? is_duped
|
|
294
299
|
alias deep_duped? is_deep_duped
|
|
295
300
|
alias strict? is_strict
|
|
296
301
|
alias reference_checked? reference_checked
|
|
302
|
+
alias claimed_but_error? is_claimed_but_error
|
|
297
303
|
end
|
|
298
304
|
end
|
|
@@ -7,9 +7,9 @@ module Foobara
|
|
|
7
7
|
class TypeDeclarationHandler < Value::Processor::Pipeline
|
|
8
8
|
class << self
|
|
9
9
|
def foobara_manifest
|
|
10
|
-
# :
|
|
10
|
+
# simplecov:disable
|
|
11
11
|
super.merge(processor_type: :type_declaration_handler)
|
|
12
|
-
# :
|
|
12
|
+
# simplecov:enable
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def starting_desugarizers
|
|
@@ -51,9 +51,9 @@ module Foobara
|
|
|
51
51
|
**opts
|
|
52
52
|
)
|
|
53
53
|
if processors && !processors.empty?
|
|
54
|
-
# :
|
|
54
|
+
# simplecov:disable
|
|
55
55
|
raise ArgumentError, "Cannot set processors directly for a type declaration handler"
|
|
56
|
-
# :
|
|
56
|
+
# simplecov:enable
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
self.desugarizers = Util.array(desugarizers)
|
|
@@ -67,15 +67,15 @@ module Foobara
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def starting_desugarizers_with_inherited
|
|
70
|
-
# :
|
|
70
|
+
# simplecov:disable
|
|
71
71
|
self.class.starting_desugarizers_with_inherited
|
|
72
|
-
# :
|
|
72
|
+
# simplecov:enable
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def starting_desugarizers_without_inherited
|
|
76
|
-
# :
|
|
76
|
+
# simplecov:disable
|
|
77
77
|
self.class.starting_desugarizers_without_inherited
|
|
78
|
-
# :
|
|
78
|
+
# simplecov:enable
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def starting_type_declaration_validators
|
|
@@ -87,7 +87,7 @@ module Foobara
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
def inspect
|
|
90
|
-
# :
|
|
90
|
+
# simplecov:disable
|
|
91
91
|
s = super
|
|
92
92
|
|
|
93
93
|
if s.size > 400
|
|
@@ -95,13 +95,13 @@ module Foobara
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
s
|
|
98
|
-
# :
|
|
98
|
+
# simplecov:enable
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def applicable?(_sugary_type_declaration)
|
|
102
|
-
# :
|
|
103
|
-
raise
|
|
104
|
-
# :
|
|
102
|
+
# simplecov:disable
|
|
103
|
+
raise NotImplementedError
|
|
104
|
+
# simplecov:enable
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
def processors
|
data/projects/typesystem/projects/type_declarations/src/type_declaration_handler_registry.rb
CHANGED
|
@@ -3,9 +3,9 @@ module Foobara
|
|
|
3
3
|
class TypeDeclarationHandlerRegistry < Value::Processor::Selection
|
|
4
4
|
class << self
|
|
5
5
|
def foobara_manifest
|
|
6
|
-
# :
|
|
6
|
+
# simplecov:disable
|
|
7
7
|
super.merge(processor_type: :type_declaration_handler_registry)
|
|
8
|
-
# :
|
|
8
|
+
# simplecov:enable
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
|
|
@@ -62,9 +62,9 @@ module Foobara
|
|
|
62
62
|
remover_class = sensitive_value_removers[handler.class.name]
|
|
63
63
|
|
|
64
64
|
unless remover_class
|
|
65
|
-
# :
|
|
65
|
+
# simplecov:disable
|
|
66
66
|
raise "No sensitive value remover found for #{declaration_data}"
|
|
67
|
-
# :
|
|
67
|
+
# simplecov:enable
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
remover_class
|
|
@@ -3,7 +3,7 @@ module Foobara
|
|
|
3
3
|
class << self
|
|
4
4
|
def types_depended_on(*args)
|
|
5
5
|
if args.size == 1
|
|
6
|
-
context_type.types_depended_on(args
|
|
6
|
+
context_type.types_depended_on(args[0])
|
|
7
7
|
elsif args.empty?
|
|
8
8
|
begin
|
|
9
9
|
if context_type
|
|
@@ -15,16 +15,16 @@ module Foobara
|
|
|
15
15
|
if abstract?
|
|
16
16
|
[]
|
|
17
17
|
else
|
|
18
|
-
# :
|
|
18
|
+
# simplecov:disable
|
|
19
19
|
raise
|
|
20
|
-
# :
|
|
20
|
+
# simplecov:enable
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
else
|
|
25
|
-
# :
|
|
25
|
+
# simplecov:disable
|
|
26
26
|
raise ArgumentError, "Too many arguments #{args}"
|
|
27
|
-
# :
|
|
27
|
+
# simplecov:enable
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
end
|