lib/dry/system/config/component_dir.rb in dry-system-0.27.2 vs lib/dry/system/config/component_dir.rb in dry-system-1.0.0.rc1

- old
+ new

@@ -188,43 +188,9 @@ # # @see add_to_load_path= # @api public setting :add_to_load_path, default: true - # @api public - def default_namespace=(namespace) - Dry::Core::Deprecations.announce( - "Dry::System::Config::ComponentDir#default_namespace=", - "Add a namespace instead: `dir.namespaces.add #{namespace.to_s.inspect}, key: nil`", - tag: "dry-system", - uplevel: 1 - ) - - # We don't have the configured separator here, so the best we can do is guess - # that it's a dot - namespace_path = namespace.gsub(".", PATH_SEPARATOR) - - return if namespaces.namespaces[namespace_path] - - namespaces.add namespace_path, key: nil - end - - # @api public - def default_namespace - Dry::Core::Deprecations.announce( - "Dry::System::Config::ComponentDir#default_namespace", - "Use namespaces instead, e.g. `dir.namespaces`", - tag: "dry-system", - uplevel: 1 - ) - - ns_path = namespaces.to_a.reject(&:root?).first&.path - - # We don't have the configured separator here, so the best we can do is guess - # that it's a dot - ns_path&.gsub(PATH_SEPARATOR, ".") - end - # @!endgroup # Returns the component dir path, relative to the configured container root # # @return [String] the path