-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
476 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
# Omakase Ruby styling for Rails | ||
inherit_gem: { rubocop-rails-omakase: rubocop.yml } | ||
|
||
# Overwrite or add rules to create your own house style | ||
# | ||
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` | ||
# Layout/SpaceInsideArrayLiteralBrackets: | ||
# Enabled: false | ||
inherit_from: .rubocop_todo.yml | ||
|
||
require: | ||
- rubocop-capybara | ||
- rubocop-rails | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.3 | ||
NewCops: enable | ||
Exclude: | ||
- bin/* | ||
- db/schema.rb | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- config/environments/* | ||
|
||
Metrics/MethodLength: | ||
Max: 35 | ||
Exclude: | ||
- db/migrate/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-07-19 12:31:30 UTC using RuboCop version 1.64.1. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,57 @@ | ||
source "https://rubygems.org" | ||
# frozen_string_literal: true | ||
|
||
ruby file: ".ruby-version" | ||
source 'https://rubygems.org' | ||
|
||
gem "rails", "~> 7.1" | ||
ruby file: '.ruby-version' | ||
|
||
gem 'rails', '~> 7.1' | ||
|
||
# Drivers | ||
gem "sqlite3", "~> 1.4" | ||
gem "redis", ">= 4.0.1" | ||
gem 'redis', '>= 4.0.1' | ||
gem 'sqlite3', '~> 1.4' | ||
|
||
# Deployment | ||
gem "puma", ">= 5.0" | ||
gem 'puma', '>= 5.0' | ||
|
||
# Jobs | ||
gem "resque", "~> 2.6.0" | ||
gem "resque-pool", "~> 0.7.1" | ||
gem 'resque', '~> 2.6.0' | ||
gem 'resque-pool', '~> 0.7.1' | ||
|
||
# Front-end | ||
gem "propshaft" | ||
gem "importmap-rails" | ||
gem "turbo-rails" | ||
gem "stimulus-rails" | ||
gem "bootstrap", "~> 5.1" | ||
gem "sassc-rails" | ||
gem "simple_form", "~> 5.3" | ||
gem 'bootstrap', '~> 5.1' | ||
gem 'importmap-rails' | ||
gem 'simple_form', '~> 5.3' | ||
gem 'stimulus-rails' | ||
gem 'turbo-rails' | ||
|
||
# Other | ||
gem "sprockets-rails" | ||
gem "useragent", github: "basecamp/useragent" | ||
gem "jbuilder" | ||
gem "redcarpet", "~> 3.6" | ||
gem "rouge", "~> 4.2" | ||
gem "bcrypt", "~> 3.1.7" | ||
gem "image_processing", "~> 1.2" | ||
gem "rqrcode" | ||
gem "thruster" | ||
gem "front_matter_parser" | ||
gem "rails-i18n", "~> 7.0.0" | ||
gem 'bcrypt', '~> 3.1.7' | ||
gem 'front_matter_parser' | ||
gem 'image_processing', '~> 1.2' | ||
gem 'jbuilder' | ||
gem 'rails-i18n', '~> 7.0.0' | ||
gem 'redcarpet', '~> 3.6' | ||
gem 'rouge', '~> 4.2' | ||
gem 'rqrcode' | ||
gem 'sassc-rails' | ||
gem 'sprockets-rails' | ||
gem 'thruster' | ||
gem 'useragent', github: 'basecamp/useragent' | ||
|
||
group :development, :test do | ||
gem "debug" | ||
gem "faker", require: false | ||
gem "brakeman", require: false | ||
gem "rubocop-rails-omakase", require: false | ||
gem 'brakeman', require: false | ||
gem 'debug' | ||
gem 'faker', require: false | ||
gem 'rubocop-capybara', require: false | ||
gem 'rubocop-rails', require: false | ||
end | ||
|
||
group :development do | ||
gem "web-console" | ||
gem "htmlbeautifier" | ||
gem 'htmlbeautifier' | ||
gem 'web-console' | ||
end | ||
|
||
group :test do | ||
gem "capybara" | ||
gem "selenium-webdriver" | ||
gem 'capybara' | ||
gem 'selenium-webdriver' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require_relative "config/application" | ||
require_relative 'config/application' | ||
|
||
Rails.application.load_tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class HomeController < ApplicationController | ||
def index | ||
@members = Member.all | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationMailer < ActionMailer::Base | ||
default from: "[email protected]" | ||
layout "mailer" | ||
default from: '[email protected]' | ||
layout 'mailer' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationRecord < ActiveRecord::Base | ||
self.abstract_class = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class MedicalCertificate < ApplicationRecord | ||
has_one_attached :certificate | ||
|
||
enum :kind, %i[regular competitive] | ||
|
||
validates :kind, :certificate, :expires_at, presence: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
class Member < ApplicationRecord | ||
has_many :payments, dependent: :destroy | ||
has_many :memberships, dependent: :destroy | ||
|
||
validates :name, :surname, :born_at, :born_in, :citizenship, :address, :postal_code, presence: true | ||
|
||
def status | ||
%w[ok warning error].sample | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class Membership < ApplicationRecord | ||
belongs_to :member | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class Payment < ApplicationRecord | ||
belongs_to :member | ||
|
||
validates :amount, presence: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
asdasd | ||
<ul class="nav nav-tabs" id="myTab" role="tablist"> | ||
<% @members.each do |member| %> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="<%= member.name.parameterize %>-tab" data-bs-toggle="tab" data-bs-target="#<%= member.name.parameterize %>" type="button" role="tab" aria-controls="<%= member.name %>" aria-selected="true"> | ||
<span class="dot-<%= member.status %>"></span> | ||
<%= member.name %> | ||
</button> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<div class="tab-content" id="myTabContent"> | ||
<% @members.each do |member| %> | ||
<div class="tab-pane fade show" id="<%= member.name.parameterize %>" role="tabpanel" aria-labelledby="<%= member.name.parameterize %>-tab"> | ||
<%= member.name %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# This file is used by Rack-based servers to start the application. | ||
|
||
require_relative "config/environment" | ||
require_relative 'config/environment' | ||
|
||
run Rails.application | ||
Rails.application.load_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" # Set up gems listed in the Gemfile. | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
|
||
require 'bundler/setup' # Set up gems listed in the Gemfile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
# Load the Rails application. | ||
require_relative "application" | ||
require_relative 'application' | ||
|
||
# Initialize the Rails application. | ||
Rails.application.initialize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.