Skip to content

Commit

Permalink
some more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrias committed Aug 21, 2024
1 parent 7cfaa4a commit 4f7b76b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
10 changes: 2 additions & 8 deletions lib/public/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions sorbet/rbi/gems/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sorbet/rbi/todo.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f7b76b

Please sign in to comment.