Skip to content

Commit 6e83cd0

Browse files
authored
Initial commit
0 parents  commit 6e83cd0

File tree

116 files changed

+3061
-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.

116 files changed

+3061
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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/universal
3+
{
4+
"name": "Container",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "firstdraft/appdev-rails-7-template",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
"forwardPorts": [3000, 4567, 9292],
13+
14+
"portsAttributes": {
15+
"3000": {
16+
"onAutoForward": "silent"
17+
},
18+
"4567": {
19+
"onAutoForward": "silent"
20+
},
21+
"9292": {
22+
"onAutoForward": "silent"
23+
}
24+
},
25+
26+
"otherPortsAttributes": {"onAutoForward": "ignore"},
27+
28+
// Use 'postCreateCommand' to run commands after the container is created.
29+
"postCreateCommand": "bin/setup",
30+
31+
// Configure tool-specific properties.
32+
"customizations": {
33+
"vscode": {
34+
"extensions": ["vortizhe.simple-ruby-erb",
35+
"mbessey.vscode-rufo",
36+
"aliariff.vscode-erb-beautify",
37+
"eamodio.gitlens",
38+
"setobiralo.erb-commenter",
39+
"firstdraft.terminal-clear"]
40+
}
41+
}
42+
43+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44+
// "remoteUser": "root"
45+
}

.erdconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
attributes:
2+
- content
3+
- primary_keys
4+
- foreign_keys
5+
- inheritance
6+
- timestamps
7+
disconnected: true
8+
filename: erd
9+
filetype: png
10+
indirect: true
11+
inheritance: false
12+
markup: true
13+
notation: bachman
14+
orientation: vertical
15+
polymorphism: false
16+
sort: true
17+
warn: false
18+
title: false
19+
exclude: ActiveRecord::InternalMetadata,ActiveRecord::SchemaMigration,ActiveStorage::Attachment,ActiveStorage::Blob,AdminUser,ActiveAdmin::Comment,primary::SchemaMigration,SolidQueue::Job,SolidQueue::ScheduledExecution,SolidQueue::RecurringTask,SolidQueue::RecurringExecution,SolidQueue::ReadyExecution,SolidQueue::Pause,SolidQueue::FailedExecution,SolidQueue::Process,SolidQueue::ClaimedExecution,SolidQueue::BlockedExecution,SolidQueue::Semaphore,SolidCache::Entry,SolidCable::Message
20+
only: null
21+
only_recursion_depth: null
22+
prepend_primary: false
23+
cluster: false
24+
splines: spline

.gitattributes

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

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
# Ignore uploaded files in development.
22+
/storage/*
23+
!/storage/.keep
24+
/tmp/storage/*
25+
!/tmp/storage/
26+
!/tmp/storage/.keep
27+
28+
/public/assets
29+
30+
# Ignore master key for decrypting credentials and more.
31+
/config/master.key
32+
# AppDev files
33+
core.chrome*
34+
examples.txt
35+
.vscode/.ltici_apitoken.yml
36+
37+
# Ignore dotenv files
38+
/.env*
39+
40+
# Un-ignore SQLite3 db
41+
!/db/*.sqlite3
42+
!/db/*.sqlite3-journal
43+
44+
# Ignore public uploads
45+
/public/uploads/*

.gitpod.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
image: firstdraft/appdev-rails-7-template
2+
3+
tasks:
4+
- before: |
5+
sudo cp -r /home/student /home/gitpod
6+
(cd /home/gitpod/student; sudo find . -maxdepth 1 -exec mv {} .. \;)
7+
source ~/.bashrc
8+
sudo chmod 777 /home/gitpod && sudo chown -R gitpod /home/gitpod /home/student
9+
export GEM_HOME=/workspace/.rvm
10+
export GEM_PATH=$GEM_HOME:$GEM_PATH
11+
export PATH=/workspace/.rvm/bin:$PATH
12+
bin/setup
13+
ports:
14+
- port: 3000
15+
onOpen: open-preview
16+
visibility: public
17+
- port: 4567
18+
onOpen: open-preview
19+
visibility: public
20+
- port: 9292
21+
onOpen: open-preview
22+
visibility: public
23+
- port: 5432
24+
onOpen: ignore
25+
26+
vscode:
27+
extensions:
28+
- vortizhe.simple-ruby-erb
29+
- mbessey.vscode-rufo
30+
- aliariff.vscode-erb-beautify
31+
- eamodio.gitlens
32+
- setobiralo.erb-commenter
33+
- firstdraft.terminal-clear

.pryrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Pry.config.print = proc do |output, value, _pry_|
2+
case value
3+
when ActiveRecord::Relation
4+
output.puts "=> #{value.to_s}"
5+
else
6+
Pry::ColorPrinter.default(output, value, _pry_)
7+
end
8+
end

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--color
2+
--format documentation
3+
--require spec_helper

.ruby-version

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

.vscode/settings.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.acceptSuggestionOnEnter": "off",
4+
"editor.bracketPairColorization.enabled": false,
5+
"editor.cursorSurroundingLines": 4,
6+
"editor.dragAndDrop": false,
7+
"editor.guides.bracketPairs": true,
8+
"editor.linkedEditing": true,
9+
"editor.minimap.enabled": false,
10+
"editor.smoothScrolling": false,
11+
"editor.wordWrap": "on",
12+
"editor.wrappingIndent": "deepIndent",
13+
"workbench.editor.closeOnFileDelete": true,
14+
"workbench.fontAliasing": "auto",
15+
"workbench.startupEditor": "none",
16+
"workbench.tree.renderIndentGuides": "always",
17+
"files.autoSaveDelay": 500,
18+
"files.exclude": {
19+
"**/.git": true,
20+
".vscode": true,
21+
".bundle": true,
22+
},
23+
"files.insertFinalNewline": true,
24+
"files.trimFinalNewlines": true,
25+
"screencastMode.keyboardOptions": {
26+
"showKeys": false,
27+
"showKeybindings": true,
28+
"showCommands": false,
29+
"showCommandGroups": false,
30+
"showSingleEditorCursorMoves": true
31+
},
32+
"screencastMode.verticalOffset": 10,
33+
"explorer.compactFolders": false,
34+
"explorer.incrementalNaming": "smart",
35+
"html.format.preserveNewLines": true,
36+
"html.format.templating": true,
37+
"terminal.integrated.altClickMovesCursor": true,
38+
"terminal.integrated.defaultProfile.linux": "bash",
39+
"vscode-erb-beautify.keepBlankLines": 1,
40+
"gitpod.openInStable.neverPrompt": true,
41+
"gitlens.showWelcomeOnInstall": false,
42+
"gitlens.currentLine.enabled": false,
43+
"emmet.includeLanguages": {
44+
"erb": "html"
45+
},
46+
"[ruby]": {
47+
"editor.defaultFormatter": "mbessey.vscode-rufo",
48+
"editor.formatOnSave": false
49+
},
50+
"[erb]": {
51+
"editor.defaultFormatter": "aliariff.vscode-erb-beautify",
52+
"editor.formatOnSave": false,
53+
"editor.autoClosingBrackets": "beforeWhitespace"
54+
},
55+
"files.associations": {
56+
"*.html.erb": "erb"
57+
}
58+
}

Gemfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.2.1"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.1.3", ">= 7.1.3.2"
8+
9+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10+
gem "sprockets-rails"
11+
12+
# Use postgresql as the database for Active Record
13+
gem "pg", "~> 1.1"
14+
15+
# Use the Puma web server [https://github.com/puma/puma]
16+
gem "puma"
17+
18+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
19+
gem "importmap-rails"
20+
21+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22+
gem "turbo-rails"
23+
24+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
25+
gem "stimulus-rails"
26+
27+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
28+
gem "jbuilder"
29+
30+
# Use Redis adapter to run Action Cable in production
31+
gem "redis", "~> 4.0"
32+
33+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
34+
# gem "kredis"
35+
36+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
37+
# gem "bcrypt", "~> 3.1.7"
38+
39+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
41+
42+
# Reduces boot times through caching; required in config/boot.rb
43+
gem "bootsnap", require: false
44+
45+
# Use Sass to process CSS
46+
# gem "sassc-rails"
47+
48+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
49+
# gem "image_processing", "~> 1.2"
50+
51+
group :development, :test do
52+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
53+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
54+
end
55+
56+
group :development do
57+
# Use console on exceptions pages [https://github.com/rails/web-console]
58+
gem "web-console"
59+
60+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
61+
# gem "rack-mini-profiler"
62+
63+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
64+
# gem "spring"
65+
end
66+
67+
group :test do
68+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
69+
gem "capybara"
70+
gem "selenium-webdriver", "~> 4.11.0"
71+
gem "webdrivers"
72+
end
73+
74+
# AppDev Gems
75+
# ===========
76+
gem "active_link_to"
77+
gem "appdev_support"
78+
gem "awesome_print"
79+
gem "devise"
80+
gem "dotenv"
81+
gem "faker"
82+
gem "htmlbeautifier"
83+
gem "http"
84+
gem "sqlite3", "~> 1.4"
85+
gem "table_print"
86+
gem "simple_form"
87+
gem "carrierwave"
88+
gem "openai-chat"
89+
90+
group :development do
91+
gem "annotate"
92+
gem "better_errors"
93+
gem "binding_of_caller"
94+
gem "dev_toolbar"
95+
gem "draft_generators"
96+
gem "pry-rails"
97+
gem "rails_db"
98+
gem "rails-erd"
99+
gem "rufo"
100+
gem "specs_to_readme"
101+
end
102+
103+
group :development, :test do
104+
gem "rspec-rails", "~> 6.0.0"
105+
gem "grade_runner", "~> 0.0.13"
106+
end
107+
108+
group :test do
109+
gem "draft_matchers"
110+
gem "shoulda-matchers", "~> 4.0"
111+
gem "rspec-html-matchers"
112+
gem "webmock"
113+
end

0 commit comments

Comments
 (0)