Skip to content

Commit 9e1125a

Browse files
committed
8.0.0.beta1
1 parent 31a0a03 commit 9e1125a

32 files changed

+702
-449
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Ignore bundler config.
88
/.bundle
99

10-
# Ignore all environment files (except templates).
10+
# Ignore all environment files.
1111
/.env*
12-
!/.env*.erb
1312

1413
# Ignore all default key files.
1514
/config/master.key

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Ignore bundler config.
88
/.bundle
99

10-
# Ignore all environment files (except templates).
10+
# Ignore all environment files.
1111
/.env*
12-
!/.env*.erb
1312

1413
# Ignore all logfiles and tempfiles.
1514
/log/*

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# syntax = docker/dockerfile:1
1+
# syntax=docker/dockerfile:1
2+
# check=error=true
23

34
# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
4-
# docker build -t my-app .
5-
# docker run -d -p 80:80 -p 443:443 --name my-app -e RAILS_MASTER_KEY=<value from config/master.key> my-app
5+
# docker build -t railsdiff .
6+
# docker run -d -p 80:80 -e RAILS_MASTER_KEY=<value from config/master.key> --name railsdiff railsdiff
7+
8+
# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
69

710
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
811
ARG RUBY_VERSION=your-ruby-version
@@ -64,6 +67,6 @@ USER 1000:1000
6467
# Entrypoint prepares the database.
6568
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
6669

67-
# Start the server by default, this can be overwritten at runtime
68-
EXPOSE 3000
69-
CMD ["./bin/rails", "server"]
70+
# Start server via Thruster by default, this can be overwritten at runtime
71+
EXPOSE 80
72+
CMD ["./bin/thrust", "./bin/rails", "server"]

Gemfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
source "https://rubygems.org"
22

33
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
4-
gem "rails", "~> 7.2.2", ">= 7.2.2.1"
5-
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
6-
gem "sprockets-rails"
4+
gem "rails", "~> 8.0.0.beta1"
5+
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
6+
gem "propshaft"
77
# Use sqlite3 as the database for Active Record
8-
gem "sqlite3", ">= 1.4"
8+
gem "sqlite3", ">= 2.1"
99
# Use the Puma web server [https://github.com/puma/puma]
1010
gem "puma", ">= 5.0"
1111
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
@@ -16,21 +16,27 @@ gem "turbo-rails"
1616
gem "stimulus-rails"
1717
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
1818
gem "jbuilder"
19-
# Use Redis adapter to run Action Cable in production
20-
# gem "redis", ">= 4.0.1"
21-
22-
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
23-
# gem "kredis"
2419

2520
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
2621
# gem "bcrypt", "~> 3.1.7"
2722

2823
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
2924
gem "tzinfo-data", platforms: %i[ windows jruby ]
3025

26+
# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable
27+
gem "solid_cache"
28+
gem "solid_queue"
29+
gem "solid_cable"
30+
3131
# Reduces boot times through caching; required in config/boot.rb
3232
gem "bootsnap", require: false
3333

34+
# Deploy this application anywhere as a Docker container [https://kamal-deploy.org]
35+
gem "kamal", ">= 2.0.0.rc2", require: false
36+
37+
# Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/]
38+
gem "thruster", require: false
39+
3440
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
3541
# gem "image_processing", "~> 1.2"
3642

app/assets/config/manifest.js

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
/*
2-
* This is a manifest file that'll be compiled into application.css, which will include all the files
3-
* listed below.
2+
* This is a manifest file that'll be compiled into application.css.
43
*
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.
4+
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
5+
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
6+
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
7+
* depending on specificity.
78
*
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
9+
* Consider organizing styles into separate files for maintainability.
1510
*/

app/channels/application_cable/channel.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/channels/application_cable/connection.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/views/layouts/application.html.erb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
<title><%= content_for(:title) || "Railsdiff" %></title>
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<meta name="apple-mobile-web-app-capable" content="yes">
7+
<meta name="mobile-web-app-capable" content="yes">
78
<%= csrf_meta_tags %>
89
<%= csp_meta_tag %>
910

1011
<%= yield :head %>
1112

12-
<link rel="manifest" href="/manifest.json">
13+
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
14+
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
15+
1316
<link rel="icon" href="/icon.png" type="image/png">
1417
<link rel="icon" href="/icon.svg" type="image/svg+xml">
1518
<link rel="apple-touch-icon" href="/icon.png">
16-
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
19+
20+
<%# Includes all stylesheet files in app/views/stylesheets %>
21+
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
1722
</head>
1823

1924
<body>

bin/dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env ruby
2+
exec "./bin/rails", "server", *ARGV

0 commit comments

Comments
 (0)