Skip to content

Commit 725c49b

Browse files
committed
base
0 parents  commit 725c49b

File tree

98 files changed

+2897
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2897
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2+
ARG RUBY_VERSION=3.3.4
3+
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION

.devcontainer/compose.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "example"
2+
3+
services:
4+
rails-app:
5+
build:
6+
context: ..
7+
dockerfile: .devcontainer/Dockerfile
8+
9+
volumes:
10+
- ../..:/workspaces:cached
11+
12+
# Overrides default command so things don't shut down after the process ends.
13+
command: sleep infinity
14+
15+
# Uncomment the next line to use a non-root user for all processes.
16+
# user: vscode
17+
18+
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
19+
# (Adding the "ports" property to this file will not forward from a Codespace.)
20+
depends_on:
21+
- redis
22+
23+
redis:
24+
image: redis:7.2
25+
restart: unless-stopped
26+
volumes:
27+
- redis-data:/data
28+
29+
30+
volumes:
31+
redis-data:

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3+
{
4+
"name": "example",
5+
"dockerComposeFile": "compose.yaml",
6+
"service": "rails-app",
7+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
"features": {
11+
"ghcr.io/devcontainers/features/github-cli:1": {},
12+
"ghcr.io/rails/devcontainer/features/activestorage": {},
13+
"ghcr.io/devcontainers/features/node:1": {},
14+
"ghcr.io/rails/devcontainer/features/sqlite3": {}
15+
},
16+
17+
"containerEnv": {
18+
"REDIS_URL": "redis://redis:6379/1"
19+
},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
"forwardPorts": [3000, 6379],
23+
24+
// Configure tool-specific properties.
25+
// "customizations": {},
26+
27+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
28+
// "remoteUser": "root",
29+
30+
31+
// Use 'postCreateCommand' to run commands after the container is created.
32+
"postCreateCommand": "bin/setup"
33+
}

.dockerignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2+
3+
# Ignore git directory.
4+
/.git/
5+
/.gitignore
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files (except templates).
11+
/.env*
12+
!/.env*.erb
13+
14+
# Ignore all default key files.
15+
/config/master.key
16+
/config/credentials/*.key
17+
18+
# Ignore all logfiles and tempfiles.
19+
/log/*
20+
/tmp/*
21+
!/log/.keep
22+
!/tmp/.keep
23+
24+
# Ignore pidfiles, but keep the directory.
25+
/tmp/pids/*
26+
!/tmp/pids/.keep
27+
28+
# Ignore storage (uploaded files in development and any SQLite databases).
29+
/storage/*
30+
!/storage/.keep
31+
/tmp/storage/*
32+
!/tmp/storage/.keep
33+
34+
# Ignore assets.
35+
/node_modules/
36+
/app/assets/builds/*
37+
!/app/assets/builds/.keep
38+
/public/assets
39+
40+
# Ignore CI service files.
41+
/.github
42+
43+
# Ignore development files
44+
/.devcontainer
45+
46+
# Ignore Docker-related files
47+
/.dockerignore
48+
/Dockerfile*

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
8+
jobs:
9+
scan_ruby:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: .ruby-version
20+
bundler-cache: true
21+
22+
- name: Scan for common Rails security vulnerabilities using static analysis
23+
run: bin/brakeman --no-pager
24+
25+
lint:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: .ruby-version
35+
bundler-cache: true
36+
37+
- name: Lint code for consistent style
38+
run: bin/rubocop -f github
39+

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# Temporary files generated by your text editor or operating system
4+
# belong in git's global ignore instead:
5+
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`
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+
37+
/app/assets/builds/*
38+
!/app/assets/builds/.keep
39+
40+
/node_modules

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
21.7.3

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Omakase Ruby styling for Rails
2+
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
3+
4+
# Overwrite or add rules to create your own house style
5+
#
6+
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
7+
# Layout/SpaceInsideArrayLiteralBrackets:
8+
# Enabled: false

0 commit comments

Comments
 (0)