2 |
3 | <% if @resource.try(:unconfirmed_email?) %>
4 |
We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
5 | <% else %>
6 |
We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/config/importmap.rb:
--------------------------------------------------------------------------------
1 | # Pin npm packages by running ./bin/importmap
2 |
3 | pin "application", preload: true
4 | pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
5 | pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
6 | pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
7 | pin_all_from "app/javascript/controllers", under: "controllers"
8 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }])
7 | # Character.create(name: "Luke", movie: movies.first)
8 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the "{}" from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5 | # notations and behaviors.
6 | Rails.application.config.filter_parameters += [
7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8 | ]
9 |
--------------------------------------------------------------------------------
/config/initializers/permissions_policy.rb:
--------------------------------------------------------------------------------
1 | # Define an application-wide HTTP permissions policy. For further
2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy
3 | #
4 | # Rails.application.config.permissions_policy do |f|
5 | # f.camera :none
6 | # f.gyroscope :none
7 | # f.microphone :none
8 | # f.usb :none
9 | # f.fullscreen :self
10 | # f.payment :self, "https://secure.example.com"
11 | # end
12 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/reset_password_instructions.html.erb:
--------------------------------------------------------------------------------
1 |
Hello <%= @resource.email %>!
2 |
3 |
Someone has requested a link to change your password. You can do this through the link below.
4 |
5 |
<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
6 |
7 |
If you didn't request this, please ignore this email.
8 |
Your password won't change until you access the link above and create a new one.
9 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require_relative '../config/environment'
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Run tests in parallel with specified workers
7 | parallelize(workers: :number_of_processors, with: :threads)
8 |
9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10 | fixtures :all
11 |
12 | # Add more helper methods to be used by all tests here...
13 | end
14 |
--------------------------------------------------------------------------------
/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | JE0XgpBdlG5bn41kgwxQvco6Jlv10N//4wfR/8n92IeYwGdO0JuhS06k+J2X4xdtpiDqSsNZnTKK6V+HXzrfWOk+93OW4hCU5WskzDWKOY8wnZhutW8NKJNbFLrhmSxgUvWWraa50HOmQyZjGTXe6WCoEWPRUJifGVsfdjsoHeR/tlAGsk27d3b/qQypRFIo9yhVQenz78yumDwfzlYG0opm6hySNvLu+aEJ0R3638cSe1DVdMN1tTnaXTLEgp89pG40/dn5mtHXm+j20scIVvczlX4bTSEydgRGYhqtgRJ2bsyT+l0EBsAriL3lWarhQv+nV3DScYVKpXg9YSdbYAzLmOAFxHBCSD+21tYBaW4eCDi3aerW77F1stGjZpeMkorc5L8Z/LFNZk2V0ENbnIKzU7eyGQeHGCsK--G3eokWPZtq9zasvH--e26EhBY0ShSNiP7iSkOSQg==
--------------------------------------------------------------------------------
/app/views/devise/shared/_error_messages.html.erb:
--------------------------------------------------------------------------------
1 | <% if resource.errors.any? %>
2 |
10 | <% resource.errors.full_messages.each do |message| %>
11 |
<%= message %>
12 | <% end %>
13 |
14 |
15 | <% end %>
16 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = "1.0"
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/app/views/devise/unlocks/new.html.erb:
--------------------------------------------------------------------------------
1 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/javascript/controllers/index.js:
--------------------------------------------------------------------------------
1 | // Import and register all your controllers from the importmap under controllers/*
2 |
3 | import { application } from "controllers/application"
4 |
5 | // Eager load all controllers defined in the import map under controllers/**/*_controller
6 | import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7 | eagerLoadControllersFrom("controllers", application)
8 |
9 | // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10 | // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11 | // lazyLoadControllersFrom("controllers", application)
12 |
--------------------------------------------------------------------------------
/app/views/devise/confirmations/new.html.erb:
--------------------------------------------------------------------------------
1 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, "\\1en"
8 | # inflect.singular /^(ox)en/i, "\\1"
9 | # inflect.irregular "person", "people"
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym "RESTful"
16 | # end
17 |
--------------------------------------------------------------------------------
/app/views/devise/sessions/new.html.erb:
--------------------------------------------------------------------------------
1 |
30 | <%= f.label :current_password %> (we need your current password to confirm your changes)
31 | <%= f.password_field :current_password, autocomplete: "current-password" %>
32 |
33 |
34 |
35 | <%= f.submit "Update" %>
36 |
37 | <% end %>
38 |
39 |
Cancel my account
40 |
41 |
Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %>
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers: a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum; this matches the default thread size of Active Record.
6 | #
7 | max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8 | min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9 | threads min_threads_count, max_threads_count
10 |
11 | # Specifies the `worker_timeout` threshold that Puma will use to wait before
12 | # terminating a worker in development environments.
13 | #
14 | worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
15 |
16 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
17 | #
18 | port ENV.fetch("PORT") { 3000 }
19 |
20 | # Specifies the `environment` that Puma will run in.
21 | #
22 | environment ENV.fetch("RAILS_ENV") { "development" }
23 |
24 | # Specifies the `pidfile` that Puma will use.
25 | pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
26 |
27 | # Specifies the number of `workers` to boot in clustered mode.
28 | # Workers are forked web server processes. If using threads and workers together
29 | # the concurrency of the application would be max `threads` * `workers`.
30 | # Workers do not work on JRuby or Windows (both of which do not support
31 | # processes).
32 | #
33 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
34 |
35 | # Use the `preload_app!` method when specifying a `workers` number.
36 | # This directive tells Puma to first boot the application and load code
37 | # before forking the application. This takes advantage of Copy On Write
38 | # process behavior so workers use less memory.
39 | #
40 | # preload_app!
41 |
42 | # Allow puma to be restarted by `bin/rails restart` command.
43 | plugin :tmp_restart
44 |
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3 |
4 | ruby '3.2.2'
5 |
6 | gem 'rubocop', '>= 1.0', '< 2.0'
7 |
8 | gem 'devise'
9 |
10 | # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
11 | gem 'rails', '~> 7.0.7', '>= 7.0.7.2'
12 |
13 | # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
14 | gem 'sprockets-rails'
15 |
16 | # Use postgresql as the database for Active Record
17 | gem 'pg', '~> 1.1'
18 |
19 | # Use the Puma web server [https://github.com/puma/puma]
20 | gem 'puma', '~> 5.0'
21 |
22 | # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
23 | gem 'importmap-rails'
24 |
25 | # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
26 | gem 'turbo-rails'
27 |
28 | # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
29 | gem 'stimulus-rails'
30 |
31 | # Build JSON APIs with ease [https://github.com/rails/jbuilder]
32 | gem 'jbuilder'
33 |
34 | # Use Redis adapter to run Action Cable in production
35 | # gem "redis", "~> 4.0"
36 |
37 | # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
38 | # gem "kredis"
39 |
40 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
41 | # gem "bcrypt", "~> 3.1.7"
42 |
43 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
44 | gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
45 |
46 | # Reduces boot times through caching; required in config/boot.rb
47 | gem 'bootsnap', require: false
48 |
49 | # Use Sass to process CSS
50 | # gem "sassc-rails"
51 |
52 | # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
53 | # gem "image_processing", "~> 1.2"
54 |
55 | group :development, :test do
56 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
57 | gem 'debug', platforms: %i[mri mingw x64_mingw]
58 | end
59 |
60 | group :development do
61 | # Use console on exceptions pages [https://github.com/rails/web-console]
62 | gem 'web-console'
63 |
64 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
65 | # gem "rack-mini-profiler"
66 |
67 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
68 | # gem "spring"
69 | end
70 |
71 | group :test do
72 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
73 | gem 'capybara'
74 | gem 'selenium-webdriver'
75 | gem 'webdrivers'
76 | end
77 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | # The test environment is used exclusively to run your application's
4 | # test suite. You never need to work with it otherwise. Remember that
5 | # your test database is "scratch space" for the test suite and is wiped
6 | # and recreated between test runs. Don't rely on the data there!
7 |
8 | Rails.application.configure do
9 | # Settings specified here will take precedence over those in config/application.rb.
10 |
11 | # Turn false under Spring and add config.action_view.cache_template_loading = true.
12 | config.cache_classes = true
13 |
14 | # Eager loading loads your whole application. When running a single test locally,
15 | # this probably isn't necessary. It's a good idea to do in a continuous integration
16 | # system, or in some way before deploying your code.
17 | config.eager_load = ENV["CI"].present?
18 |
19 | # Configure public file server for tests with Cache-Control for performance.
20 | config.public_file_server.enabled = true
21 | config.public_file_server.headers = {
22 | "Cache-Control" => "public, max-age=#{1.hour.to_i}"
23 | }
24 |
25 | # Show full error reports and disable caching.
26 | config.consider_all_requests_local = true
27 | config.action_controller.perform_caching = false
28 | config.cache_store = :null_store
29 |
30 | # Raise exceptions instead of rendering exception templates.
31 | config.action_dispatch.show_exceptions = false
32 |
33 | # Disable request forgery protection in test environment.
34 | config.action_controller.allow_forgery_protection = false
35 |
36 | # Store uploaded files on the local file system in a temporary directory.
37 | config.active_storage.service = :test
38 |
39 | config.action_mailer.perform_caching = false
40 |
41 | # Tell Action Mailer not to deliver emails to the real world.
42 | # The :test delivery method accumulates sent emails in the
43 | # ActionMailer::Base.deliveries array.
44 | config.action_mailer.delivery_method = :test
45 |
46 | # Print deprecation notices to the stderr.
47 | config.active_support.deprecation = :stderr
48 |
49 | # Raise exceptions for disallowed deprecations.
50 | config.active_support.disallowed_deprecation = :raise
51 |
52 | # Tell Active Support which deprecation messages to disallow.
53 | config.active_support.disallowed_deprecation_warnings = []
54 |
55 | # Raises error for missing translations.
56 | # config.i18n.raise_on_missing_translations = true
57 |
58 | # Annotate rendered view with file names.
59 | # config.action_view.annotate_rendered_view_with_filenames = true
60 | end
61 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | Rails.application.configure do
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | # In the development environment your application's code is reloaded any time
7 | # it changes. This slows down response time but is perfect for development
8 | # since you don't have to restart the web server when you make code changes.
9 | config.cache_classes = false
10 |
11 | # Do not eager load code on boot.
12 | config.eager_load = false
13 |
14 | # Show full error reports.
15 | config.consider_all_requests_local = true
16 |
17 | # Enable server timing
18 | config.server_timing = true
19 |
20 | config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
21 |
22 | # Enable/disable caching. By default caching is disabled.
23 | # Run rails dev:cache to toggle caching.
24 | if Rails.root.join("tmp/caching-dev.txt").exist?
25 | config.action_controller.perform_caching = true
26 | config.action_controller.enable_fragment_cache_logging = true
27 |
28 | config.cache_store = :memory_store
29 | config.public_file_server.headers = {
30 | "Cache-Control" => "public, max-age=#{2.days.to_i}"
31 | }
32 | else
33 | config.action_controller.perform_caching = false
34 |
35 | config.cache_store = :null_store
36 | end
37 |
38 | # Store uploaded files on the local file system (see config/storage.yml for options).
39 | config.active_storage.service = :local
40 |
41 | # Don't care if the mailer can't send.
42 | config.action_mailer.raise_delivery_errors = false
43 |
44 | config.action_mailer.perform_caching = false
45 |
46 | # Print deprecation notices to the Rails logger.
47 | config.active_support.deprecation = :log
48 |
49 | # Raise exceptions for disallowed deprecations.
50 | config.active_support.disallowed_deprecation = :raise
51 |
52 | # Tell Active Support which deprecation messages to disallow.
53 | config.active_support.disallowed_deprecation_warnings = []
54 |
55 | # Raise an error on page load if there are pending migrations.
56 | config.active_record.migration_error = :page_load
57 |
58 | # Highlight code that triggered database queries in logs.
59 | config.active_record.verbose_query_logs = true
60 |
61 | # Suppress logger output for asset requests.
62 | config.assets.quiet = true
63 |
64 | # Raises error for missing translations.
65 | # config.i18n.raise_on_missing_translations = true
66 |
67 | # Annotate rendered view with file names.
68 | # config.action_view.annotate_rendered_view_with_filenames = true
69 |
70 | # Uncomment if you wish to allow Action Cable access from any origin.
71 | # config.action_cable.disable_request_forgery_protection = true
72 | end
73 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'bundle' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "rubygems"
12 |
13 | m = Module.new do
14 | module_function
15 |
16 | def invoked_as_script?
17 | File.expand_path($0) == File.expand_path(__FILE__)
18 | end
19 |
20 | def env_var_version
21 | ENV["BUNDLER_VERSION"]
22 | end
23 |
24 | def cli_arg_version
25 | return unless invoked_as_script? # don't want to hijack other binstubs
26 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27 | bundler_version = nil
28 | update_index = nil
29 | ARGV.each_with_index do |a, i|
30 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31 | bundler_version = a
32 | end
33 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34 | bundler_version = $1
35 | update_index = i
36 | end
37 | bundler_version
38 | end
39 |
40 | def gemfile
41 | gemfile = ENV["BUNDLE_GEMFILE"]
42 | return gemfile if gemfile && !gemfile.empty?
43 |
44 | File.expand_path("../Gemfile", __dir__)
45 | end
46 |
47 | def lockfile
48 | lockfile =
49 | case File.basename(gemfile)
50 | when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51 | else "#{gemfile}.lock"
52 | end
53 | File.expand_path(lockfile)
54 | end
55 |
56 | def lockfile_version
57 | return unless File.file?(lockfile)
58 | lockfile_contents = File.read(lockfile)
59 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60 | Regexp.last_match(1)
61 | end
62 |
63 | def bundler_requirement
64 | @bundler_requirement ||=
65 | env_var_version ||
66 | cli_arg_version ||
67 | bundler_requirement_for(lockfile_version)
68 | end
69 |
70 | def bundler_requirement_for(version)
71 | return "#{Gem::Requirement.default}.a" unless version
72 |
73 | bundler_gem_version = Gem::Version.new(version)
74 |
75 | bundler_gem_version.approximate_recommendation
76 | end
77 |
78 | def load_bundler!
79 | ENV["BUNDLE_GEMFILE"] ||= gemfile
80 |
81 | activate_bundler
82 | end
83 |
84 | def activate_bundler
85 | gem_error = activation_error_handling do
86 | gem "bundler", bundler_requirement
87 | end
88 | return if gem_error.nil?
89 | require_error = activation_error_handling do
90 | require "bundler/version"
91 | end
92 | return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93 | warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94 | exit 42
95 | end
96 |
97 | def activation_error_handling
98 | yield
99 | nil
100 | rescue StandardError, LoadError => e
101 | e
102 | end
103 | end
104 |
105 | m.load_bundler!
106 |
107 | if m.invoked_as_script?
108 | load Gem.bin_path("bundler", "bundle")
109 | end
110 |
--------------------------------------------------------------------------------
/bin/bundle.cmd:
--------------------------------------------------------------------------------
1 | @ruby -x "%~f0" %*
2 | @exit /b %ERRORLEVEL%
3 |
4 | #!/usr/bin/env ruby
5 | # frozen_string_literal: true
6 |
7 | #
8 | # This file was generated by Bundler.
9 | #
10 | # The application 'bundle' is installed as part of a gem, and
11 | # this file is here to facilitate running it.
12 | #
13 |
14 | require "rubygems"
15 |
16 | m = Module.new do
17 | module_function
18 |
19 | def invoked_as_script?
20 | File.expand_path($0) == File.expand_path(__FILE__)
21 | end
22 |
23 | def env_var_version
24 | ENV["BUNDLER_VERSION"]
25 | end
26 |
27 | def cli_arg_version
28 | return unless invoked_as_script? # don't want to hijack other binstubs
29 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
30 | bundler_version = nil
31 | update_index = nil
32 | ARGV.each_with_index do |a, i|
33 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
34 | bundler_version = a
35 | end
36 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
37 | bundler_version = $1
38 | update_index = i
39 | end
40 | bundler_version
41 | end
42 |
43 | def gemfile
44 | gemfile = ENV["BUNDLE_GEMFILE"]
45 | return gemfile if gemfile && !gemfile.empty?
46 |
47 | File.expand_path("../Gemfile", __dir__)
48 | end
49 |
50 | def lockfile
51 | lockfile =
52 | case File.basename(gemfile)
53 | when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
54 | else "#{gemfile}.lock"
55 | end
56 | File.expand_path(lockfile)
57 | end
58 |
59 | def lockfile_version
60 | return unless File.file?(lockfile)
61 | lockfile_contents = File.read(lockfile)
62 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
63 | Regexp.last_match(1)
64 | end
65 |
66 | def bundler_requirement
67 | @bundler_requirement ||=
68 | env_var_version ||
69 | cli_arg_version ||
70 | bundler_requirement_for(lockfile_version)
71 | end
72 |
73 | def bundler_requirement_for(version)
74 | return "#{Gem::Requirement.default}.a" unless version
75 |
76 | bundler_gem_version = Gem::Version.new(version)
77 |
78 | bundler_gem_version.approximate_recommendation
79 | end
80 |
81 | def load_bundler!
82 | ENV["BUNDLE_GEMFILE"] ||= gemfile
83 |
84 | activate_bundler
85 | end
86 |
87 | def activate_bundler
88 | gem_error = activation_error_handling do
89 | gem "bundler", bundler_requirement
90 | end
91 | return if gem_error.nil?
92 | require_error = activation_error_handling do
93 | require "bundler/version"
94 | end
95 | return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
96 | warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
97 | exit 42
98 | end
99 |
100 | def activation_error_handling
101 | yield
102 | nil
103 | rescue StandardError, LoadError => e
104 | e
105 | end
106 | end
107 |
108 | m.load_bundler!
109 |
110 | if m.invoked_as_script?
111 | load Gem.bin_path("bundler", "bundle")
112 | end
113 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 9.3 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On macOS with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On macOS with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem "pg"
16 | #
17 | default: &default
18 | adapter: postgresql
19 | encoding: unicode
20 | # For details on connection pooling, see Rails configuration guide
21 | # https://guides.rubyonrails.org/configuring.html#database-pooling
22 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
23 |
24 | development:
25 | <<: *default
26 | database: Recipe_App_development
27 | username: postgres
28 | password: 313
29 | host: localhost
30 | port: 5432
31 |
32 | # The specified database role being used to connect to postgres.
33 | # To create additional roles in postgres see `$ createuser --help`.
34 | # When left blank, postgres will use the default role. This is
35 | # the same name as the operating system user running Rails.
36 | #username: Recipe_App
37 |
38 | # The password associated with the postgres role (username).
39 | #password:
40 |
41 | # Connect on a TCP socket. Omitted by default since the client uses a
42 | # domain socket that doesn't need configuration. Windows does not have
43 | # domain sockets, so uncomment these lines.
44 | #host: localhost
45 |
46 | # The TCP port the server listens on. Defaults to 5432.
47 | # If your server runs on a different port number, change accordingly.
48 | #port: 5432
49 |
50 | # Schema search path. The server defaults to $user,public
51 | #schema_search_path: myapp,sharedapp,public
52 |
53 | # Minimum log levels, in increasing order:
54 | # debug5, debug4, debug3, debug2, debug1,
55 | # log, notice, warning, error, fatal, and panic
56 | # Defaults to warning.
57 | #min_messages: notice
58 |
59 | # Warning: The database defined as "test" will be erased and
60 | # re-generated from your development database when you run "rake".
61 | # Do not set this db to the same as development or production.
62 | test:
63 | <<: *default
64 | database: Recipe_App_test
65 | username: postgres
66 | password: 313
67 | host: localhost
68 | port: 5432
69 |
70 | # As with config/credentials.yml, you never want to store sensitive information,
71 | # like your database password, in your source code. If your source code is
72 | # ever seen by anyone, they now have access to your database.
73 | #
74 | # Instead, provide the password or a full connection URL as an environment
75 | # variable when you boot the app. For example:
76 | #
77 | # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
78 | #
79 | # If the connection URL is provided in the special DATABASE_URL environment
80 | # variable, Rails will automatically merge its configuration values on top of
81 | # the values provided in this file. Alternatively, you can specify a connection
82 | # URL environment variable explicitly:
83 | #
84 | # production:
85 | # url: <%= ENV["MY_APP_DATABASE_URL"] %>
86 | #
87 | # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
88 | # for a full overview on how database connection configuration can be specified.
89 | #
90 | production:
91 | <<: *default
92 | database: Recipe_App_production
93 | username: Recipe_App
94 | password: <%= ENV["RECIPE_APP_DATABASE_PASSWORD"] %>
95 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | Rails.application.configure do
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | # Code is not reloaded between requests.
7 | config.cache_classes = true
8 |
9 | # Eager load code on boot. This eager loads most of Rails and
10 | # your application in memory, allowing both threaded web servers
11 | # and those relying on copy on write to perform better.
12 | # Rake tasks automatically ignore this option for performance.
13 | config.eager_load = true
14 |
15 | # Full error reports are disabled and caching is turned on.
16 | config.consider_all_requests_local = false
17 | config.action_controller.perform_caching = true
18 |
19 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21 | # config.require_master_key = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26 |
27 | # Compress CSS using a preprocessor.
28 | # config.assets.css_compressor = :sass
29 |
30 | # Do not fallback to assets pipeline if a precompiled asset is missed.
31 | config.assets.compile = false
32 |
33 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34 | # config.asset_host = "http://assets.example.com"
35 |
36 | # Specifies the header that your server uses for sending files.
37 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
38 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
39 |
40 | # Store uploaded files on the local file system (see config/storage.yml for options).
41 | config.active_storage.service = :local
42 |
43 | # Mount Action Cable outside main process or domain.
44 | # config.action_cable.mount_path = nil
45 | # config.action_cable.url = "wss://example.com/cable"
46 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
47 |
48 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
49 | # config.force_ssl = true
50 |
51 | # Include generic and useful information about system operation, but avoid logging too much
52 | # information to avoid inadvertent exposure of personally identifiable information (PII).
53 | config.log_level = :info
54 |
55 | # Prepend all log lines with the following tags.
56 | config.log_tags = [ :request_id ]
57 |
58 | # Use a different cache store in production.
59 | # config.cache_store = :mem_cache_store
60 |
61 | # Use a real queuing backend for Active Job (and separate queues per environment).
62 | # config.active_job.queue_adapter = :resque
63 | # config.active_job.queue_name_prefix = "Recipe_App_production"
64 |
65 | config.action_mailer.perform_caching = false
66 |
67 | # Ignore bad email addresses and do not raise email delivery errors.
68 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
69 | # config.action_mailer.raise_delivery_errors = false
70 |
71 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72 | # the I18n.default_locale when a translation cannot be found).
73 | config.i18n.fallbacks = true
74 |
75 | # Don't log any deprecations.
76 | config.active_support.report_deprecations = false
77 |
78 | # Use default logging formatter so that PID and timestamp are not suppressed.
79 | config.log_formatter = ::Logger::Formatter.new
80 |
81 | # Use a different logger for distributed setups.
82 | # require "syslog/logger"
83 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
84 |
85 | if ENV["RAILS_LOG_TO_STDOUT"].present?
86 | logger = ActiveSupport::Logger.new(STDOUT)
87 | logger.formatter = config.log_formatter
88 | config.logger = ActiveSupport::TaggedLogging.new(logger)
89 | end
90 |
91 | # Do not dump schema after migrations.
92 | config.active_record.dump_schema_after_migration = false
93 | end
94 |
--------------------------------------------------------------------------------
/config/locales/devise.en.yml:
--------------------------------------------------------------------------------
1 | # Additional translations at https://github.com/heartcombo/devise/wiki/I18n
2 |
3 | en:
4 | devise:
5 | confirmations:
6 | confirmed: "Your email address has been successfully confirmed."
7 | send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8 | send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9 | failure:
10 | already_authenticated: "You are already signed in."
11 | inactive: "Your account is not activated yet."
12 | invalid: "Invalid %{authentication_keys} or password."
13 | locked: "Your account is locked."
14 | last_attempt: "You have one more attempt before your account is locked."
15 | not_found_in_database: "Invalid %{authentication_keys} or password."
16 | timeout: "Your session expired. Please sign in again to continue."
17 | unauthenticated: "You need to sign in or sign up before continuing."
18 | unconfirmed: "You have to confirm your email address before continuing."
19 | mailer:
20 | confirmation_instructions:
21 | subject: "Confirmation instructions"
22 | reset_password_instructions:
23 | subject: "Reset password instructions"
24 | unlock_instructions:
25 | subject: "Unlock instructions"
26 | email_changed:
27 | subject: "Email Changed"
28 | password_change:
29 | subject: "Password Changed"
30 | omniauth_callbacks:
31 | failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
32 | success: "Successfully authenticated from %{kind} account."
33 | passwords:
34 | no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
35 | send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
36 | send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
37 | updated: "Your password has been changed successfully. You are now signed in."
38 | updated_not_active: "Your password has been changed successfully."
39 | registrations:
40 | destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
41 | signed_up: "Welcome! You have signed up successfully."
42 | signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
43 | signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
44 | signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
45 | update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
46 | updated: "Your account has been updated successfully."
47 | updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again."
48 | sessions:
49 | signed_in: "Signed in successfully."
50 | signed_out: "Signed out successfully."
51 | already_signed_out: "Signed out successfully."
52 | unlocks:
53 | send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
54 | send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
55 | unlocked: "Your account has been unlocked successfully. Please sign in to continue."
56 | errors:
57 | messages:
58 | already_confirmed: "was already confirmed, please try signing in"
59 | confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
60 | expired: "has expired, please request a new one"
61 | not_found: "not found"
62 | not_locked: "was not locked"
63 | not_saved:
64 | one: "1 error prohibited this %{resource} from being saved:"
65 | other: "%{count} errors prohibited this %{resource} from being saved:"
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | > # Recipe Application
4 |
5 | | Project Login Page |
6 | |---------------------------------------|
7 | |
|
8 |
9 |
10 |
11 |
12 |
13 |
14 | # 📗 Table of Contents
15 |
16 | - [📖 About the Project](#about-project)
17 | - [🛠 Built With](#built-with)
18 | - [Tech Stack](#tech-stack)
19 | - [Key Features](#key-features)
20 | - [💻 Getting Started](#getting-started)
21 | - [Setup](#setup)
22 | - [Prerequisites](#prerequisites)
23 | - [Install](#install)
24 | - [Usage](#usage)
25 | - [Run tests](#run-tests)
26 | - [👥 Authors](#authors)
27 | - [🔭 Future Features](#future-features)
28 | - [🤝 Contributing](#contributing)
29 | - [⭐️ Show your support](#support)
30 | - [🙏 Acknowledgements](#acknowledgements)
31 | - [📝 License](#license)
32 |
33 |
34 |
35 | # 📖 [Recipe Application]
36 |
37 | > **[Recipe-App]** The Recipe app keeps track of all your recipes, ingredients, and inventory. It allows you to save ingredients, keep track of what you have, create recipes, and generate a shopping list based on what you have and what you are missing from a recipe.
38 | ## 🛠 Built With
39 |
40 | ### Tech Stack
41 |
42 |
43 | Client
44 |
87 |
88 |
89 |
90 | ## 💻 Getting Started
91 |
92 | To get a local copy up and running, follow these steps.
93 |
94 | ### Prerequisites
95 |
96 | In order to run this project you need:
97 | - [Ruby on Rails](https://rubyonrails.org/) installed and running. To get more information, read the [installation guide](https://guides.rubyonrails.org/).
98 |
99 | - [PostgreSQL](https://www.postgresql.org/) installed and running
100 |
101 |
202 |
203 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actioncable (7.0.7.2)
5 | actionpack (= 7.0.7.2)
6 | activesupport (= 7.0.7.2)
7 | nio4r (~> 2.0)
8 | websocket-driver (>= 0.6.1)
9 | actionmailbox (7.0.7.2)
10 | actionpack (= 7.0.7.2)
11 | activejob (= 7.0.7.2)
12 | activerecord (= 7.0.7.2)
13 | activestorage (= 7.0.7.2)
14 | activesupport (= 7.0.7.2)
15 | mail (>= 2.7.1)
16 | net-imap
17 | net-pop
18 | net-smtp
19 | actionmailer (7.0.7.2)
20 | actionpack (= 7.0.7.2)
21 | actionview (= 7.0.7.2)
22 | activejob (= 7.0.7.2)
23 | activesupport (= 7.0.7.2)
24 | mail (~> 2.5, >= 2.5.4)
25 | net-imap
26 | net-pop
27 | net-smtp
28 | rails-dom-testing (~> 2.0)
29 | actionpack (7.0.7.2)
30 | actionview (= 7.0.7.2)
31 | activesupport (= 7.0.7.2)
32 | rack (~> 2.0, >= 2.2.4)
33 | rack-test (>= 0.6.3)
34 | rails-dom-testing (~> 2.0)
35 | rails-html-sanitizer (~> 1.0, >= 1.2.0)
36 | actiontext (7.0.7.2)
37 | actionpack (= 7.0.7.2)
38 | activerecord (= 7.0.7.2)
39 | activestorage (= 7.0.7.2)
40 | activesupport (= 7.0.7.2)
41 | globalid (>= 0.6.0)
42 | nokogiri (>= 1.8.5)
43 | actionview (7.0.7.2)
44 | activesupport (= 7.0.7.2)
45 | builder (~> 3.1)
46 | erubi (~> 1.4)
47 | rails-dom-testing (~> 2.0)
48 | rails-html-sanitizer (~> 1.1, >= 1.2.0)
49 | activejob (7.0.7.2)
50 | activesupport (= 7.0.7.2)
51 | globalid (>= 0.3.6)
52 | activemodel (7.0.7.2)
53 | activesupport (= 7.0.7.2)
54 | activerecord (7.0.7.2)
55 | activemodel (= 7.0.7.2)
56 | activesupport (= 7.0.7.2)
57 | activestorage (7.0.7.2)
58 | actionpack (= 7.0.7.2)
59 | activejob (= 7.0.7.2)
60 | activerecord (= 7.0.7.2)
61 | activesupport (= 7.0.7.2)
62 | marcel (~> 1.0)
63 | mini_mime (>= 1.1.0)
64 | activesupport (7.0.7.2)
65 | concurrent-ruby (~> 1.0, >= 1.0.2)
66 | i18n (>= 1.6, < 2)
67 | minitest (>= 5.1)
68 | tzinfo (~> 2.0)
69 | addressable (2.8.5)
70 | public_suffix (>= 2.0.2, < 6.0)
71 | ast (2.4.2)
72 | base64 (0.1.1)
73 | bcrypt (3.1.19)
74 | bindex (0.8.1)
75 | bootsnap (1.16.0)
76 | msgpack (~> 1.2)
77 | builder (3.2.4)
78 | capybara (3.39.2)
79 | addressable
80 | matrix
81 | mini_mime (>= 0.1.3)
82 | nokogiri (~> 1.8)
83 | rack (>= 1.6.0)
84 | rack-test (>= 0.6.3)
85 | regexp_parser (>= 1.5, < 3.0)
86 | xpath (~> 3.2)
87 | concurrent-ruby (1.2.2)
88 | crass (1.0.6)
89 | date (3.3.3)
90 | debug (1.8.0)
91 | irb (>= 1.5.0)
92 | reline (>= 0.3.1)
93 | devise (4.9.2)
94 | bcrypt (~> 3.0)
95 | orm_adapter (~> 0.1)
96 | railties (>= 4.1.0)
97 | responders
98 | warden (~> 1.2.3)
99 | erubi (1.12.0)
100 | globalid (1.2.0)
101 | activesupport (>= 6.1)
102 | i18n (1.14.1)
103 | concurrent-ruby (~> 1.0)
104 | importmap-rails (1.2.1)
105 | actionpack (>= 6.0.0)
106 | railties (>= 6.0.0)
107 | io-console (0.6.0)
108 | irb (1.8.0)
109 | rdoc (~> 6.5)
110 | reline (>= 0.3.6)
111 | jbuilder (2.11.5)
112 | actionview (>= 5.0.0)
113 | activesupport (>= 5.0.0)
114 | json (2.6.3)
115 | language_server-protocol (3.17.0.3)
116 | loofah (2.21.3)
117 | crass (~> 1.0.2)
118 | nokogiri (>= 1.12.0)
119 | mail (2.8.1)
120 | mini_mime (>= 0.1.1)
121 | net-imap
122 | net-pop
123 | net-smtp
124 | marcel (1.0.2)
125 | matrix (0.4.2)
126 | method_source (1.0.0)
127 | mini_mime (1.1.5)
128 | minitest (5.19.0)
129 | msgpack (1.7.2)
130 | net-imap (0.3.7)
131 | date
132 | net-protocol
133 | net-pop (0.1.2)
134 | net-protocol
135 | net-protocol (0.2.1)
136 | timeout
137 | net-smtp (0.3.3)
138 | net-protocol
139 | nio4r (2.5.9)
140 | nokogiri (1.15.4-x64-mingw-ucrt)
141 | racc (~> 1.4)
142 | orm_adapter (0.5.0)
143 | parallel (1.23.0)
144 | parser (3.2.2.3)
145 | ast (~> 2.4.1)
146 | racc
147 | pg (1.5.4-x64-mingw-ucrt)
148 | psych (5.1.0)
149 | stringio
150 | public_suffix (5.0.3)
151 | puma (5.6.7)
152 | nio4r (~> 2.0)
153 | racc (1.7.1)
154 | rack (2.2.8)
155 | rack-test (2.1.0)
156 | rack (>= 1.3)
157 | rails (7.0.7.2)
158 | actioncable (= 7.0.7.2)
159 | actionmailbox (= 7.0.7.2)
160 | actionmailer (= 7.0.7.2)
161 | actionpack (= 7.0.7.2)
162 | actiontext (= 7.0.7.2)
163 | actionview (= 7.0.7.2)
164 | activejob (= 7.0.7.2)
165 | activemodel (= 7.0.7.2)
166 | activerecord (= 7.0.7.2)
167 | activestorage (= 7.0.7.2)
168 | activesupport (= 7.0.7.2)
169 | bundler (>= 1.15.0)
170 | railties (= 7.0.7.2)
171 | rails-dom-testing (2.2.0)
172 | activesupport (>= 5.0.0)
173 | minitest
174 | nokogiri (>= 1.6)
175 | rails-html-sanitizer (1.6.0)
176 | loofah (~> 2.21)
177 | nokogiri (~> 1.14)
178 | railties (7.0.7.2)
179 | actionpack (= 7.0.7.2)
180 | activesupport (= 7.0.7.2)
181 | method_source
182 | rake (>= 12.2)
183 | thor (~> 1.0)
184 | zeitwerk (~> 2.5)
185 | rainbow (3.1.1)
186 | rake (13.0.6)
187 | rdoc (6.5.0)
188 | psych (>= 4.0.0)
189 | regexp_parser (2.8.1)
190 | reline (0.3.8)
191 | io-console (~> 0.5)
192 | responders (3.1.0)
193 | actionpack (>= 5.2)
194 | railties (>= 5.2)
195 | rexml (3.2.6)
196 | rubocop (1.56.2)
197 | base64 (~> 0.1.1)
198 | json (~> 2.3)
199 | language_server-protocol (>= 3.17.0)
200 | parallel (~> 1.10)
201 | parser (>= 3.2.2.3)
202 | rainbow (>= 2.2.2, < 4.0)
203 | regexp_parser (>= 1.8, < 3.0)
204 | rexml (>= 3.2.5, < 4.0)
205 | rubocop-ast (>= 1.28.1, < 2.0)
206 | ruby-progressbar (~> 1.7)
207 | unicode-display_width (>= 2.4.0, < 3.0)
208 | rubocop-ast (1.29.0)
209 | parser (>= 3.2.1.0)
210 | ruby-progressbar (1.13.0)
211 | rubyzip (2.3.2)
212 | selenium-webdriver (4.10.0)
213 | rexml (~> 3.2, >= 3.2.5)
214 | rubyzip (>= 1.2.2, < 3.0)
215 | websocket (~> 1.0)
216 | sprockets (4.2.0)
217 | concurrent-ruby (~> 1.0)
218 | rack (>= 2.2.4, < 4)
219 | sprockets-rails (3.4.2)
220 | actionpack (>= 5.2)
221 | activesupport (>= 5.2)
222 | sprockets (>= 3.0.0)
223 | stimulus-rails (1.2.2)
224 | railties (>= 6.0.0)
225 | stringio (3.0.8)
226 | thor (1.2.2)
227 | timeout (0.4.0)
228 | turbo-rails (1.4.0)
229 | actionpack (>= 6.0.0)
230 | activejob (>= 6.0.0)
231 | railties (>= 6.0.0)
232 | tzinfo (2.0.6)
233 | concurrent-ruby (~> 1.0)
234 | tzinfo-data (1.2023.3)
235 | tzinfo (>= 1.0.0)
236 | unicode-display_width (2.4.2)
237 | warden (1.2.9)
238 | rack (>= 2.0.9)
239 | web-console (4.2.0)
240 | actionview (>= 6.0.0)
241 | activemodel (>= 6.0.0)
242 | bindex (>= 0.4.0)
243 | railties (>= 6.0.0)
244 | webdrivers (5.3.1)
245 | nokogiri (~> 1.6)
246 | rubyzip (>= 1.3.0)
247 | selenium-webdriver (~> 4.0, < 4.11)
248 | websocket (1.2.9)
249 | websocket-driver (0.7.6)
250 | websocket-extensions (>= 0.1.0)
251 | websocket-extensions (0.1.5)
252 | xpath (3.2.0)
253 | nokogiri (~> 1.8)
254 | zeitwerk (2.6.11)
255 |
256 | PLATFORMS
257 | x64-mingw-ucrt
258 |
259 | DEPENDENCIES
260 | bootsnap
261 | capybara
262 | debug
263 | devise
264 | importmap-rails
265 | jbuilder
266 | pg (~> 1.1)
267 | puma (~> 5.0)
268 | rails (~> 7.0.7, >= 7.0.7.2)
269 | rubocop (>= 1.0, < 2.0)
270 | selenium-webdriver
271 | sprockets-rails
272 | stimulus-rails
273 | turbo-rails
274 | tzinfo-data
275 | web-console
276 | webdrivers
277 |
278 | RUBY VERSION
279 | ruby 3.2.2p53
280 |
281 | BUNDLED WITH
282 | 2.4.17
283 |
--------------------------------------------------------------------------------
/log/development.log:
--------------------------------------------------------------------------------
1 | Started GET "/" for 127.0.0.1 at 2023-09-05 12:54:12 +0330
2 |
3 | ActiveRecord::NoDatabaseError (We could not find your database: Recipe_App_development. Which can be found in the database configuration file located at config/database.yml.
4 |
5 | To resolve this issue:
6 |
7 | - Did you create the database for this app, or delete it? You may need to create your database.
8 | - Has the database name changed? Check your database.yml config has the correct database name.
9 |
10 | To create your database, run:
11 |
12 | bin/rails db:create
13 | ):
14 |
15 | activerecord (7.0.7.2) lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
16 | activerecord (7.0.7.2) lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
17 | activerecord (7.0.7.2) lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
18 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
19 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
20 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
21 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
22 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
23 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
24 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
25 | activerecord (7.0.7.2) lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
26 | activerecord (7.0.7.2) lib/active_record/connection_handling.rb:313:in `retrieve_connection'
27 | activerecord (7.0.7.2) lib/active_record/connection_handling.rb:280:in `connection'
28 | activerecord (7.0.7.2) lib/active_record/migration.rb:613:in `connection'
29 | activerecord (7.0.7.2) lib/active_record/migration.rb:608:in `build_watcher'
30 | activerecord (7.0.7.2) lib/active_record/migration.rb:590:in `block in call'
31 | activerecord (7.0.7.2) lib/active_record/migration.rb:589:in `synchronize'
32 | activerecord (7.0.7.2) lib/active_record/migration.rb:589:in `call'
33 | actionpack (7.0.7.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
34 | activesupport (7.0.7.2) lib/active_support/callbacks.rb:99:in `run_callbacks'
35 | actionpack (7.0.7.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
36 | actionpack (7.0.7.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
37 | actionpack (7.0.7.2) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
38 | actionpack (7.0.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
39 | web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app'
40 | web-console (4.2.0) lib/web_console/middleware.rb:28:in `block in call'
41 | web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch'
42 | web-console (4.2.0) lib/web_console/middleware.rb:17:in `call'
43 | actionpack (7.0.7.2) lib/action_dispatch/middleware/show_exceptions.rb:29:in `call'
44 | railties (7.0.7.2) lib/rails/rack/logger.rb:40:in `call_app'
45 | railties (7.0.7.2) lib/rails/rack/logger.rb:25:in `block in call'
46 | activesupport (7.0.7.2) lib/active_support/tagged_logging.rb:99:in `block in tagged'
47 | activesupport (7.0.7.2) lib/active_support/tagged_logging.rb:37:in `tagged'
48 | activesupport (7.0.7.2) lib/active_support/tagged_logging.rb:99:in `tagged'
49 | railties (7.0.7.2) lib/rails/rack/logger.rb:25:in `call'
50 | sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
51 | actionpack (7.0.7.2) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
52 | actionpack (7.0.7.2) lib/action_dispatch/middleware/request_id.rb:26:in `call'
53 | rack (2.2.8) lib/rack/method_override.rb:24:in `call'
54 | rack (2.2.8) lib/rack/runtime.rb:22:in `call'
55 | activesupport (7.0.7.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
56 | actionpack (7.0.7.2) lib/action_dispatch/middleware/server_timing.rb:61:in `block in call'
57 | actionpack (7.0.7.2) lib/action_dispatch/middleware/server_timing.rb:26:in `collect_events'
58 | actionpack (7.0.7.2) lib/action_dispatch/middleware/server_timing.rb:60:in `call'
59 | actionpack (7.0.7.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
60 | actionpack (7.0.7.2) lib/action_dispatch/middleware/static.rb:23:in `call'
61 | rack (2.2.8) lib/rack/sendfile.rb:110:in `call'
62 | actionpack (7.0.7.2) lib/action_dispatch/middleware/host_authorization.rb:137:in `call'
63 | railties (7.0.7.2) lib/rails/engine.rb:530:in `call'
64 | puma (5.6.7) lib/puma/configuration.rb:252:in `call'
65 | puma (5.6.7) lib/puma/request.rb:77:in `block in handle_request'
66 | puma (5.6.7) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
67 | puma (5.6.7) lib/puma/request.rb:76:in `handle_request'
68 | puma (5.6.7) lib/puma/server.rb:443:in `process_client'
69 | puma (5.6.7) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
70 | [1m[35m (1971.0ms)[0m [1m[35mCREATE DATABASE "Recipe_App_development" ENCODING = 'unicode'[0m
71 | [1m[35m (861.2ms)[0m [1m[35mCREATE DATABASE "Recipe_App_test" ENCODING = 'unicode'[0m
72 | Started GET "/" for 127.0.0.1 at 2023-09-05 12:56:29 +0330
73 | Processing by Rails::WelcomeController#index as HTML
74 | Rendering C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/templates/rails/welcome/index.html.erb
75 | Rendered C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/templates/rails/welcome/index.html.erb (Duration: 113.9ms | Allocations: 286)
76 | Completed 200 OK in 536ms (Views: 117.7ms | ActiveRecord: 0.0ms | Allocations: 3021)
77 |
78 |
79 | Started GET "/" for 127.0.0.1 at 2023-09-05 13:36:49 +0330
80 | Processing by Rails::WelcomeController#index as HTML
81 | Rendering C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/templates/rails/welcome/index.html.erb
82 | Rendered C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/templates/rails/welcome/index.html.erb (Duration: 12.4ms | Allocations: 272)
83 | Completed 200 OK in 61ms (Views: 34.9ms | ActiveRecord: 0.0ms | Allocations: 906)
84 |
85 |
86 | [1m[35m (348.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
87 | [1m[35m (115.0ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)[0m
88 | [1m[35m (0.4ms)[0m [1m[34mSELECT pg_try_advisory_lock(8272370091435100875)[0m
89 | [1m[36mActiveRecord::SchemaMigration Pluck (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
90 | Migrating to DeviseCreateUsers (20230906060153)
91 | [1m[36mTRANSACTION (0.3ms)[0m [1m[35mBEGIN[0m
92 | [1m[35m (114.1ms)[0m [1m[35mCREATE TABLE "users" ("id" bigserial primary key, "email" character varying DEFAULT '' NOT NULL, "encrypted_password" character varying DEFAULT '' NOT NULL, "reset_password_token" character varying, "reset_password_sent_at" timestamp(6), "remember_created_at" timestamp(6), "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)[0m
93 | [1m[35m (21.9ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
94 | [1m[35m (37.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
95 | [1m[36mActiveRecord::SchemaMigration Create (2.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20230906060153"]]
96 | [1m[36mTRANSACTION (1.1ms)[0m [1m[35mCOMMIT[0m
97 | [1m[36mActiveRecord::InternalMetadata Load (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
98 | [1m[36mTRANSACTION (0.4ms)[0m [1m[35mBEGIN[0m
99 | [1m[36mActiveRecord::InternalMetadata Create (1.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2023-09-06 06:05:13.953042"], ["updated_at", "2023-09-06 06:05:13.953042"]]
100 | [1m[36mTRANSACTION (0.8ms)[0m [1m[35mCOMMIT[0m
101 | [1m[35m (0.4ms)[0m [1m[34mSELECT pg_advisory_unlock(8272370091435100875)[0m
102 | [1m[36mActiveRecord::SchemaMigration Pluck (2.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
103 | Started GET "/" for 127.0.0.1 at 2023-09-06 11:47:32 +0330
104 | [1m[36mActiveRecord::SchemaMigration Pluck (4.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
105 | Processing by UsersController#index as HTML
106 | Rendering layout layouts/application.html.erb
107 | Rendering users/index.html.erb within layouts/application
108 | Rendered users/index.html.erb within layouts/application (Duration: 84.5ms | Allocations: 311)
109 | Rendered layout layouts/application.html.erb (Duration: 5044.0ms | Allocations: 97026)
110 | Completed 200 OK in 5455ms (Views: 5264.5ms | ActiveRecord: 0.0ms | Allocations: 99672)
111 |
112 |
113 | Started GET "/" for 127.0.0.1 at 2023-09-06 11:48:40 +0330
114 | Processing by UsersController#index as HTML
115 | Rendering layout layouts/application.html.erb
116 | Rendering users/index.html.erb within layouts/application
117 | Rendered users/index.html.erb within layouts/application (Duration: 50.8ms | Allocations: 109)
118 | Rendered layout layouts/application.html.erb (Duration: 96.7ms | Allocations: 3014)
119 | Completed 200 OK in 121ms (Views: 114.6ms | ActiveRecord: 0.0ms | Allocations: 3670)
120 |
121 |
122 |
--------------------------------------------------------------------------------
/config/initializers/devise.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Assuming you have not yet modified this file, each configuration option below
4 | # is set to its default value. Note that some are commented out while others
5 | # are not: uncommented lines are intended to protect your configuration from
6 | # breaking changes in upgrades (i.e., in the event that future versions of
7 | # Devise change the default values for those options).
8 | #
9 | # Use this hook to configure devise mailer, warden hooks and so forth.
10 | # Many of these configuration options can be set straight in your model.
11 | Devise.setup do |config|
12 | # The secret key used by Devise. Devise uses this key to generate
13 | # random tokens. Changing this key will render invalid all existing
14 | # confirmation, reset password and unlock tokens in the database.
15 | # Devise will use the `secret_key_base` as its `secret_key`
16 | # by default. You can change it below and use your own secret key.
17 | # config.secret_key = 'dfc70d074f537916b218bf0dc8f60b411f11254a087415a7019d9d082d911f454c83b0bec41d9e99ae7a67447e05154e4042d51261a911e07761a9bb1d719a1c'
18 |
19 | # ==> Controller configuration
20 | # Configure the parent class to the devise controllers.
21 | # config.parent_controller = 'DeviseController'
22 |
23 | # ==> Mailer Configuration
24 | # Configure the e-mail address which will be shown in Devise::Mailer,
25 | # note that it will be overwritten if you use your own mailer class
26 | # with default "from" parameter.
27 | config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
28 |
29 | # Configure the class responsible to send e-mails.
30 | # config.mailer = 'Devise::Mailer'
31 |
32 | # Configure the parent class responsible to send e-mails.
33 | # config.parent_mailer = 'ActionMailer::Base'
34 |
35 | # ==> ORM configuration
36 | # Load and configure the ORM. Supports :active_record (default) and
37 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
38 | # available as additional gems.
39 | require 'devise/orm/active_record'
40 |
41 | # ==> Configuration for any authentication mechanism
42 | # Configure which keys are used when authenticating a user. The default is
43 | # just :email. You can configure it to use [:username, :subdomain], so for
44 | # authenticating a user, both parameters are required. Remember that those
45 | # parameters are used only when authenticating and not when retrieving from
46 | # session. If you need permissions, you should implement that in a before filter.
47 | # You can also supply a hash where the value is a boolean determining whether
48 | # or not authentication should be aborted when the value is not present.
49 | # config.authentication_keys = [:email]
50 |
51 | # Configure parameters from the request object used for authentication. Each entry
52 | # given should be a request method and it will automatically be passed to the
53 | # find_for_authentication method and considered in your model lookup. For instance,
54 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
55 | # The same considerations mentioned for authentication_keys also apply to request_keys.
56 | # config.request_keys = []
57 |
58 | # Configure which authentication keys should be case-insensitive.
59 | # These keys will be downcased upon creating or modifying a user and when used
60 | # to authenticate or find a user. Default is :email.
61 | config.case_insensitive_keys = [:email]
62 |
63 | # Configure which authentication keys should have whitespace stripped.
64 | # These keys will have whitespace before and after removed upon creating or
65 | # modifying a user and when used to authenticate or find a user. Default is :email.
66 | config.strip_whitespace_keys = [:email]
67 |
68 | # Tell if authentication through request.params is enabled. True by default.
69 | # It can be set to an array that will enable params authentication only for the
70 | # given strategies, for example, `config.params_authenticatable = [:database]` will
71 | # enable it only for database (email + password) authentication.
72 | # config.params_authenticatable = true
73 |
74 | # Tell if authentication through HTTP Auth is enabled. False by default.
75 | # It can be set to an array that will enable http authentication only for the
76 | # given strategies, for example, `config.http_authenticatable = [:database]` will
77 | # enable it only for database authentication.
78 | # For API-only applications to support authentication "out-of-the-box", you will likely want to
79 | # enable this with :database unless you are using a custom strategy.
80 | # The supported strategies are:
81 | # :database = Support basic authentication with authentication key + password
82 | # config.http_authenticatable = false
83 |
84 | # If 401 status code should be returned for AJAX requests. True by default.
85 | # config.http_authenticatable_on_xhr = true
86 |
87 | # The realm used in Http Basic Authentication. 'Application' by default.
88 | # config.http_authentication_realm = 'Application'
89 |
90 | # It will change confirmation, password recovery and other workflows
91 | # to behave the same regardless if the e-mail provided was right or wrong.
92 | # Does not affect registerable.
93 | # config.paranoid = true
94 |
95 | # By default Devise will store the user in session. You can skip storage for
96 | # particular strategies by setting this option.
97 | # Notice that if you are skipping storage for all authentication paths, you
98 | # may want to disable generating routes to Devise's sessions controller by
99 | # passing skip: :sessions to `devise_for` in your config/routes.rb
100 | config.skip_session_storage = [:http_auth]
101 |
102 | # By default, Devise cleans up the CSRF token on authentication to
103 | # avoid CSRF token fixation attacks. This means that, when using AJAX
104 | # requests for sign in and sign up, you need to get a new CSRF token
105 | # from the server. You can disable this option at your own risk.
106 | # config.clean_up_csrf_token_on_authentication = true
107 |
108 | # When false, Devise will not attempt to reload routes on eager load.
109 | # This can reduce the time taken to boot the app but if your application
110 | # requires the Devise mappings to be loaded during boot time the application
111 | # won't boot properly.
112 | # config.reload_routes = true
113 |
114 | # ==> Configuration for :database_authenticatable
115 | # For bcrypt, this is the cost for hashing the password and defaults to 12. If
116 | # using other algorithms, it sets how many times you want the password to be hashed.
117 | # The number of stretches used for generating the hashed password are stored
118 | # with the hashed password. This allows you to change the stretches without
119 | # invalidating existing passwords.
120 | #
121 | # Limiting the stretches to just one in testing will increase the performance of
122 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
123 | # a value less than 10 in other environments. Note that, for bcrypt (the default
124 | # algorithm), the cost increases exponentially with the number of stretches (e.g.
125 | # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
126 | config.stretches = Rails.env.test? ? 1 : 12
127 |
128 | # Set up a pepper to generate the hashed password.
129 | # config.pepper = 'af5d943a3c91f14e62afd5d319a424a0023403146d67788630dfe386fcf312daad4d994f4ff3544d6e4e76e8548511d7769521de26f063e60d96a6fe36a595ef'
130 |
131 | # Send a notification to the original email when the user's email is changed.
132 | # config.send_email_changed_notification = false
133 |
134 | # Send a notification email when the user's password is changed.
135 | # config.send_password_change_notification = false
136 |
137 | # ==> Configuration for :confirmable
138 | # A period that the user is allowed to access the website even without
139 | # confirming their account. For instance, if set to 2.days, the user will be
140 | # able to access the website for two days without confirming their account,
141 | # access will be blocked just in the third day.
142 | # You can also set it to nil, which will allow the user to access the website
143 | # without confirming their account.
144 | # Default is 0.days, meaning the user cannot access the website without
145 | # confirming their account.
146 | # config.allow_unconfirmed_access_for = 2.days
147 |
148 | # A period that the user is allowed to confirm their account before their
149 | # token becomes invalid. For example, if set to 3.days, the user can confirm
150 | # their account within 3 days after the mail was sent, but on the fourth day
151 | # their account can't be confirmed with the token any more.
152 | # Default is nil, meaning there is no restriction on how long a user can take
153 | # before confirming their account.
154 | # config.confirm_within = 3.days
155 |
156 | # If true, requires any email changes to be confirmed (exactly the same way as
157 | # initial account confirmation) to be applied. Requires additional unconfirmed_email
158 | # db field (see migrations). Until confirmed, new email is stored in
159 | # unconfirmed_email column, and copied to email column on successful confirmation.
160 | config.reconfirmable = true
161 |
162 | # Defines which key will be used when confirming an account
163 | # config.confirmation_keys = [:email]
164 |
165 | # ==> Configuration for :rememberable
166 | # The time the user will be remembered without asking for credentials again.
167 | # config.remember_for = 2.weeks
168 |
169 | # Invalidates all the remember me tokens when the user signs out.
170 | config.expire_all_remember_me_on_sign_out = true
171 |
172 | # If true, extends the user's remember period when remembered via cookie.
173 | # config.extend_remember_period = false
174 |
175 | # Options to be passed to the created cookie. For instance, you can set
176 | # secure: true in order to force SSL only cookies.
177 | # config.rememberable_options = {}
178 |
179 | # ==> Configuration for :validatable
180 | # Range for password length.
181 | config.password_length = 6..128
182 |
183 | # Email regex used to validate email formats. It simply asserts that
184 | # one (and only one) @ exists in the given string. This is mainly
185 | # to give user feedback and not to assert the e-mail validity.
186 | config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
187 |
188 | # ==> Configuration for :timeoutable
189 | # The time you want to timeout the user session without activity. After this
190 | # time the user will be asked for credentials again. Default is 30 minutes.
191 | # config.timeout_in = 30.minutes
192 |
193 | # ==> Configuration for :lockable
194 | # Defines which strategy will be used to lock an account.
195 | # :failed_attempts = Locks an account after a number of failed attempts to sign in.
196 | # :none = No lock strategy. You should handle locking by yourself.
197 | # config.lock_strategy = :failed_attempts
198 |
199 | # Defines which key will be used when locking and unlocking an account
200 | # config.unlock_keys = [:email]
201 |
202 | # Defines which strategy will be used to unlock an account.
203 | # :email = Sends an unlock link to the user email
204 | # :time = Re-enables login after a certain amount of time (see :unlock_in below)
205 | # :both = Enables both strategies
206 | # :none = No unlock strategy. You should handle unlocking by yourself.
207 | # config.unlock_strategy = :both
208 |
209 | # Number of authentication tries before locking an account if lock_strategy
210 | # is failed attempts.
211 | # config.maximum_attempts = 20
212 |
213 | # Time interval to unlock the account if :time is enabled as unlock_strategy.
214 | # config.unlock_in = 1.hour
215 |
216 | # Warn on the last attempt before the account is locked.
217 | # config.last_attempt_warning = true
218 |
219 | # ==> Configuration for :recoverable
220 | #
221 | # Defines which key will be used when recovering the password for an account
222 | # config.reset_password_keys = [:email]
223 |
224 | # Time interval you can reset your password with a reset password key.
225 | # Don't put a too small interval or your users won't have the time to
226 | # change their passwords.
227 | config.reset_password_within = 6.hours
228 |
229 | # When set to false, does not sign a user in automatically after their password is
230 | # reset. Defaults to true, so a user is signed in automatically after a reset.
231 | # config.sign_in_after_reset_password = true
232 |
233 | # ==> Configuration for :encryptable
234 | # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
235 | # You can use :sha1, :sha512 or algorithms from others authentication tools as
236 | # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
237 | # for default behavior) and :restful_authentication_sha1 (then you should set
238 | # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
239 | #
240 | # Require the `devise-encryptable` gem when using anything other than bcrypt
241 | # config.encryptor = :sha512
242 |
243 | # ==> Scopes configuration
244 | # Turn scoped views on. Before rendering "sessions/new", it will first check for
245 | # "users/sessions/new". It's turned off by default because it's slower if you
246 | # are using only default views.
247 | # config.scoped_views = false
248 |
249 | # Configure the default scope given to Warden. By default it's the first
250 | # devise role declared in your routes (usually :user).
251 | # config.default_scope = :user
252 |
253 | # Set this configuration to false if you want /users/sign_out to sign out
254 | # only the current scope. By default, Devise signs out all scopes.
255 | # config.sign_out_all_scopes = true
256 |
257 | # ==> Navigation configuration
258 | # Lists the formats that should be treated as navigational. Formats like
259 | # :html should redirect to the sign in page when the user does not have
260 | # access, but formats like :xml or :json, should return 401.
261 | #
262 | # If you have any extra navigational formats, like :iphone or :mobile, you
263 | # should add them to the navigational formats lists.
264 | #
265 | # The "*/*" below is required to match Internet Explorer requests.
266 | # config.navigational_formats = ['*/*', :html, :turbo_stream]
267 |
268 | # The default HTTP method used to sign out a resource. Default is :delete.
269 | config.sign_out_via = :delete
270 |
271 | # ==> OmniAuth
272 | # Add a new OmniAuth provider. Check the wiki for more information on setting
273 | # up on your models and hooks.
274 | # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
275 |
276 | # ==> Warden configuration
277 | # If you want to use other strategies, that are not supported by Devise, or
278 | # change the failure app, you can configure them inside the config.warden block.
279 | #
280 | # config.warden do |manager|
281 | # manager.intercept_401 = false
282 | # manager.default_strategies(scope: :user).unshift :some_external_strategy
283 | # end
284 |
285 | # ==> Mountable engine configurations
286 | # When using Devise inside an engine, let's call it `MyEngine`, and this engine
287 | # is mountable, there are some extra configurations to be taken into account.
288 | # The following options are available, assuming the engine is mounted as:
289 | #
290 | # mount MyEngine, at: '/my_engine'
291 | #
292 | # The router that invoked `devise_for`, in the example above, would be:
293 | # config.router_name = :my_engine
294 | #
295 | # When using OmniAuth, Devise cannot automatically set OmniAuth path,
296 | # so you need to do it manually. For the users scope, it would be:
297 | # config.omniauth_path_prefix = '/my_engine/users/auth'
298 |
299 | # ==> Hotwire/Turbo configuration
300 | # When using Devise with Hotwire/Turbo, the http status for error responses
301 | # and some redirects must match the following. The default in Devise for existing
302 | # apps is `200 OK` and `302 Found respectively`, but new apps are generated with
303 | # these new defaults that match Hotwire/Turbo behavior.
304 | # Note: These might become the new default in future versions of Devise.
305 | config.responder.error_status = :unprocessable_entity
306 | config.responder.redirect_status = :see_other
307 |
308 | # ==> Configuration for :registerable
309 |
310 | # When set to false, does not sign a user in automatically after their password is
311 | # changed. Defaults to true, so a user is signed in automatically after changing a password.
312 | # config.sign_in_after_change_password = true
313 | end
314 |
--------------------------------------------------------------------------------