Skip to content

Commit

Permalink
Add Rails 7 app
Browse files Browse the repository at this point in the history
  • Loading branch information
alisnic committed Mar 14, 2022
1 parent 6fe7a96 commit a7ac1b7
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/rails7/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source 'https://rubygems.org'

gem 'rails', '~> 7.0.2'
gem 'devise'
gem 'pry-rails'
gem 'sqlite3'

group :development do
gem 'solargraph'
end
6 changes: 6 additions & 0 deletions spec/rails7/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require_relative 'config/application'

Rails.application.load_tasks
Empty file.
2 changes: 2 additions & 0 deletions spec/rails7/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ApplicationController < ActionController::Base
end
Empty file.
Empty file added spec/rails7/app/models/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions spec/rails7/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is used by Rack-based servers to start the application.

require_relative 'config/environment'

run Rails.application
10 changes: 10 additions & 0 deletions spec/rails7/config/application.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require_relative 'boot'
require 'rails/all'

Bundler.require(*Rails.groups)

module MyApp
class Application < Rails::Application
##
end
end
3 changes: 3 additions & 0 deletions spec/rails7/config/boot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)

require 'bundler/setup' # Set up gems listed in the Gemfile.
4 changes: 4 additions & 0 deletions spec/rails7/config/database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
development:
adapter: sqlite3
pool: 5
database: db/dev.sqlite3
10 changes: 10 additions & 0 deletions spec/rails7/config/environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Load the Rails application.
require_relative 'application'

Rails.application.configure do
config.eager_load = true
config.active_storage.service = :local
end

# Initialize the Rails application.
Rails.application.initialize!
3 changes: 3 additions & 0 deletions spec/rails7/config/storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
local:
service: Disk
root: <%= Rails.root.join("storage") %>
Binary file added spec/rails7/db/dev.sqlite3
Binary file not shown.
Empty file added spec/rails7/db/migrate/.gitkeep
Empty file.

0 comments on commit a7ac1b7

Please sign in to comment.