From 4f7b76bd17b2fa7f6bba26a73f327714f305417d Mon Sep 17 00:00:00 2001 From: Genar Trias Ortiz Date: Wed, 21 Aug 2024 12:57:59 +0200 Subject: [PATCH] some more fixes --- lib/public/resource.rb | 10 ++-------- sorbet/rbi/gems/rspec-core@3.13.0.rbi | 9 --------- sorbet/rbi/todo.rbi | 1 - 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/public/resource.rb b/lib/public/resource.rb index e88c28f..6dde37c 100644 --- a/lib/public/resource.rb +++ b/lib/public/resource.rb @@ -33,12 +33,6 @@ class SchemaNotFound < StandardError # it as a hack to avoid having to build pagination into our products const :paginateable, T::Boolean, default: true - sig { returns(T::Array[T.class_of(EventSystem::Event)]) } - def public_events - @public_events = T.let([], T.nilable(T::Array[T.class_of(EventSystem::Event)])) - @public_events ||= verbs.values.filter_map(&:event) - end - sig { returns(String) } def path @path = T.let(@path, T.nilable(String)) @@ -70,7 +64,7 @@ def resource_name T.must(repository_raw.split('::').last) end - sig { returns(T::Class[ResourceRegistry::Repositories::Base]) } + sig { returns(T::Class[ResourceRegistry::Repositories::Base[T.untyped]]) } def repository repository_klass = repository_raw.safe_constantize raise ArgumentError, "Repository #{repository_raw} not found, did you misspell it?" if repository_klass.nil? @@ -163,7 +157,7 @@ def capability_by_key(key) ).returns(T::Boolean) end def capability?(feature) - capabilities[feature.key].present? + !!capabilities[feature.key] end sig do diff --git a/sorbet/rbi/gems/rspec-core@3.13.0.rbi b/sorbet/rbi/gems/rspec-core@3.13.0.rbi index 2503560..69f9e69 100644 --- a/sorbet/rbi/gems/rspec-core@3.13.0.rbi +++ b/sorbet/rbi/gems/rspec-core@3.13.0.rbi @@ -9276,15 +9276,6 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#17 def method_missing(name, *args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def nonblock(*args, &block); end - - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def nonblock=(*args, &block); end - - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def nonblock?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def nread(*args, &block); end diff --git a/sorbet/rbi/todo.rbi b/sorbet/rbi/todo.rbi index 0909fa4..95ae8c8 100644 --- a/sorbet/rbi/todo.rbi +++ b/sorbet/rbi/todo.rbi @@ -34,7 +34,6 @@ module ResourceRegistry::Repositories::OutputContexts::Sort; end module ResourceRegistry::Repositories::ReadOutputContext; end module ResourceRegistry::Repositories::ReadResult::Outcome; end module ResourceRegistry::Repositories::ReadResult::OutputContexts::PageInfoDto; end -module ResourceRegistry::Resource::EventSystem::Event; end module ResourceRegistry::Serializer; end module ResourceRegistry::Tracer::Telemetry::Tracer; end module SchemaRegistry::GenerateFromStruct::ActionDispatch::Http::UploadedFile; end