Skip to content

Commit 21f5ddd

Browse files
committed
Create rails project
1 parent 42dd796 commit 21f5ddd

Some content is hidden

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

67 files changed

+1357
-0
lines changed

.gitattributes

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

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.1

Gemfile

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.1.1"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.0.2", ">= 7.0.2.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", "~> 5.0"
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+

Gemfile.lock

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (7.0.2.3)
5+
actionpack (= 7.0.2.3)
6+
activesupport (= 7.0.2.3)
7+
nio4r (~> 2.0)
8+
websocket-driver (>= 0.6.1)
9+
actionmailbox (7.0.2.3)
10+
actionpack (= 7.0.2.3)
11+
activejob (= 7.0.2.3)
12+
activerecord (= 7.0.2.3)
13+
activestorage (= 7.0.2.3)
14+
activesupport (= 7.0.2.3)
15+
mail (>= 2.7.1)
16+
net-imap
17+
net-pop
18+
net-smtp
19+
actionmailer (7.0.2.3)
20+
actionpack (= 7.0.2.3)
21+
actionview (= 7.0.2.3)
22+
activejob (= 7.0.2.3)
23+
activesupport (= 7.0.2.3)
24+
mail (~> 2.5, >= 2.5.4)
25+
net-imap
26+
net-pop
27+
net-smtp
28+
rails-dom-testing (~> 2.0)
29+
actionpack (7.0.2.3)
30+
actionview (= 7.0.2.3)
31+
activesupport (= 7.0.2.3)
32+
rack (~> 2.0, >= 2.2.0)
33+
rack-test (>= 0.6.3)
34+
rails-dom-testing (~> 2.0)
35+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36+
actiontext (7.0.2.3)
37+
actionpack (= 7.0.2.3)
38+
activerecord (= 7.0.2.3)
39+
activestorage (= 7.0.2.3)
40+
activesupport (= 7.0.2.3)
41+
globalid (>= 0.6.0)
42+
nokogiri (>= 1.8.5)
43+
actionview (7.0.2.3)
44+
activesupport (= 7.0.2.3)
45+
builder (~> 3.1)
46+
erubi (~> 1.4)
47+
rails-dom-testing (~> 2.0)
48+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49+
activejob (7.0.2.3)
50+
activesupport (= 7.0.2.3)
51+
globalid (>= 0.3.6)
52+
activemodel (7.0.2.3)
53+
activesupport (= 7.0.2.3)
54+
activerecord (7.0.2.3)
55+
activemodel (= 7.0.2.3)
56+
activesupport (= 7.0.2.3)
57+
activestorage (7.0.2.3)
58+
actionpack (= 7.0.2.3)
59+
activejob (= 7.0.2.3)
60+
activerecord (= 7.0.2.3)
61+
activesupport (= 7.0.2.3)
62+
marcel (~> 1.0)
63+
mini_mime (>= 1.1.0)
64+
activesupport (7.0.2.3)
65+
concurrent-ruby (~> 1.0, >= 1.0.2)
66+
i18n (>= 1.6, < 2)
67+
minitest (>= 5.1)
68+
tzinfo (~> 2.0)
69+
bindex (0.8.1)
70+
bootsnap (1.11.1)
71+
msgpack (~> 1.2)
72+
builder (3.2.4)
73+
concurrent-ruby (1.1.9)
74+
crass (1.0.6)
75+
debug (1.4.0)
76+
irb (>= 1.3.6)
77+
reline (>= 0.2.7)
78+
digest (3.1.0)
79+
erubi (1.10.0)
80+
globalid (1.0.0)
81+
activesupport (>= 5.0)
82+
i18n (1.10.0)
83+
concurrent-ruby (~> 1.0)
84+
importmap-rails (1.0.3)
85+
actionpack (>= 6.0.0)
86+
railties (>= 6.0.0)
87+
io-console (0.5.11)
88+
io-wait (0.2.1)
89+
irb (1.4.1)
90+
reline (>= 0.3.0)
91+
jbuilder (2.11.5)
92+
actionview (>= 5.0.0)
93+
activesupport (>= 5.0.0)
94+
loofah (2.15.0)
95+
crass (~> 1.0.2)
96+
nokogiri (>= 1.5.9)
97+
mail (2.7.1)
98+
mini_mime (>= 0.1.1)
99+
marcel (1.0.2)
100+
method_source (1.0.0)
101+
mini_mime (1.1.2)
102+
minitest (5.15.0)
103+
msgpack (1.4.5)
104+
net-imap (0.2.3)
105+
digest
106+
net-protocol
107+
strscan
108+
net-pop (0.1.1)
109+
digest
110+
net-protocol
111+
timeout
112+
net-protocol (0.1.2)
113+
io-wait
114+
timeout
115+
net-smtp (0.3.1)
116+
digest
117+
net-protocol
118+
timeout
119+
nio4r (2.5.8)
120+
nokogiri (1.13.3-x86_64-linux)
121+
racc (~> 1.4)
122+
pg (1.3.4)
123+
puma (5.6.2)
124+
nio4r (~> 2.0)
125+
racc (1.6.0)
126+
rack (2.2.3)
127+
rack-test (1.1.0)
128+
rack (>= 1.0, < 3)
129+
rails (7.0.2.3)
130+
actioncable (= 7.0.2.3)
131+
actionmailbox (= 7.0.2.3)
132+
actionmailer (= 7.0.2.3)
133+
actionpack (= 7.0.2.3)
134+
actiontext (= 7.0.2.3)
135+
actionview (= 7.0.2.3)
136+
activejob (= 7.0.2.3)
137+
activemodel (= 7.0.2.3)
138+
activerecord (= 7.0.2.3)
139+
activestorage (= 7.0.2.3)
140+
activesupport (= 7.0.2.3)
141+
bundler (>= 1.15.0)
142+
railties (= 7.0.2.3)
143+
rails-dom-testing (2.0.3)
144+
activesupport (>= 4.2.0)
145+
nokogiri (>= 1.6)
146+
rails-html-sanitizer (1.4.2)
147+
loofah (~> 2.3)
148+
railties (7.0.2.3)
149+
actionpack (= 7.0.2.3)
150+
activesupport (= 7.0.2.3)
151+
method_source
152+
rake (>= 12.2)
153+
thor (~> 1.0)
154+
zeitwerk (~> 2.5)
155+
rake (13.0.6)
156+
reline (0.3.1)
157+
io-console (~> 0.5)
158+
sprockets (4.0.3)
159+
concurrent-ruby (~> 1.0)
160+
rack (> 1, < 3)
161+
sprockets-rails (3.4.2)
162+
actionpack (>= 5.2)
163+
activesupport (>= 5.2)
164+
sprockets (>= 3.0.0)
165+
stimulus-rails (1.0.4)
166+
railties (>= 6.0.0)
167+
strscan (3.0.1)
168+
thor (1.2.1)
169+
timeout (0.2.0)
170+
turbo-rails (1.0.1)
171+
actionpack (>= 6.0.0)
172+
railties (>= 6.0.0)
173+
tzinfo (2.0.4)
174+
concurrent-ruby (~> 1.0)
175+
web-console (4.2.0)
176+
actionview (>= 6.0.0)
177+
activemodel (>= 6.0.0)
178+
bindex (>= 0.4.0)
179+
railties (>= 6.0.0)
180+
websocket-driver (0.7.5)
181+
websocket-extensions (>= 0.1.0)
182+
websocket-extensions (0.1.5)
183+
zeitwerk (2.5.4)
184+
185+
PLATFORMS
186+
x86_64-linux
187+
188+
DEPENDENCIES
189+
bootsnap
190+
debug
191+
importmap-rails
192+
jbuilder
193+
pg (~> 1.1)
194+
puma (~> 5.0)
195+
rails (~> 7.0.2, >= 7.0.2.2)
196+
sprockets-rails
197+
stimulus-rails
198+
turbo-rails
199+
tzinfo-data
200+
web-console
201+
202+
RUBY VERSION
203+
ruby 3.1.1p18
204+
205+
BUNDLED WITH
206+
2.3.8

Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative "config/application"
5+
6+
Rails.application.load_tasks

app/assets/config/manifest.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//= link_tree ../images
2+
//= link_directory ../stylesheets .css
3+
//= link_tree ../../javascript .js
4+
//= link_tree ../../../vendor/javascript .js

app/assets/images/.keep

Whitespace-only changes.
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require_tree .
14+
*= require_self
15+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module ApplicationCable
2+
class Channel < ActionCable::Channel::Base
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module ApplicationCable
2+
class Connection < ActionCable::Connection::Base
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationController < ActionController::Base
2+
end

app/controllers/concerns/.keep

Whitespace-only changes.

app/helpers/application_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end

app/javascript/application.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2+
import "@hotwired/turbo-rails"
3+
import "controllers"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Application } from "@hotwired/stimulus"
2+
3+
const application = Application.start()
4+
5+
// Configure Stimulus development experience
6+
application.debug = false
7+
window.Stimulus = application
8+
9+
export { application }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Controller } from "@hotwired/stimulus"
2+
3+
export default class extends Controller {
4+
connect() {
5+
this.element.textContent = "Hello World!"
6+
}
7+
}

app/javascript/controllers/index.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Import and register all your controllers from the importmap under controllers/*
2+
3+
import { application } from "controllers/application"
4+
5+
// Eager load all controllers defined in the import map under controllers/**/*_controller
6+
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7+
eagerLoadControllersFrom("controllers", application)
8+
9+
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10+
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11+
// lazyLoadControllersFrom("controllers", application)

0 commit comments

Comments
 (0)