foobara 0.5.10 → 0.6.0
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.
Potentially problematic release.
This version of foobara might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +13 -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/spec/command_connector_spec.rb +63 -4
- data/projects/command_connectors/spec/spec_helper.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 +4 -4
- 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 +15 -15
- 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/spec/builtin_types/detached_entity_spec.rb +1 -1
- data/projects/entities/spec/builtin_types/entity_spec.rb +1 -1
- data/projects/entities/spec/builtin_types/model_spec.rb +1 -1
- data/projects/entities/spec/entity/extending_existing_spec.rb +1 -1
- data/projects/entities/spec/entity/from_type_declaration_spec.rb +1 -1
- data/projects/entities/spec/model/model_spec.rb +2 -2
- data/projects/entities/spec/spec_helper.rb +1 -1
- data/projects/entities_plumbing/lib/foobara/entities_plumbing.rb +6 -2
- data/projects/entities_plumbing/spec/inputs_spec.rb +54 -0
- data/projects/entities_plumbing/spec/spec_helper.rb +1 -1
- data/projects/entities_plumbing/spec/transaction_spec.rb +2 -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/spec/spec_helper.rb +1 -1
- 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/coverage/assets/0.13.2/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/DataTables-1.10.20/images/sort_both.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/application.css +1 -0
- data/projects/typesystem/coverage/assets/0.13.2/application.js +7 -0
- data/projects/typesystem/coverage/assets/0.13.2/colorbox/border.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/colorbox/controls.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/colorbox/loading.gif +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/colorbox/loading_background.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/favicon_green.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/favicon_red.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/favicon_yellow.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-icons_222222_256x240.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-icons_2e83ff_256x240.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-icons_454545_256x240.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-icons_888888_256x240.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/loading.gif +0 -0
- data/projects/typesystem/coverage/assets/0.13.2/magnify.png +0 -0
- data/projects/typesystem/coverage/index.html +215756 -0
- data/projects/typesystem/projects/builtin_types/lib/foobara/builtin_types.rb +1 -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 +6 -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/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/projects/typesystem/spec/builtin_types/custom_type_spec.rb +2 -2
- data/projects/typesystem/spec/builtin_types/instance_of_spec.rb +1 -1
- data/projects/typesystem/spec/foobara/foobara_spec.rb +18 -8
- data/projects/typesystem/spec/namespace/foobara_simulation_spec.rb +1 -1
- data/projects/typesystem/spec/spec_helper.rb +1 -1
- data/projects/typesystem/spec/state_machine/callbacks_spec.rb +1 -1
- data/projects/typesystem/spec/value/caster_spec.rb +1 -1
- data/version.rb +2 -2
- metadata +75 -35
- /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
|
@@ -5,15 +5,15 @@ module Foobara
|
|
|
5
5
|
module Desugarizers
|
|
6
6
|
class Attributes < Desugarizer
|
|
7
7
|
def desugarizer_symbol
|
|
8
|
-
# :
|
|
9
|
-
raise
|
|
10
|
-
# :
|
|
8
|
+
# simplecov:disable
|
|
9
|
+
raise NotImplementedError
|
|
10
|
+
# simplecov:enable
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def opts_key
|
|
14
|
-
# :
|
|
15
|
-
raise
|
|
16
|
-
# :
|
|
14
|
+
# simplecov:disable
|
|
15
|
+
raise NotImplementedError
|
|
16
|
+
# simplecov:enable
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def applicable?(args_and_opts)
|
|
@@ -40,13 +40,13 @@ module Foobara
|
|
|
40
40
|
transformers = transformers.map do |transformer|
|
|
41
41
|
if transformer.is_a?(::Hash) && transformer.key?(desugarizer_symbol)
|
|
42
42
|
params = transformer[desugarizer_symbol]
|
|
43
|
-
AttributesTransformers.
|
|
43
|
+
AttributesTransformers.__send__(transformer_method, *params)
|
|
44
44
|
else
|
|
45
45
|
transformer
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
transformers = transformers
|
|
49
|
+
transformers = transformers[0] unless is_array
|
|
50
50
|
|
|
51
51
|
opts = opts.merge(opts_key => transformers)
|
|
52
52
|
|
|
@@ -30,13 +30,13 @@ module Foobara
|
|
|
30
30
|
AttributesTransformers.set(transformer[:set])
|
|
31
31
|
else
|
|
32
32
|
# TODO: add a test for this
|
|
33
|
-
# :
|
|
33
|
+
# simplecov:disable
|
|
34
34
|
transformer
|
|
35
|
-
# :
|
|
35
|
+
# simplecov:enable
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
transformers = transformers
|
|
39
|
+
transformers = transformers[0] unless is_array
|
|
40
40
|
|
|
41
41
|
opts = opts.merge(inputs_transformers: transformers)
|
|
42
42
|
|
|
@@ -2,9 +2,9 @@ module Foobara
|
|
|
2
2
|
module CommandConnectors
|
|
3
3
|
class RequestMutator < Foobara::Value::Mutator
|
|
4
4
|
def inputs_type_declaration_from(_inputs_type)
|
|
5
|
-
# :
|
|
6
|
-
raise
|
|
7
|
-
# :
|
|
5
|
+
# simplecov:disable
|
|
6
|
+
raise NotImplementedError
|
|
7
|
+
# simplecov:enable
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def inputs_type_from(inputs_type)
|
|
@@ -13,9 +13,9 @@ module Foobara
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def mutate
|
|
16
|
-
# :
|
|
17
|
-
raise
|
|
18
|
-
# :
|
|
16
|
+
# simplecov:disable
|
|
17
|
+
raise NotImplementedError
|
|
18
|
+
# simplecov:enable
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
alias request declaration_data
|
|
@@ -2,9 +2,9 @@ module Foobara
|
|
|
2
2
|
module CommandConnectors
|
|
3
3
|
class ResponseMutator < Foobara::Value::Mutator
|
|
4
4
|
def result_type_declaration_from(_result_type)
|
|
5
|
-
# :
|
|
6
|
-
raise
|
|
7
|
-
# :
|
|
5
|
+
# simplecov:disable
|
|
6
|
+
raise NotImplementedError
|
|
7
|
+
# simplecov:enable
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def result_type_from(result_type)
|
|
@@ -13,9 +13,9 @@ module Foobara
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def mutate
|
|
16
|
-
# :
|
|
17
|
-
raise
|
|
18
|
-
# :
|
|
16
|
+
# simplecov:disable
|
|
17
|
+
raise NotImplementedError
|
|
18
|
+
# simplecov:enable
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
alias response declaration_data
|
|
@@ -19,6 +19,7 @@ module Foobara
|
|
|
19
19
|
:request_mutators,
|
|
20
20
|
:allowed_rule,
|
|
21
21
|
:requires_authentication,
|
|
22
|
+
:authentication_optional,
|
|
22
23
|
:authenticator,
|
|
23
24
|
:subclassed_in_namespace,
|
|
24
25
|
:suffix,
|
|
@@ -39,6 +40,7 @@ module Foobara
|
|
|
39
40
|
allowed_rule:,
|
|
40
41
|
requires_authentication:,
|
|
41
42
|
authenticator:,
|
|
43
|
+
authentication_optional: nil,
|
|
42
44
|
suffix: nil,
|
|
43
45
|
capture_unknown_error: false
|
|
44
46
|
)
|
|
@@ -56,6 +58,7 @@ module Foobara
|
|
|
56
58
|
klass.request_mutators = Util.array(request_mutators)
|
|
57
59
|
klass.allowed_rule = allowed_rule
|
|
58
60
|
klass.requires_authentication = requires_authentication
|
|
61
|
+
klass.authentication_optional = authentication_optional
|
|
59
62
|
klass.authenticator = authenticator
|
|
60
63
|
klass.subclassed_in_namespace = scoped_namespace
|
|
61
64
|
klass.suffix = suffix
|
|
@@ -63,15 +66,15 @@ module Foobara
|
|
|
63
66
|
end
|
|
64
67
|
|
|
65
68
|
def domain
|
|
66
|
-
# :
|
|
69
|
+
# simplecov:disable
|
|
67
70
|
command_class.domain
|
|
68
|
-
# :
|
|
71
|
+
# simplecov:enable
|
|
69
72
|
end
|
|
70
73
|
|
|
71
74
|
def organization
|
|
72
|
-
# :
|
|
75
|
+
# simplecov:disable
|
|
73
76
|
command_class.organization
|
|
74
|
-
# :
|
|
77
|
+
# simplecov:enable
|
|
75
78
|
end
|
|
76
79
|
|
|
77
80
|
def description
|
|
@@ -307,9 +310,9 @@ module Foobara
|
|
|
307
310
|
if type.registered?
|
|
308
311
|
# TODO: if we ever change from attributes-only inputs type
|
|
309
312
|
# then this will be handy
|
|
310
|
-
# :
|
|
313
|
+
# simplecov:disable
|
|
311
314
|
types |= [type]
|
|
312
|
-
# :
|
|
315
|
+
# simplecov:enable
|
|
313
316
|
end
|
|
314
317
|
|
|
315
318
|
types |= type.types_depended_on
|
|
@@ -321,9 +324,9 @@ module Foobara
|
|
|
321
324
|
if type.registered?
|
|
322
325
|
# TODO: if we ever change from attributes-only inputs type
|
|
323
326
|
# then this will be handy
|
|
324
|
-
# :
|
|
327
|
+
# simplecov:disable
|
|
325
328
|
types |= [type]
|
|
326
|
-
# :
|
|
329
|
+
# simplecov:enable
|
|
327
330
|
end
|
|
328
331
|
|
|
329
332
|
types |= type.types_depended_on
|
|
@@ -447,7 +450,7 @@ module Foobara
|
|
|
447
450
|
end
|
|
448
451
|
|
|
449
452
|
@inputs_transformer = if transformers.size == 1
|
|
450
|
-
transformers
|
|
453
|
+
transformers[0]
|
|
451
454
|
else
|
|
452
455
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
453
456
|
end
|
|
@@ -468,7 +471,7 @@ module Foobara
|
|
|
468
471
|
transformers = transformers_to_processors(response_mutators, result_type_from_transformers, direction: :from)
|
|
469
472
|
|
|
470
473
|
if transformers.size == 1
|
|
471
|
-
transformers
|
|
474
|
+
transformers[0]
|
|
472
475
|
else
|
|
473
476
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
474
477
|
end
|
|
@@ -490,7 +493,7 @@ module Foobara
|
|
|
490
493
|
transformers = transformers_to_processors(request_mutators, inputs_type_from_transformers, direction: :to)
|
|
491
494
|
|
|
492
495
|
if transformers.size == 1
|
|
493
|
-
transformers
|
|
496
|
+
transformers[0]
|
|
494
497
|
else
|
|
495
498
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
496
499
|
end
|
|
@@ -515,7 +518,7 @@ module Foobara
|
|
|
515
518
|
transformers = transformers_to_processors(result_transformers, command_class.result_type, direction: :from)
|
|
516
519
|
|
|
517
520
|
if transformers.size == 1
|
|
518
|
-
transformers
|
|
521
|
+
transformers[0]
|
|
519
522
|
else
|
|
520
523
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
521
524
|
end
|
|
@@ -540,9 +543,9 @@ module Foobara
|
|
|
540
543
|
elsif transformer.respond_to?(:call)
|
|
541
544
|
Value::Transformer.create(transform: transformer)
|
|
542
545
|
else
|
|
543
|
-
# :
|
|
546
|
+
# simplecov:disable
|
|
544
547
|
raise "Not sure how to apply #{transformer}"
|
|
545
|
-
# :
|
|
548
|
+
# simplecov:enable
|
|
546
549
|
end
|
|
547
550
|
end
|
|
548
551
|
end
|
|
@@ -575,7 +578,7 @@ module Foobara
|
|
|
575
578
|
klass.foobara_manifest_reference
|
|
576
579
|
# TODO: Delete this nocov block
|
|
577
580
|
# TODO: make anonymous scoped path's have better names instead of random hexadecimal
|
|
578
|
-
# :
|
|
581
|
+
# simplecov:disable
|
|
579
582
|
elsif processor.respond_to?(:symbol) && processor.symbol
|
|
580
583
|
processor.symbol
|
|
581
584
|
else
|
|
@@ -587,14 +590,14 @@ module Foobara
|
|
|
587
590
|
end
|
|
588
591
|
|
|
589
592
|
"Anonymous#{Util.non_full_name(name)}"
|
|
590
|
-
# :
|
|
593
|
+
# simplecov:enable
|
|
591
594
|
end
|
|
592
595
|
elsif processor.is_a?(::Proc)
|
|
593
596
|
"Proc"
|
|
594
597
|
else
|
|
595
|
-
# :
|
|
598
|
+
# simplecov:disable
|
|
596
599
|
"Unknown"
|
|
597
|
-
# :
|
|
600
|
+
# simplecov:enable
|
|
598
601
|
end
|
|
599
602
|
end
|
|
600
603
|
end
|
|
@@ -610,15 +613,15 @@ module Foobara
|
|
|
610
613
|
end
|
|
611
614
|
|
|
612
615
|
def full_command_name
|
|
613
|
-
# :
|
|
616
|
+
# simplecov:disable
|
|
614
617
|
self.class.full_command_name
|
|
615
|
-
# :
|
|
618
|
+
# simplecov:enable
|
|
616
619
|
end
|
|
617
620
|
|
|
618
621
|
def command_name
|
|
619
|
-
# :
|
|
622
|
+
# simplecov:disable
|
|
620
623
|
self.class.command_name
|
|
621
|
-
# :
|
|
624
|
+
# simplecov:enable
|
|
622
625
|
end
|
|
623
626
|
|
|
624
627
|
def command_class
|
|
@@ -630,15 +633,15 @@ module Foobara
|
|
|
630
633
|
end
|
|
631
634
|
|
|
632
635
|
def inputs_transformers
|
|
633
|
-
# :
|
|
636
|
+
# simplecov:disable
|
|
634
637
|
self.class.inputs_transformers
|
|
635
|
-
# :
|
|
638
|
+
# simplecov:enable
|
|
636
639
|
end
|
|
637
640
|
|
|
638
641
|
def result_transformers
|
|
639
|
-
# :
|
|
642
|
+
# simplecov:disable
|
|
640
643
|
self.class.result_transformers
|
|
641
|
-
# :
|
|
644
|
+
# simplecov:enable
|
|
642
645
|
end
|
|
643
646
|
|
|
644
647
|
def errors_transformers
|
|
@@ -729,7 +732,7 @@ module Foobara
|
|
|
729
732
|
transformers = self.class.transformers_to_processors(serializers, nil, declaration_data: self)
|
|
730
733
|
|
|
731
734
|
if transformers.size == 1
|
|
732
|
-
transformers
|
|
735
|
+
transformers[0]
|
|
733
736
|
else
|
|
734
737
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
735
738
|
end
|
|
@@ -742,7 +745,7 @@ module Foobara
|
|
|
742
745
|
declaration_data: self)
|
|
743
746
|
|
|
744
747
|
if transformers.size == 1
|
|
745
|
-
transformers
|
|
748
|
+
transformers[0]
|
|
746
749
|
else
|
|
747
750
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
748
751
|
end
|
|
@@ -759,7 +762,7 @@ module Foobara
|
|
|
759
762
|
)
|
|
760
763
|
|
|
761
764
|
if transformers.size == 1
|
|
762
|
-
transformers
|
|
765
|
+
transformers[0]
|
|
763
766
|
else
|
|
764
767
|
Value::Processor::Pipeline.new(processors: transformers)
|
|
765
768
|
end
|
|
@@ -790,11 +793,11 @@ module Foobara
|
|
|
790
793
|
if auth_mapped_method?(method_name)
|
|
791
794
|
auth_mapped_value_for(method_name)
|
|
792
795
|
elsif command.respond_to?(method_name)
|
|
793
|
-
command.
|
|
796
|
+
command.__send__(method_name, ...)
|
|
794
797
|
else
|
|
795
|
-
# :
|
|
798
|
+
# simplecov:disable
|
|
796
799
|
super
|
|
797
|
-
# :
|
|
800
|
+
# simplecov:enable
|
|
798
801
|
end
|
|
799
802
|
end
|
|
800
803
|
|
|
@@ -851,9 +854,9 @@ module Foobara
|
|
|
851
854
|
source = if allowed_rule.block.respond_to?("source") && defined?(MethodSource)
|
|
852
855
|
begin
|
|
853
856
|
# This only works when pry is loaded
|
|
854
|
-
# :
|
|
857
|
+
# simplecov:disable
|
|
855
858
|
allowed_rule.block.source
|
|
856
|
-
# :
|
|
859
|
+
# simplecov:enable
|
|
857
860
|
rescue MethodSource::SourceNotFoundError
|
|
858
861
|
# This path is hit if the way the source code is extracted
|
|
859
862
|
# doesn't result in valid Ruby, for example, as part of a hash such as:
|
|
@@ -900,9 +903,9 @@ module Foobara
|
|
|
900
903
|
if capture_unknown_error
|
|
901
904
|
self.outcome = Outcome.error(CommandConnector::UnknownError.for(e))
|
|
902
905
|
else
|
|
903
|
-
# :
|
|
906
|
+
# simplecov:disable
|
|
904
907
|
raise
|
|
905
|
-
# :
|
|
908
|
+
# simplecov:enable
|
|
906
909
|
end
|
|
907
910
|
end
|
|
908
911
|
|
data/projects/command_connectors/src/transformers/entity_to_primary_key_inputs_transformer.rb
CHANGED
|
@@ -75,9 +75,9 @@ module Foobara
|
|
|
75
75
|
attributes_type = to_type.target_class.attributes_type
|
|
76
76
|
EntityToPrimaryKeyInputsTransformer.new(to: attributes_type).from_type_declaration
|
|
77
77
|
else
|
|
78
|
-
# :
|
|
78
|
+
# simplecov:disable
|
|
79
79
|
raise "Not sure how to handle #{to_type}"
|
|
80
|
-
# :
|
|
80
|
+
# simplecov:enable
|
|
81
81
|
end
|
|
82
82
|
else
|
|
83
83
|
to_type
|
|
@@ -86,7 +86,7 @@ module Foobara
|
|
|
86
86
|
# TODO: should this be somewhere more general-purpose?
|
|
87
87
|
def args_to_type(*args, **opts, &block)
|
|
88
88
|
if args.size == 1 && opts.empty? && block.nil?
|
|
89
|
-
object_to_type(args
|
|
89
|
+
object_to_type(args[0])
|
|
90
90
|
else
|
|
91
91
|
domain.foobara_type_from_declaration(*args, **opts, &block)
|
|
92
92
|
end
|
|
@@ -121,9 +121,9 @@ module Foobara
|
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
def map
|
|
124
|
-
# :
|
|
125
|
-
raise
|
|
126
|
-
# :
|
|
124
|
+
# simplecov:disable
|
|
125
|
+
raise NotImplementedError
|
|
126
|
+
# simplecov:enable
|
|
127
127
|
end
|
|
128
128
|
end
|
|
129
129
|
end
|
|
@@ -8,9 +8,9 @@ module Foobara
|
|
|
8
8
|
invalid_keys = opts.keys - [:value]
|
|
9
9
|
|
|
10
10
|
if invalid_keys.any?
|
|
11
|
-
# :
|
|
11
|
+
# simplecov:disable
|
|
12
12
|
raise ArgumentError, "Invalid keys: #{invalid_keys.join(", ")}. expected one of: #{valid_keys.join(", ")}"
|
|
13
|
-
# :
|
|
13
|
+
# simplecov:enable
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
if opts.key?(:value)
|
|
@@ -83,7 +83,7 @@ module Foobara
|
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
value = candidates
|
|
86
|
+
value = candidates[0]
|
|
87
87
|
|
|
88
88
|
return value if value
|
|
89
89
|
|
|
@@ -59,13 +59,13 @@ module Foobara
|
|
|
59
59
|
values
|
|
60
60
|
else
|
|
61
61
|
if values.size > 1
|
|
62
|
-
# :
|
|
62
|
+
# simplecov:disable
|
|
63
63
|
raise "Multiple records found for #{name} association but only expected 0 or 1."
|
|
64
|
-
# :
|
|
64
|
+
# simplecov:enable
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
unless values.empty?
|
|
68
|
-
values
|
|
68
|
+
values[0]
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
end
|
|
@@ -73,7 +73,7 @@ module Foobara
|
|
|
73
73
|
|
|
74
74
|
def association_for(association_filters)
|
|
75
75
|
if association_filters.size == 1
|
|
76
|
-
data_path = association_filters.
|
|
76
|
+
data_path = association_filters[0].to_s
|
|
77
77
|
|
|
78
78
|
if deep_associations.key?(data_path)
|
|
79
79
|
return data_path
|
|
@@ -85,15 +85,15 @@ module Foobara
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
if result.empty?
|
|
88
|
-
# :
|
|
88
|
+
# simplecov:disable
|
|
89
89
|
raise "Could not find association matching #{association_filters}"
|
|
90
|
-
# :
|
|
90
|
+
# simplecov:enable
|
|
91
91
|
elsif result.size > 1
|
|
92
|
-
# :
|
|
92
|
+
# simplecov:disable
|
|
93
93
|
raise "Multiple associations matched by #{association_filters}"
|
|
94
|
-
# :
|
|
94
|
+
# simplecov:enable
|
|
95
95
|
else
|
|
96
|
-
result
|
|
96
|
+
result[0]
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
@@ -121,9 +121,9 @@ module Foobara
|
|
|
121
121
|
entity_class == filter || entity_class < filter
|
|
122
122
|
end
|
|
123
123
|
else
|
|
124
|
-
# :
|
|
124
|
+
# simplecov:disable
|
|
125
125
|
raise "Not sure how to apply filter #{filter}"
|
|
126
|
-
# :
|
|
126
|
+
# simplecov:enable
|
|
127
127
|
end
|
|
128
128
|
end
|
|
129
129
|
|
|
@@ -168,9 +168,9 @@ module Foobara
|
|
|
168
168
|
|
|
169
169
|
if remove_sensitive
|
|
170
170
|
# TODO: test this code path
|
|
171
|
-
# :
|
|
171
|
+
# simplecov:disable
|
|
172
172
|
element_types = element_types&.reject(&:sensitive?)
|
|
173
|
-
# :
|
|
173
|
+
# simplecov:enable
|
|
174
174
|
end
|
|
175
175
|
|
|
176
176
|
element_types&.each&.with_index do |element_type, index|
|
|
@@ -196,19 +196,19 @@ module Foobara
|
|
|
196
196
|
target_class = type.target_class
|
|
197
197
|
|
|
198
198
|
method = target_class.respond_to?(:foobara_attributes_type) ? :foobara_attributes_type : :attributes_type
|
|
199
|
-
attributes_type = target_class.
|
|
199
|
+
attributes_type = target_class.__send__(method)
|
|
200
200
|
|
|
201
201
|
if !remove_sensitive || !attributes_type.sensitive?
|
|
202
202
|
construct_associations(attributes_type, path, result, initial: false)
|
|
203
203
|
end
|
|
204
204
|
elsif type.extends?(BuiltinTypes[:associative_array])
|
|
205
205
|
# not going to bother testing this for now
|
|
206
|
-
# :
|
|
206
|
+
# simplecov:disable
|
|
207
207
|
if contains_associations?(type)
|
|
208
208
|
raise "Associative array types with associations in them are not currently supported. " \
|
|
209
209
|
"Use attributes type if you can or set the key_type and/or value_type to duck type"
|
|
210
210
|
end
|
|
211
|
-
# :
|
|
211
|
+
# simplecov:enable
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
result
|
|
@@ -228,9 +228,9 @@ module Foobara
|
|
|
228
228
|
|
|
229
229
|
if remove_sensitive
|
|
230
230
|
# TODO: test this code path
|
|
231
|
-
# :
|
|
231
|
+
# simplecov:disable
|
|
232
232
|
element_types = element_types&.reject(&:sensitive?)
|
|
233
|
-
# :
|
|
233
|
+
# simplecov:enable
|
|
234
234
|
end
|
|
235
235
|
|
|
236
236
|
contains_associations?(element_types, false)
|
|
@@ -20,9 +20,9 @@ module Foobara
|
|
|
20
20
|
invalid_options = options.keys - ALLOWED_OPTIONS
|
|
21
21
|
|
|
22
22
|
unless invalid_options.empty?
|
|
23
|
-
# :
|
|
23
|
+
# simplecov:disable
|
|
24
24
|
raise ArgumentError, "Invalid options #{invalid_options} expected only #{ALLOWED_OPTIONS}"
|
|
25
|
-
# :
|
|
25
|
+
# simplecov:enable
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
if options[:unloaded]
|
|
@@ -11,15 +11,15 @@ module Foobara
|
|
|
11
11
|
module ClassMethods
|
|
12
12
|
def primary_key(attribute_name)
|
|
13
13
|
if primary_key_attribute
|
|
14
|
-
# :
|
|
14
|
+
# simplecov:disable
|
|
15
15
|
raise "Primary key already set to #{primary_key_attribute}"
|
|
16
|
-
# :
|
|
16
|
+
# simplecov:enable
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
if attribute_name.nil? || attribute_name.empty?
|
|
20
|
-
# :
|
|
20
|
+
# simplecov:disable
|
|
21
21
|
raise ArgumentError, "Primary key can't be blank"
|
|
22
|
-
# :
|
|
22
|
+
# simplecov:enable
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
@foobara_primary_key_attribute = attribute_name.to_sym
|
|
@@ -28,18 +28,18 @@ module Foobara
|
|
|
28
28
|
# TODO: No longer is hit in this test suite but ActiveRecordType needs this class
|
|
29
29
|
# and potentially this snippet of code in order to do the right thing.
|
|
30
30
|
# TODO: test that out and delete this method if possible.
|
|
31
|
-
# :
|
|
31
|
+
# simplecov:disable
|
|
32
32
|
declaration_data = declaration_data.merge(type: :detached_entity)
|
|
33
|
-
# :
|
|
33
|
+
# simplecov:enable
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
if self.class.model_base_class_requires_conversion?(declaration_data[:model_base_class])
|
|
37
37
|
# TODO: No longer is hit in this test suite but ActiveRecordType needs this class
|
|
38
38
|
# and potentially this snippet of code in order to do the right thing.
|
|
39
39
|
# TODO: test that out and delete this method if possible.
|
|
40
|
-
# :
|
|
40
|
+
# simplecov:disable
|
|
41
41
|
declaration_data = declaration_data.merge(model_base_class: "Foobara::DetachedEntity")
|
|
42
|
-
# :
|
|
42
|
+
# simplecov:enable
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# TODO: remove private attributes, add delegated attributes
|
|
@@ -26,9 +26,9 @@ module Foobara
|
|
|
26
26
|
model_type = type_for_declaration(parent_declaration_data[:type])
|
|
27
27
|
model_type.target_class
|
|
28
28
|
else
|
|
29
|
-
# :
|
|
29
|
+
# simplecov:disable
|
|
30
30
|
raise "Missing :model_class in parent_declaration_data for #{parent_declaration_data}"
|
|
31
|
-
# :
|
|
31
|
+
# simplecov:enable
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|