Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance: Move pre init code to files which get dynamically loaded.
- Loading branch information
Showing
5 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
# load all core_ext extensions | ||
Rails.root.glob('lib/core_ext/**/*.rb').each do |file| | ||
if File.file?(file) | ||
Rails.root | ||
.glob('lib/core_ext/**/*.rb') | ||
.each do |file| | ||
require file | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
# EmailAddress gem clashes with EmailAddress model. | ||
# https://github.com/afair/email_address#namespace-conflict-resolution | ||
EmailAddressValidator = EmailAddress | ||
Object.send(:remove_const, :EmailAddress) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
# Only load gems for asset compilation if they are needed to avoid | ||
# having unneeded runtime dependencies like NodeJS. | ||
if ArgvHelper.argv.any? { |e| e.start_with? 'assets:' } || Rails.groups.exclude?('production') | ||
Bundler | ||
.load | ||
.current_dependencies | ||
.each do |dep| | ||
require dep.name if dep.groups.include?(:assets) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
Zammad::SafeMode.hint |