Rails World 2025 会议官方应用
Rails application that allows you to create and manage conferences. You can use it to create a conference, add speakers and sessions. Attendees can register for the conference, view the schedule, receive notifications and more.
gem install bundler)git clone xxx)bin/setup (needs to be run only once)bin/devhttp://localhost:3000 in your browserhttp://localhost:3000/avoconfig/seeds.rb for the default admin credentials)http://localhost:3000 to see the conference scheduleYou can enable features by using ENV variables. The ENV var key should follow the convention "#{feature_name}_ENABLED". For example, to enable the litestream_backups feature, add LITESTREAM_BACKUP_ENABLED=true to your .env file. You can view all the available features in app/models/feature.rb.
This application is set up for deployment using Kamal 2.
Each environment has its own deploy.yml file. Before you deploy, check that these files have the correct values for your environment. If you have already run bin/setup, there should be a .env file for each environment. Just fill in the required variables!
The staging environment can be used for QA before deploying a new version to production.
Your First Staging Deployment Currently, the staging environment is set up to use AppSignal, MailPace, Avo, and Amazon for storage.
Make sure all your environment variables are present in the .env.staging file. Kamal only loads variables from your shell environment (ENV), not from dotenv .env files as discussed here.
You can use the dotenv command before Kamal commands to load variables from your .env.staging file. Check if all variables are present with:
dotenv -f ".env.staging" kamal secrets print -d stagingWhen all variables are present, you can deploy. Important!: You must commit your changes before Kamal picks them up.
dotenv -f ".env.staging" kamal deploy -d stagingWe use Standard Ruby for linting and formatting.
bundle exec rubocop to check all ruby filesbundle exec rubocop -a to auto-correct offensesWe use ERB Lint to lint our ERB files.
bundle exec erblint --lint-all to check all ERB filesbundle exec erblint --lint-all -a to auto-correct offenses. WARNING: This command isn't safe and can break your code.We use StandardJS to lint our JavaScript files.
npm install standard --globalstandard to check all JavaScript filesstandard --fix to auto-correct offensesWe use Typos as a spell checker.
brew install typos-clitypos to check all filestypos -w to auto-correct offenses_typos.yml fileLeftook will execute the linters' auto-fix on staged files and abort the commit if there are offenses that can't be auto-fixed. Run the following commands to enable this flow:
gem install lefthook
lefthook installBesides code reviews, we use rubycritic to generate a report of the code quality. Both as a reviewer and as a contributor, you should check the report and address the issues found if the files you are working on have a low score ("D" or "F").
bundle exec rubycriticWe use DatabaseConsistency to check for inconsistencies between the database schema and the application models.
bundle exec database_consistency.Run tests by using bundle exec rspec.
HEADLESS=false bundle exec rspecpause inside an it statement.:log, e.g. it "xxx", :log dodata-test-id to find elements instead of classes/ids, e.g. data-test-id="decline_modal"DataTestId module to select HTML elements, e.g., find_dti("decline_modal")暂无开放 Issues,或尚未同步最近议题。