spec
|--- apis #do not put into controllers folder.
|--- your_api_test_spec.rb
|--- controllers
|--- models
|--- factories
|--- views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Context + metadata | |
shared_context 'Logged as a user', role: true do | |
let(:user) { |example| create :user, example.metadata[:role] } | |
before { login_as user } | |
end | |
scenario "Login as a client", role: :client | |
scenario "Login as a customer", role: :customer | |
scenario "Login as an admin", role: :admin |
This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
- Rails 7+
- Ruby 3+
- PostgreSQL
- Ubuntu Server 24.04
- Capistrano, Puma, Nginx