mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
Patch by Takashi Kato. git-svn-id: https://svn.redmine.org/redmine/trunk@22488 e93f8b46-1217-0410-a6f0-8f06a7374b81
30 lines
617 B
Ruby
30 lines
617 B
Ruby
# frozen_string_literal: true
|
|
|
|
lib = Rails.root.join('lib/redmine')
|
|
IGNORE_LIST = [
|
|
'wiki_formatting/textile/redcloth3.rb',
|
|
'core_ext.rb',
|
|
'core_ext'
|
|
]
|
|
|
|
class RedmineInflector < Zeitwerk::Inflector
|
|
def camelize(basename, abspath)
|
|
abspath.match?('redmine\/version.rb\z') ? 'VERSION' : super
|
|
end
|
|
end
|
|
|
|
Rails.autoloaders.each do |loader|
|
|
loader.inflector = RedmineInflector.new
|
|
loader.inflector.inflect(
|
|
'html' => 'HTML',
|
|
'csv' => 'CSV',
|
|
'pdf' => 'PDF',
|
|
'url' => 'URL',
|
|
'pop3' => 'POP3',
|
|
'imap' => 'IMAP'
|
|
)
|
|
IGNORE_LIST.each do |mod|
|
|
loader.ignore lib.join(mod)
|
|
end
|
|
end
|