lib/esse/deprecations/repository.rb in esse-0.2.2 vs lib/esse/deprecations/repository.rb in esse-0.2.3
- old
+ new
@@ -1,19 +1,34 @@
# frozen_string_literal: true
module Esse
class Repository
class << self
- extend Gem::Deprecate
+ extend Esse::Deprecations::Deprecate
def type_name
- document_type
+ repo_name
end
- deprecate :type_name, :document_type, 2022, 10
+ deprecate :type_name, :repo_type, 2023, 12
def mappings(*args, &block)
+ warning("#{self}.mappings", "#{index}.mappings", 2023, 12)
+
index.mappings(*args, &block)
end
- deprecate :mappings, "Esse::Index.mappings", 2022, 10
+
+ def serializer(*args, **kwargs, &block)
+ warning("#{self}.serializer", "#{self}.document", 2023, 12)
+
+ document(*args, **kwargs, &block)
+ end
+
+ def elasticsearch
+ Esse::Deprecations::RepositoryBackendDelegator.new(:elasticsearch, self)
+ end
+
+ def backend
+ Esse::Deprecations::RepositoryBackendDelegator.new(:backend, self)
+ end
end
end
end