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: false
require_dependency "login_system" require_dependency "login_system"
require_dependency "tracks/source_view" require_dependency "tracks/source_view"

View file

@ -1,3 +1,4 @@
# typed: false
class CalendarController < ApplicationController class CalendarController < ApplicationController
skip_before_action :login_required, :only => [:show] skip_before_action :login_required, :only => [:show]
prepend_before_action :login_or_feed_token_required, :only => [:show] prepend_before_action :login_or_feed_token_required, :only => [:show]

View file

@ -1,3 +1,4 @@
# typed: false
class ContextsController < ApplicationController class ContextsController < ApplicationController
helper :todos helper :todos

View file

@ -1,3 +1,4 @@
# typed: false
class DataController < ApplicationController class DataController < ApplicationController
require 'csv' require 'csv'

View file

@ -1,3 +1,4 @@
# typed: true
class FeedlistController < ApplicationController class FeedlistController < ApplicationController
helper :feedlist helper :feedlist

View file

@ -1,3 +1,4 @@
# typed: true
class IntegrationsController < ApplicationController class IntegrationsController < ApplicationController
require 'mail' require 'mail'

View file

@ -1,3 +1,4 @@
# typed: false
class LoginController < ApplicationController class LoginController < ApplicationController
layout 'login' layout 'login'

View file

@ -1,3 +1,4 @@
# typed: true
require 'openssl' require 'openssl'
class MailgunController < ApplicationController class MailgunController < ApplicationController

View file

@ -1,3 +1,4 @@
# typed: false
class NotesController < ApplicationController class NotesController < ApplicationController
before_action :set_source_view before_action :set_source_view

View file

@ -1,3 +1,4 @@
# typed: false
class PreferencesController < ApplicationController class PreferencesController < ApplicationController
def index def index

View file

@ -1,3 +1,4 @@
# typed: false
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
helper :application, :todos, :notes helper :application, :todos, :notes

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
class RecurringTodosController < ApplicationController class RecurringTodosController < ApplicationController
helper :todos, :recurring_todos helper :todos, :recurring_todos

View file

@ -1,3 +1,4 @@
# typed: true
class SearchController < ApplicationController class SearchController < ApplicationController
helper :todos, :application, :notes, :projects, :contexts helper :todos, :application, :notes, :projects, :contexts

View file

@ -1,3 +1,4 @@
# typed: false
class StatsController < ApplicationController class StatsController < ApplicationController
SECONDS_PER_DAY = 86400; SECONDS_PER_DAY = 86400;

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
class TodosController < ApplicationController class TodosController < ApplicationController
skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done] skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
@ -45,7 +46,7 @@ class TodosController < ApplicationController
@page_title = t('todos.mobile_todos_page_title') @page_title = t('todos.mobile_todos_page_title')
@home = true @home = true
cookies[:mobile_url]= { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']} cookies[:mobile_url] = { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
determine_down_count determine_down_count
render :action => 'index'.freeze render :action => 'index'.freeze

View file

@ -1,3 +1,4 @@
# typed: false
class UsersController < ApplicationController class UsersController < ApplicationController
before_action :admin_login_required, :only => [ :index, :show, :destroy ] before_action :admin_login_required, :only => [ :index, :show, :destroy ]

View file

@ -1,3 +1,4 @@
# typed: false
module ApplicationHelper module ApplicationHelper
def group_view_by_menu_entry def group_view_by_menu_entry

View file

@ -1,2 +1,3 @@
# typed: strong
module BackendHelper module BackendHelper
end end

View file

@ -1,3 +1,4 @@
# typed: false
module BootstrapFlashHelper module BootstrapFlashHelper
ALERT_MAPPING = { ALERT_MAPPING = {
:notice => :success, :notice => :success,

View file

@ -1,3 +1,4 @@
# typed: false
module ContextsHelper module ContextsHelper
def show_context_name(context) def show_context_name(context)

View file

@ -1,2 +1,3 @@
# typed: strong
module DataHelper module DataHelper
end end

View file

@ -1,3 +1,4 @@
# typed: true
module DateLabelHelper module DateLabelHelper
class GenericDateView class GenericDateView

View file

@ -1,3 +1,4 @@
# typed: false
module FeedlistHelper module FeedlistHelper
def linkoptions(format, options) def linkoptions(format, options)

View file

@ -1,3 +1,4 @@
# typed: true
module IconHelper module IconHelper
include FontAwesome::Sass::Rails::ViewHelpers include FontAwesome::Sass::Rails::ViewHelpers

View file

@ -1,2 +1,3 @@
# typed: strong
module IntegrationsHelper module IntegrationsHelper
end end

View file

@ -1,3 +1,4 @@
# typed: strong
module LoginHelper module LoginHelper
end end

View file

@ -1,2 +1,3 @@
# typed: strong
module MobileHelper module MobileHelper
end end

View file

@ -1,3 +1,4 @@
# typed: false
module NotesHelper module NotesHelper
def truncated_note(note, characters = 50) def truncated_note(note, characters = 50)
render_text(truncate(note.body, :length => characters, :omission => "...")) render_text(truncate(note.body, :length => characters, :omission => "..."))

View file

@ -1,3 +1,4 @@
# typed: false
module PreferencesHelper module PreferencesHelper
def pref(model, pref_name, &block) def pref(model, pref_name, &block)

View file

@ -1,3 +1,4 @@
# typed: false
module ProjectsHelper module ProjectsHelper
def show_project_name(project) def show_project_name(project)

View file

@ -1,3 +1,4 @@
# typed: false
module RecurringTodosHelper module RecurringTodosHelper
def recurring_todo_tag_list def recurring_todo_tag_list

View file

@ -1,3 +1,4 @@
# typed: ignore
module RenderingHelper module RenderingHelper
AUTO_LINK_MESSAGE_RE = %r{message://<[^>]+>} unless const_defined?(:AUTO_LINK_MESSAGE_RE) AUTO_LINK_MESSAGE_RE = %r{message://<[^>]+>} unless const_defined?(:AUTO_LINK_MESSAGE_RE)

View file

@ -1,2 +1,3 @@
# typed: strong
module SearchHelper module SearchHelper
end end

View file

@ -1,3 +1,4 @@
# typed: false
module StatsHelper module StatsHelper
def font_size(cloud, tag) def font_size(cloud, tag)

View file

@ -1,3 +1,4 @@
# typed: false
require 'staleness' require 'staleness'
module TodosHelper module TodosHelper

View file

@ -1,3 +1,4 @@
# typed: false
module UsersHelper module UsersHelper
def remote_delete_user(user) def remote_delete_user(user)
return link_to( return link_to(

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
class Context < ApplicationRecord 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 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 class Dependency < ApplicationRecord
# touch to make sure todo caches for predecessor and successor are invalidated # touch to make sure todo caches for predecessor and successor are invalidated

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
class Project < ApplicationRecord 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 :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 has_many :notes, -> {order "created_at DESC"}, dependent: :delete_all

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: true
# Get action count for the top n contexts (default: all) # Get action count for the top n contexts (default: all)
# If initialized with :running => true, then only active # If initialized with :running => true, then only active
# and visible contexts will be included. # 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. # Get the first 10 projects with their actions count of actions.
# When a cutoff is passed in, only actions that have been created # When a cutoff is passed in, only actions that have been created
# or completed since that cutoff will be included. # or completed since that cutoff will be included.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: true
require 'date' require 'date'
class RichMessageExtractor class RichMessageExtractor
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper

View file

@ -1,3 +1,4 @@
# typed: false
class TodoFromRichMessage class TodoFromRichMessage
attr_reader :user, :default_context_id, :description, :notes attr_reader :user, :default_context_id, :description, :notes

View file

@ -1,3 +1,4 @@
# typed: false
require_relative 'boot' require_relative 'boot'
require 'rails/all' require 'rails/all'

View file

@ -1,3 +1,4 @@
# typed: strong
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile. require 'bundler/setup' # Set up gems listed in the Gemfile.

View file

@ -1,3 +1,4 @@
# typed: strict
# Load the Rails application. # Load the Rails application.
require_relative 'application' require_relative 'application'

View file

@ -1,3 +1,4 @@
# typed: false
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.

View file

@ -1,3 +1,4 @@
# typed: false
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.

View file

@ -1,3 +1,4 @@
# typed: false
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do # ActiveSupport::Reloader.to_prepare do

View file

@ -1,3 +1,4 @@
# typed: false
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets. # Version of your assets, change this if you want to expire all your assets.

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

View file

@ -1,3 +1,4 @@
# typed: strong
# config for bullet gem # config for bullet gem
if defined? Bullet if defined? Bullet

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy # Define an application-wide content security policy

View file

@ -1,3 +1,4 @@
# typed: false
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars. # Specify a serializer for the signed and encrypted cookie jars.

View file

@ -1,3 +1,4 @@
# typed: false
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.

View file

@ -1,3 +1,4 @@
# typed: false
module I18n::Backend::Pluralization module I18n::Backend::Pluralization
# rules taken from : http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html # rules taken from : http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html
def pluralize(locale, entry, n) def pluralize(locale, entry, n)

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections # Add new inflection rules using the following format. Inflections

View file

@ -1,3 +1,4 @@
# typed: strict
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks: # Add new mime types for use in respond_to blocks:

View file

@ -1,3 +1,4 @@
# typed: false
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# #
# This file contains migration options to ease your Rails 5.0 upgrade. # This file contains migration options to ease your Rails 5.0 upgrade.

View file

@ -1,3 +1,4 @@
# typed: false
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# #
# This file contains migration options to ease your Rails 5.1 upgrade. # This file contains migration options to ease your Rails 5.1 upgrade.

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# #
# This file contains migration options to ease your Rails 5.2 upgrade. # This file contains migration options to ease your Rails 5.2 upgrade.

Some files were not shown because too many files have changed in this diff Show more