├── .gitattributes
├── .gitignore
├── .ruby-version
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── Procfile
├── README.md
├── Rakefile
├── app
├── assets
│ ├── config
│ │ └── manifest.js
│ ├── images
│ │ └── .keep
│ └── stylesheets
│ │ └── application.css
├── channels
│ └── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
├── controllers
│ ├── application_controller.rb
│ ├── concerns
│ │ └── .keep
│ └── hello_world_controller.rb
├── helpers
│ ├── application_helper.rb
│ └── hello_world_helper.rb
├── javascript
│ ├── application.js
│ └── controllers
│ │ ├── application.js
│ │ ├── hello_controller.js
│ │ └── index.js
├── jobs
│ └── application_job.rb
├── mailers
│ └── application_mailer.rb
├── models
│ └── concerns
│ │ └── .keep
└── views
│ ├── hello_world
│ └── index.html.erb
│ └── layouts
│ ├── application.html.erb
│ ├── mailer.html.erb
│ └── mailer.text.erb
├── bin
├── bundle
├── bundle.cmd
├── importmap
├── rails
├── rake
└── setup
├── config.ru
├── config
├── application.rb
├── boot.rb
├── cable.yml
├── credentials.yml.enc
├── environment.rb
├── environments
│ ├── development.rb
│ ├── production.rb
│ └── test.rb
├── importmap.rb
├── initializers
│ ├── assets.rb
│ ├── content_security_policy.rb
│ ├── filter_parameter_logging.rb
│ ├── inflections.rb
│ └── permissions_policy.rb
├── locales
│ └── en.yml
├── puma.rb
└── routes.rb
├── lib
├── assets
│ └── .keep
└── tasks
│ └── .keep
├── log
└── .keep
├── public
├── 404.html
├── 422.html
├── 500.html
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── favicon.ico
└── robots.txt
├── test
├── application_system_test_case.rb
├── channels
│ └── application_cable
│ │ └── connection_test.rb
├── controllers
│ ├── .keep
│ └── hello_world_controller_test.rb
├── fixtures
│ └── files
│ │ └── .keep
├── helpers
│ └── .keep
├── integration
│ └── .keep
├── mailers
│ └── .keep
├── models
│ └── .keep
├── system
│ └── .keep
└── test_helper.rb
├── tmp
├── .keep
└── pids
│ └── .keep
└── vendor
├── .keep
└── javascript
└── .keep
/.gitattributes:
--------------------------------------------------------------------------------
1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2 |
3 |
4 | # Mark any vendored files as having been vendored.
5 | vendor/* linguist-vendored
6 |
--------------------------------------------------------------------------------
/.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 logfiles and tempfiles.
11 | /log/*
12 | /tmp/*
13 | !/log/.keep
14 | !/tmp/.keep
15 |
16 | # Ignore pidfiles, but keep the directory.
17 | /tmp/pids/*
18 | !/tmp/pids/
19 | !/tmp/pids/.keep
20 |
21 |
22 | /public/assets
23 |
24 | # Ignore master key for decrypting credentials and more.
25 | /config/master.key
26 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-3.1.3
2 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3 |
4 | ruby "3.1.3"
5 |
6 | # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7 | gem "rails", "~> 7.0.4", ">= 7.0.4.2"
8 |
9 | # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10 | gem "sprockets-rails"
11 |
12 | # Use the Puma web server [https://github.com/puma/puma]
13 | gem "puma", "~> 5.0"
14 |
15 | # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
16 | gem "importmap-rails"
17 |
18 | # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
19 | gem "turbo-rails"
20 |
21 | # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
22 | gem "stimulus-rails"
23 |
24 | # Build JSON APIs with ease [https://github.com/rails/jbuilder]
25 | gem "jbuilder"
26 |
27 | # Use Redis adapter to run Action Cable in production
28 | # gem "redis", "~> 4.0"
29 |
30 | # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
31 | # gem "kredis"
32 |
33 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
34 | # gem "bcrypt", "~> 3.1.7"
35 |
36 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
37 | gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
38 |
39 | # Reduces boot times through caching; required in config/boot.rb
40 | gem "bootsnap", require: false
41 |
42 | # Use Sass to process CSS
43 | # gem "sassc-rails"
44 |
45 | group :development, :test do
46 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
47 | gem "debug", platforms: %i[ mri mingw x64_mingw ]
48 | end
49 |
50 | group :development do
51 | # Use console on exceptions pages [https://github.com/rails/web-console]
52 | gem "web-console"
53 |
54 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
55 | # gem "rack-mini-profiler"
56 |
57 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
58 | # gem "spring"
59 | end
60 |
61 | group :test do
62 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
63 | gem "capybara"
64 | gem "selenium-webdriver"
65 | gem "webdrivers"
66 | end
67 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actioncable (7.0.4.2)
5 | actionpack (= 7.0.4.2)
6 | activesupport (= 7.0.4.2)
7 | nio4r (~> 2.0)
8 | websocket-driver (>= 0.6.1)
9 | actionmailbox (7.0.4.2)
10 | actionpack (= 7.0.4.2)
11 | activejob (= 7.0.4.2)
12 | activerecord (= 7.0.4.2)
13 | activestorage (= 7.0.4.2)
14 | activesupport (= 7.0.4.2)
15 | mail (>= 2.7.1)
16 | net-imap
17 | net-pop
18 | net-smtp
19 | actionmailer (7.0.4.2)
20 | actionpack (= 7.0.4.2)
21 | actionview (= 7.0.4.2)
22 | activejob (= 7.0.4.2)
23 | activesupport (= 7.0.4.2)
24 | mail (~> 2.5, >= 2.5.4)
25 | net-imap
26 | net-pop
27 | net-smtp
28 | rails-dom-testing (~> 2.0)
29 | actionpack (7.0.4.2)
30 | actionview (= 7.0.4.2)
31 | activesupport (= 7.0.4.2)
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.2)
37 | actionpack (= 7.0.4.2)
38 | activerecord (= 7.0.4.2)
39 | activestorage (= 7.0.4.2)
40 | activesupport (= 7.0.4.2)
41 | globalid (>= 0.6.0)
42 | nokogiri (>= 1.8.5)
43 | actionview (7.0.4.2)
44 | activesupport (= 7.0.4.2)
45 | builder (~> 3.1)
46 | erubi (~> 1.4)
47 | rails-dom-testing (~> 2.0)
48 | rails-html-sanitizer (~> 1.1, >= 1.2.0)
49 | activejob (7.0.4.2)
50 | activesupport (= 7.0.4.2)
51 | globalid (>= 0.3.6)
52 | activemodel (7.0.4.2)
53 | activesupport (= 7.0.4.2)
54 | activerecord (7.0.4.2)
55 | activemodel (= 7.0.4.2)
56 | activesupport (= 7.0.4.2)
57 | activestorage (7.0.4.2)
58 | actionpack (= 7.0.4.2)
59 | activejob (= 7.0.4.2)
60 | activerecord (= 7.0.4.2)
61 | activesupport (= 7.0.4.2)
62 | marcel (~> 1.0)
63 | mini_mime (>= 1.1.0)
64 | activesupport (7.0.4.2)
65 | concurrent-ruby (~> 1.0, >= 1.0.2)
66 | i18n (>= 1.6, < 2)
67 | minitest (>= 5.1)
68 | tzinfo (~> 2.0)
69 | addressable (2.8.1)
70 | public_suffix (>= 2.0.2, < 6.0)
71 | bindex (0.8.1)
72 | bootsnap (1.16.0)
73 | msgpack (~> 1.2)
74 | builder (3.2.4)
75 | capybara (3.38.0)
76 | addressable
77 | matrix
78 | mini_mime (>= 0.1.3)
79 | nokogiri (~> 1.8)
80 | rack (>= 1.6.0)
81 | rack-test (>= 0.6.3)
82 | regexp_parser (>= 1.5, < 3.0)
83 | xpath (~> 3.2)
84 | concurrent-ruby (1.2.0)
85 | crass (1.0.6)
86 | date (3.3.3)
87 | debug (1.7.1)
88 | irb (>= 1.5.0)
89 | reline (>= 0.3.1)
90 | erubi (1.12.0)
91 | globalid (1.1.0)
92 | activesupport (>= 5.0)
93 | i18n (1.12.0)
94 | concurrent-ruby (~> 1.0)
95 | importmap-rails (1.1.5)
96 | actionpack (>= 6.0.0)
97 | railties (>= 6.0.0)
98 | io-console (0.6.0)
99 | irb (1.6.2)
100 | reline (>= 0.3.0)
101 | jbuilder (2.11.5)
102 | actionview (>= 5.0.0)
103 | activesupport (>= 5.0.0)
104 | loofah (2.19.1)
105 | crass (~> 1.0.2)
106 | nokogiri (>= 1.5.9)
107 | mail (2.8.0.1)
108 | mini_mime (>= 0.1.1)
109 | net-imap
110 | net-pop
111 | net-smtp
112 | marcel (1.0.2)
113 | matrix (0.4.2)
114 | method_source (1.0.0)
115 | mini_mime (1.1.2)
116 | minitest (5.17.0)
117 | msgpack (1.6.0)
118 | net-imap (0.3.4)
119 | date
120 | net-protocol
121 | net-pop (0.1.2)
122 | net-protocol
123 | net-protocol (0.2.1)
124 | timeout
125 | net-smtp (0.3.3)
126 | net-protocol
127 | nio4r (2.5.8)
128 | nokogiri (1.14.0-x64-mingw-ucrt)
129 | racc (~> 1.4)
130 | public_suffix (5.0.1)
131 | puma (5.6.5)
132 | nio4r (~> 2.0)
133 | racc (1.6.2)
134 | rack (2.2.6.2)
135 | rack-test (2.0.2)
136 | rack (>= 1.3)
137 | rails (7.0.4.2)
138 | actioncable (= 7.0.4.2)
139 | actionmailbox (= 7.0.4.2)
140 | actionmailer (= 7.0.4.2)
141 | actionpack (= 7.0.4.2)
142 | actiontext (= 7.0.4.2)
143 | actionview (= 7.0.4.2)
144 | activejob (= 7.0.4.2)
145 | activemodel (= 7.0.4.2)
146 | activerecord (= 7.0.4.2)
147 | activestorage (= 7.0.4.2)
148 | activesupport (= 7.0.4.2)
149 | bundler (>= 1.15.0)
150 | railties (= 7.0.4.2)
151 | rails-dom-testing (2.0.3)
152 | activesupport (>= 4.2.0)
153 | nokogiri (>= 1.6)
154 | rails-html-sanitizer (1.5.0)
155 | loofah (~> 2.19, >= 2.19.1)
156 | railties (7.0.4.2)
157 | actionpack (= 7.0.4.2)
158 | activesupport (= 7.0.4.2)
159 | method_source
160 | rake (>= 12.2)
161 | thor (~> 1.0)
162 | zeitwerk (~> 2.5)
163 | rake (13.0.6)
164 | regexp_parser (2.6.2)
165 | reline (0.3.2)
166 | io-console (~> 0.5)
167 | rexml (3.2.5)
168 | rubyzip (2.3.2)
169 | selenium-webdriver (4.8.0)
170 | rexml (~> 3.2, >= 3.2.5)
171 | rubyzip (>= 1.2.2, < 3.0)
172 | websocket (~> 1.0)
173 | sprockets (4.2.0)
174 | concurrent-ruby (~> 1.0)
175 | rack (>= 2.2.4, < 4)
176 | sprockets-rails (3.4.2)
177 | actionpack (>= 5.2)
178 | activesupport (>= 5.2)
179 | sprockets (>= 3.0.0)
180 | stimulus-rails (1.2.1)
181 | railties (>= 6.0.0)
182 | thor (1.2.1)
183 | timeout (0.3.1)
184 | turbo-rails (1.3.2)
185 | actionpack (>= 6.0.0)
186 | activejob (>= 6.0.0)
187 | railties (>= 6.0.0)
188 | tzinfo (2.0.5)
189 | concurrent-ruby (~> 1.0)
190 | tzinfo-data (1.2022.7)
191 | tzinfo (>= 1.0.0)
192 | web-console (4.2.0)
193 | actionview (>= 6.0.0)
194 | activemodel (>= 6.0.0)
195 | bindex (>= 0.4.0)
196 | railties (>= 6.0.0)
197 | webdrivers (5.2.0)
198 | nokogiri (~> 1.6)
199 | rubyzip (>= 1.3.0)
200 | selenium-webdriver (~> 4.0)
201 | websocket (1.2.9)
202 | websocket-driver (0.7.5)
203 | websocket-extensions (>= 0.1.0)
204 | websocket-extensions (0.1.5)
205 | xpath (3.2.0)
206 | nokogiri (~> 1.8)
207 | zeitwerk (2.6.6)
208 |
209 | PLATFORMS
210 | x64-mingw-ucrt
211 |
212 | DEPENDENCIES
213 | bootsnap
214 | capybara
215 | debug
216 | importmap-rails
217 | jbuilder
218 | puma (~> 5.0)
219 | rails (~> 7.0.4, >= 7.0.4.2)
220 | selenium-webdriver
221 | sprockets-rails
222 | stimulus-rails
223 | turbo-rails
224 | tzinfo-data
225 | web-console
226 | webdrivers
227 |
228 | RUBY VERSION
229 | ruby 3.1.3p185
230 |
231 | BUNDLED WITH
232 | 2.3.26
233 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Kinsta Inc.
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.
22 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: rails server
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Kinsta - Ruby on Rails Starter
2 |
3 | An example of how to set **Ruby on Rails** up to enable deployment on Kinsta App Hosting services.
4 |
5 | ---
6 | Kinsta is a developer-centric cloud host / PaaS. We’re striving to make it easier for you to share your web projects with your users. Focus on coding and building, and we’ll take care of deployment and provide fast, scalable hosting. + 24/7 expert-only support.
7 |
8 | - [Start your free trial](https://kinsta.com/signup/?product_type=app-db)
9 | - [Application Hosting](https://kinsta.com/application-hosting)
10 | - [Database Hosting](https://kinsta.com/database-hosting)
11 |
12 | ## Dependency Management
13 | **Kinsta** will automatically install dependencies defined in your `Gemfile` file.
14 |
15 | ## Web Server Setup
16 | ### Start Command
17 | When deploying an application Kinsta will automatically create processes based on the `Procfile` in the root of the repository. Make sure to use this command to run your server:
18 | ```
19 | web: rails server
20 | ```
21 |
22 | ## Watch How to Set Up a Ruby on Rails Application on Kinsta
23 | [](https://www.youtube.com/watch?v=Z3V0M5TQJQs)
24 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/app/assets/images/.keep
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/hello_world_controller.rb:
--------------------------------------------------------------------------------
1 | class HelloWorldController < ApplicationController
2 | def index
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/hello_world_helper.rb:
--------------------------------------------------------------------------------
1 | module HelloWorldHelper
2 | end
3 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/javascript/controllers/index.js:
--------------------------------------------------------------------------------
1 | // Import and register all your controllers from the importmap under controllers/*
2 |
3 | import { application } from "controllers/application"
4 |
5 | // Eager load all controllers defined in the import map under controllers/**/*_controller
6 | import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7 | eagerLoadControllersFrom("controllers", application)
8 |
9 | // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10 | // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11 | // lazyLoadControllersFrom("controllers", application)
12 |
--------------------------------------------------------------------------------
/app/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/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "from@example.com"
3 | layout "mailer"
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/views/hello_world/index.html.erb:
--------------------------------------------------------------------------------
1 |
Hello World
2 | Find me in app/views/hello_world/index.html.erb
3 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 | Rails project | Kinsta Welcome to your
Rails project
Here are some ideas how to get started
Join the Kinsta Community forum and connect with developers
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/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$/, 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 |
--------------------------------------------------------------------------------
/bin/bundle.cmd:
--------------------------------------------------------------------------------
1 | @ruby -x "%~f0" %*
2 | @exit /b %ERRORLEVEL%
3 |
4 | #!/usr/bin/env ruby
5 | # frozen_string_literal: true
6 |
7 | #
8 | # This file was generated by Bundler.
9 | #
10 | # The application 'bundle' is installed as part of a gem, and
11 | # this file is here to facilitate running it.
12 | #
13 |
14 | require "rubygems"
15 |
16 | m = Module.new do
17 | module_function
18 |
19 | def invoked_as_script?
20 | File.expand_path($0) == File.expand_path(__FILE__)
21 | end
22 |
23 | def env_var_version
24 | ENV["BUNDLER_VERSION"]
25 | end
26 |
27 | def cli_arg_version
28 | return unless invoked_as_script? # don't want to hijack other binstubs
29 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
30 | bundler_version = nil
31 | update_index = nil
32 | ARGV.each_with_index do |a, i|
33 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
34 | bundler_version = a
35 | end
36 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
37 | bundler_version = $1
38 | update_index = i
39 | end
40 | bundler_version
41 | end
42 |
43 | def gemfile
44 | gemfile = ENV["BUNDLE_GEMFILE"]
45 | return gemfile if gemfile && !gemfile.empty?
46 |
47 | File.expand_path("../Gemfile", __dir__)
48 | end
49 |
50 | def lockfile
51 | lockfile =
52 | case File.basename(gemfile)
53 | when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
54 | else "#{gemfile}.lock"
55 | end
56 | File.expand_path(lockfile)
57 | end
58 |
59 | def lockfile_version
60 | return unless File.file?(lockfile)
61 | lockfile_contents = File.read(lockfile)
62 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
63 | Regexp.last_match(1)
64 | end
65 |
66 | def bundler_requirement
67 | @bundler_requirement ||=
68 | env_var_version || cli_arg_version ||
69 | bundler_requirement_for(lockfile_version)
70 | end
71 |
72 | def bundler_requirement_for(version)
73 | return "#{Gem::Requirement.default}.a" unless version
74 |
75 | bundler_gem_version = Gem::Version.new(version)
76 |
77 | requirement = bundler_gem_version.approximate_recommendation
78 |
79 | return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
80 |
81 | requirement += ".a" if bundler_gem_version.prerelease?
82 |
83 | requirement
84 | end
85 |
86 | def load_bundler!
87 | ENV["BUNDLE_GEMFILE"] ||= gemfile
88 |
89 | activate_bundler
90 | end
91 |
92 | def activate_bundler
93 | gem_error = activation_error_handling do
94 | gem "bundler", bundler_requirement
95 | end
96 | return if gem_error.nil?
97 | require_error = activation_error_handling do
98 | require "bundler/version"
99 | end
100 | return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
101 | 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}'`"
102 | exit 42
103 | end
104 |
105 | def activation_error_handling
106 | yield
107 | nil
108 | rescue StandardError, LoadError => e
109 | e
110 | end
111 | end
112 |
113 | m.load_bundler!
114 |
115 | if m.invoked_as_script?
116 | load Gem.bin_path("bundler", "bundle")
117 | end
118 |
--------------------------------------------------------------------------------
/bin/importmap:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require_relative "../config/application"
4 | require "importmap/commands"
5 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby.exe
2 | APP_PATH = File.expand_path("../config/application", __dir__)
3 | require_relative "../config/boot"
4 | require "rails/commands"
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby.exe
2 | require_relative "../config/boot"
3 | require "rake"
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby.exe
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) || abort("\n== Command #{args} failed ==")
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== Removing old logs and tempfiles =="
21 | system! "bin/rails log:clear tmp:clear"
22 |
23 | puts "\n== Restarting application server =="
24 | system! "bin/rails restart"
25 | end
26 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative "boot"
2 |
3 | require "rails"
4 | # Pick the frameworks you want:
5 | require "active_model/railtie"
6 | require "active_job/railtie"
7 | # require "active_record/railtie"
8 | # require "active_storage/engine"
9 | require "action_controller/railtie"
10 | require "action_mailer/railtie"
11 | # require "action_mailbox/engine"
12 | # require "action_text/engine"
13 | require "action_view/railtie"
14 | require "action_cable/engine"
15 | require "rails/test_unit/railtie"
16 |
17 | # Require the gems listed in Gemfile, including any gems
18 | # you've limited to :test, :development, or :production.
19 | Bundler.require(*Rails.groups)
20 |
21 | module KinstaHelloWorld
22 | class Application < Rails::Application
23 | # Initialize configuration defaults for originally generated Rails version.
24 | config.load_defaults 7.0
25 |
26 | # Configuration for the application, engines, and railties goes here.
27 | #
28 | # These settings can be overridden in specific environments using the files
29 | # in config/environments, which are processed later.
30 | #
31 | # config.time_zone = "Central Time (US & Canada)"
32 | # config.eager_load_paths << Rails.root.join("extras")
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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: kinsta_hello_world_production
11 |
--------------------------------------------------------------------------------
/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | qDGkrztvJMpODc4izgABj7Knwnn+j09wUzIW3slU44hpwmGuige6xFD9Z/fUikVcT4AaiyLGhAs0a97PvTvIUlWgWHQx/OIsdtfgIKuwEmVsUXijSpxLSpqgjW8vUJekB0/5fJRtx8FxmBRGhqqZuWUIiCCf8j/Q7mXsoQJoIj14Mq4oMrfdyQF3Xg+HIwH5pdFziNQQDGtZSaaX00HQ2CNUCGGvSj7GlqS3P5kaau+SNfXzOrXc7fPlgeX7Aql5GvjZQI6sL9wHUTXNB7aFA5rWzftc6Unw9LlggVv4O5pUqjNVM6J0uIvakfJVrg/fqFubzUHhb/wIoKbdW5jbWlSst+3jritYAy6QJdqqhr68U2B8izPzhp5J1NEr4Z6ZR+r6lBjOL1/MpOxW1IZWrczoSkjUTnS3oVyu--koqzp57dAgEmeqOZ--2XJRi7hgstzF7dO/iqRimA==
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative "application"
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/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 | # Don't care if the mailer can't send.
37 | config.action_mailer.raise_delivery_errors = false
38 |
39 | config.action_mailer.perform_caching = false
40 |
41 | # Print deprecation notices to the Rails logger.
42 | config.active_support.deprecation = :log
43 |
44 | # Raise exceptions for disallowed deprecations.
45 | config.active_support.disallowed_deprecation = :raise
46 |
47 | # Tell Active Support which deprecation messages to disallow.
48 | config.active_support.disallowed_deprecation_warnings = []
49 |
50 | # Suppress logger output for asset requests.
51 | config.assets.quiet = true
52 |
53 | # Raises error for missing translations.
54 | # config.i18n.raise_on_missing_translations = true
55 |
56 | # Annotate rendered view with file names.
57 | # config.action_view.annotate_rendered_view_with_filenames = true
58 |
59 | # Uncomment if you wish to allow Action Cable access from any origin.
60 | # config.action_cable.disable_request_forgery_protection = true
61 | end
62 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | Rails.application.configure do
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | # Code is not reloaded between requests.
7 | config.cache_classes = true
8 |
9 | # Eager load code on boot. This eager loads most of Rails and
10 | # your application in memory, allowing both threaded web servers
11 | # and those relying on copy on write to perform better.
12 | # Rake tasks automatically ignore this option for performance.
13 | config.eager_load = true
14 |
15 | # Full error reports are disabled and caching is turned on.
16 | config.consider_all_requests_local = false
17 | config.action_controller.perform_caching = true
18 |
19 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21 | # config.require_master_key = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26 |
27 | # Compress CSS using a preprocessor.
28 | # config.assets.css_compressor = :sass
29 |
30 | # Do not fallback to assets pipeline if a precompiled asset is missed.
31 | config.assets.compile = false
32 |
33 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34 | # config.asset_host = "http://assets.example.com"
35 |
36 | # Specifies the header that your server uses for sending files.
37 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
38 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
39 |
40 | # Mount Action Cable outside main process or domain.
41 | # config.action_cable.mount_path = nil
42 | # config.action_cable.url = "wss://example.com/cable"
43 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
44 |
45 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
46 | # config.force_ssl = true
47 |
48 | # Include generic and useful information about system operation, but avoid logging too much
49 | # information to avoid inadvertent exposure of personally identifiable information (PII).
50 | config.log_level = :info
51 |
52 | # Prepend all log lines with the following tags.
53 | config.log_tags = [ :request_id ]
54 |
55 | # Use a different cache store in production.
56 | # config.cache_store = :mem_cache_store
57 |
58 | # Use a real queuing backend for Active Job (and separate queues per environment).
59 | # config.active_job.queue_adapter = :resque
60 | # config.active_job.queue_name_prefix = "kinsta_hello_world_production"
61 |
62 | config.action_mailer.perform_caching = false
63 |
64 | # Ignore bad email addresses and do not raise email delivery errors.
65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66 | # config.action_mailer.raise_delivery_errors = false
67 |
68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69 | # the I18n.default_locale when a translation cannot be found).
70 | config.i18n.fallbacks = true
71 |
72 | # Don't log any deprecations.
73 | config.active_support.report_deprecations = false
74 |
75 | # Use default logging formatter so that PID and timestamp are not suppressed.
76 | config.log_formatter = ::Logger::Formatter.new
77 |
78 | # Use a different logger for distributed setups.
79 | # require "syslog/logger"
80 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
81 |
82 | if ENV["RAILS_LOG_TO_STDOUT"].present?
83 | logger = ActiveSupport::Logger.new(STDOUT)
84 | logger.formatter = config.log_formatter
85 | config.logger = ActiveSupport::TaggedLogging.new(logger)
86 | end
87 | end
88 |
--------------------------------------------------------------------------------
/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 | config.action_mailer.perform_caching = false
37 |
38 | # Tell Action Mailer not to deliver emails to the real world.
39 | # The :test delivery method accumulates sent emails in the
40 | # ActionMailer::Base.deliveries array.
41 | config.action_mailer.delivery_method = :test
42 |
43 | # Print deprecation notices to the stderr.
44 | config.active_support.deprecation = :stderr
45 |
46 | # Raise exceptions for disallowed deprecations.
47 | config.active_support.disallowed_deprecation = :raise
48 |
49 | # Tell Active Support which deprecation messages to disallow.
50 | config.active_support.disallowed_deprecation_warnings = []
51 |
52 | # Raises error for missing translations.
53 | # config.i18n.raise_on_missing_translations = true
54 |
55 | # Annotate rendered view with file names.
56 | # config.action_view.annotate_rendered_view_with_filenames = true
57 | end
58 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 and inline scripts
20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21 | # config.content_security_policy_nonce_directives = %w(script-src)
22 | #
23 | # # Report violations without enforcing the policy.
24 | # # config.content_security_policy_report_only = true
25 | # end
26 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5 | # notations and behaviors.
6 | Rails.application.config.filter_parameters += [
7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8 | ]
9 |
--------------------------------------------------------------------------------
/config/initializers/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 |
--------------------------------------------------------------------------------
/config/initializers/permissions_policy.rb:
--------------------------------------------------------------------------------
1 | # Define an application-wide HTTP permissions policy. For further
2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy
3 | #
4 | # Rails.application.config.permissions_policy do |f|
5 | # f.camera :none
6 | # f.gyroscope :none
7 | # f.microphone :none
8 | # f.usb :none
9 | # f.fullscreen :self
10 | # f.payment :self, "https://secure.example.com"
11 | # end
12 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than 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 | # The following keys must be escaped otherwise they will not be retrieved by
20 | # the default I18n backend:
21 | #
22 | # true, false, on, off, yes, no
23 | #
24 | # Instead, surround them with single quotes.
25 | #
26 | # en:
27 | # "true": "foo"
28 | #
29 | # To learn more, please read the Rails Internationalization guide
30 | # available at https://guides.rubyonrails.org/i18n.html.
31 |
32 | en:
33 | hello: "Hello world"
34 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | get "/", to: "hello_world#index"
3 | end
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/lib/tasks/.keep
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/log/.keep
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/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/channels/application_cable/connection_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
4 | # test "connects with cookies" do
5 | # cookies.signed[:user_id] = 42
6 | #
7 | # connect
8 | #
9 | # assert_equal connection.user_id, "42"
10 | # end
11 | end
12 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/controllers/.keep
--------------------------------------------------------------------------------
/test/controllers/hello_world_controller_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class HelloWorldControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/fixtures/files/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/fixtures/files/.keep
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/helpers/.keep
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/integration/.keep
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/mailers/.keep
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/models/.keep
--------------------------------------------------------------------------------
/test/system/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/test/system/.keep
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] ||= "test"
2 | require_relative "../config/environment"
3 | require "rails/test_help"
4 |
5 | class ActiveSupport::TestCase
6 | # Run tests in parallel with specified workers
7 | parallelize(workers: :number_of_processors, with: :threads)
8 |
9 | # Add more helper methods to be used by all tests here...
10 | end
11 |
--------------------------------------------------------------------------------
/tmp/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/tmp/.keep
--------------------------------------------------------------------------------
/tmp/pids/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/tmp/pids/.keep
--------------------------------------------------------------------------------
/vendor/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/vendor/.keep
--------------------------------------------------------------------------------
/vendor/javascript/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kinsta/hello-world-rails/60c70e5ec2e66d2e1f5116f612ce1b7e2a73475d/vendor/javascript/.keep
--------------------------------------------------------------------------------