├── log
└── .keep
├── storage
└── .keep
├── tmp
├── .keep
├── pids
│ └── .keep
└── storage
│ └── .keep
├── vendor
├── .keep
└── javascript
│ └── .keep
├── lib
├── assets
│ └── .keep
└── tasks
│ └── .keep
├── public
├── favicon.ico
├── apple-touch-icon.png
├── apple-touch-icon-precomposed.png
├── robots.txt
├── 500.html
├── 422.html
└── 404.html
├── test
├── helpers
│ └── .keep
├── mailers
│ └── .keep
├── models
│ ├── .keep
│ └── greeting_test.rb
├── system
│ └── .keep
├── controllers
│ ├── .keep
│ └── api
│ │ └── greetings_controller_test.rb
├── integration
│ └── .keep
├── fixtures
│ ├── files
│ │ └── .keep
│ └── greetings.yml
├── application_system_test_case.rb
├── channels
│ └── application_cable
│ │ └── connection_test.rb
└── test_helper.rb
├── .ruby-version
├── app
├── assets
│ ├── images
│ │ └── .keep
│ ├── config
│ │ └── manifest.js
│ └── stylesheets
│ │ └── application.css
├── models
│ ├── concerns
│ │ └── .keep
│ ├── greeting.rb
│ └── application_record.rb
├── controllers
│ ├── concerns
│ │ └── .keep
│ ├── application_controller.rb
│ └── api
│ │ └── greetings_controller.rb
├── views
│ └── layouts
│ │ ├── mailer.text.erb
│ │ ├── mailer.html.erb
│ │ └── application.html.erb
├── helpers
│ ├── application_helper.rb
│ └── api
│ │ └── greetings_helper.rb
├── channels
│ └── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
├── mailers
│ └── application_mailer.rb
├── javascript
│ ├── application.js
│ └── controllers
│ │ ├── hello_controller.js
│ │ ├── application.js
│ │ └── index.js
└── jobs
│ └── application_job.rb
├── bin
├── rake
├── importmap
├── rails
├── docker-entrypoint
├── setup
└── bundle
├── config
├── routes.rb
├── environment.rb
├── boot.rb
├── cable.yml
├── importmap.rb
├── credentials.yml.enc
├── initializers
│ ├── filter_parameter_logging.rb
│ ├── permissions_policy.rb
│ ├── assets.rb
│ ├── inflections.rb
│ └── content_security_policy.rb
├── locales
│ └── en.yml
├── storage.yml
├── application.rb
├── puma.rb
├── environments
│ ├── test.rb
│ ├── development.rb
│ └── production.rb
└── database.yml
├── db
├── seeds.rb
├── migrate
│ └── 20231109201540_create_greetings.rb
└── schema.rb
├── config.ru
├── package.json
├── Rakefile
├── .gitattributes
├── .stylelintrc.json
├── .dockerignore
├── .gitignore
├── LICENSE
├── .rubocop.yml
├── .github
└── workflows
│ └── linters.yml
├── Dockerfile
├── Gemfile
├── README.md
└── Gemfile.lock
/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/storage/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tmp/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vendor/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/system/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tmp/pids/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tmp/storage/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.2.2
2 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vendor/javascript/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/files/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/greeting.rb:
--------------------------------------------------------------------------------
1 | class Greeting < ApplicationRecord
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/api/greetings_helper.rb:
--------------------------------------------------------------------------------
1 | module Api::GreetingsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | primary_abstract_class
3 | end
4 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative "../config/boot"
3 | require "rake"
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/importmap:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require_relative "../config/application"
4 | require "importmap/commands"
5 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | namespace :api do
3 | resources :greetings, only: [:index]
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: 'from@example.com'
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path("../config/application", __dir__)
3 | require_relative "../config/boot"
4 | require "rails/commands"
5 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative "application"
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | greetings = ["Hello", "Hi", "Greetings", "Welcome", "Salutations"]
2 |
3 | greetings.each do |greeting|
4 | Greeting.create(message: greeting)
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/greeting_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class GreetingTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../stylesheets .css
3 | //= link_tree ../../javascript .js
4 | //= link_tree ../../../vendor/javascript .js
5 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 | Rails.application.load_server
7 |
--------------------------------------------------------------------------------
/app/javascript/application.js:
--------------------------------------------------------------------------------
1 | // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2 | import "@hotwired/turbo-rails"
3 | import "controllers"
4 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/test/controllers/api/greetings_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class Api::GreetingsControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/controllers/api/greetings_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::GreetingsController < ApplicationController
2 | def index
3 | greetings = Greeting.find(Random.new.rand(1..5))
4 | render json: greetings
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "stylelint": "^13.13.1",
4 | "stylelint-config-standard": "^21.0.0",
5 | "stylelint-csstree-validator": "^1.9.0",
6 | "stylelint-scss": "^3.21.0"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/bin/docker-entrypoint:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | # If running the rails server then create or migrate existing database
4 | if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
5 | ./bin/rails db:prepare
6 | fi
7 |
8 | exec "${@}"
9 |
--------------------------------------------------------------------------------
/db/migrate/20231109201540_create_greetings.rb:
--------------------------------------------------------------------------------
1 | class CreateGreetings < ActiveRecord::Migration[7.1]
2 | def change
3 | create_table :greetings do |t|
4 | t.string :message
5 |
6 | t.timestamps
7 | end
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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: redis
3 | url: redis://localhost:6379/1
4 |
5 | test:
6 | adapter: test
7 |
8 | production:
9 | adapter: redis
10 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
11 | channel_prefix: hello_rails_back_end_production
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 |
--------------------------------------------------------------------------------
/config/importmap.rb:
--------------------------------------------------------------------------------
1 | # Pin npm packages by running ./bin/importmap
2 |
3 | pin "application", preload: true
4 | pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
5 | pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
6 | pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
7 | pin_all_from "app/javascript/controllers", under: "controllers"
8 |
--------------------------------------------------------------------------------
/test/channels/application_cable/connection_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | module ApplicationCable
4 | class ConnectionTest < ActionCable::Connection::TestCase
5 | # test "connects with cookies" do
6 | # cookies.signed[:user_id] = 42
7 | #
8 | # connect
9 | #
10 | # assert_equal connection.user_id, "42"
11 | # end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/.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 | config/credentials/*.yml.enc diff=rails_credentials
9 | config/credentials.yml.enc diff=rails_credentials
10 |
--------------------------------------------------------------------------------
/test/fixtures/greetings.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the "{}" from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HelloRailsBackEnd
5 |
6 | <%= csrf_meta_tags %>
7 | <%= csp_meta_tag %>
8 |
9 | <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
10 | <%= javascript_importmap_tags %>
11 |
12 |
13 |
14 | <%= yield %>
15 |
16 |
17 |
--------------------------------------------------------------------------------
/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | ZsM+o29O1yywXy1UK3DgFalxyS3AvNVWG760UG/3R9buLJuPnRf+uiErzh3DCVH4QeZ7sH1+jIx7vBrnR8rX30n4rUNbkpzmZNMtrgsCcNP3EKcvkShoLQQ4xq0CUnyxzt8AEjKG+KfXg2+KMSQIw0crgRbN3/ekazYO1105MaRabf3o3ADk34cY+giIf4/n2orqpuVWPwDWmpcu0P+0dpSbw5rUdfY9Zopk84ZIOdwWtSYIsALQznpkxDf6mfDjYBEsFeSce44RkiEJ9DpzzSZl716RckdyB0aiPJmSMKFreqNz8o7QUedd2W0MUTqSDslZO3Lq0zYaB0kRnDopmSrjdc5c+llZCxhDrzoNGToVRnfbiBJzDpKBhp+Gbdba1HyzygOPUxHCdn9kvTU3McatWYFn--2anN7dyTjH6lYTQC--cRrNjzvf2J9rdjRvouMQ5A==
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require_relative '../config/environment'
3 | require 'rails/test_help'
4 |
5 | module ActiveSupport
6 | class TestCase
7 | # Run tests in parallel with specified workers
8 | parallelize(workers: :number_of_processors)
9 |
10 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
11 | fixtures :all
12 |
13 | # Add more helper methods to be used by all tests here...
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
4 | # Use this to limit dissemination of sensitive information.
5 | # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
6 | Rails.application.config.filter_parameters += [
7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8 | ]
9 |
--------------------------------------------------------------------------------
/config/initializers/permissions_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide HTTP permissions policy. For further
4 | # information see: https://developers.google.com/web/updates/2018/06/feature-policy
5 |
6 | # Rails.application.config.permissions_policy do |policy|
7 | # policy.camera :none
8 | # policy.gyroscope :none
9 | # policy.microphone :none
10 | # policy.usb :none
11 | # policy.fullscreen :self
12 | # policy.payment :self, "https://secure.example.com"
13 | # end
14 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = "1.0"
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/app/javascript/controllers/index.js:
--------------------------------------------------------------------------------
1 | // Import and register all your controllers from the importmap under controllers/*
2 |
3 | import { application } from "controllers/application"
4 |
5 | // Eager load all controllers defined in the import map under controllers/**/*_controller
6 | import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7 | eagerLoadControllersFrom("controllers", application)
8 |
9 | // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10 | // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11 | // lazyLoadControllersFrom("controllers", application)
12 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, "\\1en"
8 | # inflect.singular /^(ox)en/i, "\\1"
9 | # inflect.irregular "person", "people"
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym "RESTful"
16 | # end
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6 | * vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS
10 | * files in this directory. Styles in this file should be added after the last require_* statement.
11 | * It is generally better to create a new file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/.stylelintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["stylelint-config-standard"],
3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"],
4 | "rules": {
5 | "at-rule-no-unknown": [
6 | true,
7 | {
8 | "ignoreAtRules": [
9 | "tailwind",
10 | "apply",
11 | "variants",
12 | "responsive",
13 | "screen"
14 | ]
15 | }
16 | ],
17 | "scss/at-rule-no-unknown": [
18 | true,
19 | {
20 | "ignoreAtRules": [
21 | "tailwind",
22 | "apply",
23 | "variants",
24 | "responsive",
25 | "screen"
26 | ]
27 | }
28 | ],
29 | "csstree/validator": true
30 | },
31 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
32 | }
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2 |
3 | # Ignore git directory.
4 | /.git/
5 |
6 | # Ignore bundler config.
7 | /.bundle
8 |
9 | # Ignore all environment files (except templates).
10 | /.env*
11 | !/.env*.erb
12 |
13 | # Ignore all default key files.
14 | /config/master.key
15 | /config/credentials/*.key
16 |
17 | # Ignore all logfiles and tempfiles.
18 | /log/*
19 | /tmp/*
20 | !/log/.keep
21 | !/tmp/.keep
22 |
23 | # Ignore pidfiles, but keep the directory.
24 | /tmp/pids/*
25 | !/tmp/pids/.keep
26 |
27 | # Ignore storage (uploaded files in development and any SQLite databases).
28 | /storage/*
29 | !/storage/.keep
30 | /tmp/storage/*
31 | !/tmp/storage/.keep
32 |
33 | # Ignore assets.
34 | /node_modules/
35 | /app/assets/builds/*
36 | !/app/assets/builds/.keep
37 | /public/assets
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | # Ignore all environment files (except templates).
11 | /.env*
12 | !/.env*.erb
13 |
14 | # Ignore all logfiles and tempfiles.
15 | /log/*
16 | /tmp/*
17 | !/log/.keep
18 | !/tmp/.keep
19 |
20 | # Ignore pidfiles, but keep the directory.
21 | /tmp/pids/*
22 | !/tmp/pids/
23 | !/tmp/pids/.keep
24 |
25 | # Ignore storage (uploaded files in development and any SQLite databases).
26 | /storage/*
27 | !/storage/.keep
28 | /tmp/storage/*
29 | !/tmp/storage/
30 | !/tmp/storage/.keep
31 |
32 | /public/assets
33 |
34 | # Ignore master key for decrypting credentials and more.
35 | /config/master.key
36 | node_modules/
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization and
2 | # are automatically loaded by Rails. If you want to use locales other than
3 | # English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t "hello"
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t("hello") %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more about the API, please read the Rails Internationalization guide
20 | # at https://guides.rubyonrails.org/i18n.html.
21 | #
22 | # Be aware that YAML interprets the following case-insensitive strings as
23 | # booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
24 | # must be quoted to be interpreted as strings. For example:
25 | #
26 | # en:
27 | # "yes": yup
28 | # enabled: "ON"
29 |
30 | en:
31 | hello: "Hello world"
32 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require "fileutils"
3 |
4 | # path to your application root.
5 | APP_ROOT = File.expand_path("..", __dir__)
6 |
7 | def system!(*args)
8 | system(*args, exception: true)
9 | end
10 |
11 | FileUtils.chdir APP_ROOT do
12 | # This script is a way to set up or update your development environment automatically.
13 | # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14 | # Add necessary setup steps to this file.
15 |
16 | puts "== Installing dependencies =="
17 | system! "gem install bundler --conservative"
18 | system("bundle check") || system!("bundle install")
19 |
20 | # puts "\n== Copying sample files =="
21 | # unless File.exist?("config/database.yml")
22 | # FileUtils.cp "config/database.yml.sample", "config/database.yml"
23 | # end
24 |
25 | puts "\n== Preparing database =="
26 | system! "bin/rails db:prepare"
27 |
28 | puts "\n== Removing old logs and tempfiles =="
29 | system! "bin/rails log:clear tmp:clear"
30 |
31 | puts "\n== Restarting application server =="
32 | system! "bin/rails restart"
33 | end
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Ahmed Eid
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/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.1].define(version: 2023_11_09_201540) do
14 | # These are extensions that must be enabled in order to support this database
15 | enable_extension "plpgsql"
16 |
17 | create_table "greetings", force: :cascade do |t|
18 | t.string "message"
19 | t.datetime "created_at", null: false
20 | t.datetime "updated_at", null: false
21 | end
22 |
23 | end
24 |
--------------------------------------------------------------------------------
/config/initializers/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy.
4 | # See the Securing Rails Applications Guide for more information:
5 | # https://guides.rubyonrails.org/security.html#content-security-policy-header
6 |
7 | # Rails.application.configure do
8 | # config.content_security_policy do |policy|
9 | # policy.default_src :self, :https
10 | # policy.font_src :self, :https, :data
11 | # policy.img_src :self, :https, :data
12 | # policy.object_src :none
13 | # policy.script_src :self, :https
14 | # policy.style_src :self, :https
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 | #
19 | # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21 | # config.content_security_policy_nonce_directives = %w(script-src style-src)
22 | #
23 | # # Report violations without enforcing the policy.
24 | # # config.content_security_policy_report_only = true
25 | # end
26 |
--------------------------------------------------------------------------------
/config/storage.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local:
6 | service: Disk
7 | root: <%= Rails.root.join("storage") %>
8 |
9 | # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10 | # amazon:
11 | # service: S3
12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14 | # region: us-east-1
15 | # bucket: your_own_bucket-<%= Rails.env %>
16 |
17 | # Remember not to checkin your GCS keyfile to a repository
18 | # google:
19 | # service: GCS
20 | # project: your_project
21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22 | # bucket: your_own_bucket-<%= Rails.env %>
23 |
24 | # Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25 | # microsoft:
26 | # service: AzureStorage
27 | # storage_account_name: your_account_name
28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29 | # container: your_container_name-<%= Rails.env %>
30 |
31 | # mirror:
32 | # service: Mirror
33 | # primary: local
34 | # mirrors: [ amazon, google, microsoft ]
35 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative "boot"
2 |
3 | require "rails/all"
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module HelloRailsBackEnd
10 | class Application < Rails::Application
11 | # Initialize configuration defaults for originally generated Rails version.
12 | config.load_defaults 7.1
13 |
14 | config.middleware.insert_before ActionDispatch::Static, Rack::Cors do
15 | allow do
16 | origins "*"
17 | resource "*", headers: :any, methods: [:get, :post, :put, :patch, :delete, :options, :head]
18 | end
19 | end
20 | # Please, add to the `ignore` list any other `lib` subdirectories that do
21 | # not contain `.rb` files, or that should not be reloaded or eager loaded.
22 | # Common ones are `templates`, `generators`, or `middleware`, for example.
23 | config.autoload_lib(ignore: %w(assets tasks))
24 |
25 | # Configuration for the application, engines, and railties goes here.
26 | #
27 | # These settings can be overridden in specific environments using the files
28 | # in config/environments, which are processed later.
29 | #
30 | # config.time_zone = "Central Time (US & Canada)"
31 | # config.eager_load_paths << Rails.root.join("extras")
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/.rubocop.yml:
--------------------------------------------------------------------------------
1 | AllCops:
2 | NewCops: enable
3 | Exclude:
4 | - "db/**/*"
5 | - "bin/*"
6 | - "config/**/*"
7 | - "Guardfile"
8 | - "Rakefile"
9 | - "node_modules/**/*"
10 |
11 | DisplayCopNames: true
12 |
13 | Layout/LineLength:
14 | Max: 120
15 | Metrics/MethodLength:
16 | Include:
17 | - "app/controllers/*"
18 | - "app/models/*"
19 | Max: 20
20 | Metrics/AbcSize:
21 | Include:
22 | - "app/controllers/*"
23 | - "app/models/*"
24 | Max: 50
25 | Metrics/ClassLength:
26 | Max: 150
27 | Metrics/BlockLength:
28 | AllowedMethods: ['describe']
29 | Max: 30
30 |
31 | Style/Documentation:
32 | Enabled: false
33 | Style/ClassAndModuleChildren:
34 | Enabled: false
35 | Style/EachForSimpleLoop:
36 | Enabled: false
37 | Style/AndOr:
38 | Enabled: false
39 | Style/DefWithParentheses:
40 | Enabled: false
41 | Style/FrozenStringLiteralComment:
42 | EnforcedStyle: never
43 |
44 | Layout/HashAlignment:
45 | EnforcedColonStyle: key
46 | Layout/ExtraSpacing:
47 | AllowForAlignment: false
48 | Layout/MultilineMethodCallIndentation:
49 | Enabled: true
50 | EnforcedStyle: indented
51 | Lint/RaiseException:
52 | Enabled: false
53 | Lint/StructNewOverride:
54 | Enabled: false
55 | Style/HashEachMethods:
56 | Enabled: false
57 | Style/HashTransformKeys:
58 | Enabled: false
59 | Style/HashTransformValues:
60 | Enabled: false
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # This configuration file will be evaluated by Puma. The top-level methods that
2 | # are invoked here are part of Puma's configuration DSL. For more information
3 | # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
4 |
5 | # Puma can serve each request in a thread from an internal thread pool.
6 | # The `threads` method setting takes two numbers: a minimum and maximum.
7 | # Any libraries that use thread pools should be configured to match
8 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
9 | # and maximum; this matches the default thread size of Active Record.
10 | max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
11 | min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
12 | threads min_threads_count, max_threads_count
13 |
14 | # Specifies that the worker count should equal the number of processors in production.
15 | if ENV["RAILS_ENV"] == "production"
16 | require "concurrent-ruby"
17 | worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
18 | workers worker_count if worker_count > 1
19 | end
20 |
21 | # Specifies the `worker_timeout` threshold that Puma will use to wait before
22 | # terminating a worker in development environments.
23 | worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
24 |
25 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
26 | port ENV.fetch("PORT") { 3000 }
27 |
28 | # Specifies the `environment` that Puma will run in.
29 | environment ENV.fetch("RAILS_ENV") { "development" }
30 |
31 | # Specifies the `pidfile` that Puma will use.
32 | pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
33 |
34 | # Allow puma to be restarted by `bin/rails restart` command.
35 | plugin :tmp_restart
36 |
--------------------------------------------------------------------------------
/.github/workflows/linters.yml:
--------------------------------------------------------------------------------
1 | name: Linters
2 |
3 | on: pull_request
4 |
5 | env:
6 | FORCE_COLOR: 1
7 |
8 | jobs:
9 | rubocop:
10 | name: Rubocop
11 | runs-on: ubuntu-22.04
12 | steps:
13 | - uses: actions/checkout@v3
14 | - uses: actions/setup-ruby@v1
15 | with:
16 | ruby-version: 3.1.x
17 | - name: Setup Rubocop
18 | run: |
19 | gem install --no-document rubocop -v '>= 1.0, < 2.0' # https://docs.rubocop.org/en/stable/installation/
20 | [ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml
21 | - name: Rubocop Report
22 | run: rubocop --color
23 | stylelint:
24 | name: Stylelint
25 | runs-on: ubuntu-22.04
26 | steps:
27 | - uses: actions/checkout@v3
28 | - uses: actions/setup-node@v3
29 | with:
30 | node-version: "18.x"
31 | - name: Setup Stylelint
32 | run: |
33 | npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
34 | [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.stylelintrc.json
35 | - name: Stylelint Report
36 | run: npx stylelint "**/*.{css,scss}"
37 | nodechecker:
38 | name: node_modules checker
39 | runs-on: ubuntu-22.04
40 | steps:
41 | - uses: actions/checkout@v3
42 | - name: Check node_modules existence
43 | run: |
44 | if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
--------------------------------------------------------------------------------
/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax = docker/dockerfile:1
2 |
3 | # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
4 | ARG RUBY_VERSION=3.2.2
5 | FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
6 |
7 | # Rails app lives here
8 | WORKDIR /rails
9 |
10 | # Set production environment
11 | ENV RAILS_ENV="production" \
12 | BUNDLE_DEPLOYMENT="1" \
13 | BUNDLE_PATH="/usr/local/bundle" \
14 | BUNDLE_WITHOUT="development"
15 |
16 |
17 | # Throw-away build stage to reduce size of final image
18 | FROM base as build
19 |
20 | # Install packages needed to build gems
21 | RUN apt-get update -qq && \
22 | apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config
23 |
24 | # Install application gems
25 | COPY Gemfile Gemfile.lock ./
26 | RUN bundle install && \
27 | rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
28 | bundle exec bootsnap precompile --gemfile
29 |
30 | # Copy application code
31 | COPY . .
32 |
33 | # Precompile bootsnap code for faster boot times
34 | RUN bundle exec bootsnap precompile app/ lib/
35 |
36 | # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
37 | RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
38 |
39 |
40 | # Final stage for app image
41 | FROM base
42 |
43 | # Install packages needed for deployment
44 | RUN apt-get update -qq && \
45 | apt-get install --no-install-recommends -y curl libvips postgresql-client && \
46 | rm -rf /var/lib/apt/lists /var/cache/apt/archives
47 |
48 | # Copy built artifacts: gems, application
49 | COPY --from=build /usr/local/bundle /usr/local/bundle
50 | COPY --from=build /rails /rails
51 |
52 | # Run and own only the runtime files as a non-root user for security
53 | RUN useradd rails --create-home --shell /bin/bash && \
54 | chown -R rails:rails db log storage tmp
55 | USER rails:rails
56 |
57 | # Entrypoint prepares the database.
58 | ENTRYPOINT ["/rails/bin/docker-entrypoint"]
59 |
60 | # Start the server by default, this can be overwritten at runtime
61 | EXPOSE 3000
62 | CMD ["./bin/rails", "server"]
63 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | ruby '3.2.2'
4 |
5 | # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
6 | gem 'rails', '~> 7.1.1'
7 |
8 | # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
9 | gem 'sprockets-rails'
10 |
11 | # Use postgresql as the database for Active Record
12 | gem 'pg', '~> 1.1'
13 |
14 | # Use the Puma web server [https://github.com/puma/puma]
15 | gem 'puma', '>= 5.0'
16 |
17 | # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
18 | gem 'importmap-rails'
19 |
20 | # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
21 | gem 'turbo-rails'
22 |
23 | # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
24 | gem 'stimulus-rails'
25 |
26 | # Build JSON APIs with ease [https://github.com/rails/jbuilder]
27 | gem 'jbuilder'
28 | gem 'rubocop', '>= 1.0', '< 2.0'
29 | # Use Redis adapter to run Action Cable in production
30 | gem 'rack-cors'
31 | gem 'redis', '>= 4.0.1'
32 |
33 | # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
34 | # gem "kredis"
35 |
36 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
37 | # gem "bcrypt", "~> 3.1.7"
38 |
39 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40 | gem 'tzinfo-data', platforms: %i[windows jruby]
41 |
42 | # Reduces boot times through caching; required in config/boot.rb
43 | gem 'bootsnap', require: false
44 |
45 | # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
46 | # gem "image_processing", "~> 1.2"
47 |
48 | group :development, :test do
49 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
50 | gem 'debug', platforms: %i[mri windows]
51 | end
52 |
53 | group :development do
54 | # Use console on exceptions pages [https://github.com/rails/web-console]
55 | gem 'web-console'
56 |
57 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
58 | # gem "rack-mini-profiler"
59 |
60 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
61 | # gem "spring"
62 | end
63 |
64 | group :test do
65 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
66 | gem 'capybara'
67 | gem 'selenium-webdriver'
68 | end
69 |
--------------------------------------------------------------------------------
/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 | # While tests run files are not watched, reloading is not necessary.
12 | config.enable_reloading = false
13 |
14 | # Eager loading loads your entire application. When running a single test locally,
15 | # this is usually not necessary, and can slow down your test suite. However, it's
16 | # recommended that you enable it in continuous integration systems to ensure eager
17 | # loading is working properly before deploying your code.
18 | config.eager_load = ENV["CI"].present?
19 |
20 | # Configure public file server for tests with Cache-Control for performance.
21 | config.public_file_server.enabled = true
22 | config.public_file_server.headers = {
23 | "Cache-Control" => "public, max-age=#{1.hour.to_i}"
24 | }
25 |
26 | # Show full error reports and disable caching.
27 | config.consider_all_requests_local = true
28 | config.action_controller.perform_caching = false
29 | config.cache_store = :null_store
30 |
31 | # Raise exceptions instead of rendering exception templates.
32 | config.action_dispatch.show_exceptions = :rescuable
33 |
34 | # Disable request forgery protection in test environment.
35 | config.action_controller.allow_forgery_protection = false
36 |
37 | # Store uploaded files on the local file system in a temporary directory.
38 | config.active_storage.service = :test
39 |
40 | config.action_mailer.perform_caching = false
41 |
42 | # Tell Action Mailer not to deliver emails to the real world.
43 | # The :test delivery method accumulates sent emails in the
44 | # ActionMailer::Base.deliveries array.
45 | config.action_mailer.delivery_method = :test
46 |
47 | # Print deprecation notices to the stderr.
48 | config.active_support.deprecation = :stderr
49 |
50 | # Raise exceptions for disallowed deprecations.
51 | config.active_support.disallowed_deprecation = :raise
52 |
53 | # Tell Active Support which deprecation messages to disallow.
54 | config.active_support.disallowed_deprecation_warnings = []
55 |
56 | # Raises error for missing translations.
57 | # config.i18n.raise_on_missing_translations = true
58 |
59 | # Annotate rendered view with file names.
60 | # config.action_view.annotate_rendered_view_with_filenames = true
61 |
62 | # Raise error when a before_action's only/except options reference missing actions
63 | config.action_controller.raise_on_missing_callback_actions = true
64 | end
65 |
--------------------------------------------------------------------------------
/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.enable_reloading = true
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 | # Highlight code that enqueued background job in logs.
60 | config.active_job.verbose_enqueue_logs = true
61 |
62 | # Suppress logger output for asset requests.
63 | config.assets.quiet = true
64 |
65 | # Raises error for missing translations.
66 | # config.i18n.raise_on_missing_translations = true
67 |
68 | # Annotate rendered view with file names.
69 | # config.action_view.annotate_rendered_view_with_filenames = true
70 |
71 | # Uncomment if you wish to allow Action Cable access from any origin.
72 | # config.action_cable.disable_request_forgery_protection = true
73 |
74 | # Raise error when a before_action's only/except options reference missing actions
75 | config.action_controller.raise_on_missing_callback_actions = true
76 | end
77 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'bundle' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "rubygems"
12 |
13 | m = Module.new do
14 | module_function
15 |
16 | def invoked_as_script?
17 | File.expand_path($0) == File.expand_path(__FILE__)
18 | end
19 |
20 | def env_var_version
21 | ENV["BUNDLER_VERSION"]
22 | end
23 |
24 | def cli_arg_version
25 | return unless invoked_as_script? # don't want to hijack other binstubs
26 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27 | bundler_version = nil
28 | update_index = nil
29 | ARGV.each_with_index do |a, i|
30 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31 | bundler_version = a
32 | end
33 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34 | bundler_version = $1
35 | update_index = i
36 | end
37 | bundler_version
38 | end
39 |
40 | def gemfile
41 | gemfile = ENV["BUNDLE_GEMFILE"]
42 | return gemfile if gemfile && !gemfile.empty?
43 |
44 | File.expand_path("../Gemfile", __dir__)
45 | end
46 |
47 | def lockfile
48 | lockfile =
49 | case File.basename(gemfile)
50 | when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51 | else "#{gemfile}.lock"
52 | end
53 | File.expand_path(lockfile)
54 | end
55 |
56 | def lockfile_version
57 | return unless File.file?(lockfile)
58 | lockfile_contents = File.read(lockfile)
59 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60 | Regexp.last_match(1)
61 | end
62 |
63 | def bundler_requirement
64 | @bundler_requirement ||=
65 | env_var_version ||
66 | cli_arg_version ||
67 | bundler_requirement_for(lockfile_version)
68 | end
69 |
70 | def bundler_requirement_for(version)
71 | return "#{Gem::Requirement.default}.a" unless version
72 |
73 | bundler_gem_version = Gem::Version.new(version)
74 |
75 | bundler_gem_version.approximate_recommendation
76 | end
77 |
78 | def load_bundler!
79 | ENV["BUNDLE_GEMFILE"] ||= gemfile
80 |
81 | activate_bundler
82 | end
83 |
84 | def activate_bundler
85 | gem_error = activation_error_handling do
86 | gem "bundler", bundler_requirement
87 | end
88 | return if gem_error.nil?
89 | require_error = activation_error_handling do
90 | require "bundler/version"
91 | end
92 | return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93 | warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94 | exit 42
95 | end
96 |
97 | def activation_error_handling
98 | yield
99 | nil
100 | rescue StandardError, LoadError => e
101 | e
102 | end
103 | end
104 |
105 | m.load_bundler!
106 |
107 | if m.invoked_as_script?
108 | load Gem.bin_path("bundler", "bundle")
109 | end
110 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 9.3 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On macOS with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On Windows:
8 | # gem install pg
9 | # Choose the win32 build.
10 | # Install PostgreSQL and put its /bin directory on your path.
11 | #
12 | # Configure Using Gemfile
13 | # gem "pg"
14 | #
15 | default: &default
16 | adapter: postgresql
17 | encoding: unicode
18 | # For details on connection pooling, see Rails configuration guide
19 | # https://guides.rubyonrails.org/configuring.html#database-pooling
20 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
21 |
22 | development:
23 | <<: *default
24 | database: hello_rails_back_end_development
25 |
26 | # The specified database role being used to connect to PostgreSQL.
27 | # To create additional roles in PostgreSQL see `$ createuser --help`.
28 | # When left blank, PostgreSQL will use the default role. This is
29 | # the same name as the operating system user running Rails.
30 | #username: hello_rails_back_end
31 |
32 | # The password associated with the PostgreSQL role (username).
33 | #password:
34 |
35 | # Connect on a TCP socket. Omitted by default since the client uses a
36 | # domain socket that doesn't need configuration. Windows does not have
37 | # domain sockets, so uncomment these lines.
38 | #host: localhost
39 |
40 | # The TCP port the server listens on. Defaults to 5432.
41 | # If your server runs on a different port number, change accordingly.
42 | #port: 5432
43 |
44 | # Schema search path. The server defaults to $user,public
45 | #schema_search_path: myapp,sharedapp,public
46 |
47 | # Minimum log levels, in increasing order:
48 | # debug5, debug4, debug3, debug2, debug1,
49 | # log, notice, warning, error, fatal, and panic
50 | # Defaults to warning.
51 | #min_messages: notice
52 |
53 | # Warning: The database defined as "test" will be erased and
54 | # re-generated from your development database when you run "rake".
55 | # Do not set this db to the same as development or production.
56 | test:
57 | <<: *default
58 | database: hello_rails_back_end_test
59 |
60 | # As with config/credentials.yml, you never want to store sensitive information,
61 | # like your database password, in your source code. If your source code is
62 | # ever seen by anyone, they now have access to your database.
63 | #
64 | # Instead, provide the password or a full connection URL as an environment
65 | # variable when you boot the app. For example:
66 | #
67 | # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
68 | #
69 | # If the connection URL is provided in the special DATABASE_URL environment
70 | # variable, Rails will automatically merge its configuration values on top of
71 | # the values provided in this file. Alternatively, you can specify a connection
72 | # URL environment variable explicitly:
73 | #
74 | # production:
75 | # url: <%= ENV["MY_APP_DATABASE_URL"] %>
76 | #
77 | # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
78 | # for a full overview on how database connection configuration can be specified.
79 | #
80 | production:
81 | <<: *default
82 | database: hello_rails_back_end_production
83 | username: hello_rails_back_end
84 | password: <%= ENV["HELLO_RAILS_BACK_END_DATABASE_PASSWORD"] %>
85 |
--------------------------------------------------------------------------------
/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.enable_reloading = false
8 |
9 | # Eager load code on boot. This eager loads most of Rails and
10 | # your application in memory, allowing both threaded web servers
11 | # and those relying on copy on write to perform better.
12 | # Rake tasks automatically ignore this option for performance.
13 | config.eager_load = true
14 |
15 | # Full error reports are disabled and caching is turned on.
16 | config.consider_all_requests_local = false
17 | config.action_controller.perform_caching = true
18 |
19 | # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
20 | # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
21 | # config.require_master_key = true
22 |
23 | # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
24 | config.public_file_server.enabled = true
25 |
26 | # Compress CSS using a preprocessor.
27 | # config.assets.css_compressor = :sass
28 |
29 | # Do not fallback to assets pipeline if a precompiled asset is missed.
30 | config.assets.compile = false
31 |
32 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
33 | # config.asset_host = "http://assets.example.com"
34 |
35 | # Specifies the header that your server uses for sending files.
36 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
37 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
38 |
39 | # Store uploaded files on the local file system (see config/storage.yml for options).
40 | config.active_storage.service = :local
41 |
42 | # Mount Action Cable outside main process or domain.
43 | # config.action_cable.mount_path = nil
44 | # config.action_cable.url = "wss://example.com/cable"
45 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
46 |
47 | # Assume all access to the app is happening through a SSL-terminating reverse proxy.
48 | # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
49 | # config.assume_ssl = true
50 |
51 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
52 | config.force_ssl = true
53 |
54 | # Log to STDOUT by default
55 | config.logger = ActiveSupport::Logger.new(STDOUT)
56 | .tap { |logger| logger.formatter = ::Logger::Formatter.new }
57 | .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
58 |
59 | # Prepend all log lines with the following tags.
60 | config.log_tags = [ :request_id ]
61 |
62 | # Info include generic and useful information about system operation, but avoids logging too much
63 | # information to avoid inadvertent exposure of personally identifiable information (PII). If you
64 | # want to log everything, set the level to "debug".
65 | config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
66 |
67 | # Use a different cache store in production.
68 | # config.cache_store = :mem_cache_store
69 |
70 | # Use a real queuing backend for Active Job (and separate queues per environment).
71 | # config.active_job.queue_adapter = :resque
72 | # config.active_job.queue_name_prefix = "hello_rails_back_end_production"
73 |
74 | config.action_mailer.perform_caching = false
75 |
76 | # Ignore bad email addresses and do not raise email delivery errors.
77 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
78 | # config.action_mailer.raise_delivery_errors = false
79 |
80 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
81 | # the I18n.default_locale when a translation cannot be found).
82 | config.i18n.fallbacks = true
83 |
84 | # Don't log any deprecations.
85 | config.active_support.report_deprecations = false
86 |
87 | # Do not dump schema after migrations.
88 | config.active_record.dump_schema_after_migration = false
89 |
90 | # Enable DNS rebinding protection and other `Host` header attacks.
91 | # config.hosts = [
92 | # "example.com", # Allow requests from example.com
93 | # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
94 | # ]
95 | # Skip DNS rebinding protection for the default health check endpoint.
96 | # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
97 | end
98 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | hello_rails_back_end
4 |
5 |
6 |
7 | # 📗 Table of Contents
8 |
9 | - [📗 Table of Contents](#-table-of-contents)
10 | - [📖 hello\_rails\_front\_end ](#-hello_rails_back_end-)
11 | - [💻 link to front end ](#-link-to-front-end-)
12 | - [🛠 Built With ](#-built-with-)
13 | - [Tech Stack ](#tech-stack-)
14 | - [Key Features ](#key-features-)
15 | - [💻 Getting Started ](#-getting-started-)
16 | - [Prerequisites](#prerequisites)
17 | - [Setup](#setup)
18 | - [Install](#install)
19 | - [Usage](#usage)
20 | - [👥 Author ](#-author-)
21 | - [🔭 Future Features ](#-future-features-)
22 | - [🤝 Contributing ](#-contributing-)
23 | - [⭐️ Show your support ](#️-show-your-support-)
24 | - [🙏 Acknowledgments ](#-acknowledgments-)
25 | - [📝 License ](#-license-)
26 |
27 |
28 |
29 | # 📖 hello_rails_back_end
30 |
31 | **hello_rails_back_end** Introducing 'hello-react-back-end,' a straightforward React-Redux application. It employs a primary App component with react-router for seamless navigation. A designated route directs users to the Greeting component, showcasing dynamic greeting messages retrieved from an external API. The application leverages Redux for efficient state management, focusing on handling API requests and dynamically updating the displayed greeting message.
32 |
33 | ## 💻 link to front end
34 |
35 |
36 | [Link to Front End](https://github.com/ahmedeid6842/hello-rails-back-end)
37 |
38 | (back to top)
39 |
40 |
41 | ## 🛠 Built With
42 |
43 | ### Tech Stack
44 |
45 |
46 | Technologies
47 |
51 |
52 |
53 | Linters
54 |
57 |
58 |
59 |
60 | ### Key Features
61 |
62 | - [x] **Integration of Ruby on Rails and React**
63 | - [x] **API Endpoint for Generating Random Greetings**
64 | - [x] **Navigation Using React Router**
65 | - [x] **State Management with Redux**
66 | - [x] **Setting the Static View as the Root**
67 |
68 |
69 | (back to top)
70 |
71 |
72 | ## 💻 Getting Started
73 |
74 | To get a local copy up and running, follow these steps.
75 |
76 | ### Prerequisites
77 |
78 | Before you begin, make sure you have the following prerequisites installed on your system:
79 |
80 | - Ruby: You need Ruby to run the Ruby on Rails application.
81 | - Bundler: Bundler is used to manage gem dependencies in your Ruby project.
82 |
83 | ### Setup
84 |
85 | Clone this repository to your desired folder:
86 |
87 | sh
88 | cd my-folder
89 | git clone https://github.com/ahmedeid6842/hello-react-back-end
90 |
91 | ### Install
92 |
93 | Install this project with:
94 |
95 | - npm install
96 | - npm start
97 |
98 | ### Usage
99 |
100 | To run the project, execute the following command:
101 |
102 | rails server
103 |
104 | **Ahmed Eid 🙋♂️**
105 | - Github: [@ahmedeid6842](https://github.com/ahmedeid6842/)
106 | - LinkedIn : [Ahmed Eid](https://www.linkedin.com/in/ahmed-eid-0018571b1/)
107 | - Twitter: [@ahmedeid2684](https://twitter.com/ahmedeid2684)
108 |
109 | (back to top)
110 |
111 |
112 | ## 🔭 Future Features
113 |
114 | - [ ] **Personalized Greetings**
115 |
116 |
117 | (back to top)
118 |
119 | ## 🤝 Contributing
120 |
121 | Contributions, issues, and feature requests are welcome!
122 |
123 | Feel free to check the [issues page](https://github.com/ahmedeid6842/hello-react-back-end/issues).
124 |
125 | (back to top)
126 |
127 | ## ⭐️ Show your support
128 |
129 | If you like this project please feel free to send me corrections for make it better I would feel glad to read your comments.
130 | And think If you enjoy gift me a star.
131 |
132 | (back to top)
133 |
134 | ## 🙏 Acknowledgments
135 |
136 | - Microverse for providing the opportunity to learn Git and GitHub in a collaborative environment.
137 |
138 | (back to top)
139 |
140 |
141 | ## 📝 License
142 |
143 | This project is licensed under the MIT License - you can click here to have more details [MIT](./LICENSE) licensed.
144 |
145 | (back to top)
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actioncable (7.1.1)
5 | actionpack (= 7.1.1)
6 | activesupport (= 7.1.1)
7 | nio4r (~> 2.0)
8 | websocket-driver (>= 0.6.1)
9 | zeitwerk (~> 2.6)
10 | actionmailbox (7.1.1)
11 | actionpack (= 7.1.1)
12 | activejob (= 7.1.1)
13 | activerecord (= 7.1.1)
14 | activestorage (= 7.1.1)
15 | activesupport (= 7.1.1)
16 | mail (>= 2.7.1)
17 | net-imap
18 | net-pop
19 | net-smtp
20 | actionmailer (7.1.1)
21 | actionpack (= 7.1.1)
22 | actionview (= 7.1.1)
23 | activejob (= 7.1.1)
24 | activesupport (= 7.1.1)
25 | mail (~> 2.5, >= 2.5.4)
26 | net-imap
27 | net-pop
28 | net-smtp
29 | rails-dom-testing (~> 2.2)
30 | actionpack (7.1.1)
31 | actionview (= 7.1.1)
32 | activesupport (= 7.1.1)
33 | nokogiri (>= 1.8.5)
34 | rack (>= 2.2.4)
35 | rack-session (>= 1.0.1)
36 | rack-test (>= 0.6.3)
37 | rails-dom-testing (~> 2.2)
38 | rails-html-sanitizer (~> 1.6)
39 | actiontext (7.1.1)
40 | actionpack (= 7.1.1)
41 | activerecord (= 7.1.1)
42 | activestorage (= 7.1.1)
43 | activesupport (= 7.1.1)
44 | globalid (>= 0.6.0)
45 | nokogiri (>= 1.8.5)
46 | actionview (7.1.1)
47 | activesupport (= 7.1.1)
48 | builder (~> 3.1)
49 | erubi (~> 1.11)
50 | rails-dom-testing (~> 2.2)
51 | rails-html-sanitizer (~> 1.6)
52 | activejob (7.1.1)
53 | activesupport (= 7.1.1)
54 | globalid (>= 0.3.6)
55 | activemodel (7.1.1)
56 | activesupport (= 7.1.1)
57 | activerecord (7.1.1)
58 | activemodel (= 7.1.1)
59 | activesupport (= 7.1.1)
60 | timeout (>= 0.4.0)
61 | activestorage (7.1.1)
62 | actionpack (= 7.1.1)
63 | activejob (= 7.1.1)
64 | activerecord (= 7.1.1)
65 | activesupport (= 7.1.1)
66 | marcel (~> 1.0)
67 | activesupport (7.1.1)
68 | base64
69 | bigdecimal
70 | concurrent-ruby (~> 1.0, >= 1.0.2)
71 | connection_pool (>= 2.2.5)
72 | drb
73 | i18n (>= 1.6, < 2)
74 | minitest (>= 5.1)
75 | mutex_m
76 | tzinfo (~> 2.0)
77 | addressable (2.8.5)
78 | public_suffix (>= 2.0.2, < 6.0)
79 | ast (2.4.2)
80 | base64 (0.2.0)
81 | bigdecimal (3.1.4)
82 | bindex (0.8.1)
83 | bootsnap (1.17.0)
84 | msgpack (~> 1.2)
85 | builder (3.2.4)
86 | capybara (3.39.2)
87 | addressable
88 | matrix
89 | mini_mime (>= 0.1.3)
90 | nokogiri (~> 1.8)
91 | rack (>= 1.6.0)
92 | rack-test (>= 0.6.3)
93 | regexp_parser (>= 1.5, < 3.0)
94 | xpath (~> 3.2)
95 | concurrent-ruby (1.2.2)
96 | connection_pool (2.4.1)
97 | crass (1.0.6)
98 | date (3.3.4)
99 | debug (1.8.0)
100 | irb (>= 1.5.0)
101 | reline (>= 0.3.1)
102 | drb (2.2.0)
103 | ruby2_keywords
104 | erubi (1.12.0)
105 | globalid (1.2.1)
106 | activesupport (>= 6.1)
107 | i18n (1.14.1)
108 | concurrent-ruby (~> 1.0)
109 | importmap-rails (1.2.3)
110 | actionpack (>= 6.0.0)
111 | activesupport (>= 6.0.0)
112 | railties (>= 6.0.0)
113 | io-console (0.6.0)
114 | irb (1.8.3)
115 | rdoc
116 | reline (>= 0.3.8)
117 | jbuilder (2.11.5)
118 | actionview (>= 5.0.0)
119 | activesupport (>= 5.0.0)
120 | json (2.6.3)
121 | language_server-protocol (3.17.0.3)
122 | loofah (2.21.4)
123 | crass (~> 1.0.2)
124 | nokogiri (>= 1.12.0)
125 | mail (2.8.1)
126 | mini_mime (>= 0.1.1)
127 | net-imap
128 | net-pop
129 | net-smtp
130 | marcel (1.0.2)
131 | matrix (0.4.2)
132 | mini_mime (1.1.5)
133 | minitest (5.20.0)
134 | msgpack (1.7.2)
135 | mutex_m (0.2.0)
136 | net-imap (0.4.4)
137 | date
138 | net-protocol
139 | net-pop (0.1.2)
140 | net-protocol
141 | net-protocol (0.2.2)
142 | timeout
143 | net-smtp (0.4.0)
144 | net-protocol
145 | nio4r (2.5.9)
146 | nokogiri (1.15.4-x86_64-linux)
147 | racc (~> 1.4)
148 | parallel (1.23.0)
149 | parser (3.2.2.4)
150 | ast (~> 2.4.1)
151 | racc
152 | pg (1.5.4)
153 | psych (5.1.1.1)
154 | stringio
155 | public_suffix (5.0.3)
156 | puma (6.4.0)
157 | nio4r (~> 2.0)
158 | racc (1.7.3)
159 | rack (3.0.8)
160 | rack-cors (2.0.1)
161 | rack (>= 2.0.0)
162 | rack-session (2.0.0)
163 | rack (>= 3.0.0)
164 | rack-test (2.1.0)
165 | rack (>= 1.3)
166 | rackup (2.1.0)
167 | rack (>= 3)
168 | webrick (~> 1.8)
169 | rails (7.1.1)
170 | actioncable (= 7.1.1)
171 | actionmailbox (= 7.1.1)
172 | actionmailer (= 7.1.1)
173 | actionpack (= 7.1.1)
174 | actiontext (= 7.1.1)
175 | actionview (= 7.1.1)
176 | activejob (= 7.1.1)
177 | activemodel (= 7.1.1)
178 | activerecord (= 7.1.1)
179 | activestorage (= 7.1.1)
180 | activesupport (= 7.1.1)
181 | bundler (>= 1.15.0)
182 | railties (= 7.1.1)
183 | rails-dom-testing (2.2.0)
184 | activesupport (>= 5.0.0)
185 | minitest
186 | nokogiri (>= 1.6)
187 | rails-html-sanitizer (1.6.0)
188 | loofah (~> 2.21)
189 | nokogiri (~> 1.14)
190 | railties (7.1.1)
191 | actionpack (= 7.1.1)
192 | activesupport (= 7.1.1)
193 | irb
194 | rackup (>= 1.0.0)
195 | rake (>= 12.2)
196 | thor (~> 1.0, >= 1.2.2)
197 | zeitwerk (~> 2.6)
198 | rainbow (3.1.1)
199 | rake (13.1.0)
200 | rdoc (6.6.0)
201 | psych (>= 4.0.0)
202 | redis (5.0.8)
203 | redis-client (>= 0.17.0)
204 | redis-client (0.18.0)
205 | connection_pool
206 | regexp_parser (2.8.2)
207 | reline (0.4.0)
208 | io-console (~> 0.5)
209 | rexml (3.2.6)
210 | rubocop (1.57.2)
211 | json (~> 2.3)
212 | language_server-protocol (>= 3.17.0)
213 | parallel (~> 1.10)
214 | parser (>= 3.2.2.4)
215 | rainbow (>= 2.2.2, < 4.0)
216 | regexp_parser (>= 1.8, < 3.0)
217 | rexml (>= 3.2.5, < 4.0)
218 | rubocop-ast (>= 1.28.1, < 2.0)
219 | ruby-progressbar (~> 1.7)
220 | unicode-display_width (>= 2.4.0, < 3.0)
221 | rubocop-ast (1.30.0)
222 | parser (>= 3.2.1.0)
223 | ruby-progressbar (1.13.0)
224 | ruby2_keywords (0.0.5)
225 | rubyzip (2.3.2)
226 | selenium-webdriver (4.15.0)
227 | rexml (~> 3.2, >= 3.2.5)
228 | rubyzip (>= 1.2.2, < 3.0)
229 | websocket (~> 1.0)
230 | sprockets (4.2.1)
231 | concurrent-ruby (~> 1.0)
232 | rack (>= 2.2.4, < 4)
233 | sprockets-rails (3.4.2)
234 | actionpack (>= 5.2)
235 | activesupport (>= 5.2)
236 | sprockets (>= 3.0.0)
237 | stimulus-rails (1.3.0)
238 | railties (>= 6.0.0)
239 | stringio (3.0.9)
240 | thor (1.3.0)
241 | timeout (0.4.1)
242 | turbo-rails (1.5.0)
243 | actionpack (>= 6.0.0)
244 | activejob (>= 6.0.0)
245 | railties (>= 6.0.0)
246 | tzinfo (2.0.6)
247 | concurrent-ruby (~> 1.0)
248 | unicode-display_width (2.5.0)
249 | web-console (4.2.1)
250 | actionview (>= 6.0.0)
251 | activemodel (>= 6.0.0)
252 | bindex (>= 0.4.0)
253 | railties (>= 6.0.0)
254 | webrick (1.8.1)
255 | websocket (1.2.10)
256 | websocket-driver (0.7.6)
257 | websocket-extensions (>= 0.1.0)
258 | websocket-extensions (0.1.5)
259 | xpath (3.2.0)
260 | nokogiri (~> 1.8)
261 | zeitwerk (2.6.12)
262 |
263 | PLATFORMS
264 | x86_64-linux
265 |
266 | DEPENDENCIES
267 | bootsnap
268 | capybara
269 | debug
270 | importmap-rails
271 | jbuilder
272 | pg (~> 1.1)
273 | puma (>= 5.0)
274 | rack-cors
275 | rails (~> 7.1.1)
276 | redis (>= 4.0.1)
277 | rubocop (>= 1.0, < 2.0)
278 | selenium-webdriver
279 | sprockets-rails
280 | stimulus-rails
281 | turbo-rails
282 | tzinfo-data
283 | web-console
284 |
285 | RUBY VERSION
286 | ruby 3.2.2p53
287 |
288 | BUNDLED WITH
289 | 2.4.21
290 |
--------------------------------------------------------------------------------