Skip to content

Commit

Permalink
feat: inform about autoload_lib configuration
Browse files Browse the repository at this point in the history
Closes #39
  • Loading branch information
palkan committed Sep 19, 2023
1 parent 8d32418 commit 1d3019f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ local_gemfile = "#{File.dirname(__FILE__)}/Gemfile.local"
if File.exist?(local_gemfile)
eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
else
gem "rails", "~> 6.0"
gem "rails", "~> 7.0"
end
5 changes: 5 additions & 0 deletions templates/install/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,9 @@ def build_component(**options)
CODE
end
end

# Check if autoload_lib is configured
if File.file?("config/application.rb") && File.read("config/application.rb").include?("config.autoload_lib")
say_status :info, "⚠️ Make sure you configured autoload_lib to ignore the lib/generators folder"
end
end

0 comments on commit 1d3019f

Please sign in to comment.