Skip to content

Commit 9795eb9

Browse files
committed
Regenerate Action Text dummy app
Generated using the following script and manually reviewed after: skipkayhil/rails-bin@38e2aac
1 parent 915159f commit 9795eb9

29 files changed

+204
-172
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//= link_tree ../images
2-
//= link_directory ../javascripts .js
32
//= link_directory ../stylesheets .css
3+
//= link_tree ../../javascript .js

actiontext/test/dummy/app/assets/stylesheets/application.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* files in this directory. Styles in this file should be added after the last require_* statement.
1111
* It is generally better to create a new file per style scope.
1212
*
13-
*= require trix/dist/trix.css
13+
*= require trix
1414
*= require_tree .
1515
*= require_self
1616
*/

actiontext/test/dummy/app/controllers/messages_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
class MessagesController < ActionController::Base
22
before_action :set_message, only: [:show, :edit, :update, :destroy]
33

4+
# This class intentionally does not extend ApplicationController, so the
5+
# layout must be set manually. See commit 614e813 for details
46
layout "application"
57

68
# GET /messages
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
class ApplicationJob < ActiveJob::Base
2+
# Automatically retry jobs that encountered a deadlock
3+
# retry_on ActiveRecord::Deadlocked
4+
5+
# Most jobs are safe to ignore if the underlying records are no longer available
6+
# discard_on ActiveJob::DeserializationError
27
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
class ApplicationMailer < ActionMailer::Base
2-
default from: '[email protected]'
3-
layout 'mailer'
2+
default from: "[email protected]"
3+
layout "mailer"
44
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class ApplicationRecord < ActiveRecord::Base
2-
self.abstract_class = true
2+
primary_abstract_class
33
end

actiontext/test/dummy/app/views/layouts/application.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<html>
33
<head>
44
<title>Dummy</title>
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
56
<%= csrf_meta_tags %>
7+
<%= csp_meta_tag %>
68

7-
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
9+
<%= stylesheet_link_tag "application" %>
810
<%= javascript_importmap_tags %>
911
</head>
1012

actiontext/test/dummy/bin/bundle

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

actiontext/test/dummy/bin/rails

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env ruby
2-
APP_PATH = File.expand_path('../config/application', __dir__)
2+
APP_PATH = File.expand_path("../config/application", __dir__)
33
require_relative "../config/boot"
44
require "rails/commands"

actiontext/test/dummy/bin/setup

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
3-
include FileUtils
43

54
# path to your application root.
6-
APP_ROOT = File.expand_path('..', __dir__)
5+
APP_ROOT = File.expand_path("..", __dir__)
76

87
def system!(*args)
98
system(*args, exception: true)
109
end
1110

12-
chdir APP_ROOT do
13-
# This script is a starting point to set up your application.
11+
FileUtils.chdir APP_ROOT do
12+
# This script is a way to set up or update your development environment automatically.
13+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
1414
# Add necessary setup steps to this file.
1515

16-
puts '== Installing dependencies =='
17-
system! 'gem install bundler --conservative'
18-
system('bundle check') || system!('bundle install')
19-
20-
# Install JavaScript dependencies if using Yarn
21-
# system('bin/yarn')
16+
puts "== Installing dependencies =="
17+
system! "gem install bundler --conservative"
18+
system("bundle check") || system!("bundle install")
2219

2320
# puts "\n== Copying sample files =="
24-
# unless File.exist?('config/database.yml')
25-
# cp 'config/database.yml.sample', 'config/database.yml'
21+
# unless File.exist?("config/database.yml")
22+
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
2623
# end
2724

2825
puts "\n== Preparing database =="
29-
system! 'bin/rails db:setup'
26+
system! "bin/rails db:prepare"
3027

3128
puts "\n== Removing old logs and tempfiles =="
32-
system! 'bin/rails log:clear tmp:clear'
29+
system! "bin/rails log:clear tmp:clear"
3330

3431
puts "\n== Restarting application server =="
35-
system! 'bin/rails restart'
32+
system! "bin/rails restart"
3633
end

0 commit comments

Comments
 (0)