Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: cd spec/dummy_rails && bundle exec rails db:migrate

- name: Run tests
#env:
# RUBYOPT: '-rbundler/setup -rrbs/test/setup'
# RBS_TEST_TARGET: 'TinyAdmin::*'
env:
RUBYOPT: '-rbundler/setup -rrbs/test/setup'
RBS_TEST_TARGET: 'TinyAdmin::*'
run: bin/rspec --profile
6 changes: 3 additions & 3 deletions sig/tiny_admin/field.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module TinyAdmin
attr_reader title: String
attr_reader type: Symbol

def initialize: (name: String, title: String, type: Symbol, options: Hash[Symbol, String]) -> void
def initialize: (name: String, title: String, type: Symbol, ?options: Hash[Symbol, String]) -> void

def apply_call_option: (untyped) -> void

def translate_value: (untyped) -> String?
def translate_value: (untyped) -> untyped

def self.create_field: (name: String, ?title: String?, ?type: Symbol?, ?options: Hash[Symbol, untyped]) -> Field
def self.create_field: (name: String | Symbol, ?title: String?, ?type: Symbol?, ?options: Hash[Symbol, untyped]?) -> Field
end
end
6 changes: 3 additions & 3 deletions sig/tiny_admin/plugins/active_record_repository.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ module TinyAdmin

def collection: () -> untyped

def fields: (options: Hash[untyped, untyped]?) -> Hash[String, Field]
def fields: (?options: Hash[untyped, untyped]?) -> Hash[String, Field]

def find: (untyped) -> untyped

def index_record_attrs: (untyped, fields: Hash[untyped, untyped]?) -> Hash[untyped, untyped]
def index_record_attrs: (untyped, ?fields: Hash[untyped, untyped]?) -> Hash[untyped, untyped]

def index_title: () -> String

def list: (page: Integer, limit: Integer, sort: untyped?, filters: untyped?) -> Array[untyped]
def list: (?page: Integer, ?limit: Integer, ?sort: untyped?, ?filters: untyped?) -> [Array[untyped], Integer]

def show_title: (untyped) -> String

Expand Down
2 changes: 1 addition & 1 deletion sig/tiny_admin/section.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module TinyAdmin
attr_reader path: String
attr_reader slug: String?

def initialize: (name: String, ?slug: String?, ?path: String?, ?options: Hash[Symbol, String]) -> void
def initialize: (name: String, ?slug: String?, ?path: String?, ?options: Hash[Symbol, String]?) -> void
end
end
8 changes: 4 additions & 4 deletions sig/tiny_admin/store.rbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module TinyAdmin
class Store
attr_reader navbar: Array[Section]
attr_reader navbar: Array[Section?]
attr_reader pages: Hash[String, Hash[Symbol, untyped]]
attr_reader resources: Hash[String, Hash[Symbol, untyped]]
attr_reader settings: Settings
attr_reader settings: untyped

def initialize: (Settings) -> void
def initialize: (untyped) -> void

def prepare_sections: (Array[untyped], logout: TinyAdmin::Section?) -> void

Expand All @@ -15,7 +15,7 @@ module TinyAdmin

def add_page_section: (String, Hash[Symbol, untyped]) -> TinyAdmin::Section

def add_resource_section: (String, Hash[Symbol, untyped]) -> TinyAdmin::Section
def add_resource_section: (String, Hash[Symbol, untyped]) -> TinyAdmin::Section?

def add_url_section: (String, Hash[Symbol, untyped]) -> TinyAdmin::Section
end
Expand Down
16 changes: 8 additions & 8 deletions sig/tiny_admin/support.rbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module TinyAdmin
class Support
def self.call: (?untyped, options: Array[String]?) -> String?
def self.call: (?untyped, ?options: Array[String]) -> untyped

def self.downcase: (?untyped, options: Array[String]?) -> String?
def self.downcase: (?untyped, ?options: Array[String]) -> String?

def self.format: (?untyped, options: Array[String]?) -> String?
def self.format: (?untyped, ?options: Array[String]) -> String?

def self.label_for: (?untyped, options: Array[String]?) -> String?
def self.label_for: (?untyped, ?options: Array[String]) -> untyped

def self.round: (?untyped, options: Array[String]?) -> String?
def self.round: (?untyped, ?options: Array[String]) -> untyped

def self.strftime: (?untyped, options: Array[String]?) -> String?
def self.strftime: (?untyped, ?options: Array[String]) -> String?

def self.to_date: (?untyped, options: Array[String]?) -> String?
def self.to_date: (?untyped, ?options: Array[String]) -> String?

def self.upcase: (?untyped, options: Array[String]?) -> String?
def self.upcase: (?untyped, ?options: Array[String]) -> String?
end
end
Loading