Skip to content

Commit 0e65871

Browse files
authored
lib/assets is too rare of a use case to warrant a default directory (rails#52447)
* lib/assets is too rare of a use case to warrant a default directory Either these assets are part of your app, and should be in app/assets, or you're getting them from a vendor, and they should be in vendor/assets. * Fix test
1 parent 2038c9d commit 0e65871

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

railties/lib/rails/generators/rails/app/app_generator.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ def db
216216
def lib
217217
empty_directory "lib"
218218
empty_directory_with_keep_file "lib/tasks"
219-
empty_directory_with_keep_file "lib/assets"
220219
end
221220

222221
def log
@@ -476,7 +475,6 @@ def create_devcontainer_files
476475
def delete_app_assets_if_api_option
477476
if options[:api]
478477
remove_dir "app/assets"
479-
remove_dir "lib/assets"
480478
end
481479
end
482480

railties/lib/rails/generators/rails/plugin/plugin_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_dummy_clean
160160
remove_file ".ruby-version"
161161
remove_dir "db"
162162
remove_file "Gemfile"
163-
remove_file "lib/tasks"
163+
remove_dir "lib"
164164
remove_file "public/robots.txt"
165165
remove_file "README.md"
166166
remove_file "test"

railties/test/generators/api_app_generator_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ def skipped_files
185185
bin/yarn
186186
config/initializers/assets.rb
187187
config/initializers/content_security_policy.rb
188-
lib/assets
189188
test/helpers
190189
public/404.html
191190
public/422.html

railties/test/generators/app_generator_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
config/routes.rb
5959
config/storage.yml
6060
db/seeds.rb
61-
lib/assets/.keep
6261
lib/tasks/.keep
6362
log/.keep
6463
public/404.html
@@ -1043,7 +1042,6 @@ def test_create_keeps
10431042
app/controllers/concerns
10441043
app/models/concerns
10451044
lib/tasks
1046-
lib/assets
10471045
log
10481046
script
10491047
test/fixtures/files

railties/test/generators/plugin_generator_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
test/dummy/config/puma.rb
6060
test/dummy/config/routes.rb
6161
test/dummy/config/storage.yml
62-
test/dummy/lib/assets/.keep
6362
test/dummy/log/.keep
6463
test/dummy/public/404.html
6564
test/dummy/public/406-unsupported-browser.html

0 commit comments

Comments
 (0)