Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
552ee36b
Commit
552ee36b
authored
Mar 04, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Zeitwerk autoloader
Configure's Zeitwerk inflections to match current definitions
parent
26dfc31b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
2 deletions
+59
-2
config/application.rb
config/application.rb
+2
-0
config/environments/development.rb
config/environments/development.rb
+1
-1
config/environments/test.rb
config/environments/test.rb
+1
-1
config/initializers_before_autoloader/002_zeitwerk.rb
config/initializers_before_autoloader/002_zeitwerk.rb
+55
-0
No files found.
config/application.rb
View file @
552ee36b
...
...
@@ -31,6 +31,8 @@ module Gitlab
config
.
active_record
.
sqlite3
.
represent_boolean_as_integer
=
true
config
.
autoloader
=
:zeitwerk
# Sidekiq uses eager loading, but directories not in the standard Rails
# directories must be added to the eager load paths:
# https://github.com/mperham/sidekiq/wiki/FAQ#why-doesnt-sidekiq-autoload-my-rails-application-code
...
...
config/environments/development.rb
View file @
552ee36b
...
...
@@ -42,7 +42,7 @@ Rails.application.configure do
config
.
action_mailer
.
raise_delivery_errors
=
true
# Don't make a mess when bootstrapping a development environment
config
.
action_mailer
.
perform_deliveries
=
(
ENV
[
'BOOTSTRAP'
]
!=
'1'
)
config
.
action_mailer
.
preview_path
=
'app/mailers/previews'
config
.
action_mailer
.
preview_path
=
Rails
.
root
.
join
(
'app'
,
'mailers'
,
'previews'
)
config
.
eager_load
=
false
...
...
config/environments/test.rb
View file @
552ee36b
...
...
@@ -43,7 +43,7 @@ Rails.application.configure do
# Print deprecation notices to the stderr
config
.
active_support
.
deprecation
=
:stderr
config
.
eager_load
=
tru
e
config
.
eager_load
=
fals
e
config
.
cache_store
=
:null_store
...
...
config/initializers_before_autoloader/002_zeitwerk.rb
0 → 100644
View file @
552ee36b
# frozen_string_literal: true
Rails
.
autoloaders
.
each
do
|
autoloader
|
# We need to ignore these since these are non-Ruby files
# that do not define Ruby classes / modules
autoloader
.
ignore
(
Rails
.
root
.
join
(
'lib/support'
))
# Ignore generators since these are loaded manually by Rails
autoloader
.
ignore
(
Rails
.
root
.
join
(
'lib/generators'
))
autoloader
.
ignore
(
Rails
.
root
.
join
(
'ee/lib/generators'
))
if
Gitlab
.
ee?
# Mailer previews are also loaded manually by Rails
autoloader
.
ignore
(
Rails
.
root
.
join
(
'app/mailers/previews'
))
autoloader
.
ignore
(
Rails
.
root
.
join
(
'ee/app/mailers/previews'
))
if
Gitlab
.
ee?
autoloader
.
inflector
.
inflect
(
'api'
=>
'API'
,
'api_guard'
=>
'APIGuard'
,
'group_api_compatibility'
=>
'GroupAPICompatibility'
,
'project_api_compatibility'
=>
'ProjectAPICompatibility'
,
'cte'
=>
'CTE'
,
'recursive_cte'
=>
'RecursiveCTE'
,
'cidr'
=>
'CIDR'
,
'cli'
=>
'CLI'
,
'dn'
=>
'DN'
,
'hmac_token'
=>
'HMACToken'
,
'html'
=>
'HTML'
,
'html_parser'
=>
'HTMLParser'
,
'html_gitlab'
=>
'HTMLGitlab'
,
'http'
=>
'HTTP'
,
'http_connection_adapter'
=>
'HTTPConnectionAdapter'
,
'http_clone_enabled_check'
=>
'HTTPCloneEnabledCheck'
,
'chunked_io'
=>
'ChunkedIO'
,
'http_io'
=>
'HttpIO'
,
'json'
=>
'JSON'
,
'json_formatter'
=>
'JSONFormatter'
,
'json_web_token'
=>
'JSONWebToken'
,
'as_json'
=>
'AsJSON'
,
'ldap_key'
=>
'LDAPKey'
,
'mr_note'
=>
'MRNote'
,
'pdf'
=>
'PDF'
,
'rsa_token'
=>
'RSAToken'
,
'san_extension'
=>
'SANExtension'
,
'sca'
=>
'SCA'
,
'spdx'
=>
'SPDX'
,
'sql'
=>
'SQL'
,
'ssh_key'
=>
'SSHKey'
,
'ssh_key_with_user'
=>
'SSHKeyWithUser'
,
'ssh_public_key'
=>
'SSHPublicKey'
,
'git_push_ssh_proxy'
=>
'GitPushSSHProxy'
,
'git_user_default_ssh_config_check'
=>
'GitUserDefaultSSHConfigCheck'
,
'binary_stl'
=>
'BinarySTL'
,
'text_stl'
=>
'TextSTL'
,
'svg'
=>
'SVG'
,
'function_uri'
=>
'FunctionURI'
)
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment