Browse Source

no more YARD docs warning

main
pvincent 11 months ago
parent
commit
13bc2c19a0
  1. 22
      .solargraph.yml
  2. 4
      README.md
  3. 2
      app/controllers/application_controller.rb
  4. 1
      app/helpers/application_helper.rb
  5. 2
      app/helpers/articles_helper.rb
  6. 1
      app/helpers/main_helper.rb
  7. 5
      app/mailers/application_mailer.rb
  8. 3
      app/views/main/about.html.erb
  9. 6
      app/views/main/home.html.erb
  10. 9
      config/application.rb
  11. 6
      config/boot.rb
  12. 23
      db/schema.rb

22
.solargraph.yml

@ -0,0 +1,22 @@
---
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
- ".bundle/**/*"
require: []
domains: []
reporters:
- rubocop
# - require_not_found
formatter:
rubocop:
cops: safe
except: []
only: []
extra_args: []
require_paths: []
plugins: []
max_files: 5000

4
README.md

@ -6,14 +6,14 @@
* [x] LXD aware (through remote ssh)
* [x] Rufo Formatter
* [x] Semantic Logging (efficient for dark theme)
* [x] Max duration to complete in order to prevent long action
* [x] tailwindcss-rails
* [x] Max duration to complete in order to prevent long action
* [x] Devise
* [ ] PRODUCTION ready, not yet!!!
## Interesting Gems to try out
* [ ] Devise Vs Authentication-Zero
* [ ] Devise
* [ ] **Noticed**
* [ ] CANCANCAN
* [ ] ViewComponent ??

2
app/controllers/application_controller.rb

@ -1,5 +1,3 @@
# frozen_string_literal: true
# Base Application
class ApplicationController < ActionController::Base
MAX_DURATION_TO_COMPLETE_IN_SECONDS = 3

1
app/helpers/application_helper.rb

@ -1,2 +1,3 @@
# helpers available for any view
module ApplicationHelper
end

2
app/helpers/articles_helper.rb

@ -1,2 +0,0 @@
module ArticlesHelper
end

1
app/helpers/main_helper.rb

@ -1,2 +1,3 @@
# helpers available for main related views
module MainHelper
end

5
app/mailers/application_mailer.rb

@ -1,4 +1,5 @@
# default mailer
class ApplicationMailer < ActionMailer::Base
default from: "from@example.com"
layout "mailer"
default from: 'from@example.com'
layout 'mailer'
end

3
app/views/main/about.html.erb

@ -3,6 +3,7 @@
<h1 class="text-2xl text-red-800 ">Main#index</h1>
<h2 class="text-3xl">aaaaaaaaaaaaaa</h2>
<h1 class="text-3xl font-bold text-gray-700">aaaaaasaaa</h1>
<p class=" text-4xl center bg-red-700 text-blue-800">Find me in app/views/main/index.html.erb</p>
<p class=" text-4xl center bg-yellow-700 text-cyan-800">Find me in app/views/main/index.html.erb</p>
ABOUT 3
coucou Steven
</div>

6
app/views/main/home.html.erb

@ -1,6 +1,6 @@
<div>
<h1 class="text-4xl font-bold">HOME</h1>
<div class="text-xl bg-gray-100 ">
<div class="p-5">
<h1 class="text-8xl font-bold">HOME</h1>
<div class="text-xl bg-blue-500 ">
value is <%=@value%>
</div>
<div class="font-bold italic text-2xl bg-pink-500 text-red-50">

9
config/application.rb

@ -1,18 +1,19 @@
require_relative "boot"
require_relative 'boot'
require "rails/all"
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Blog
module Basic
# Basic Rails application
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0
# Efficient logging with Semantic Logger
require Rails.root.join("lib", "formatters", "basic_formatter")
require Rails.root.join('lib', 'formatters', 'basic_formatter')
config.rails_semantic_logger.add_file_appender = false
config.rails_semantic_logger.semantic = false
config.rails_semantic_logger.started = true

6
config/boot.rb

@ -1,4 +1,4 @@
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 "bootsnap/setup" # Speed up boot time by caching expensive operations.
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.

23
db/schema.rb

@ -10,17 +10,16 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_06_03_061214) do
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
ActiveRecord::Schema[7.0].define(version: 20_230_603_061_214) do
create_table 'users', force: :cascade do |t|
t.string 'email', default: '', null: false
t.string 'encrypted_password', default: '', null: false
t.string 'reset_password_token'
t.datetime 'reset_password_sent_at'
t.datetime 'remember_created_at'
t.datetime 'created_at', null: false
t.datetime 'updated_at', null: false
t.index ['email'], name: 'index_users_on_email', unique: true
t.index ['reset_password_token'], name: 'index_users_on_reset_password_token', unique: true
end
end
Loading…
Cancel
Save