Skip to content

hummingbird-me/kitsu-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1a77745 Â· Feb 2, 2025
Feb 2, 2025
Feb 2, 2025
Nov 9, 2024
Nov 9, 2024
Dec 26, 2024
Nov 10, 2024
Sep 22, 2015
Sep 22, 2015
Feb 2, 2025
Jun 5, 2022
Mar 1, 2021
Apr 19, 2020
Dec 24, 2024
Aug 24, 2020
May 5, 2023
Dec 7, 2016
Oct 23, 2017
May 1, 2023
Dec 8, 2024
Oct 6, 2024
Nov 18, 2024
May 6, 2023
Dec 26, 2024
Dec 26, 2024
Mar 4, 2017
Aug 31, 2018
Sep 22, 2021
Apr 25, 2017
Dec 26, 2024
Oct 26, 2024
Mar 7, 2020
Oct 6, 2024

Kitsu Server

Kitsu Test Suite Kitsu API Deployment Code Climate Test Coverage


This is our server repository. It contains the rails application for Kitsu.
Check out the tools, web, mobile and api docs repositories.


This README outlines the details of collaborating on this application.

Styleguide

Styleguide Amendments

These amendments are listed below, though we may forget some. Rubocop will help you, and we have a .rubocop.yml which we develop with.

Rails

ActiveRecord Models

  • Group macro-style methods at the beginning of the class definition, in the following order:

    class User < ActiveRecord::Base
      # put the default scope at the top
      default_scope { includes(:favorites) }
    
      # then the constants
      COLORS = %w[red green blue]
    
      # then named scopes
      scope(:banned) { where(banned: true) }
    
      # then any mixin-style "acts_as_*" and similar methods
      acts_as_sortable
      devise :database_authenticable, :registerable, :recoverable,
             :validatable, :confirmable
    
      # then field-type macros such as enums and associations
      enum rating_system: %i[smilies stars]
      has_many :library_entries
    
      # then validation
      validates :email, presence: true
      validates name, presence: true
    
      # and then callbacks
      before_save :do_the_thing
    
      # ... and finally the rest of the methods!
    end

Contributors