mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02: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: false
|
||||
require_dependency "login_system"
|
||||
require_dependency "tracks/source_view"
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class ContextsController < ApplicationController
|
||||
|
||||
helper :todos
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class DataController < ApplicationController
|
||||
|
||||
require 'csv'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class FeedlistController < ApplicationController
|
||||
|
||||
helper :feedlist
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class IntegrationsController < ApplicationController
|
||||
require 'mail'
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class LoginController < ApplicationController
|
||||
|
||||
layout 'login'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
require 'openssl'
|
||||
|
||||
class MailgunController < ApplicationController
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class NotesController < ApplicationController
|
||||
|
||||
before_action :set_source_view
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class PreferencesController < ApplicationController
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class ProjectsController < ApplicationController
|
||||
|
||||
helper :application, :todos, :notes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module RecurringTodos
|
||||
|
||||
class FormHelper
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class RecurringTodosController < ApplicationController
|
||||
|
||||
helper :todos, :recurring_todos
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
class SearchController < ApplicationController
|
||||
|
||||
helper :todos, :application, :notes, :projects, :contexts
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class StatsController < ApplicationController
|
||||
|
||||
SECONDS_PER_DAY = 86400;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module Todos
|
||||
class TodoCreateParamsHelper
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class TodosController < ApplicationController
|
||||
|
||||
skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class UsersController < ApplicationController
|
||||
|
||||
before_action :admin_login_required, :only => [ :index, :show, :destroy ]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module ApplicationHelper
|
||||
|
||||
def group_view_by_menu_entry
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# typed: strong
|
||||
module BackendHelper
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module BootstrapFlashHelper
|
||||
ALERT_MAPPING = {
|
||||
:notice => :success,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module ContextsHelper
|
||||
|
||||
def show_context_name(context)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# typed: strong
|
||||
module DataHelper
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module DateLabelHelper
|
||||
|
||||
class GenericDateView
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module FeedlistHelper
|
||||
|
||||
def linkoptions(format, options)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
module IconHelper
|
||||
include FontAwesome::Sass::Rails::ViewHelpers
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# typed: strong
|
||||
module IntegrationsHelper
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
module LoginHelper
|
||||
|
||||
end
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# typed: strong
|
||||
module MobileHelper
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module NotesHelper
|
||||
def truncated_note(note, characters = 50)
|
||||
render_text(truncate(note.body, :length => characters, :omission => "..."))
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module PreferencesHelper
|
||||
|
||||
def pref(model, pref_name, &block)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module ProjectsHelper
|
||||
|
||||
def show_project_name(project)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module RecurringTodosHelper
|
||||
|
||||
def recurring_todo_tag_list
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: ignore
|
||||
module RenderingHelper
|
||||
AUTO_LINK_MESSAGE_RE = %r{message://<[^>]+>} unless const_defined?(:AUTO_LINK_MESSAGE_RE)
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# typed: strong
|
||||
module SearchHelper
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module StatsHelper
|
||||
|
||||
def font_size(cloud, tag)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
require 'staleness'
|
||||
|
||||
module TodosHelper
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
module UsersHelper
|
||||
def remote_delete_user(user)
|
||||
return link_to(
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: true
|
||||
require 'date'
|
||||
class RichMessageExtractor
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
class TodoFromRichMessage
|
||||
|
||||
attr_reader :user, :default_context_id, :description, :notes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
require_relative 'boot'
|
||||
|
||||
require 'rails/all'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||
|
||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strict
|
||||
# Load the Rails application.
|
||||
require_relative 'application'
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: false
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# ActiveSupport::Reloader.to_prepare do
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
# config for bullet gem
|
||||
|
||||
if defined? Bullet
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# typed: strong
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Define an application-wide content security policy
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue