From 13bc2c19a00440047bce74ec45abcba35d31c977 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 5 Jun 2023 18:33:33 +0400 Subject: [PATCH] no more YARD docs warning --- .solargraph.yml | 22 ++++++++++++++++++++++ README.md | 4 ++-- app/controllers/application_controller.rb | 2 -- app/helpers/application_helper.rb | 1 + app/helpers/articles_helper.rb | 2 -- app/helpers/main_helper.rb | 1 + app/mailers/application_mailer.rb | 5 +++-- app/views/main/about.html.erb | 3 ++- app/views/main/home.html.erb | 6 +++--- config/application.rb | 9 +++++---- config/boot.rb | 6 +++--- db/schema.rb | 23 +++++++++++------------ 12 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 .solargraph.yml delete mode 100644 app/helpers/articles_helper.rb diff --git a/.solargraph.yml b/.solargraph.yml new file mode 100644 index 0000000..1cf9a28 --- /dev/null +++ b/.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 diff --git a/README.md b/README.md index f1be400..c447066 100644 --- a/README.md +++ b/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 ?? diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f588283..8369716 100644 --- a/app/controllers/application_controller.rb +++ b/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 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..75c32d8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,3 @@ +# helpers available for any view module ApplicationHelper end diff --git a/app/helpers/articles_helper.rb b/app/helpers/articles_helper.rb deleted file mode 100644 index 2968277..0000000 --- a/app/helpers/articles_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ArticlesHelper -end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb index 826effe..8d9f3f8 100644 --- a/app/helpers/main_helper.rb +++ b/app/helpers/main_helper.rb @@ -1,2 +1,3 @@ +# helpers available for main related views module MainHelper end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 3c34c81..e6a80db 100644 --- a/app/mailers/application_mailer.rb +++ b/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 diff --git a/app/views/main/about.html.erb b/app/views/main/about.html.erb index e3706c4..b33502d 100644 --- a/app/views/main/about.html.erb +++ b/app/views/main/about.html.erb @@ -3,6 +3,7 @@

Main#index

aaaaaaaaaaaaaa

aaaaaasaaa

-

Find me in app/views/main/index.html.erb

+

Find me in app/views/main/index.html.erb

ABOUT 3 + coucou Steven diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index d084e47..1939b0d 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -1,6 +1,6 @@ -
-

HOME

-
+
+

HOME

+
value is <%=@value%>
diff --git a/config/application.rb b/config/application.rb index cd1c4f7..ba26729 100644 --- a/config/application.rb +++ b/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 diff --git a/config/boot.rb b/config/boot.rb index 988a5dd..b9e460c 100644 --- a/config/boot.rb +++ b/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. diff --git a/db/schema.rb b/db/schema.rb index 31111ea..c0d5f1e 100644 --- a/db/schema.rb +++ b/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