mirror of
https://github.com/kingomarnajjar/codespaces-rails.git
synced 2026-07-26 06:37:17 +10:00
First cut
This commit is contained in:
parent
81712ed44a
commit
c1821d8bd1
17 changed files with 41 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -33,3 +33,5 @@
|
||||||
|
|
||||||
# Ignore master key for decrypting credentials and more.
|
# Ignore master key for decrypting credentials and more.
|
||||||
/config/master.key
|
/config/master.key
|
||||||
|
|
||||||
|
dump.rdb
|
||||||
|
|
|
||||||
4
Gemfile
4
Gemfile
|
|
@ -28,7 +28,7 @@ gem "stimulus-rails"
|
||||||
gem "jbuilder"
|
gem "jbuilder"
|
||||||
|
|
||||||
# Use Redis adapter to run Action Cable in production
|
# Use Redis adapter to run Action Cable in production
|
||||||
# gem "redis", "~> 4.0"
|
gem "redis", "~> 4.0"
|
||||||
|
|
||||||
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
||||||
# gem "kredis"
|
# gem "kredis"
|
||||||
|
|
@ -74,3 +74,5 @@ group :test do
|
||||||
gem "selenium-webdriver"
|
gem "selenium-webdriver"
|
||||||
gem "webdrivers"
|
gem "webdrivers"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gem "hotwire-livereload", "~> 1.2"
|
||||||
|
|
|
||||||
13
Gemfile.lock
13
Gemfile.lock
|
|
@ -108,8 +108,12 @@ GEM
|
||||||
rubocop
|
rubocop
|
||||||
smart_properties
|
smart_properties
|
||||||
erubi (1.11.0)
|
erubi (1.11.0)
|
||||||
|
ffi (1.15.5)
|
||||||
globalid (1.0.0)
|
globalid (1.0.0)
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
|
hotwire-livereload (1.2.2)
|
||||||
|
listen (>= 3.0.0)
|
||||||
|
rails (>= 6.0.0)
|
||||||
i18n (1.12.0)
|
i18n (1.12.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
importmap-rails (1.1.5)
|
importmap-rails (1.1.5)
|
||||||
|
|
@ -127,6 +131,9 @@ GEM
|
||||||
rexml
|
rexml
|
||||||
kramdown-parser-gfm (1.1.0)
|
kramdown-parser-gfm (1.1.0)
|
||||||
kramdown (~> 2.0)
|
kramdown (~> 2.0)
|
||||||
|
listen (3.7.1)
|
||||||
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
loofah (2.18.0)
|
loofah (2.18.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
|
|
@ -193,6 +200,10 @@ GEM
|
||||||
zeitwerk (~> 2.5)
|
zeitwerk (~> 2.5)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
|
rb-fsevent (0.11.2)
|
||||||
|
rb-inotify (0.10.1)
|
||||||
|
ffi (~> 1.0)
|
||||||
|
redis (4.8.0)
|
||||||
regexp_parser (2.5.0)
|
regexp_parser (2.5.0)
|
||||||
reline (0.3.1)
|
reline (0.3.1)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
|
|
@ -283,10 +294,12 @@ DEPENDENCIES
|
||||||
capybara
|
capybara
|
||||||
debug
|
debug
|
||||||
erb_lint
|
erb_lint
|
||||||
|
hotwire-livereload (~> 1.2)
|
||||||
importmap-rails
|
importmap-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
puma (~> 5.0)
|
puma (~> 5.0)
|
||||||
rails (~> 7.0.3)
|
rails (~> 7.0.3)
|
||||||
|
redis (~> 4.0)
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
solargraph
|
solargraph
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
|
|
|
||||||
4
app/controllers/hello_codespaces_controller.rb
Normal file
4
app/controllers/hello_codespaces_controller.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
class HelloCodespacesController < ApplicationController
|
||||||
|
def index
|
||||||
|
end
|
||||||
|
end
|
||||||
2
app/helpers/hello_codespaces_helper.rb
Normal file
2
app/helpers/hello_codespaces_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
module HelloCodespacesHelper
|
||||||
|
end
|
||||||
2
app/views/hello_codespaces/index.html.erb
Normal file
2
app/views/hello_codespaces/index.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
<h1>HelloCodespaces#index</h1>
|
||||||
|
<p>Find me in app/views/hello_codespaces/index.html.erb!!</p>
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||||
<%= javascript_importmap_tags %>
|
<%= javascript_importmap_tags %>
|
||||||
|
<%= hotwire_livereload_tags if Rails.env.development? %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
development:
|
development:
|
||||||
adapter: async
|
adapter: redis
|
||||||
|
url: redis://localhost:6379/1
|
||||||
|
|
||||||
test:
|
test:
|
||||||
adapter: test
|
adapter: test
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,10 @@ Rails.application.configure do
|
||||||
# config.action_view.annotate_rendered_view_with_filenames = true
|
# config.action_view.annotate_rendered_view_with_filenames = true
|
||||||
|
|
||||||
# Uncomment if you wish to allow Action Cable access from any origin.
|
# Uncomment if you wish to allow Action Cable access from any origin.
|
||||||
# config.action_cable.disable_request_forgery_protection = true
|
config.action_cable.disable_request_forgery_protection = true
|
||||||
|
|
||||||
# Allow requests from our preview domain.
|
# Allow requests from our preview domain.
|
||||||
config.hosts << "#{ENV['CODESPACE_NAME']}-3000.preview.app.github.dev"
|
config.hosts << "#{ENV['CODESPACE_NAME']}-3000.preview.app.github.dev"
|
||||||
|
|
||||||
|
# config.action_cable.allowed_request_origins = ["#{ENV['CODESPACE_NAME']}-3000.preview.app.github.dev"]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
root "hello_codespaces#index"
|
||||||
|
|
||||||
# Defines the root path route ("/")
|
|
||||||
# root "articles#index"
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
8
test/controllers/hello_codespaces_controller_test.rb
Normal file
8
test/controllers/hello_codespaces_controller_test.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
require "test_helper"
|
||||||
|
|
||||||
|
class HelloCodespacesControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
test "should get index" do
|
||||||
|
get hello_codespaces_index_url
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
end
|
||||||
BIN
vendor/cache/ffi-1.15.5.gem
vendored
Normal file
BIN
vendor/cache/ffi-1.15.5.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/hotwire-livereload-1.2.2.gem
vendored
Normal file
BIN
vendor/cache/hotwire-livereload-1.2.2.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/listen-3.7.1.gem
vendored
Normal file
BIN
vendor/cache/listen-3.7.1.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/rb-fsevent-0.11.2.gem
vendored
Normal file
BIN
vendor/cache/rb-fsevent-0.11.2.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/rb-inotify-0.10.1.gem
vendored
Normal file
BIN
vendor/cache/rb-inotify-0.10.1.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/redis-4.8.0.gem
vendored
Normal file
BIN
vendor/cache/redis-4.8.0.gem
vendored
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue