mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 07:34:08 +01:00
Add sorbet typing information to all the files
This commit is contained in:
parent
8b8db1ef7c
commit
cabe2f80ed
263 changed files with 264 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class Attachment < ApplicationRecord
|
||||
belongs_to :todo, touch: true
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class Dependency < ApplicationRecord
|
||||
|
||||
# touch to make sure todo caches for predecessor and successor are invalidated
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class MessageGateway < ActionMailer::Base
|
||||
|
||||
def receive(email)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strict
|
||||
class Note < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class NullTime
|
||||
include Comparable
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class Preference < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :sms_context, :class_name => 'Context'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class RecurringTodo < ApplicationRecord
|
||||
belongs_to :context
|
||||
belongs_to :project
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class AbstractRecurrencePattern
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module RecurringTodos
|
||||
|
||||
class AbstractRecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class DailyRecurrencePattern < AbstractRecurrencePattern
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class DailyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class MonthlyRecurrencePattern < AbstractRecurrencePattern
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class MonthlyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class RecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module RecurringTodos
|
||||
|
||||
class WeeklyRecurrencePattern < AbstractRecurrencePattern
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class WeeklyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class YearlyRecurrencePattern < AbstractRecurrencePattern
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class YearlyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Search
|
||||
|
||||
class SearchResults
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class Sidebar
|
||||
attr_reader :contexts, :projects
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class Actions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
|
||||
class Chart
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class Contexts
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class Projects
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class TagCloudQuery
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class TimeToComplete
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class Totals
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class UserStats
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Stats
|
||||
class UserTagsQuery
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class Tag < ApplicationRecord
|
||||
|
||||
has_many :taggings
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
|
||||
# The Tagging join model.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class Todo < ApplicationRecord
|
||||
|
||||
MAX_DESCRIPTION_LENGTH = 300
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Todos
|
||||
class Calendar
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Todos
|
||||
class UndoneTodosQuery
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
require 'digest/sha1'
|
||||
require 'bcrypt'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue