diff --git a/app/helpers/heroicon_helper.rb b/app/helpers/heroicon_helper.rb index c4f9665..d224271 100644 --- a/app/helpers/heroicon_helper.rb +++ b/app/helpers/heroicon_helper.rb @@ -2,4 +2,4 @@ module HeroiconHelper include Heroicon::Engine.helpers -end \ No newline at end of file +end diff --git a/config/environments/development.rb b/config/environments/development.rb index 4e0f6c5..ea63a94 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,7 +1,7 @@ require "active_support/core_ext/integer/time" Rails.application.configure do - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } + config.action_mailer.default_url_options = {host: "localhost", port: 3000} # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time @@ -57,7 +57,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/config/environments/test.rb b/config/environments/test.rb index 6ea4d1e..9de8427 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -23,7 +23,7 @@ } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index 5f84a9e..7627cc7 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # # Uncomment this and change the path if necessary to include your own # components. @@ -54,8 +55,8 @@ ## Inputs # b.use :input, class: 'input', error_class: 'is-invalid', valid_class: 'is-valid' b.use :label_input - b.use :hint, wrap_with: { tag: :span, class: :hint } - b.use :error, wrap_with: { tag: :span, class: :error } + b.use :hint, wrap_with: {tag: :span, class: :hint} + b.use :error, wrap_with: {tag: :span, class: :error} ## full_messages_for # If you want to display the full error message for the attribute, you can @@ -74,7 +75,7 @@ config.boolean_style = :nested # Default class for buttons - config.button_class = 'btn' + config.button_class = "btn" # Method used to tidy up errors. Specify any Rails Array method. # :first lists the first message for each field. @@ -85,7 +86,7 @@ config.error_notification_tag = :div # CSS class to add for error notification helper. - config.error_notification_class = 'error_notification' + config.error_notification_class = "error_notification" # Series of attempts to detect a default label method for collection. # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] @@ -161,7 +162,7 @@ # config.input_class = nil # Define the default class of the input wrapper of the boolean input. - config.boolean_label_class = 'checkbox' + config.boolean_label_class = "checkbox" # Defines if the default input wrapper class should be included in radio # collection wrappers. diff --git a/config/puma.rb b/config/puma.rb index daaf036..ce4878f 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -4,7 +4,7 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5) min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count @@ -15,7 +15,7 @@ # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT", 3000) # Specifies the `environment` that Puma will run in. # diff --git a/db/migrate/20220808151443_devise_create_users.rb b/db/migrate/20220808151443_devise_create_users.rb index 43927db..4afc134 100644 --- a/db/migrate/20220808151443_devise_create_users.rb +++ b/db/migrate/20220808151443_devise_create_users.rb @@ -4,11 +4,11 @@ class DeviseCreateUsers < ActiveRecord::Migration[7.0] def change create_table :users do |t| ## Database authenticatable - t.string :email, null: false, default: "" + t.string :email, null: false, default: "" t.string :encrypted_password, null: false, default: "" ## Recoverable - t.string :reset_password_token + t.string :reset_password_token t.datetime :reset_password_sent_at ## Rememberable @@ -32,11 +32,10 @@ def change # t.string :unlock_token # Only if unlock strategy is :email or :both # t.datetime :locked_at - t.timestamps null: false end - add_index :users, :email, unique: true + add_index :users, :email, unique: true add_index :users, :reset_password_token, unique: true # add_index :users, :confirmation_token, unique: true # add_index :users, :unlock_token, unique: true diff --git a/spec/factories/users.rb b/spec/factories/users.rb deleted file mode 100644 index 628434c..0000000 --- a/spec/factories/users.rb +++ /dev/null @@ -1,5 +0,0 @@ -FactoryBot.define do - factory :user do - - end -end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb deleted file mode 100644 index 47a31bb..0000000 --- a/spec/models/user_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe User, type: :model do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 357f5b2..bb7b469 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,17 +1,16 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' -require 'spec_helper' -ENV['RAILS_ENV'] ||= 'test' -require_relative '../config/environment' +require "spec_helper" +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? -require 'rspec/rails' +require "rspec/rails" # Add additional requires below this line. Rails is not loaded until this point! -require 'capybara/rspec' -require 'capybara/rails' -require 'capybara-screenshot/rspec' - -Capybara.asset_host = 'http://localhost:3000' +require "capybara/rspec" +require "capybara/rails" +require "capybara-screenshot/rspec" +Capybara.asset_host = "http://localhost:3000" # Requires supporting ruby files with custom matchers and macros, etc, in # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a0d4080..d0cef33 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -44,51 +44,49 @@ # triggering implicit auto-inclusion in groups with matching metadata. config.shared_context_metadata_behavior = :apply_to_host_groups -# The settings below are suggested to provide a good initial experience -# with RSpec, but feel free to customize to your heart's content. -=begin - # This allows you to limit a spec run to individual examples or groups - # you care about by tagging them with `:focus` metadata. When nothing - # is tagged with `:focus`, all examples get run. RSpec also provides - # aliases for `it`, `describe`, and `context` that include `:focus` - # metadata: `fit`, `fdescribe` and `fcontext`, respectively. - config.filter_run_when_matching :focus - - # Allows RSpec to persist some state between runs in order to support - # the `--only-failures` and `--next-failure` CLI options. We recommend - # you configure your source control system to ignore this file. - config.example_status_persistence_file_path = "spec/examples.txt" - - # Limits the available syntax to the non-monkey patched syntax that is - # recommended. For more details, see: - # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode - config.disable_monkey_patching! - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - if config.files_to_run.one? - # Use the documentation formatter for detailed output, - # unless a formatter has already been configured - # (e.g. via a command-line flag). - config.default_formatter = "doc" - end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed -=end + # The settings below are suggested to provide a good initial experience + # with RSpec, but feel free to customize to your heart's content. + # # This allows you to limit a spec run to individual examples or groups + # # you care about by tagging them with `:focus` metadata. When nothing + # # is tagged with `:focus`, all examples get run. RSpec also provides + # # aliases for `it`, `describe`, and `context` that include `:focus` + # # metadata: `fit`, `fdescribe` and `fcontext`, respectively. + # config.filter_run_when_matching :focus + # + # # Allows RSpec to persist some state between runs in order to support + # # the `--only-failures` and `--next-failure` CLI options. We recommend + # # you configure your source control system to ignore this file. + # config.example_status_persistence_file_path = "spec/examples.txt" + # + # # Limits the available syntax to the non-monkey patched syntax that is + # # recommended. For more details, see: + # # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode + # config.disable_monkey_patching! + # + # # Many RSpec users commonly either run the entire suite or an individual + # # file, and it's useful to allow more verbose output when running an + # # individual spec file. + # if config.files_to_run.one? + # # Use the documentation formatter for detailed output, + # # unless a formatter has already been configured + # # (e.g. via a command-line flag). + # config.default_formatter = "doc" + # end + # + # # Print the 10 slowest examples and example groups at the + # # end of the spec run, to help surface which specs are running + # # particularly slow. + # config.profile_examples = 10 + # + # # Run specs in random order to surface order dependencies. If you find an + # # order dependency and want to debug it, you can fix the order by providing + # # the seed, which is printed after each run. + # # --seed 1234 + # config.order = :random + # + # # Seed global randomization in this process using the `--seed` CLI option. + # # Setting this allows you to use `--seed` to deterministically reproduce + # # test failures related to randomization by passing the same `--seed` value + # # as the one that triggered the failure. + # Kernel.srand config.seed end