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 "tracks/source_view"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
class TodosController < ApplicationController
skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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'

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
# typed: false
Rails.application.configure do
# 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.
# ActiveSupport::Reloader.to_prepare do

View file

@ -1,3 +1,4 @@
# typed: false
# 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.

View file

@ -1,3 +1,4 @@
# typed: strong
# 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.

View file

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

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file.
# 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.
# 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.
# Configure sensitive parameters which will be filtered from the log file.

View file

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

View file

@ -1,3 +1,4 @@
# typed: strong
# Be sure to restart your server when you modify this file.
# 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.
# 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.
#
# 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.
#
# 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.
#
# 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