Skip to content

Commit

Permalink
Initial project commit (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-shaw authored Jan 22, 2025
1 parent aae91ee commit 7797109
Show file tree
Hide file tree
Showing 157 changed files with 5,184 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Set up database schema
run: bin/rails db:setup

- name: Run tests
run: bundle exec rspec

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Security audit dependencies
run: bundle exec bundler-audit update

- name: Security audit application code
run: bundle exec brakeman -q

- name: Lint Ruby files
run: bundle exec rubocop
81 changes: 81 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
*.rbc
capybara-*.html
.rspec
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-[0-9]*
/public/system
/coverage/
/spec/tmp
*.orig
rerun.txt
pickle-email-*.html

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
config/initializers/secret_token.rb
config/master.key
config/local_env.yml

# Only include if you have production secrets in this file, which is no longer a Rails default
# config/secrets.yml

# dotenv, dotenv-rails
# TODO Comment out these rules if environment variables can be committed
.env
.env*.local

## Environment normalization:
/.bundle
/vendor/bundle

# these should all be checked in to normalize the environment:
# Gemfile.lock, .ruby-version, .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# if using bower-rails ignore default bower_components path bower.json files
/vendor/assets/bower_components
*.bowerrc
bower.json

# Ignore pow environment settings
.powenv

# Ignore Byebug command history file.
.byebug_history

# Ignore node_modules
node_modules/

# Ignore precompiled javascript packs
/public/packs
/public/packs-test
/public/assets

# Ignore yarn files
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ignore uploaded files in development
/storage/*
!/storage/.keep
/public/uploads

# Ignore temp sqlite files
db/development.sqlite3-shm
db/development.sqlite3-wal
db/development 2.sqlite3-wal

# Jetbrains - Rubymine IntelliJ config files
.idea

/config/master.key
sendgrid.env
62 changes: 62 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Enable necessary RuboCop extensions
require:
- rubocop-rails
- rubocop-rspec
- rubocop-factory_bot
- rubocop-capybara

# Global settings
AllCops:
NewCops: enable
Exclude:
- 'db/schema.rb' # Exclude auto-generated schema files

inherit_mode:
merge:
- Exclude

Metrics/MethodLength:
Enabled: false

Layout/LineLength:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

RSpec/NestedGroups:
Enabled: false

Metrics/AbcSize:
Enabled: false

Style/Documentation:
Enabled: false

Rails/I18nLocaleTexts:
Enabled: false

Rails/LexicallyScopedActionFilter:
Enabled: false

RSpec/SpecFilePathFormat:
Enabled: false

Rails/NotNullColumn:
Exclude:
- 'db/migrate/*.rb'

Rails:
Enabled: true

RSpec:
Enabled: true
AllCops:
Exclude:
- 'spec/**/*.rb'

FactoryBot:
Enabled: true

Capybara:
Enabled: true
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
94 changes: 94 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.2'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'rails', '~> 7.1.3.4', '>= 7.1.3.4'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'

# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '~> 5.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem 'stimulus-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem 'jbuilder'

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false

# Use Sass to process CSS
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
gem 'image_processing', '~> 1.2'

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'annotate', '3.2.0'
gem 'bundler-audit'
gem 'debug', platforms: %i[mri mingw x64_mingw]
gem 'factory_bot_rails'
gem 'faker'
gem 'rails-controller-testing'
gem 'rspec-rails', '6.1.1'
gem 'rubocop', '~> 1.67'
gem 'rubocop-capybara', '~> 2.21'
gem 'rubocop-factory_bot', '~> 2.26', '>= 2.26.1'
gem 'rubocop-rails', '~> 2.27', '>= 2.27'
gem 'rubocop-rspec', '~> 3.2'
gem 'rubocop-rspec_rails', '~> 2.30'
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem 'brakeman'
gem 'web-console'
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem 'capybara', '3.40.0'
gem 'database_cleaner-active_record'
gem 'selenium-webdriver', '4.10'
gem 'simplecov', require: false
gem 'webdrivers'
end

gem 'devise', '~> 4.9'

gem 'noticed', '~> 1.6'

gem 'ransack', '~> 4.1'
Loading

0 comments on commit 7797109

Please sign in to comment.