Add sorbet typing information to all the files

This commit is contained in:
Matt Rogers 2019-12-18 09:49:57 -06:00
parent 8b8db1ef7c
commit cabe2f80ed
No known key found for this signature in database
GPG key ID: 605D017C07EB4316
263 changed files with 264 additions and 1 deletions

View file

@ -1,3 +1,4 @@
# typed: strong
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View file

@ -1,3 +1,4 @@
# typed: true
class Attachment < ApplicationRecord
belongs_to :todo, touch: true

View file

@ -1,3 +1,4 @@
# typed: false
class Context < ApplicationRecord
has_many :todos, -> { order(Arel.sql("todos.due IS NULL, todos.due ASC, todos.created_at ASC")).includes(:project) }, :dependent => :delete_all

View file

@ -1,3 +1,4 @@
# typed: true
class Dependency < ApplicationRecord
# touch to make sure todo caches for predecessor and successor are invalidated

View file

@ -1,3 +1,4 @@
# typed: false
class MessageGateway < ActionMailer::Base
def receive(email)

View file

@ -1,3 +1,4 @@
# typed: strict
class Note < ApplicationRecord
belongs_to :user
belongs_to :project

View file

@ -1,3 +1,4 @@
# typed: true
class NullTime
include Comparable

View file

@ -1,3 +1,4 @@
# typed: false
class Preference < ApplicationRecord
belongs_to :user
belongs_to :sms_context, :class_name => 'Context'

View file

@ -1,3 +1,4 @@
# typed: false
class Project < ApplicationRecord
has_many :todos, -> {order(Arel.sql("todos.due IS NULL, todos.due ASC, todos.created_at ASC"))}, dependent: :delete_all
has_many :notes, -> {order "created_at DESC"}, dependent: :delete_all

View file

@ -1,3 +1,4 @@
# typed: false
class RecurringTodo < ApplicationRecord
belongs_to :context
belongs_to :project

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class AbstractRecurrencePattern

View file

@ -1,3 +1,4 @@
# typed: false
module RecurringTodos
class AbstractRecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class DailyRecurrencePattern < AbstractRecurrencePattern

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class DailyRecurringTodosBuilder < AbstractRecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class MonthlyRecurrencePattern < AbstractRecurrencePattern

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class MonthlyRecurringTodosBuilder < AbstractRecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class RecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: false
module RecurringTodos
class WeeklyRecurrencePattern < AbstractRecurrencePattern

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class WeeklyRecurringTodosBuilder < AbstractRecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class YearlyRecurrencePattern < AbstractRecurrencePattern

View file

@ -1,3 +1,4 @@
# typed: true
module RecurringTodos
class YearlyRecurringTodosBuilder < AbstractRecurringTodosBuilder

View file

@ -1,3 +1,4 @@
# typed: true
module Search
class SearchResults

View file

@ -1,3 +1,4 @@
# typed: true
class Sidebar
attr_reader :contexts, :projects

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class Actions

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class Chart

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class Contexts

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class Projects

View file

@ -1,3 +1,4 @@
# typed: true
# tag cloud code inspired by this article
# http://www.juixe.com/techknow/index.php/2006/07/15/acts-as-taggable-tag-cloud/
module Stats

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class TagCloudQuery

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class TimeToComplete

View file

@ -1,3 +1,4 @@
# typed: true
# Get action count for the top n contexts (default: all)
# If initialized with :running => true, then only active
# and visible contexts will be included.

View file

@ -1,3 +1,4 @@
# typed: true
# Get the first 10 projects with their actions count of actions.
# When a cutoff is passed in, only actions that have been created
# or completed since that cutoff will be included.

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class Totals

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class UserStats

View file

@ -1,3 +1,4 @@
# typed: true
module Stats
class UserTagsQuery

View file

@ -1,3 +1,4 @@
# typed: false
class Tag < ApplicationRecord
has_many :taggings

View file

@ -1,3 +1,4 @@
# typed: true
# The Tagging join model.

View file

@ -1,3 +1,4 @@
# typed: false
class Todo < ApplicationRecord
MAX_DESCRIPTION_LENGTH = 300

View file

@ -1,3 +1,4 @@
# typed: true
module Todos
class Calendar

View file

@ -1,3 +1,4 @@
# typed: true
module Todos
class UndoneTodosQuery
include ActionView::Helpers::SanitizeHelper

View file

@ -1,3 +1,4 @@
# typed: false
require 'digest/sha1'
require 'bcrypt'