8 |
--------------------------------------------------------------------------------
/app/views/admin/categories/edit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "bootstrap_modal" do %>
2 | <%= render partial: "admin/categories/form_modal", locals: { category: @category }%>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/admin/categories/new.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "bootstrap_modal" do %>
2 | <%= render partial: "admin/categories/form_modal", locals: { category: @category }%>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/layouts/store/_footer.html.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/bin/dev:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if ! foreman version &> /dev/null
4 | then
5 | echo "Installing foreman..."
6 | gem install foreman
7 | fi
8 |
9 | foreman start -f Procfile.dev "$@"
10 |
--------------------------------------------------------------------------------
/test/application_system_test_case.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5 | end
6 |
--------------------------------------------------------------------------------
/app/javascript/application.js:
--------------------------------------------------------------------------------
1 | // Entry point for the build script in your package.json
2 | import "@hotwired/turbo-rails"
3 | import "./controllers"
4 | import * as bootstrap from "bootstrap"
5 | import "./mask"
6 |
--------------------------------------------------------------------------------
/app/javascript/controllers/hello_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus"
2 |
3 | export default class extends Controller {
4 | connect() {
5 | this.element.textContent = "Hello World!"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2 |
3 | require "bundler/setup" # Set up gems listed in the Gemfile.
4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/app/javascript/devise.js:
--------------------------------------------------------------------------------
1 | // Entry point for the build script in your package.json
2 | import "@hotwired/turbo-rails"
3 | import "./controllers"
4 | import * as bootstrap from "bootstrap"
5 | Turbo.session.drive = false
6 | import "./mask"
7 |
--------------------------------------------------------------------------------
/app/javascript/mask.js:
--------------------------------------------------------------------------------
1 | import Inputmask from "inputmask"
2 |
3 | // MASK PHONE
4 | const element_phone = document.getElementsByClassName("mask-phone")
5 | const im_phone = new Inputmask("(99) 999999999")
6 | im_phone.mask(element_phone)
7 |
--------------------------------------------------------------------------------
/spec/factories/products.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 | factory :product do
3 | name { "MyString" }
4 | description { "MyText" }
5 | price { "9.99" }
6 | publish { false }
7 | category { nil }
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative "config/application"
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: test
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: ecommerce_showzim_production
11 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/confirmation_instructions.html.erb:
--------------------------------------------------------------------------------
1 |
Welcome <%= @email %>!
2 |
3 |
You can confirm your account email through the link below:
4 |
5 |
<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
6 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2 |
3 | # Mark the database schema as having been generated.
4 | db/schema.rb linguist-generated
5 |
6 | # Mark any vendored files as having been vendored.
7 | vendor/* linguist-vendored
8 |
--------------------------------------------------------------------------------
/app/views/admin/categories/_category.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Name:
4 | <%= category.name %>
5 |
6 |
7 |
8 | Position:
9 | <%= category.position %>
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/db/migrate/20221104231300_create_categories.rb:
--------------------------------------------------------------------------------
1 | class CreateCategories < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :categories do |t|
4 | t.string :name
5 | t.integer :position
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20221202232713_add_fields_promo_to_products.rb:
--------------------------------------------------------------------------------
1 | class AddFieldsPromoToProducts < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :products, :promo, :boolean, default: false
4 | add_column :products, :promo_price, :decimal, default: 0.0
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/layouts/admin/_footer.html.erb:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/app/javascript/controllers/application.js:
--------------------------------------------------------------------------------
1 | import { Application } from "@hotwired/stimulus"
2 |
3 | const application = Application.start()
4 |
5 | // Configure Stimulus development experience
6 | application.debug = false
7 | window.Stimulus = application
8 |
9 | export { application }
10 |
--------------------------------------------------------------------------------
/spec/requests/home_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | RSpec.describe "Homes", type: :request do
4 | describe "GET /index" do
5 | it "returns http success" do
6 | get "/home/index"
7 | expect(response).to have_http_status(:success)
8 | end
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | # Automatically retry jobs that encountered a deadlock
3 | # retry_on ActiveRecord::Deadlocked
4 |
5 | # Most jobs are safe to ignore if the underlying records are no longer available
6 | # discard_on ActiveJob::DeserializationError
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/admin/products/show.html.erb:
--------------------------------------------------------------------------------
1 |
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 |
--------------------------------------------------------------------------------
/app/views/layouts/admin/_topbar.html.erb:
--------------------------------------------------------------------------------
1 |
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 |
--------------------------------------------------------------------------------
/app/javascript/sbadmin/sbadmin.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | "use strict"; // Start of use strict
3 |
4 | // Toggle the side navigation
5 | $("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
6 | $("body").toggleClass("sidebar-toggled");
7 | $(".sidebar").toggleClass("toggled");
8 | if ($(".sidebar").hasClass("toggled")) {
9 | $('.sidebar .collapse').collapse('hide');
10 | };
11 | });
12 |
13 | // Close any open menu accordions when window is resized below 768px
14 | $(window).resize(function() {
15 | if ($(window).width() < 768) {
16 | $('.sidebar .collapse').collapse('hide');
17 | };
18 |
19 | // Toggle the side navigation when window is resized below 480px
20 | if ($(window).width() < 480 && !$(".sidebar").hasClass("toggled")) {
21 | $("body").addClass("sidebar-toggled");
22 | $(".sidebar").addClass("toggled");
23 | $('.sidebar .collapse').collapse('hide');
24 | };
25 | });
26 |
27 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over
28 | $('body.fixed-nav .sidebar').on('mousewheel DOMMouseScroll wheel', function(e) {
29 | if ($(window).width() > 768) {
30 | var e0 = e.originalEvent,
31 | delta = e0.wheelDelta || -e0.detail;
32 | this.scrollTop += (delta < 0 ? 1 : -1) * 30;
33 | e.preventDefault();
34 | }
35 | });
36 |
37 | // Scroll to top button appear
38 | $(document).on('scroll', function() {
39 | var scrollDistance = $(this).scrollTop();
40 | if (scrollDistance > 100) {
41 | $('.scroll-to-top').fadeIn();
42 | } else {
43 | $('.scroll-to-top').fadeOut();
44 | }
45 | });
46 |
47 | // Smooth scrolling using jQuery easing
48 | $(document).on('click', 'a.scroll-to-top', function(e) {
49 | var $anchor = $(this);
50 | $('html, body').stop().animate({
51 | scrollTop: ($($anchor.attr('href')).offset().top)
52 | }, 1000, 'easeInOutExpo');
53 | e.preventDefault();
54 | });
55 |
56 | })(jQuery); // End of use strict
57 |
--------------------------------------------------------------------------------
/spec/models/user_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | RSpec.describe User, type: :model do
4 | context 'Espero validar os campos obrigatório' do
5 | it 'Valida o campo nome está presente' do
6 | user = build(:user)
7 |
8 | expect(user.valid?).to eq(true)
9 | end
10 |
11 | it 'valida o campo nome não está presente' do
12 | user = build(:user, name: nil)
13 |
14 | expect(user.valid?).to eq(false)
15 | end
16 |
17 | it 'Valida o campo telefone está presente' do
18 | user = build(:user)
19 |
20 | expect(user.valid?).to eq(true)
21 | end
22 |
23 | it 'valida o campo telefone não está presente' do
24 | user = build(:user, phone: nil)
25 |
26 | expect(user.valid?).to eq(false)
27 | end
28 |
29 | it 'Valida o campo email está presente' do
30 | user = build(:user)
31 |
32 | expect(user.valid?).to eq(true)
33 | end
34 |
35 | it 'valida o campo email não está presente' do
36 | user = build(:user, email: nil)
37 |
38 | expect(user.valid?).to eq(false)
39 | end
40 |
41 | it 'Valida o campo senha está presente' do
42 | user = build(:user)
43 |
44 | expect(user.valid?).to eq(true)
45 | end
46 |
47 | it 'valida o campo senha não está presente' do
48 | user = build(:user, password: nil)
49 |
50 | expect(user.valid?).to eq(false)
51 | end
52 |
53 | context 'Valida email' do
54 | it 'Validar email unicos' do
55 | user1 = create(:user) # user email: user1@gmail.com
56 | user2 = build(:user, email: user1.email) # user1@gmail.com
57 |
58 | expect(user2.valid?).to eq(false)
59 | end
60 |
61 | it 'Validar mensagem de erro para emails unicos' do
62 | user1 = create(:user) # user email: user1@gmail.com
63 | user2 = build(:user, email: user1.email) # user1@gmail.com
64 |
65 | user2.save
66 |
67 | expect(user2.valid?).to eq(false)
68 | expect(user2.errors.size).to be_positive
69 | end
70 | end
71 | end
72 | end
73 |
--------------------------------------------------------------------------------
/db/migrate/20221112000829_create_active_storage_tables.active_storage.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from active_storage (originally 20170806125915)
2 | class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3 | def change
4 | # Use Active Record's configured type for primary and foreign keys
5 | primary_key_type, foreign_key_type = primary_and_foreign_key_types
6 |
7 | create_table :active_storage_blobs, id: primary_key_type do |t|
8 | t.string :key, null: false
9 | t.string :filename, null: false
10 | t.string :content_type
11 | t.text :metadata
12 | t.string :service_name, null: false
13 | t.bigint :byte_size, null: false
14 | t.string :checksum
15 |
16 | if connection.supports_datetime_with_precision?
17 | t.datetime :created_at, precision: 6, null: false
18 | else
19 | t.datetime :created_at, null: false
20 | end
21 |
22 | t.index [ :key ], unique: true
23 | end
24 |
25 | create_table :active_storage_attachments, id: primary_key_type do |t|
26 | t.string :name, null: false
27 | t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
28 | t.references :blob, null: false, type: foreign_key_type
29 |
30 | if connection.supports_datetime_with_precision?
31 | t.datetime :created_at, precision: 6, null: false
32 | else
33 | t.datetime :created_at, null: false
34 | end
35 |
36 | t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true
37 | t.foreign_key :active_storage_blobs, column: :blob_id
38 | end
39 |
40 | create_table :active_storage_variant_records, id: primary_key_type do |t|
41 | t.belongs_to :blob, null: false, index: false, type: foreign_key_type
42 | t.string :variation_digest, null: false
43 |
44 | t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true
45 | t.foreign_key :active_storage_blobs, column: :blob_id
46 | end
47 | end
48 |
49 | private
50 | def primary_and_foreign_key_types
51 | config = Rails.configuration.generators
52 | setting = config.options[config.orm][:primary_key_type]
53 | primary_key_type = setting || :primary_key
54 | foreign_key_type = setting || :bigint
55 | [primary_key_type, foreign_key_type]
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/app/javascript/sbadmin/jquery-easing/jquery.easing.min.js:
--------------------------------------------------------------------------------
1 | (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})});
--------------------------------------------------------------------------------
/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 | # Enable/disable caching. By default caching is disabled.
21 | # Run rails dev:cache to toggle caching.
22 | if Rails.root.join("tmp/caching-dev.txt").exist?
23 | config.action_controller.perform_caching = true
24 | config.action_controller.enable_fragment_cache_logging = true
25 |
26 | config.cache_store = :memory_store
27 | config.public_file_server.headers = {
28 | "Cache-Control" => "public, max-age=#{2.days.to_i}"
29 | }
30 | else
31 | config.action_controller.perform_caching = false
32 |
33 | config.cache_store = :null_store
34 | end
35 |
36 | # Store uploaded files on the local file system (see config/storage.yml for options).
37 | config.active_storage.service = :local
38 |
39 | # Don't care if the mailer can't send.
40 | config.action_mailer.raise_delivery_errors = false
41 |
42 | config.action_mailer.perform_caching = false
43 |
44 | # Print deprecation notices to the Rails logger.
45 | config.active_support.deprecation = :log
46 |
47 | # Raise exceptions for disallowed deprecations.
48 | config.active_support.disallowed_deprecation = :raise
49 |
50 | # Tell Active Support which deprecation messages to disallow.
51 | config.active_support.disallowed_deprecation_warnings = []
52 |
53 | # Raise an error on page load if there are pending migrations.
54 | config.active_record.migration_error = :page_load
55 |
56 | # Highlight code that triggered database queries in logs.
57 | config.active_record.verbose_query_logs = true
58 |
59 | # Suppress logger output for asset requests.
60 | config.assets.quiet = true
61 |
62 | config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
63 | # Raises error for missing translations.
64 | # config.i18n.raise_on_missing_translations = true
65 |
66 | # Annotate rendered view with file names.
67 | # config.action_view.annotate_rendered_view_with_filenames = true
68 |
69 | # Uncomment if you wish to allow Action Cable access from any origin.
70 | # config.action_cable.disable_request_forgery_protection = true
71 | end
72 |
--------------------------------------------------------------------------------
/app/views/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/assets/images/undraw_profile.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
39 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3 |
4 | ruby "3.1.2"
5 |
6 | # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7 | gem "rails", "~> 7.0.4"
8 |
9 | # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10 | gem "sprockets-rails"
11 |
12 | # Use pg as the database for Active Record
13 | gem "pg"
14 |
15 | # Use the Puma web server [https://github.com/puma/puma]
16 | gem "puma", "~> 5.0"
17 |
18 | # Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
19 | gem "jsbundling-rails"
20 |
21 | # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22 | gem "turbo-rails"
23 |
24 | # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
25 | gem "stimulus-rails"
26 |
27 | # Bundle and process CSS [https://github.com/rails/cssbundling-rails]
28 | gem "cssbundling-rails"
29 |
30 | # Build JSON APIs with ease [https://github.com/rails/jbuilder]
31 | gem "jbuilder"
32 |
33 | gem 'devise'
34 |
35 | gem 'simple_form'
36 |
37 | gem 'pundit'
38 |
39 | gem "aws-sdk-s3"
40 | gem "image_processing", ">= 1.2"
41 |
42 | # Use Redis adapter to run Action Cable in production
43 | # gem "redis", "~> 4.0"
44 |
45 | # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
46 | # gem "kredis"
47 |
48 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
49 | # gem "bcrypt", "~> 3.1.7"
50 |
51 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
52 | gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
53 |
54 | # Reduces boot times through caching; required in config/boot.rb
55 | gem "bootsnap", require: false
56 |
57 | # Use Sass to process CSS
58 | # gem "sassc-rails"
59 |
60 | # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
61 | # gem "image_processing", "~> 1.2"
62 |
63 | group :development, :test do
64 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
65 | gem "debug", platforms: %i[ mri mingw x64_mingw ]
66 | gem 'awesome_print'
67 | gem 'dotenv-rails'
68 | gem 'factory_bot_rails'
69 | gem 'faker'
70 | gem 'pry-rails'
71 | gem 'rspec-rails'
72 | gem 'rubocop'
73 | end
74 |
75 | group :development do
76 | # Use console on exceptions pages [https://github.com/rails/web-console]
77 | gem "web-console"
78 |
79 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
80 | # gem "rack-mini-profiler"
81 |
82 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
83 | # gem "spring"
84 | end
85 |
86 | group :test do
87 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
88 | gem "capybara"
89 | gem "selenium-webdriver"
90 | gem "webdrivers"
91 | gem 'webmock'
92 | gem 'database_cleaner'
93 | gem 'shoulda-matchers'
94 | gem 'simplecov'
95 | gem 'vcr'
96 | end
97 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # README
2 |
3 | Este projeto esta sendo desenvolvido em live no meu canal https://twitch.tv/progshowzim
4 |
5 | # Configurando o sistema
6 | Para configurar o sistema no seu computador você precisa do ruby, node e yarn configurado no seu computador.
7 |
8 | Para ruby eu costumo usar o asdf como gerenciador de ruby e node. Mas você pode isntalar o gerenciador que estiver mais familiarizado.
9 |
10 | Ruby: 3.1.2
11 | Rails 7.0.2
12 | Node: 16+
13 | Yarn: 1.22+
14 | Libvips: https://installati.one/ubuntu/20.04/libvips-dev/
15 |
16 | Siga os passos abaixo para configurar o sistema no seu computador.
17 | 1. Instalar todas as dependências assets: `yarn install`
18 | 2. Instalar todas as dependências do rails (gems): `bundle install`
19 | 3. Configure o arquivo `database.yml` que está na pasta config com seu usuário e senha.
20 | 4. Com o banco de dados configurado gere os bancos: `rails db:create`
21 | 5. Agora execute as migrações: `rails db:migrate`
22 | 6. Fim
23 |
24 | # Iniciando o projeto
25 | Agora com tudo configurado, basta executa `bin/dev`
26 |
27 | ## Fluxos do sistema:
28 | https://whimsical.com/e-commerce-showzim-LzJQQLaeREuubiZSkCMmC5
29 |
30 | ## Templates
31 |
32 | https://startbootstrap.com/template/shop-homepage
33 | https://startbootstrap.com/template/shop-item
34 | https://colorlib.com/wp/template/login-form-11/
35 | Design do perfil - https://cdn.dribbble.com/users/5015889/screenshots/14032312/media/90a535d6824b058c0476f0324ee7ae9c.png
36 |
37 | # modelagem
38 | https://dbdiagram.io/d/63645030c9abfc611170313f
39 |
40 | ### Usando com docker
41 |
42 | 1. Create file `.env` and `env.test` off file `.env.sample`.
43 |
44 | 2. Add values in the variables empties
45 |
46 | 3. Add value below on file `.env`
47 |
48 | ```yml
49 | DATABASE_URL=postgres://postgres:postgres@db:5432/projeto_development
50 | ```
51 |
52 | 4. Add value below on file `.env.test`
53 |
54 | ```yml
55 | DATABASE_URL=postgres://postgres:postgres@db:5432/projeto_test
56 | ```
57 |
58 | 5. Create file `.env.sidekiq` and add values below:
59 | ```
60 | REDIS_URL=redis://redis:6379/0
61 | SIDEKIQ_WORKERS=5
62 | DATABASE_URL=postgres://postgres:postgres@db:5432/projeto_development
63 | ```
64 | 6. Execute the command below for build image
65 | ```
66 | docker-compose up -d --no-deps --build app
67 | ```
68 | 7. Execute the command below for start project
69 | ```
70 | docker compose up -d
71 | ```
72 | 8. Execute the command below for access bash
73 | ```
74 | docker compose run --rm app bash
75 | ```
76 | 9. Execute the command below for create database
77 | ```
78 | rails db:create
79 | ```
80 | 10. Execute the command below for migration database
81 | ```
82 | rails db:migrate
83 | ```
84 | 11. Execute the command below for populate database
85 | ```
86 | rails db:seed
87 | ```
88 |
89 | # Command extras
90 | Reset stats sidekiq
91 | ```
92 | Sidekiq::Stats.new.reset
93 | ```
94 | For the test rspec, execute the command below
95 | ```
96 | ENV_FILE=.env.test docker compose run --rm app rspec
97 | ```
98 | For execute rubocop
99 | ```
100 | docker compose run --rm app rubocop
101 | ```
102 | For debug with binding.pry
103 | ```
104 | docker attach --detach-keys="ctrl-c"
105 | ```
106 |
--------------------------------------------------------------------------------
/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", __FILE__)
45 | end
46 |
47 | def lockfile
48 | lockfile =
49 | case File.basename(gemfile)
50 | when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
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 || cli_arg_version ||
66 | bundler_requirement_for(lockfile_version)
67 | end
68 |
69 | def bundler_requirement_for(version)
70 | return "#{Gem::Requirement.default}.a" unless version
71 |
72 | bundler_gem_version = Gem::Version.new(version)
73 |
74 | requirement = bundler_gem_version.approximate_recommendation
75 |
76 | return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
77 |
78 | requirement += ".a" if bundler_gem_version.prerelease?
79 |
80 | requirement
81 | end
82 |
83 | def load_bundler!
84 | ENV["BUNDLE_GEMFILE"] ||= gemfile
85 |
86 | activate_bundler
87 | end
88 |
89 | def activate_bundler
90 | gem_error = activation_error_handling do
91 | gem "bundler", bundler_requirement
92 | end
93 | return if gem_error.nil?
94 | require_error = activation_error_handling do
95 | require "bundler/version"
96 | end
97 | return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98 | 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}'`"
99 | exit 42
100 | end
101 |
102 | def activation_error_handling
103 | yield
104 | nil
105 | rescue StandardError, LoadError => e
106 | e
107 | end
108 | end
109 |
110 | m.load_bundler!
111 |
112 | if m.invoked_as_script?
113 | load Gem.bin_path("bundler", "bundle")
114 | end
115 |
--------------------------------------------------------------------------------
/app/views/admin/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Dashboard
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Earnings (Monthly)
13 |
$40,000
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Earnings (Annual)
31 |
$215,000
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
Tasks
48 |
49 |
50 |
51 |
50%
52 |
53 |
54 |
55 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | Pending Requests
78 |
18
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/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 | # config.active_storage.service = :amazon
20 |
21 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
22 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
23 | # config.require_master_key = true
24 |
25 | # Disable serving static files from the `/public` folder by default since
26 | # Apache or NGINX already handles this.
27 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
28 |
29 | # Compress CSS using a preprocessor.
30 | # config.assets.css_compressor = :sass
31 |
32 | # Do not fallback to assets pipeline if a precompiled asset is missed.
33 | config.assets.compile = false
34 |
35 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36 | # config.asset_host = "http://assets.example.com"
37 |
38 | # Specifies the header that your server uses for sending files.
39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
40 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
41 |
42 | # Store uploaded files on the local file system (see config/storage.yml for options).
43 | config.active_storage.service = :local
44 |
45 | # Mount Action Cable outside main process or domain.
46 | # config.action_cable.mount_path = nil
47 | # config.action_cable.url = "wss://example.com/cable"
48 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
49 |
50 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
51 | # config.force_ssl = true
52 |
53 | # Include generic and useful information about system operation, but avoid logging too much
54 | # information to avoid inadvertent exposure of personally identifiable information (PII).
55 | config.log_level = :info
56 |
57 | # Prepend all log lines with the following tags.
58 | config.log_tags = [ :request_id ]
59 |
60 | # Use a different cache store in production.
61 | # config.cache_store = :mem_cache_store
62 |
63 | # Use a real queuing backend for Active Job (and separate queues per environment).
64 | # config.active_job.queue_adapter = :resque
65 | # config.active_job.queue_name_prefix = "ecommerce_showzim_production"
66 |
67 | config.action_mailer.perform_caching = false
68 |
69 | # Ignore bad email addresses and do not raise email delivery errors.
70 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
71 | # config.action_mailer.raise_delivery_errors = false
72 |
73 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
74 | # the I18n.default_locale when a translation cannot be found).
75 | config.i18n.fallbacks = true
76 |
77 | # Don't log any deprecations.
78 | config.active_support.report_deprecations = false
79 |
80 | # Use default logging formatter so that PID and timestamp are not suppressed.
81 | config.log_formatter = ::Logger::Formatter.new
82 |
83 | # Use a different logger for distributed setups.
84 | # require "syslog/logger"
85 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
86 |
87 | if ENV["RAILS_LOG_TO_STDOUT"].present?
88 | logger = ActiveSupport::Logger.new(STDOUT)
89 | logger.formatter = config.log_formatter
90 | config.logger = ActiveSupport::TaggedLogging.new(logger)
91 | end
92 |
93 | # Do not dump schema after migrations.
94 | config.active_record.dump_schema_after_migration = false
95 | end
96 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # This file is auto-generated from the current state of the database. Instead
2 | # of editing this file, please use the migrations feature of Active Record to
3 | # incrementally modify your database, and then regenerate this schema definition.
4 | #
5 | # This file is the source Rails uses to define your schema when running `bin/rails
6 | # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7 | # be faster and is potentially less error prone than running all of your
8 | # migrations from scratch. Old migrations may fail to apply correctly if those
9 | # migrations use external dependencies or application code.
10 | #
11 | # It's strongly recommended that you check this file into your version control system.
12 |
13 | ActiveRecord::Schema[7.0].define(version: 2023_02_04_002530) do
14 | # These are extensions that must be enabled in order to support this database
15 | enable_extension "plpgsql"
16 |
17 | # Custom types defined in this database.
18 | # Note that some types may not work with other database engines. Be careful if changing database.
19 | create_enum "role_user", ["user", "admin"]
20 |
21 | create_table "active_storage_attachments", force: :cascade do |t|
22 | t.string "name", null: false
23 | t.string "record_type", null: false
24 | t.bigint "record_id", null: false
25 | t.bigint "blob_id", null: false
26 | t.datetime "created_at", null: false
27 | t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
28 | t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
29 | end
30 |
31 | create_table "active_storage_blobs", force: :cascade do |t|
32 | t.string "key", null: false
33 | t.string "filename", null: false
34 | t.string "content_type"
35 | t.text "metadata"
36 | t.string "service_name", null: false
37 | t.bigint "byte_size", null: false
38 | t.string "checksum"
39 | t.datetime "created_at", null: false
40 | t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
41 | end
42 |
43 | create_table "active_storage_variant_records", force: :cascade do |t|
44 | t.bigint "blob_id", null: false
45 | t.string "variation_digest", null: false
46 | t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
47 | end
48 |
49 | create_table "addresses", force: :cascade do |t|
50 | t.string "name", null: false
51 | t.string "street", null: false
52 | t.string "neighborhood", null: false
53 | t.string "number", null: false
54 | t.string "address_detail"
55 | t.string "zipcode", null: false
56 | t.string "city", null: false
57 | t.string "state", null: false
58 | t.bigint "user_id", null: false
59 | t.datetime "created_at", null: false
60 | t.datetime "updated_at", null: false
61 | t.index ["user_id"], name: "index_addresses_on_user_id"
62 | end
63 |
64 | create_table "categories", force: :cascade do |t|
65 | t.string "name"
66 | t.integer "position"
67 | t.datetime "created_at", null: false
68 | t.datetime "updated_at", null: false
69 | end
70 |
71 | create_table "products", force: :cascade do |t|
72 | t.string "name", null: false
73 | t.text "description", null: false
74 | t.decimal "price", precision: 8, scale: 2, null: false
75 | t.boolean "publish", default: false, null: false
76 | t.bigint "category_id", null: false
77 | t.datetime "created_at", null: false
78 | t.datetime "updated_at", null: false
79 | t.boolean "promo", default: false
80 | t.decimal "promo_price", default: "0.0"
81 | t.index ["category_id"], name: "index_products_on_category_id"
82 | end
83 |
84 | create_table "users", force: :cascade do |t|
85 | t.string "email", default: "", null: false
86 | t.string "encrypted_password", default: "", null: false
87 | t.string "reset_password_token"
88 | t.datetime "reset_password_sent_at"
89 | t.datetime "remember_created_at"
90 | t.string "name"
91 | t.string "phone"
92 | t.datetime "created_at", null: false
93 | t.datetime "updated_at", null: false
94 | t.enum "role", default: "user", null: false, enum_type: "role_user"
95 | t.index ["email"], name: "index_users_on_email", unique: true
96 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
97 | end
98 |
99 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
100 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
101 | add_foreign_key "addresses", "users"
102 | add_foreign_key "products", "categories"
103 | end
104 |
--------------------------------------------------------------------------------
/spec/requests/categories_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | # This spec was generated by rspec-rails when you ran the scaffold generator.
4 | # It demonstrates how one might use RSpec to test the controller code that
5 | # was generated by Rails when you ran the scaffold generator.
6 | #
7 | # It assumes that the implementation code is generated by the rails scaffold
8 | # generator. If you are using any extension libraries to generate different
9 | # controller code, this generated spec may or may not pass.
10 | #
11 | # It only uses APIs available in rails and/or rspec-rails. There are a number
12 | # of tools you can use to make these specs even more expressive, but we're
13 | # sticking to rails and rspec-rails APIs to keep things simple and stable.
14 |
15 | RSpec.describe "/categories", type: :request do
16 |
17 | # This should return the minimal set of attributes required to create a valid
18 | # Category. As you add validations to Category, be sure to
19 | # adjust the attributes here as well.
20 | let(:valid_attributes) {
21 | skip("Add a hash of attributes valid for your model")
22 | }
23 |
24 | let(:invalid_attributes) {
25 | skip("Add a hash of attributes invalid for your model")
26 | }
27 |
28 | describe "GET /index" do
29 | it "renders a successful response" do
30 | Category.create! valid_attributes
31 | get categories_url
32 | expect(response).to be_successful
33 | end
34 | end
35 |
36 | describe "GET /show" do
37 | it "renders a successful response" do
38 | category = Category.create! valid_attributes
39 | get category_url(category)
40 | expect(response).to be_successful
41 | end
42 | end
43 |
44 | describe "GET /new" do
45 | it "renders a successful response" do
46 | get new_category_url
47 | expect(response).to be_successful
48 | end
49 | end
50 |
51 | describe "GET /edit" do
52 | it "renders a successful response" do
53 | category = Category.create! valid_attributes
54 | get edit_category_url(category)
55 | expect(response).to be_successful
56 | end
57 | end
58 |
59 | describe "POST /create" do
60 | context "with valid parameters" do
61 | it "creates a new Category" do
62 | expect {
63 | post categories_url, params: { category: valid_attributes }
64 | }.to change(Category, :count).by(1)
65 | end
66 |
67 | it "redirects to the created category" do
68 | post categories_url, params: { category: valid_attributes }
69 | expect(response).to redirect_to(category_url(Category.last))
70 | end
71 | end
72 |
73 | context "with invalid parameters" do
74 | it "does not create a new Category" do
75 | expect {
76 | post categories_url, params: { category: invalid_attributes }
77 | }.to change(Category, :count).by(0)
78 | end
79 |
80 | it "renders a successful response (i.e. to display the 'new' template)" do
81 | post categories_url, params: { category: invalid_attributes }
82 | expect(response).to be_successful
83 | end
84 | end
85 | end
86 |
87 | describe "PATCH /update" do
88 | context "with valid parameters" do
89 | let(:new_attributes) {
90 | skip("Add a hash of attributes valid for your model")
91 | }
92 |
93 | it "updates the requested category" do
94 | category = Category.create! valid_attributes
95 | patch category_url(category), params: { category: new_attributes }
96 | category.reload
97 | skip("Add assertions for updated state")
98 | end
99 |
100 | it "redirects to the category" do
101 | category = Category.create! valid_attributes
102 | patch category_url(category), params: { category: new_attributes }
103 | category.reload
104 | expect(response).to redirect_to(category_url(category))
105 | end
106 | end
107 |
108 | context "with invalid parameters" do
109 | it "renders a successful response (i.e. to display the 'edit' template)" do
110 | category = Category.create! valid_attributes
111 | patch category_url(category), params: { category: invalid_attributes }
112 | expect(response).to be_successful
113 | end
114 | end
115 | end
116 |
117 | describe "DELETE /destroy" do
118 | it "destroys the requested category" do
119 | category = Category.create! valid_attributes
120 | expect {
121 | delete category_url(category)
122 | }.to change(Category, :count).by(-1)
123 | end
124 |
125 | it "redirects to the categories list" do
126 | category = Category.create! valid_attributes
127 | delete category_url(category)
128 | expect(response).to redirect_to(categories_url)
129 | end
130 | end
131 | end
132 |
--------------------------------------------------------------------------------
/config/initializers/simple_form.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Uncomment this and change the path if necessary to include your own
4 | # components.
5 | # See https://github.com/heartcombo/simple_form#custom-components to know
6 | # more about custom components.
7 | # Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
8 | #
9 | # Use this setup block to configure all options available in SimpleForm.
10 | SimpleForm.setup do |config|
11 | # Wrappers are used by the form builder to generate a
12 | # complete input. You can remove any component from the
13 | # wrapper, change the order or even add your own to the
14 | # stack. The options given below are used to wrap the
15 | # whole input.
16 | config.wrappers :default, class: :input,
17 | hint_class: :field_with_hint, error_class: :field_with_errors, valid_class: :field_without_errors do |b|
18 | ## Extensions enabled by default
19 | # Any of these extensions can be disabled for a
20 | # given input by passing: `f.input EXTENSION_NAME => false`.
21 | # You can make any of these extensions optional by
22 | # renaming `b.use` to `b.optional`.
23 |
24 | # Determines whether to use HTML5 (:email, :url, ...)
25 | # and required attributes
26 | b.use :html5
27 |
28 | # Calculates placeholders automatically from I18n
29 | # You can also pass a string as f.input placeholder: "Placeholder"
30 | b.use :placeholder
31 |
32 | ## Optional extensions
33 | # They are disabled unless you pass `f.input EXTENSION_NAME => true`
34 | # to the input. If so, they will retrieve the values from the model
35 | # if any exists. If you want to enable any of those
36 | # extensions by default, you can change `b.optional` to `b.use`.
37 |
38 | # Calculates maxlength from length validations for string inputs
39 | # and/or database column lengths
40 | b.optional :maxlength
41 |
42 | # Calculate minlength from length validations for string inputs
43 | b.optional :minlength
44 |
45 | # Calculates pattern from format validations for string inputs
46 | b.optional :pattern
47 |
48 | # Calculates min and max from length validations for numeric inputs
49 | b.optional :min_max
50 |
51 | # Calculates readonly automatically from readonly attributes
52 | b.optional :readonly
53 |
54 | ## Inputs
55 | # b.use :input, class: 'input', error_class: 'is-invalid', valid_class: 'is-valid'
56 | b.use :label_input
57 | b.use :hint, wrap_with: { tag: :span, class: :hint }
58 | b.use :error, wrap_with: { tag: :span, class: :error }
59 |
60 | ## full_messages_for
61 | # If you want to display the full error message for the attribute, you can
62 | # use the component :full_error, like:
63 | #
64 | # b.use :full_error, wrap_with: { tag: :span, class: :error }
65 | end
66 |
67 | # The default wrapper to be used by the FormBuilder.
68 | config.default_wrapper = :default
69 |
70 | # Define the way to render check boxes / radio buttons with labels.
71 | # Defaults to :nested for bootstrap config.
72 | # inline: input + label
73 | # nested: label > input
74 | config.boolean_style = :nested
75 |
76 | # Default class for buttons
77 | config.button_class = 'btn'
78 |
79 | # Method used to tidy up errors. Specify any Rails Array method.
80 | # :first lists the first message for each field.
81 | # Use :to_sentence to list all errors for each field.
82 | # config.error_method = :first
83 |
84 | # Default tag used for error notification helper.
85 | config.error_notification_tag = :div
86 |
87 | # CSS class to add for error notification helper.
88 | config.error_notification_class = 'error_notification'
89 |
90 | # Series of attempts to detect a default label method for collection.
91 | # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
92 |
93 | # Series of attempts to detect a default value method for collection.
94 | # config.collection_value_methods = [ :id, :to_s ]
95 |
96 | # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
97 | # config.collection_wrapper_tag = nil
98 |
99 | # You can define the class to use on all collection wrappers. Defaulting to none.
100 | # config.collection_wrapper_class = nil
101 |
102 | # You can wrap each item in a collection of radio/check boxes with a tag,
103 | # defaulting to :span.
104 | # config.item_wrapper_tag = :span
105 |
106 | # You can define a class to use in all item wrappers. Defaulting to none.
107 | # config.item_wrapper_class = nil
108 |
109 | # How the label text should be generated altogether with the required text.
110 | # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
111 |
112 | # You can define the class to use on all labels. Default is nil.
113 | # config.label_class = nil
114 |
115 | # You can define the default class to be used on forms. Can be overriden
116 | # with `html: { :class }`. Defaulting to none.
117 | # config.default_form_class = nil
118 |
119 | # You can define which elements should obtain additional classes
120 | # config.generate_additional_classes_for = [:wrapper, :label, :input]
121 |
122 | # Whether attributes are required by default (or not). Default is true.
123 | # config.required_by_default = true
124 |
125 | # Tell browsers whether to use the native HTML5 validations (novalidate form option).
126 | # These validations are enabled in SimpleForm's internal config but disabled by default
127 | # in this configuration, which is recommended due to some quirks from different browsers.
128 | # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
129 | # change this configuration to true.
130 | config.browser_validations = false
131 |
132 | # Custom mappings for input types. This should be a hash containing a regexp
133 | # to match as key, and the input type that will be used when the field name
134 | # matches the regexp as value.
135 | # config.input_mappings = { /count/ => :integer }
136 |
137 | # Custom wrappers for input types. This should be a hash containing an input
138 | # type as key and the wrapper that will be used for all inputs with specified type.
139 | # config.wrapper_mappings = { string: :prepend }
140 |
141 | # Namespaces where SimpleForm should look for custom input classes that
142 | # override default inputs.
143 | # config.custom_inputs_namespaces << "CustomInputs"
144 |
145 | # Default priority for time_zone inputs.
146 | # config.time_zone_priority = nil
147 |
148 | # Default priority for country inputs.
149 | # config.country_priority = nil
150 |
151 | # When false, do not use translations for labels.
152 | # config.translate_labels = true
153 |
154 | # Automatically discover new inputs in Rails' autoload path.
155 | # config.inputs_discovery = true
156 |
157 | # Cache SimpleForm inputs discovery
158 | # config.cache_discovery = !Rails.env.development?
159 |
160 | # Default class for inputs
161 | # config.input_class = nil
162 |
163 | # Define the default class of the input wrapper of the boolean input.
164 | config.boolean_label_class = 'checkbox'
165 |
166 | # Defines if the default input wrapper class should be included in radio
167 | # collection wrappers.
168 | # config.include_default_input_wrapper_class = true
169 |
170 | # Defines which i18n scope will be used in Simple Form.
171 | # config.i18n_scope = 'simple_form'
172 |
173 | # Defines validation classes to the input_field. By default it's nil.
174 | # config.input_field_valid_class = 'is-valid'
175 | # config.input_field_error_class = 'is-invalid'
176 | end
177 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actioncable (7.0.4)
5 | actionpack (= 7.0.4)
6 | activesupport (= 7.0.4)
7 | nio4r (~> 2.0)
8 | websocket-driver (>= 0.6.1)
9 | actionmailbox (7.0.4)
10 | actionpack (= 7.0.4)
11 | activejob (= 7.0.4)
12 | activerecord (= 7.0.4)
13 | activestorage (= 7.0.4)
14 | activesupport (= 7.0.4)
15 | mail (>= 2.7.1)
16 | net-imap
17 | net-pop
18 | net-smtp
19 | actionmailer (7.0.4)
20 | actionpack (= 7.0.4)
21 | actionview (= 7.0.4)
22 | activejob (= 7.0.4)
23 | activesupport (= 7.0.4)
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.4)
30 | actionview (= 7.0.4)
31 | activesupport (= 7.0.4)
32 | rack (~> 2.0, >= 2.2.0)
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.4)
37 | actionpack (= 7.0.4)
38 | activerecord (= 7.0.4)
39 | activestorage (= 7.0.4)
40 | activesupport (= 7.0.4)
41 | globalid (>= 0.6.0)
42 | nokogiri (>= 1.8.5)
43 | actionview (7.0.4)
44 | activesupport (= 7.0.4)
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.4)
50 | activesupport (= 7.0.4)
51 | globalid (>= 0.3.6)
52 | activemodel (7.0.4)
53 | activesupport (= 7.0.4)
54 | activerecord (7.0.4)
55 | activemodel (= 7.0.4)
56 | activesupport (= 7.0.4)
57 | activestorage (7.0.4)
58 | actionpack (= 7.0.4)
59 | activejob (= 7.0.4)
60 | activerecord (= 7.0.4)
61 | activesupport (= 7.0.4)
62 | marcel (~> 1.0)
63 | mini_mime (>= 1.1.0)
64 | activesupport (7.0.4)
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.1)
70 | public_suffix (>= 2.0.2, < 6.0)
71 | ast (2.4.2)
72 | awesome_print (1.9.2)
73 | aws-eventstream (1.2.0)
74 | aws-partitions (1.660.0)
75 | aws-sdk-core (3.167.0)
76 | aws-eventstream (~> 1, >= 1.0.2)
77 | aws-partitions (~> 1, >= 1.651.0)
78 | aws-sigv4 (~> 1.5)
79 | jmespath (~> 1, >= 1.6.1)
80 | aws-sdk-kms (1.59.0)
81 | aws-sdk-core (~> 3, >= 3.165.0)
82 | aws-sigv4 (~> 1.1)
83 | aws-sdk-s3 (1.117.1)
84 | aws-sdk-core (~> 3, >= 3.165.0)
85 | aws-sdk-kms (~> 1)
86 | aws-sigv4 (~> 1.4)
87 | aws-sigv4 (1.5.2)
88 | aws-eventstream (~> 1, >= 1.0.2)
89 | bcrypt (3.1.18)
90 | bindex (0.8.1)
91 | bootsnap (1.13.0)
92 | msgpack (~> 1.2)
93 | builder (3.2.4)
94 | capybara (3.37.1)
95 | addressable
96 | matrix
97 | mini_mime (>= 0.1.3)
98 | nokogiri (~> 1.8)
99 | rack (>= 1.6.0)
100 | rack-test (>= 0.6.3)
101 | regexp_parser (>= 1.5, < 3.0)
102 | xpath (~> 3.2)
103 | childprocess (4.1.0)
104 | coderay (1.1.3)
105 | concurrent-ruby (1.1.10)
106 | crack (0.4.5)
107 | rexml
108 | crass (1.0.6)
109 | cssbundling-rails (1.1.1)
110 | railties (>= 6.0.0)
111 | database_cleaner (2.0.1)
112 | database_cleaner-active_record (~> 2.0.0)
113 | database_cleaner-active_record (2.0.1)
114 | activerecord (>= 5.a)
115 | database_cleaner-core (~> 2.0.0)
116 | database_cleaner-core (2.0.1)
117 | debug (1.6.2)
118 | irb (>= 1.3.6)
119 | reline (>= 0.3.1)
120 | devise (4.8.1)
121 | bcrypt (~> 3.0)
122 | orm_adapter (~> 0.1)
123 | railties (>= 4.1.0)
124 | responders
125 | warden (~> 1.2.3)
126 | diff-lcs (1.5.0)
127 | digest (3.1.0)
128 | docile (1.4.0)
129 | dotenv (2.8.1)
130 | dotenv-rails (2.8.1)
131 | dotenv (= 2.8.1)
132 | railties (>= 3.2)
133 | erubi (1.11.0)
134 | factory_bot (6.2.1)
135 | activesupport (>= 5.0.0)
136 | factory_bot_rails (6.2.0)
137 | factory_bot (~> 6.2.0)
138 | railties (>= 5.0.0)
139 | faker (2.23.0)
140 | i18n (>= 1.8.11, < 2)
141 | ffi (1.15.5)
142 | globalid (1.0.0)
143 | activesupport (>= 5.0)
144 | hashdiff (1.0.1)
145 | i18n (1.12.0)
146 | concurrent-ruby (~> 1.0)
147 | image_processing (1.12.2)
148 | mini_magick (>= 4.9.5, < 5)
149 | ruby-vips (>= 2.0.17, < 3)
150 | io-console (0.5.11)
151 | irb (1.4.1)
152 | reline (>= 0.3.0)
153 | jbuilder (2.11.5)
154 | actionview (>= 5.0.0)
155 | activesupport (>= 5.0.0)
156 | jmespath (1.6.1)
157 | jsbundling-rails (1.0.3)
158 | railties (>= 6.0.0)
159 | json (2.6.2)
160 | loofah (2.19.0)
161 | crass (~> 1.0.2)
162 | nokogiri (>= 1.5.9)
163 | mail (2.7.1)
164 | mini_mime (>= 0.1.1)
165 | marcel (1.0.2)
166 | matrix (0.4.2)
167 | method_source (1.0.0)
168 | mini_magick (4.11.0)
169 | mini_mime (1.1.2)
170 | minitest (5.16.3)
171 | msgpack (1.5.6)
172 | net-imap (0.2.3)
173 | digest
174 | net-protocol
175 | strscan
176 | net-pop (0.1.1)
177 | digest
178 | net-protocol
179 | timeout
180 | net-protocol (0.1.3)
181 | timeout
182 | net-smtp (0.3.1)
183 | digest
184 | net-protocol
185 | timeout
186 | nio4r (2.5.8)
187 | nokogiri (1.13.8-aarch64-linux)
188 | racc (~> 1.4)
189 | nokogiri (1.13.8-x86_64-linux)
190 | racc (~> 1.4)
191 | orm_adapter (0.5.0)
192 | parallel (1.22.1)
193 | parser (3.1.2.1)
194 | ast (~> 2.4.1)
195 | pg (1.4.3)
196 | pry (0.14.1)
197 | coderay (~> 1.1)
198 | method_source (~> 1.0)
199 | pry-rails (0.3.9)
200 | pry (>= 0.10.4)
201 | public_suffix (5.0.0)
202 | puma (5.6.5)
203 | nio4r (~> 2.0)
204 | pundit (2.2.0)
205 | activesupport (>= 3.0.0)
206 | racc (1.6.0)
207 | rack (2.2.4)
208 | rack-test (2.0.2)
209 | rack (>= 1.3)
210 | rails (7.0.4)
211 | actioncable (= 7.0.4)
212 | actionmailbox (= 7.0.4)
213 | actionmailer (= 7.0.4)
214 | actionpack (= 7.0.4)
215 | actiontext (= 7.0.4)
216 | actionview (= 7.0.4)
217 | activejob (= 7.0.4)
218 | activemodel (= 7.0.4)
219 | activerecord (= 7.0.4)
220 | activestorage (= 7.0.4)
221 | activesupport (= 7.0.4)
222 | bundler (>= 1.15.0)
223 | railties (= 7.0.4)
224 | rails-dom-testing (2.0.3)
225 | activesupport (>= 4.2.0)
226 | nokogiri (>= 1.6)
227 | rails-html-sanitizer (1.4.3)
228 | loofah (~> 2.3)
229 | railties (7.0.4)
230 | actionpack (= 7.0.4)
231 | activesupport (= 7.0.4)
232 | method_source
233 | rake (>= 12.2)
234 | thor (~> 1.0)
235 | zeitwerk (~> 2.5)
236 | rainbow (3.1.1)
237 | rake (13.0.6)
238 | regexp_parser (2.5.0)
239 | reline (0.3.1)
240 | io-console (~> 0.5)
241 | responders (3.0.1)
242 | actionpack (>= 5.0)
243 | railties (>= 5.0)
244 | rexml (3.2.5)
245 | rspec-core (3.11.0)
246 | rspec-support (~> 3.11.0)
247 | rspec-expectations (3.11.1)
248 | diff-lcs (>= 1.2.0, < 2.0)
249 | rspec-support (~> 3.11.0)
250 | rspec-mocks (3.11.1)
251 | diff-lcs (>= 1.2.0, < 2.0)
252 | rspec-support (~> 3.11.0)
253 | rspec-rails (5.1.2)
254 | actionpack (>= 5.2)
255 | activesupport (>= 5.2)
256 | railties (>= 5.2)
257 | rspec-core (~> 3.10)
258 | rspec-expectations (~> 3.10)
259 | rspec-mocks (~> 3.10)
260 | rspec-support (~> 3.10)
261 | rspec-support (3.11.1)
262 | rubocop (1.36.0)
263 | json (~> 2.3)
264 | parallel (~> 1.10)
265 | parser (>= 3.1.2.1)
266 | rainbow (>= 2.2.2, < 4.0)
267 | regexp_parser (>= 1.8, < 3.0)
268 | rexml (>= 3.2.5, < 4.0)
269 | rubocop-ast (>= 1.20.1, < 2.0)
270 | ruby-progressbar (~> 1.7)
271 | unicode-display_width (>= 1.4.0, < 3.0)
272 | rubocop-ast (1.21.0)
273 | parser (>= 3.1.1.0)
274 | ruby-progressbar (1.11.0)
275 | ruby-vips (2.1.4)
276 | ffi (~> 1.12)
277 | rubyzip (2.3.2)
278 | selenium-webdriver (4.4.0)
279 | childprocess (>= 0.5, < 5.0)
280 | rexml (~> 3.2, >= 3.2.5)
281 | rubyzip (>= 1.2.2, < 3.0)
282 | websocket (~> 1.0)
283 | shoulda-matchers (5.2.0)
284 | activesupport (>= 5.2.0)
285 | simple_form (5.1.0)
286 | actionpack (>= 5.2)
287 | activemodel (>= 5.2)
288 | simplecov (0.21.2)
289 | docile (~> 1.1)
290 | simplecov-html (~> 0.11)
291 | simplecov_json_formatter (~> 0.1)
292 | simplecov-html (0.12.3)
293 | simplecov_json_formatter (0.1.4)
294 | sprockets (4.1.1)
295 | concurrent-ruby (~> 1.0)
296 | rack (> 1, < 3)
297 | sprockets-rails (3.4.2)
298 | actionpack (>= 5.2)
299 | activesupport (>= 5.2)
300 | sprockets (>= 3.0.0)
301 | stimulus-rails (1.1.0)
302 | railties (>= 6.0.0)
303 | strscan (3.0.4)
304 | thor (1.2.1)
305 | timeout (0.3.0)
306 | turbo-rails (1.3.0)
307 | actionpack (>= 6.0.0)
308 | activejob (>= 6.0.0)
309 | railties (>= 6.0.0)
310 | tzinfo (2.0.5)
311 | concurrent-ruby (~> 1.0)
312 | unicode-display_width (2.3.0)
313 | vcr (6.1.0)
314 | warden (1.2.9)
315 | rack (>= 2.0.9)
316 | web-console (4.2.0)
317 | actionview (>= 6.0.0)
318 | activemodel (>= 6.0.0)
319 | bindex (>= 0.4.0)
320 | railties (>= 6.0.0)
321 | webdrivers (5.1.0)
322 | nokogiri (~> 1.6)
323 | rubyzip (>= 1.3.0)
324 | selenium-webdriver (~> 4.0)
325 | webmock (3.18.1)
326 | addressable (>= 2.8.0)
327 | crack (>= 0.3.2)
328 | hashdiff (>= 0.4.0, < 2.0.0)
329 | websocket (1.2.9)
330 | websocket-driver (0.7.5)
331 | websocket-extensions (>= 0.1.0)
332 | websocket-extensions (0.1.5)
333 | xpath (3.2.0)
334 | nokogiri (~> 1.8)
335 | zeitwerk (2.6.0)
336 |
337 | PLATFORMS
338 | aarch64-linux
339 | x86_64-linux
340 |
341 | DEPENDENCIES
342 | awesome_print
343 | aws-sdk-s3
344 | bootsnap
345 | capybara
346 | cssbundling-rails
347 | database_cleaner
348 | debug
349 | devise
350 | dotenv-rails
351 | factory_bot_rails
352 | faker
353 | image_processing (>= 1.2)
354 | jbuilder
355 | jsbundling-rails
356 | pg
357 | pry-rails
358 | puma (~> 5.0)
359 | pundit
360 | rails (~> 7.0.4)
361 | rspec-rails
362 | rubocop
363 | selenium-webdriver
364 | shoulda-matchers
365 | simple_form
366 | simplecov
367 | sprockets-rails
368 | stimulus-rails
369 | turbo-rails
370 | tzinfo-data
371 | vcr
372 | web-console
373 | webdrivers
374 | webmock
375 |
376 | RUBY VERSION
377 | ruby 3.1.2p20
378 |
379 | BUNDLED WITH
380 | 2.3.26
381 |
--------------------------------------------------------------------------------
/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 = 'f83ea8236f71cc6d320d3aad2e56a838ddfbd72377890f5efc94f60be7ca6d13e687bdfab0dd9104e356c644ea99917010f9f20024da6a1f75634124b6cef6e6'
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 = 'ef24c5b616738cbbb7d0707d6b03179dccc27027ddc4ba29962288764feca394169279892dbeb8c246904593313329ba4a4d31b5db64dc2cf3a7a258285a2804'
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 = :get
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 | # ==> Turbolinks configuration
300 | # If your app is using Turbolinks, Turbolinks::Controller needs to be included to make redirection work correctly:
301 | #
302 | # ActiveSupport.on_load(:devise_failure_app) do
303 | # include Turbolinks::Controller
304 | # end
305 |
306 | # ==> Configuration for :registerable
307 |
308 | # When set to false, does not sign a user in automatically after their password is
309 | # changed. Defaults to true, so a user is signed in automatically after changing a password.
310 | # config.sign_in_after_change_password = true
311 | end
312 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@esbuild/android-arm@0.15.10":
6 | version "0.15.10"
7 | resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.10.tgz#a5f9432eb221afc243c321058ef25fe899886892"
8 | integrity sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==
9 |
10 | "@esbuild/linux-loong64@0.15.10":
11 | version "0.15.10"
12 | resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz#78a42897c2cf8db9fd5f1811f7590393b77774c7"
13 | integrity sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==
14 |
15 | "@hotwired/stimulus@^3.1.0":
16 | version "3.1.0"
17 | resolved "https://registry.yarnpkg.com/@hotwired/stimulus/-/stimulus-3.1.0.tgz#20215251e5afe6e0a3787285181ba1bfc9097df0"
18 | integrity sha512-iDMHUhiEJ1xFeicyHcZQQgBzhtk5mPR0QZO3L6wtqzMsJEk2TKECuCQTGKjm+KJTHVY0dKq1dOOAWvODjpd2Mg==
19 |
20 | "@hotwired/turbo-rails@^7.2.0":
21 | version "7.2.0"
22 | resolved "https://registry.yarnpkg.com/@hotwired/turbo-rails/-/turbo-rails-7.2.0.tgz#2081ed4e626fac9fd61ba5a4d1eeb53e6ea93b03"
23 | integrity sha512-RxJJGINeLa2lyI078LLSbqZDI7RarxTDMVlgKnsLvtFEn8Pa7ySEcDUxHp5YiLXGbLacAIH/dcfD0JfCWe5Dqw==
24 | dependencies:
25 | "@hotwired/turbo" "^7.2.0"
26 | "@rails/actioncable" "^7.0"
27 |
28 | "@hotwired/turbo@^7.2.0":
29 | version "7.2.0"
30 | resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-7.2.0.tgz#4ff90d80fda17e69b04a12bbf0a42f09953504f6"
31 | integrity sha512-CYr6N9NfqsjhmZx1xVQ8zYcDo4hTm7sTUpJydbNgMRyG+YfF/9ADIQQ2TtcBdkl2zi/12a3OTWX0UMzNZnAK9w==
32 |
33 | "@popperjs/core@^2.11.6":
34 | version "2.11.6"
35 | resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45"
36 | integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==
37 |
38 | "@rails/actioncable@^7.0":
39 | version "7.0.4"
40 | resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.0.4.tgz#70a3ca56809f7aaabb80af2f9c01ae51e1a8ed41"
41 | integrity sha512-tz4oM+Zn9CYsvtyicsa/AwzKZKL+ITHWkhiu7x+xF77clh2b4Rm+s6xnOgY/sGDWoFWZmtKsE95hxBPkgQQNnQ==
42 |
43 | anymatch@~3.1.2:
44 | version "3.1.2"
45 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
46 | integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
47 | dependencies:
48 | normalize-path "^3.0.0"
49 | picomatch "^2.0.4"
50 |
51 | binary-extensions@^2.0.0:
52 | version "2.2.0"
53 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
54 | integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
55 |
56 | bootstrap-icons@^1.9.1:
57 | version "1.9.1"
58 | resolved "https://registry.yarnpkg.com/bootstrap-icons/-/bootstrap-icons-1.9.1.tgz#cf22d91a25447645e45c49ebde4e56eafdfe761b"
59 | integrity sha512-d4ZkO30MIkAhQ2nNRJqKXJVEQorALGbLWTuRxyCTJF96lRIV6imcgMehWGJUiJMJhglN0o2tqLIeDnMdiQEE9g==
60 |
61 | bootstrap@^5.2.1:
62 | version "5.2.1"
63 | resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.2.1.tgz#45f97ff05cbe828bad807b014d8425f3aeb8ec3a"
64 | integrity sha512-UQi3v2NpVPEi1n35dmRRzBJFlgvWHYwyem6yHhuT6afYF+sziEt46McRbT//kVXZ7b1YUYEVGdXEH74Nx3xzGA==
65 |
66 | braces@~3.0.2:
67 | version "3.0.2"
68 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
69 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
70 | dependencies:
71 | fill-range "^7.0.1"
72 |
73 | "chokidar@>=3.0.0 <4.0.0":
74 | version "3.5.3"
75 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
76 | integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
77 | dependencies:
78 | anymatch "~3.1.2"
79 | braces "~3.0.2"
80 | glob-parent "~5.1.2"
81 | is-binary-path "~2.1.0"
82 | is-glob "~4.0.1"
83 | normalize-path "~3.0.0"
84 | readdirp "~3.6.0"
85 | optionalDependencies:
86 | fsevents "~2.3.2"
87 |
88 | esbuild-android-64@0.15.10:
89 | version "0.15.10"
90 | resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz#8a59a84acbf2eca96996cadc35642cf055c494f0"
91 | integrity sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==
92 |
93 | esbuild-android-arm64@0.15.10:
94 | version "0.15.10"
95 | resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz#f453851dc1d8c5409a38cf7613a33852faf4915d"
96 | integrity sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==
97 |
98 | esbuild-darwin-64@0.15.10:
99 | version "0.15.10"
100 | resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz#778bd29c8186ff47b176c8af58c08cf0fb8e6b86"
101 | integrity sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==
102 |
103 | esbuild-darwin-arm64@0.15.10:
104 | version "0.15.10"
105 | resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz#b30bbefb46dc3c5d4708b0435e52f6456578d6df"
106 | integrity sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==
107 |
108 | esbuild-freebsd-64@0.15.10:
109 | version "0.15.10"
110 | resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz#ab301c5f6ded5110dbdd611140bef1a7c2e99236"
111 | integrity sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==
112 |
113 | esbuild-freebsd-arm64@0.15.10:
114 | version "0.15.10"
115 | resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz#a5b09b867a6ff49110f52343b6f12265db63d43f"
116 | integrity sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==
117 |
118 | esbuild-linux-32@0.15.10:
119 | version "0.15.10"
120 | resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz#5282fe9915641caf9c8070e4ba2c3e16d358f837"
121 | integrity sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==
122 |
123 | esbuild-linux-64@0.15.10:
124 | version "0.15.10"
125 | resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz#f3726e85a00149580cb19f8abfabcbb96f5d52bb"
126 | integrity sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==
127 |
128 | esbuild-linux-arm64@0.15.10:
129 | version "0.15.10"
130 | resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz#2f0056e9d5286edb0185b56655caa8c574d8dbe7"
131 | integrity sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==
132 |
133 | esbuild-linux-arm@0.15.10:
134 | version "0.15.10"
135 | resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz#40a9270da3c8ffa32cf72e24a79883e323dff08d"
136 | integrity sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==
137 |
138 | esbuild-linux-mips64le@0.15.10:
139 | version "0.15.10"
140 | resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz#90ce1c4ee0202edb4ac69807dea77f7e5804abc4"
141 | integrity sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==
142 |
143 | esbuild-linux-ppc64le@0.15.10:
144 | version "0.15.10"
145 | resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz#782837ae7bd5b279178106c9dd801755a21fabdf"
146 | integrity sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==
147 |
148 | esbuild-linux-riscv64@0.15.10:
149 | version "0.15.10"
150 | resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz#d7420d806ece5174f24f4634303146f915ab4207"
151 | integrity sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==
152 |
153 | esbuild-linux-s390x@0.15.10:
154 | version "0.15.10"
155 | resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz#21fdf0cb3494a7fb520a71934e4dffce67fe47be"
156 | integrity sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==
157 |
158 | esbuild-netbsd-64@0.15.10:
159 | version "0.15.10"
160 | resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz#6c06b3107e3df53de381e6299184d4597db0440f"
161 | integrity sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==
162 |
163 | esbuild-openbsd-64@0.15.10:
164 | version "0.15.10"
165 | resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz#4daef5f5d8e74bbda53b65160029445d582570cf"
166 | integrity sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==
167 |
168 | esbuild-sunos-64@0.15.10:
169 | version "0.15.10"
170 | resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz#5fe7bef267a02f322fd249a8214d0274937388a7"
171 | integrity sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==
172 |
173 | esbuild-windows-32@0.15.10:
174 | version "0.15.10"
175 | resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz#48e3dde25ab0135579a288b30ab6ddef6d1f0b28"
176 | integrity sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==
177 |
178 | esbuild-windows-64@0.15.10:
179 | version "0.15.10"
180 | resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz#387a9515bef3fee502d277a5d0a2db49a4ecda05"
181 | integrity sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==
182 |
183 | esbuild-windows-arm64@0.15.10:
184 | version "0.15.10"
185 | resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz#5a6fcf2fa49e895949bf5495cf088ab1b43ae879"
186 | integrity sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==
187 |
188 | esbuild@^0.15.10:
189 | version "0.15.10"
190 | resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.10.tgz#85c2f8446e9b1fe04fae68daceacba033eedbd42"
191 | integrity sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==
192 | optionalDependencies:
193 | "@esbuild/android-arm" "0.15.10"
194 | "@esbuild/linux-loong64" "0.15.10"
195 | esbuild-android-64 "0.15.10"
196 | esbuild-android-arm64 "0.15.10"
197 | esbuild-darwin-64 "0.15.10"
198 | esbuild-darwin-arm64 "0.15.10"
199 | esbuild-freebsd-64 "0.15.10"
200 | esbuild-freebsd-arm64 "0.15.10"
201 | esbuild-linux-32 "0.15.10"
202 | esbuild-linux-64 "0.15.10"
203 | esbuild-linux-arm "0.15.10"
204 | esbuild-linux-arm64 "0.15.10"
205 | esbuild-linux-mips64le "0.15.10"
206 | esbuild-linux-ppc64le "0.15.10"
207 | esbuild-linux-riscv64 "0.15.10"
208 | esbuild-linux-s390x "0.15.10"
209 | esbuild-netbsd-64 "0.15.10"
210 | esbuild-openbsd-64 "0.15.10"
211 | esbuild-sunos-64 "0.15.10"
212 | esbuild-windows-32 "0.15.10"
213 | esbuild-windows-64 "0.15.10"
214 | esbuild-windows-arm64 "0.15.10"
215 |
216 | fill-range@^7.0.1:
217 | version "7.0.1"
218 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
219 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
220 | dependencies:
221 | to-regex-range "^5.0.1"
222 |
223 | fsevents@~2.3.2:
224 | version "2.3.2"
225 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
226 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
227 |
228 | glob-parent@~5.1.2:
229 | version "5.1.2"
230 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
231 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
232 | dependencies:
233 | is-glob "^4.0.1"
234 |
235 | immutable@^4.0.0:
236 | version "4.1.0"
237 | resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef"
238 | integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==
239 |
240 | inputmask@^5.0.7:
241 | version "5.0.7"
242 | resolved "https://registry.yarnpkg.com/inputmask/-/inputmask-5.0.7.tgz#b04d5d4e1c85018893c3c8edb1a9f074b051007f"
243 | integrity sha512-rUxbRDS25KEib+c/Ow+K01oprU/+EK9t9SOPC8ov94/ftULGDqj1zOgRU/Hko6uzoKRMdwCfuhAafJ/Wk2wffQ==
244 |
245 | is-binary-path@~2.1.0:
246 | version "2.1.0"
247 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
248 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
249 | dependencies:
250 | binary-extensions "^2.0.0"
251 |
252 | is-extglob@^2.1.1:
253 | version "2.1.1"
254 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
255 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
256 |
257 | is-glob@^4.0.1, is-glob@~4.0.1:
258 | version "4.0.3"
259 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
260 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
261 | dependencies:
262 | is-extglob "^2.1.1"
263 |
264 | is-number@^7.0.0:
265 | version "7.0.0"
266 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
267 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
268 |
269 | jquery@^3.6.1:
270 | version "3.6.1"
271 | resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16"
272 | integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==
273 |
274 | normalize-path@^3.0.0, normalize-path@~3.0.0:
275 | version "3.0.0"
276 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
277 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
278 |
279 | picomatch@^2.0.4, picomatch@^2.2.1:
280 | version "2.3.1"
281 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
282 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
283 |
284 | readdirp@~3.6.0:
285 | version "3.6.0"
286 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
287 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
288 | dependencies:
289 | picomatch "^2.2.1"
290 |
291 | sass@^1.55.0:
292 | version "1.55.0"
293 | resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c"
294 | integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==
295 | dependencies:
296 | chokidar ">=3.0.0 <4.0.0"
297 | immutable "^4.0.0"
298 | source-map-js ">=0.6.2 <2.0.0"
299 |
300 | "source-map-js@>=0.6.2 <2.0.0":
301 | version "1.0.2"
302 | resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
303 | integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
304 |
305 | to-regex-range@^5.0.1:
306 | version "5.0.1"
307 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
308 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
309 | dependencies:
310 | is-number "^7.0.0"
311 |
--------------------------------------------------------------------------------