occi-core 4.3.6 → 5.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fasterer.yml +3 -0
- data/.gitignore +9 -16
- data/.rspec +1 -1
- data/.rubocop.yml +69 -0
- data/.travis.yml +27 -0
- data/AUTHORS +8 -6
- data/CHANGELOG.md +0 -0
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.md +25 -170
- data/Rakefile +25 -17
- data/examples/initialize_model.rb +10 -0
- data/examples/parse_action_instance_json.rb +15 -0
- data/examples/parse_action_instance_text.rb +15 -0
- data/examples/parse_categories_json.rb +15 -0
- data/examples/parse_categories_text.rb +15 -0
- data/examples/parse_instance_json.rb +15 -0
- data/examples/parse_instance_text.rb +15 -0
- data/examples/parse_model_json.rb +9 -0
- data/examples/parse_model_text.rb +9 -0
- data/examples/render_action_instance_json.rb +17 -0
- data/examples/render_action_instance_text.rb +17 -0
- data/examples/render_instance_json.rb +20 -0
- data/examples/render_instance_text.rb +20 -0
- data/examples/render_model_json.rb +12 -0
- data/examples/render_model_text.rb +12 -0
- data/examples/rendering/action_instance.json +6 -0
- data/examples/rendering/action_instance.txt +2 -0
- data/examples/rendering/categories.json +78 -0
- data/examples/rendering/categories.txt +4 -0
- data/examples/rendering/instance.json +70 -0
- data/examples/rendering/instance.txt +12 -0
- data/examples/rendering/model.alt.json +1716 -0
- data/examples/rendering/model.json +785 -0
- data/examples/rendering/model.txt +68 -0
- data/lib/occi/core/action.rb +12 -26
- data/lib/occi/core/action_instance.rb +109 -65
- data/lib/occi/core/attribute.rb +136 -0
- data/lib/occi/core/attribute_definition.rb +269 -0
- data/lib/occi/core/category.rb +110 -83
- data/lib/occi/core/collection.rb +255 -0
- data/lib/occi/core/constants.rb +14 -0
- data/lib/occi/core/entity.rb +301 -195
- data/lib/occi/core/errors/.gitkeep +0 -0
- data/lib/occi/core/errors/attribute_definition_error.rb +11 -0
- data/lib/occi/core/errors/attribute_validation_error.rb +13 -0
- data/lib/occi/core/errors/category_validation_error.rb +13 -0
- data/lib/occi/core/errors/collection_lookup_error.rb +11 -0
- data/lib/occi/core/errors/instance_validation_error.rb +13 -0
- data/lib/occi/core/errors/mandatory_argument_error.rb +11 -0
- data/lib/occi/core/errors/model_lookup_error.rb +11 -0
- data/lib/occi/core/errors/parser_error.rb +11 -0
- data/lib/occi/core/errors/parsing_error.rb +11 -0
- data/lib/occi/core/errors/renderer_error.rb +11 -0
- data/lib/occi/core/errors/rendering_error.rb +11 -0
- data/lib/occi/core/errors/validation_error.rb +11 -0
- data/lib/occi/core/errors.rb +9 -0
- data/lib/occi/core/helpers/.gitkeep +0 -0
- data/lib/occi/core/helpers/argument_validator.rb +27 -0
- data/lib/occi/core/helpers/attributes_accessor.rb +22 -0
- data/lib/occi/core/helpers/error_handler.rb +29 -0
- data/lib/occi/core/helpers/hash_dereferencer.rb +149 -0
- data/lib/occi/core/helpers/identifier_validator.rb +135 -0
- data/lib/occi/core/helpers/instance_attribute_resetter.rb +131 -0
- data/lib/occi/core/helpers/instance_attributes_accessor.rb +30 -0
- data/lib/occi/core/helpers/locatable.rb +40 -0
- data/lib/occi/core/helpers/parser_dereferencer.rb +96 -0
- data/lib/occi/core/helpers/raw_json_parser.rb +18 -0
- data/lib/occi/core/helpers/renderable.rb +93 -0
- data/lib/occi/core/helpers/yaml_summoner.rb +44 -0
- data/lib/occi/core/helpers.rb +13 -0
- data/lib/occi/core/instance_builder.rb +162 -0
- data/lib/occi/core/kind.rb +100 -132
- data/lib/occi/core/link.rb +47 -72
- data/lib/occi/core/mixin.rb +76 -61
- data/lib/occi/core/model.rb +341 -0
- data/lib/occi/core/parsers/.gitkeep +0 -0
- data/lib/occi/core/parsers/base_parser.rb +168 -0
- data/lib/occi/core/parsers/json/.gitkeep +0 -0
- data/lib/occi/core/parsers/json/action_instance.rb +36 -0
- data/lib/occi/core/parsers/json/category.rb +113 -0
- data/lib/occi/core/parsers/json/entity.rb +156 -0
- data/lib/occi/core/parsers/json/validator/.gitkeep +0 -0
- data/lib/occi/core/parsers/json/validator/action-instance.json +3 -0
- data/lib/occi/core/parsers/json/validator/entity-collection.json +3 -0
- data/lib/occi/core/parsers/json/validator/link-collection.json +3 -0
- data/lib/occi/core/parsers/json/validator/link.json +3 -0
- data/lib/occi/core/parsers/json/validator/locations.json +3 -0
- data/lib/occi/core/parsers/json/validator/mixin-collection.json +3 -0
- data/lib/occi/core/parsers/json/validator/model.json +3 -0
- data/lib/occi/core/parsers/json/validator/occi-schema.json +277 -0
- data/lib/occi/core/parsers/json/validator/resource-collection.json +3 -0
- data/lib/occi/core/parsers/json/validator/resource.json +3 -0
- data/lib/occi/core/parsers/json/validator.rb +87 -0
- data/lib/occi/core/parsers/json_parser.rb +128 -0
- data/lib/occi/core/parsers/text/.gitkeep +0 -0
- data/lib/occi/core/parsers/text/category.rb +183 -0
- data/lib/occi/core/parsers/text/constants.rb +89 -0
- data/lib/occi/core/parsers/text/entity.rb +257 -0
- data/lib/occi/core/parsers/text/location.rb +48 -0
- data/lib/occi/core/parsers/text_parser.rb +257 -0
- data/lib/occi/core/parsers.rb +18 -0
- data/lib/occi/core/renderer_factory.rb +213 -0
- data/lib/occi/core/renderers/.gitkeep +0 -0
- data/lib/occi/core/renderers/base_renderer.rb +81 -0
- data/lib/occi/core/renderers/json/.gitkeep +0 -0
- data/lib/occi/core/renderers/json/action_instance.rb +24 -0
- data/lib/occi/core/renderers/json/attributes.rb +50 -0
- data/lib/occi/core/renderers/json/base.rb +46 -0
- data/lib/occi/core/renderers/json/category.rb +85 -0
- data/lib/occi/core/renderers/json/collection.rb +52 -0
- data/lib/occi/core/renderers/json/instance.rb +39 -0
- data/lib/occi/core/renderers/json/link.rb +48 -0
- data/lib/occi/core/renderers/json/model.rb +26 -0
- data/lib/occi/core/renderers/json/resource.rb +27 -0
- data/lib/occi/core/renderers/json_renderer.rb +72 -0
- data/lib/occi/core/renderers/text/.gitkeep +0 -0
- data/lib/occi/core/renderers/text/action_instance.rb +36 -0
- data/lib/occi/core/renderers/text/attributes.rb +87 -0
- data/lib/occi/core/renderers/text/base.rb +82 -0
- data/lib/occi/core/renderers/text/category.rb +183 -0
- data/lib/occi/core/renderers/text/collection.rb +65 -0
- data/lib/occi/core/renderers/text/instance.rb +44 -0
- data/lib/occi/core/renderers/text/link.rb +40 -0
- data/lib/occi/core/renderers/text/model.rb +41 -0
- data/lib/occi/core/renderers/text/resource.rb +109 -0
- data/lib/occi/core/renderers/text_renderer.rb +72 -0
- data/lib/occi/core/renderers.rb +20 -0
- data/lib/occi/core/resource.rb +93 -57
- data/lib/occi/core/utils/.gitkeep +0 -0
- data/lib/occi/core/version.rb +17 -0
- data/lib/occi/core/warehouse/actions/.gitkeep +0 -0
- data/lib/occi/core/warehouse/actions/attributes/.gitkeep +0 -0
- data/lib/occi/core/warehouse/kinds/.gitkeep +0 -0
- data/lib/occi/core/warehouse/kinds/attributes/.gitkeep +0 -0
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.id.yml +7 -0
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.source.yml +7 -0
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.summary.yml +7 -0
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.target.yml +7 -0
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.title.yml +7 -0
- data/lib/occi/core/warehouse/kinds/entity.yml +10 -0
- data/lib/occi/core/warehouse/kinds/link.yml +10 -0
- data/lib/occi/core/warehouse/kinds/resource.yml +9 -0
- data/lib/occi/core/warehouse/mixins/.gitkeep +0 -0
- data/lib/occi/core/warehouse/mixins/attributes/.gitkeep +0 -0
- data/lib/occi/core/warehouse.rb +115 -0
- data/lib/occi/core.rb +59 -23
- data/lib/occi/infrastructure/compute.rb +5 -122
- data/lib/occi/infrastructure/constants.rb +25 -0
- data/lib/occi/infrastructure/instance_builder.rb +24 -0
- data/lib/occi/infrastructure/mixins/.gitkeep +0 -0
- data/lib/occi/infrastructure/mixins/os_tpl.rb +19 -0
- data/lib/occi/infrastructure/mixins/resource_tpl.rb +19 -0
- data/lib/occi/infrastructure/mixins.rb +12 -0
- data/lib/occi/infrastructure/model.rb +27 -0
- data/lib/occi/infrastructure/network.rb +5 -104
- data/lib/occi/infrastructure/networkinterface.rb +5 -100
- data/lib/occi/infrastructure/storage.rb +5 -59
- data/lib/occi/infrastructure/storagelink.rb +5 -54
- data/lib/occi/infrastructure/version.rb +5 -0
- data/lib/occi/infrastructure/warehouse/actions/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/actions/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/actions/compute_restart.yml +12 -0
- data/lib/occi/infrastructure/warehouse/actions/compute_save.yml +19 -0
- data/lib/occi/infrastructure/warehouse/actions/compute_start.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/compute_stop.yml +12 -0
- data/lib/occi/infrastructure/warehouse/actions/compute_suspend.yml +12 -0
- data/lib/occi/infrastructure/warehouse/actions/network_down.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/network_up.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/networkinterface_down.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/networkinterface_up.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storage_backup.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storage_offline.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storage_online.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storage_resize.yml +12 -0
- data/lib/occi/infrastructure/warehouse/actions/storage_snapshot.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storagelink_offline.yml +4 -0
- data/lib/occi/infrastructure/warehouse/actions/storagelink_online.yml +4 -0
- data/lib/occi/infrastructure/warehouse/kinds/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.architecture.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.cores.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.hostname.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.memory.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.speed.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.state.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.network.label.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.network.state.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.network.vlan.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.networkinterface.interface.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.networkinterface.mac.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.networkinterface.state.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storage.size.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storage.state.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.deviceid.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.mountpoint.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.state.yml +7 -0
- data/lib/occi/infrastructure/warehouse/kinds/compute.yml +19 -0
- data/lib/occi/infrastructure/warehouse/kinds/network.yml +13 -0
- data/lib/occi/infrastructure/warehouse/kinds/networkinterface.yml +13 -0
- data/lib/occi/infrastructure/warehouse/kinds/storage.yml +15 -0
- data/lib/occi/infrastructure/warehouse/kinds/storagelink.yml +13 -0
- data/lib/occi/infrastructure/warehouse/mixins/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.network.address.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.network.allocation.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.network.gateway.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.networkinterface.address.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.networkinterface.allocation.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/attributes/occi.networkinterface.gateway.yml +7 -0
- data/lib/occi/infrastructure/warehouse/mixins/ipnetwork.yml +11 -0
- data/lib/occi/infrastructure/warehouse/mixins/ipnetworkinterface.yml +11 -0
- data/lib/occi/infrastructure/warehouse.rb +20 -0
- data/lib/occi/infrastructure-ext.rb +35 -0
- data/lib/occi/infrastructure.rb +34 -19
- data/lib/occi/infrastructure_ext/constants.rb +20 -0
- data/lib/occi/infrastructure_ext/instance_builder.rb +22 -0
- data/lib/occi/infrastructure_ext/ipreservation.rb +9 -0
- data/lib/occi/infrastructure_ext/mixins/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/mixins/availability_zone.rb +19 -0
- data/lib/occi/infrastructure_ext/mixins.rb +12 -0
- data/lib/occi/infrastructure_ext/model.rb +26 -0
- data/lib/occi/infrastructure_ext/securitygroup.rb +9 -0
- data/lib/occi/infrastructure_ext/securitygrouplink.rb +9 -0
- data/lib/occi/infrastructure_ext/version.rb +5 -0
- data/lib/occi/infrastructure_ext/warehouse/actions/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse/actions/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse/actions/ipreservation_down.yml +4 -0
- data/lib/occi/infrastructure_ext/warehouse/actions/ipreservation_up.yml +4 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.ipreservation.address.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.ipreservation.state.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.ipreservation.used.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.securitygroup.rules.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.securitygroup.state.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.securitygrouplink.state.yml +7 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/ipreservation.yml +13 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/securitygroup.yml +9 -0
- data/lib/occi/infrastructure_ext/warehouse/kinds/securitygrouplink.yml +8 -0
- data/lib/occi/infrastructure_ext/warehouse/mixins/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse/mixins/attributes/.gitkeep +0 -0
- data/lib/occi/infrastructure_ext/warehouse.rb +20 -0
- data/lib/occi/monkey_island/boolean.rb +6 -0
- data/lib/occi/monkey_island/hash.rb +4 -0
- data/occi-core.gemspec +26 -26
- metadata +312 -243
- data/.yardopts +0 -1
- data/config/occi.yml +0 -4
- data/lib/occi/collection.rb +0 -265
- data/lib/occi/core/actions.rb +0 -21
- data/lib/occi/core/attributes.rb +0 -411
- data/lib/occi/core/categories.rb +0 -64
- data/lib/occi/core/dependencies.rb +0 -7
- data/lib/occi/core/entities.rb +0 -48
- data/lib/occi/core/kinds.rb +0 -22
- data/lib/occi/core/links.rb +0 -37
- data/lib/occi/core/mixins.rb +0 -37
- data/lib/occi/core/properties.rb +0 -108
- data/lib/occi/core/resources.rb +0 -14
- data/lib/occi/errors/attribute_definitions_converted_error.rb +0 -5
- data/lib/occi/errors/attribute_missing_error.rb +0 -5
- data/lib/occi/errors/attribute_name_invalid_error.rb +0 -5
- data/lib/occi/errors/attribute_not_defined_error.rb +0 -5
- data/lib/occi/errors/attribute_property_type_error.rb +0 -5
- data/lib/occi/errors/attribute_type_error.rb +0 -5
- data/lib/occi/errors/category_not_defined_error.rb +0 -5
- data/lib/occi/errors/kind_not_defined_error.rb +0 -5
- data/lib/occi/errors/parser_input_error.rb +0 -5
- data/lib/occi/errors/parser_type_error.rb +0 -5
- data/lib/occi/errors.rb +0 -1
- data/lib/occi/extensions/hashie.rb +0 -25
- data/lib/occi/helpers/comparators/action_instance.rb +0 -22
- data/lib/occi/helpers/comparators/attributes.rb +0 -22
- data/lib/occi/helpers/comparators/categories.rb +0 -22
- data/lib/occi/helpers/comparators/category.rb +0 -22
- data/lib/occi/helpers/comparators/collection.rb +0 -40
- data/lib/occi/helpers/comparators/entities.rb +0 -22
- data/lib/occi/helpers/comparators/entity.rb +0 -22
- data/lib/occi/helpers/comparators/properties.rb +0 -26
- data/lib/occi/helpers/comparators.rb +0 -1
- data/lib/occi/helpers/inspect.rb +0 -12
- data/lib/occi/infrastructure/network/ipnetwork.rb +0 -28
- data/lib/occi/infrastructure/networkinterface/ipnetworkinterface.rb +0 -28
- data/lib/occi/infrastructure/os_tpl.rb +0 -20
- data/lib/occi/infrastructure/resource_tpl.rb +0 -20
- data/lib/occi/log.rb +0 -71
- data/lib/occi/model.rb +0 -87
- data/lib/occi/parser/json.rb +0 -38
- data/lib/occi/parser/text/constants.rb +0 -89
- data/lib/occi/parser/text.rb +0 -280
- data/lib/occi/parser.rb +0 -144
- data/lib/occi/settings.rb +0 -10
- data/lib/occi/version.rb +0 -3
- data/lib/occi-core.rb +0 -53
- data/spec/helpers/to_plain.rb +0 -39
- data/spec/helpers/yaml_hash.rb +0 -32
- data/spec/occi/collection_samples/collection1.json +0 -1
- data/spec/occi/collection_samples/directory2/collection2.json +0 -1
- data/spec/occi/collection_spec.rb +0 -1003
- data/spec/occi/core/action_instance_spec.rb +0 -317
- data/spec/occi/core/action_spec.rb +0 -71
- data/spec/occi/core/attributes_spec.rb +0 -665
- data/spec/occi/core/categories_spec.rb +0 -28
- data/spec/occi/core/category_spec.rb +0 -216
- data/spec/occi/core/entities_spec.rb +0 -160
- data/spec/occi/core/entity_spec.rb +0 -374
- data/spec/occi/core/kind_spec.rb +0 -182
- data/spec/occi/core/link_spec.rb +0 -52
- data/spec/occi/core/links_spec.rb +0 -132
- data/spec/occi/core/mixin_spec.rb +0 -38
- data/spec/occi/core/mixins_spec.rb +0 -107
- data/spec/occi/core/properties_spec.rb +0 -171
- data/spec/occi/core/resource_spec.rb +0 -42
- data/spec/occi/core_spec.rb +0 -12
- data/spec/occi/infrastructure/compute_spec.rb +0 -229
- data/spec/occi/infrastructure/network_spec.rb +0 -96
- data/spec/occi/infrastructure/networkinterface_spec.rb +0 -96
- data/spec/occi/infrastructure/storage_spec.rb +0 -33
- data/spec/occi/infrastructure/storagelink_spec.rb +0 -45
- data/spec/occi/log_spec.rb +0 -117
- data/spec/occi/model_spec.rb +0 -256
- data/spec/occi/parser/json_samples/test.json +0 -49
- data/spec/occi/parser/text_samples/occi_categories.body_plain.expected +0 -2
- data/spec/occi/parser/text_samples/occi_categories.expected +0 -2
- data/spec/occi/parser/text_samples/occi_categories.parse_headers.expected +0 -2
- data/spec/occi/parser/text_samples/occi_categories.text +0 -2
- data/spec/occi/parser/text_samples/occi_compute_rocci_server.expected +0 -11
- data/spec/occi/parser/text_samples/occi_compute_rocci_server.text +0 -10
- data/spec/occi/parser/text_samples/occi_link_resource_instance.body_plain.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_resource_instance.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_resource_instance.parse.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_resource_instance.text +0 -7
- data/spec/occi/parser/text_samples/occi_link_simple.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_simple.text +0 -1
- data/spec/occi/parser/text_samples/occi_link_w_attributes.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_w_attributes.text +0 -7
- data/spec/occi/parser/text_samples/occi_link_w_category.expected +0 -7
- data/spec/occi/parser/text_samples/occi_link_w_category.text +0 -3
- data/spec/occi/parser/text_samples/occi_model_categories.expected +0 -3
- data/spec/occi/parser/text_samples/occi_model_rocci_server.text +0 -51
- data/spec/occi/parser/text_samples/occi_network_rocci_server.body_plain.expected +0 -11
- data/spec/occi/parser/text_samples/occi_network_rocci_server.expected +0 -11
- data/spec/occi/parser/text_samples/occi_network_rocci_server.resource.header.expected +0 -9
- data/spec/occi/parser/text_samples/occi_network_rocci_server.resource.rack.expected +0 -9
- data/spec/occi/parser/text_samples/occi_network_rocci_server.text +0 -11
- data/spec/occi/parser/text_samples/occi_resource_custom_class_w_attributes.parse.expected +0 -15
- data/spec/occi/parser/text_samples/occi_resource_custom_class_w_attributes.text +0 -15
- data/spec/occi/parser/text_samples/occi_resource_w_attributes.text +0 -11
- data/spec/occi/parser/text_samples/occi_resource_w_inline_links.expected +0 -1
- data/spec/occi/parser/text_samples/occi_resource_w_inline_links.text +0 -16
- data/spec/occi/parser/text_samples/occi_resource_w_inline_links_only.text +0 -13
- data/spec/occi/parser/text_samples/occi_storage_rocci_server.expected +0 -9
- data/spec/occi/parser/text_samples/occi_storage_rocci_server.text +0 -9
- data/spec/occi/parser/text_spec.rb +0 -320
- data/spec/occi/parser_spec.rb +0 -259
- data/spec/occi-core_spec.rb +0 -31
- data/spec/spec_helper.rb +0 -18
data/lib/occi/core/kind.rb
CHANGED
@@ -1,159 +1,127 @@
|
|
1
1
|
module Occi
|
2
2
|
module Core
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
3
|
+
# Defines the classification system of the OCCI Core Model. The `Kind`
|
4
|
+
# instance represents the type identification mechanism for all `Entity`
|
5
|
+
# instances present in the model.
|
6
|
+
#
|
7
|
+
# @example
|
8
|
+
# Kind.new schema: 'http://schemas.ogf.org/occi/infrastructure#',
|
9
|
+
# term: 'compute',
|
10
|
+
# title: 'Compute'
|
11
|
+
#
|
12
|
+
# @attr parent [Kind] previous `Kind` in the OCCI kind hierarchy
|
13
|
+
# @attr actions [Set] list of `Action` instances applicable to this `Kind`
|
14
|
+
# @attr location [URI] protocol agnostic location of this `Kind` instance
|
15
|
+
#
|
16
|
+
# @author Boris Parak <parak@cesnet.cz>
|
17
|
+
class Kind < Category
|
18
|
+
include Helpers::Locatable
|
19
|
+
|
20
|
+
attr_accessor :parent, :actions
|
21
|
+
attr_writer :location
|
22
|
+
|
23
|
+
# Checks whether the given `Kind` instance is related
|
24
|
+
# to this instance. The given `Kind` instance must be
|
25
|
+
# included in the list of predecessors (see `#related`)
|
26
|
+
# to succeed.
|
27
|
+
#
|
28
|
+
# @param kind [Kind] suspected predecessor
|
29
|
+
# @return [TrueClass, FalseClass] result
|
30
|
+
def related?(kind)
|
31
|
+
return false unless kind
|
32
|
+
return true if kind == self
|
33
|
+
related.include? kind
|
25
34
|
end
|
26
35
|
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
if parent.to_s == 'http://schemas.ogf.org/occi/core#entity'
|
40
|
-
parent = Occi::Core::Entity.kind
|
41
|
-
elsif parent.to_s == 'http://schemas.ogf.org/occi/core#resource'
|
42
|
-
parent = Occi::Core::Resource.kind
|
43
|
-
elsif parent.to_s == 'http://schemas.ogf.org/occi/core#link'
|
44
|
-
parent = Occi::Core::Link.kind
|
45
|
-
elsif parent.kind_of? Occi::Core::Kind
|
46
|
-
parent = parent
|
47
|
-
else
|
48
|
-
parent = self.get_class(*parent.to_s.split('#')).kind
|
49
|
-
end
|
50
|
-
|
51
|
-
term = self.sanitize_term(term) if Occi::Settings.compatibility
|
52
|
-
raise ArgumentError, "Invalid characters in term #{term}" unless Occi::Core::Category.valid_term?(term)
|
53
|
-
|
54
|
-
unless scheme.end_with? '#'
|
55
|
-
scheme << '#'
|
56
|
-
end
|
57
|
-
|
58
|
-
uri = URI.parse(scheme)
|
59
|
-
|
60
|
-
if uri.host == 'schemas.ogf.org'
|
61
|
-
namespace = uri.path.reverse.chomp('/').reverse.split('/')
|
62
|
-
else
|
63
|
-
namespace = uri.host.split('.').reverse + uri.path.reverse.chomp('/').reverse.split('/')
|
64
|
-
end
|
65
|
-
namespace.inject(Object) do |mod, name|
|
66
|
-
if mod.constants.collect { |sym| sym.to_s }.include? name.capitalize
|
67
|
-
namespace = mod.const_get name.capitalize
|
68
|
-
else
|
69
|
-
namespace = mod.const_set name.capitalize, Module.new
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
class_name = term.classify
|
74
|
-
if namespace.const_defined? class_name
|
75
|
-
klass = namespace.const_get class_name
|
76
|
-
unless klass.ancestors.include? Occi::Core::Entity
|
77
|
-
raise "OCCI Kind with type identifier #{scheme + term} could not be created as the corresponding class #{klass.to_s} already exists and is not derived from Occi::Core::Entity"
|
78
|
-
end
|
79
|
-
else
|
80
|
-
klass = namespace.const_set class_name, Class.new(parent.entity_type)
|
81
|
-
klass.kind = Occi::Core::Kind.new scheme=scheme,
|
82
|
-
term=term,
|
83
|
-
title=nil,
|
84
|
-
attributes={},
|
85
|
-
parent=parent
|
86
|
-
end
|
87
|
-
|
88
|
-
klass
|
36
|
+
# Checks whether the given `Kind` instance is related
|
37
|
+
# to this instance. The given `Kind` instance must be
|
38
|
+
# the immediate predecessor (see `#directly_related`)
|
39
|
+
# to succeed.
|
40
|
+
#
|
41
|
+
# @param kind [Kind] suspected predecessor
|
42
|
+
# @return [TrueClass, FalseClass] result
|
43
|
+
def directly_related?(kind)
|
44
|
+
return false unless kind
|
45
|
+
return true if kind == self
|
46
|
+
directly_related.include? kind
|
89
47
|
end
|
90
48
|
|
91
|
-
#
|
49
|
+
# Transitively returns all predecessors of this `Kind` instance in
|
50
|
+
# a multi-element `Array`.
|
92
51
|
#
|
93
|
-
# @
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|| \
|
98
|
-
(parent.to_s == "http://schemas.ogf.org/occi/infrastructure#network" && kind.to_s == "http://schemas.ogf.org/occi/core#resource") \
|
99
|
-
|| \
|
100
|
-
(parent.to_s == "http://schemas.ogf.org/occi/infrastructure#storage" && kind.to_s == "http://schemas.ogf.org/occi/core#resource") \
|
101
|
-
|| \
|
102
|
-
(parent.to_s == "http://schemas.ogf.org/occi/infrastructure#compute" && kind.to_s == "http://schemas.ogf.org/occi/core#resource")
|
52
|
+
# @return [Array] list containing predecessors of this `Kind` instance
|
53
|
+
def related
|
54
|
+
return directly_related if hierarchy_root?
|
55
|
+
[parent, parent.related].flatten.compact
|
103
56
|
end
|
104
57
|
|
105
|
-
|
106
|
-
|
58
|
+
# For compatibility reasons, returns the parent instance of this `Kind` in
|
59
|
+
# an `Array`. For hierarchy roots, returns only an empty `Array`.
|
60
|
+
#
|
61
|
+
# @return [Array] a list containing the parent `Kind` instance, if any
|
62
|
+
def directly_related
|
63
|
+
[parent].compact
|
107
64
|
end
|
108
65
|
|
109
|
-
#
|
110
|
-
#
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
66
|
+
# Indicates whether this instance is the base of the OCCI kind
|
67
|
+
# hierarchy, i.e. there are no predecessors. This helps to
|
68
|
+
# calculate the relationship status correctly, see `#related`.
|
69
|
+
#
|
70
|
+
# @return [TrueClass, FalseClass] result
|
71
|
+
def hierarchy_root?
|
72
|
+
parent.nil?
|
115
73
|
end
|
116
74
|
|
117
|
-
|
118
|
-
|
75
|
+
protected
|
76
|
+
|
77
|
+
# :nodoc:
|
78
|
+
def defaults
|
79
|
+
super.merge(parent: nil, actions: Set.new, location: nil)
|
119
80
|
end
|
120
81
|
|
121
|
-
|
122
|
-
|
82
|
+
# :nodoc:
|
83
|
+
def sufficient_args!(args)
|
84
|
+
super
|
85
|
+
[:actions].each do |attr|
|
86
|
+
if args[attr].nil?
|
87
|
+
raise Occi::Core::Errors::MandatoryArgumentError, "#{attr} is a mandatory " \
|
88
|
+
"argument for #{self.class}"
|
89
|
+
end
|
90
|
+
end
|
123
91
|
end
|
124
92
|
|
125
|
-
#
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
kind.merge! super
|
134
|
-
kind
|
93
|
+
# :nodoc:
|
94
|
+
def post_initialize(args)
|
95
|
+
super
|
96
|
+
@parent = args.fetch(:parent)
|
97
|
+
@actions = args.fetch(:actions)
|
98
|
+
@location = args.fetch(:location)
|
99
|
+
|
100
|
+
load_parent_attributes! if parent
|
135
101
|
end
|
136
102
|
|
137
|
-
#
|
138
|
-
def
|
139
|
-
|
140
|
-
string << ";rel=#{self.related.first.to_s.inspect}" if self.related.any?
|
141
|
-
string << ";location=#{self.location.inspect}"
|
142
|
-
string << self.attributes.to_string_short
|
143
|
-
string << ";actions=#{self.actions.join(' ').inspect}" if self.actions.any?
|
144
|
-
string
|
103
|
+
# :nodoc:
|
104
|
+
def load_parent_attributes!
|
105
|
+
attributes.merge!(parent.attributes) { |_, oldval, _| oldval }
|
145
106
|
end
|
146
107
|
|
147
108
|
private
|
148
109
|
|
149
|
-
#
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
110
|
+
# Generates default location based on the already configured
|
111
|
+
# `term` attribute. Fails if `term` is not present.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
# kind.term # => 'compute'
|
115
|
+
# kind.generate_location # => #<URI::Generic /compute/>
|
116
|
+
#
|
117
|
+
# @return [URI] generated location
|
118
|
+
def generate_location
|
119
|
+
if term.blank?
|
120
|
+
raise Occi::Core::Errors::MandatoryArgumentError,
|
121
|
+
'Cannot generate default location without a `term`'
|
122
|
+
end
|
123
|
+
URI.parse "/#{term}/"
|
155
124
|
end
|
156
|
-
|
157
125
|
end
|
158
126
|
end
|
159
127
|
end
|
data/lib/occi/core/link.rb
CHANGED
@@ -1,95 +1,70 @@
|
|
1
1
|
module Occi
|
2
2
|
module Core
|
3
|
-
class
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
# Implements the base class for all OCCI links, this
|
4
|
+
# class can be used directly to create link instances.
|
5
|
+
#
|
6
|
+
# @attr source [URI] link source as URI
|
7
|
+
# @attr source_kind [Occi::Core::Kind, NilClass] source kind or `nil` if unknown
|
8
|
+
# @attr target [URI] link target, may point outside of this domain
|
9
|
+
# @attr target_kind [Occi::Core::Kind, NilClass] target kind or `nil` if ourside the domain
|
10
|
+
#
|
11
|
+
# @author Boris Parak <parak@cesnet.cz>
|
12
|
+
class Link < Entity
|
13
|
+
attr_accessor :target_kind, :source_kind
|
14
|
+
|
15
|
+
# @return [URI] link source
|
16
|
+
def source
|
17
|
+
self['occi.core.source']
|
18
|
+
end
|
16
19
|
|
17
|
-
# @param [
|
18
|
-
|
19
|
-
|
20
|
-
# @param [Array] actions
|
21
|
-
# @param [String] rel
|
22
|
-
# @param [String,Occi::Core::Entity] target
|
23
|
-
# @param [String,Occi::Core::Entity] source
|
24
|
-
def initialize(kind=self.kind, mixins=[], attributes={}, actions=[], rel=Occi::Core::Link.type_identifier, target=nil, source=nil, location=nil)
|
25
|
-
super(kind, mixins, attributes, actions, location)
|
26
|
-
scheme, term = rel.to_s.split('#')
|
27
|
-
@rel = Occi::Core::Kind.get_class(scheme, term).kind if scheme && term
|
28
|
-
@source = source if source
|
29
|
-
@target = target
|
20
|
+
# @param source [URI] link source
|
21
|
+
def source=(source)
|
22
|
+
self['occi.core.source'] = source.is_a?(String) ? URI.parse(source) : source
|
30
23
|
end
|
31
24
|
|
32
|
-
# @return [
|
25
|
+
# @return [URI] link target
|
33
26
|
def target
|
34
|
-
|
35
|
-
@target
|
27
|
+
self['occi.core.target']
|
36
28
|
end
|
37
29
|
|
38
|
-
#
|
39
|
-
# @param [String] target
|
30
|
+
# @param target [URI] link target
|
40
31
|
def target=(target)
|
41
|
-
self
|
42
|
-
@target = target.to_s
|
32
|
+
self['occi.core.target'] = target.is_a?(String) ? URI.parse(target) : target
|
43
33
|
end
|
44
34
|
|
45
|
-
#
|
46
|
-
|
47
|
-
|
48
|
-
@source
|
49
|
-
end
|
35
|
+
# See `target_kind`
|
36
|
+
alias rel target_kind
|
37
|
+
alias rel= target_kind=
|
50
38
|
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
39
|
+
# See `#valid!` on `Occi::Core::Entity`.
|
40
|
+
def valid!
|
41
|
+
%i[source target].each do |attr|
|
42
|
+
next if send(attr)
|
43
|
+
raise Occi::Core::Errors::InstanceValidationError, "Missing valid #{attr}"
|
44
|
+
end
|
57
45
|
|
58
|
-
# Runs check on attributes
|
59
|
-
def check(set_defaults = false)
|
60
|
-
raise ArgumentError, "Cannot run check on #{self.to_s.inspect} kind #{self.kind.to_s.inspect} without relation (the rel attribute) set!" unless @rel
|
61
46
|
super
|
62
47
|
end
|
63
48
|
|
64
|
-
|
65
|
-
# @return [Hashie::Mash] json representation
|
66
|
-
def as_json(options={})
|
67
|
-
link = super
|
68
|
-
link.rel = @rel.to_s if @rel
|
69
|
-
link.source = self.source.to_s unless self.source.to_s.blank?
|
70
|
-
link.target = self.target.to_s if self.target
|
71
|
-
link
|
72
|
-
end
|
73
|
-
|
74
|
-
# @return [String] text representation of link reference
|
75
|
-
def to_string
|
76
|
-
string = "<#{self.target.to_s}>"
|
77
|
-
string << ";rel=#{@rel.to_s.inspect}"
|
78
|
-
string << ";self=#{self.location.inspect}" if self.location
|
49
|
+
protected
|
79
50
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
string << @attributes.to_string
|
84
|
-
|
85
|
-
string
|
51
|
+
# :nodoc:
|
52
|
+
def defaults
|
53
|
+
super.merge(source: nil, target: nil, target_kind: nil, source_kind: nil)
|
86
54
|
end
|
87
55
|
|
88
|
-
#
|
89
|
-
def
|
90
|
-
|
56
|
+
# :nodoc:
|
57
|
+
def post_initialize(args)
|
58
|
+
super
|
59
|
+
if attributes['occi.core.source']
|
60
|
+
self.source = args.fetch(:source)
|
61
|
+
@source_kind = args.fetch(:source_kind)
|
62
|
+
end
|
63
|
+
|
64
|
+
return unless attributes['occi.core.target']
|
65
|
+
self.target = args.fetch(:target)
|
66
|
+
@target_kind = args.fetch(:target_kind)
|
91
67
|
end
|
92
|
-
|
93
68
|
end
|
94
69
|
end
|
95
70
|
end
|
data/lib/occi/core/mixin.rb
CHANGED
@@ -1,81 +1,96 @@
|
|
1
1
|
module Occi
|
2
2
|
module Core
|
3
|
-
|
3
|
+
# Defines the extension mechanism of the OCCI Core Model. The
|
4
|
+
# `Mixin` instance can be used to add `actions`, `attributes`,
|
5
|
+
# and custom features to existing `Entity` instances based on
|
6
|
+
# a specific `Kind` instance. A `Mixin` instance may depend
|
7
|
+
# on other `Mixin` instances (see `#depends`) and may be applied
|
8
|
+
# only to `Entity` instances based on specified `Kind` instances
|
9
|
+
# (see `#applies`). Some `Mixin` instances have special meaning
|
10
|
+
# defined in OCCI Standard documents.
|
11
|
+
#
|
12
|
+
# @attr actions [Set] list of `Action` instances attached to this mixin instance
|
13
|
+
# @attr depends [Set] list of `Mixin` instances on which this mixin depends
|
14
|
+
# @attr applies [Set] list of `Kind` instances to which this mixin can be applied
|
15
|
+
# @attr location [URI] protocol agnostic location of this mixin instance
|
16
|
+
#
|
17
|
+
# @author Boris Parak <parak@cesnet.cz>
|
18
|
+
class Mixin < Category
|
19
|
+
include Helpers::Locatable
|
4
20
|
|
5
|
-
attr_accessor :
|
21
|
+
attr_accessor :actions, :depends, :applies
|
22
|
+
attr_writer :location
|
6
23
|
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# @param [
|
13
|
-
# @
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
title=nil,
|
18
|
-
attributes=Occi::Core::Attributes.new,
|
19
|
-
depends=Occi::Core::Dependencies.new,
|
20
|
-
actions=Occi::Core::Actions.new,
|
21
|
-
location='',
|
22
|
-
applies=Occi::Core::Kinds.new)
|
23
|
-
|
24
|
-
super(scheme, term, title, attributes)
|
25
|
-
@depends = Occi::Core::Dependencies.new depends
|
26
|
-
@actions = Occi::Core::Actions.new actions
|
27
|
-
@entities = Occi::Core::Entities.new
|
28
|
-
@location = location.blank? ? "/mixin/#{term}/" : URI.parse(location).path
|
29
|
-
@applies = Occi::Core::Kinds.new applies
|
24
|
+
# Checks whether the given mixin is in the dependency
|
25
|
+
# chains of this instance. Checking for dependencies
|
26
|
+
# is strictly flat (no transitivity is applied). One
|
27
|
+
# `Mixin` instance may depend on multiple other instances.
|
28
|
+
#
|
29
|
+
# @param mixin [Mixin] candidate instance
|
30
|
+
# @return [TrueClass, FalseClass] result
|
31
|
+
def depends?(mixin)
|
32
|
+
return false unless depends && mixin
|
33
|
+
depends.include? mixin
|
30
34
|
end
|
31
35
|
|
32
|
-
#
|
36
|
+
# Checks whether the given kind is in the applies
|
37
|
+
# set of this instance (i.e., this mixin can be applied
|
38
|
+
# to an `Entity` instance of the given kind). Checking
|
39
|
+
# for applicable kinds is strictly flat (no transitivity
|
40
|
+
# is applied). One `Mixin` instance may be applied to
|
41
|
+
# multiple kinds (`Entity` instances of the given kind).
|
33
42
|
#
|
34
|
-
# @param kind [
|
35
|
-
# @return [
|
36
|
-
def
|
37
|
-
|
43
|
+
# @param kind [Kind] candidate instance
|
44
|
+
# @return [TrueClass, FalseClass] result
|
45
|
+
def applies?(kind)
|
46
|
+
return false unless applies && kind
|
47
|
+
applies.include? kind
|
38
48
|
end
|
39
49
|
|
40
|
-
|
41
|
-
# @param [String] location
|
42
|
-
def location=(location)
|
43
|
-
location = URI.parse(location).path if location
|
44
|
-
raise "Mixin locations must end with a slash!" unless location.blank? || location =~ /^\/\S+\/$/
|
45
|
-
@location = location
|
46
|
-
end
|
50
|
+
protected
|
47
51
|
|
48
|
-
|
49
|
-
|
52
|
+
# :nodoc:
|
53
|
+
def defaults
|
54
|
+
super.merge(actions: Set.new, depends: Set.new, applies: Set.new, location: nil)
|
50
55
|
end
|
51
56
|
|
52
|
-
|
53
|
-
|
57
|
+
# :nodoc:
|
58
|
+
def sufficient_args!(args)
|
59
|
+
super
|
60
|
+
%i[actions depends applies].each do |attr|
|
61
|
+
if args[attr].nil?
|
62
|
+
raise Occi::Core::Errors::MandatoryArgumentError, "#{attr} is a mandatory " \
|
63
|
+
"argument for #{self.class}"
|
64
|
+
end
|
65
|
+
end
|
54
66
|
end
|
55
67
|
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
mixin.actions = self.actions if self.actions.any?
|
64
|
-
mixin.location = self.location if self.location
|
65
|
-
mixin.merge! super
|
66
|
-
mixin
|
68
|
+
# :nodoc:
|
69
|
+
def post_initialize(args)
|
70
|
+
super
|
71
|
+
@actions = args.fetch(:actions)
|
72
|
+
@depends = args.fetch(:depends)
|
73
|
+
@applies = args.fetch(:applies)
|
74
|
+
@location = args.fetch(:location)
|
67
75
|
end
|
68
76
|
|
69
|
-
|
70
|
-
def to_string
|
71
|
-
string = super
|
72
|
-
string << ";rel=#{self.related.join(' ').inspect}" if self.related.any?
|
73
|
-
string << ";location=#{self.location.inspect}"
|
74
|
-
string << self.attributes.to_string_short
|
75
|
-
string << ";actions=#{self.actions.join(' ').inspect}" if self.actions.any?
|
76
|
-
string
|
77
|
-
end
|
77
|
+
private
|
78
78
|
|
79
|
+
# Generates default location based on the already configured
|
80
|
+
# `term` attribute. Fails if `term` is not present.
|
81
|
+
#
|
82
|
+
# @example
|
83
|
+
# mixin.term # => 'compute'
|
84
|
+
# mixin.generate_location # => #<URI::Generic /mixin/compute/>
|
85
|
+
#
|
86
|
+
# @return [URI] generated location string
|
87
|
+
def generate_location
|
88
|
+
if term.blank?
|
89
|
+
raise Occi::Core::Errors::MandatoryArgumentError,
|
90
|
+
'Cannot generate default location without a `term`'
|
91
|
+
end
|
92
|
+
URI.parse "/mixin/#{term}/"
|
93
|
+
end
|
79
94
|
end
|
80
95
|
end
|
81
96
|
end
|