Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
projects.thm.de
GitLab
Commits
4ee08b77
Commit
4ee08b77
authored
Jul 02, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates from `rubocop -a`
parent
612f5e63
Changes
188
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
188 changed files
with
279 additions
and
309 deletions
+279
-309
Rakefile
Rakefile
+2
-2
app/controllers/admin/deploy_keys_controller.rb
app/controllers/admin/deploy_keys_controller.rb
+2
-2
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+1
-1
app/controllers/admin/hooks_controller.rb
app/controllers/admin/hooks_controller.rb
+2
-2
app/controllers/admin/identities_controller.rb
app/controllers/admin/identities_controller.rb
+1
-1
app/controllers/admin/impersonations_controller.rb
app/controllers/admin/impersonations_controller.rb
+1
-1
app/controllers/admin/jobs_controller.rb
app/controllers/admin/jobs_controller.rb
+1
-1
app/controllers/admin/runner_projects_controller.rb
app/controllers/admin/runner_projects_controller.rb
+1
-1
app/controllers/admin/runners_controller.rb
app/controllers/admin/runners_controller.rb
+1
-1
app/controllers/admin/services_controller.rb
app/controllers/admin/services_controller.rb
+1
-1
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+1
-1
app/controllers/concerns/issuable_actions.rb
app/controllers/concerns/issuable_actions.rb
+1
-1
app/controllers/concerns/lfs_request.rb
app/controllers/concerns/lfs_request.rb
+1
-1
app/controllers/groups/avatars_controller.rb
app/controllers/groups/avatars_controller.rb
+1
-1
app/controllers/groups/runners_controller.rb
app/controllers/groups/runners_controller.rb
+1
-1
app/controllers/jwt_controller.rb
app/controllers/jwt_controller.rb
+2
-2
app/controllers/notification_settings_controller.rb
app/controllers/notification_settings_controller.rb
+2
-2
app/controllers/profiles/active_sessions_controller.rb
app/controllers/profiles/active_sessions_controller.rb
+1
-1
app/controllers/profiles/avatars_controller.rb
app/controllers/profiles/avatars_controller.rb
+1
-1
app/controllers/profiles/chat_names_controller.rb
app/controllers/profiles/chat_names_controller.rb
+1
-1
app/controllers/profiles/emails_controller.rb
app/controllers/profiles/emails_controller.rb
+1
-1
app/controllers/profiles/gpg_keys_controller.rb
app/controllers/profiles/gpg_keys_controller.rb
+2
-2
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+1
-1
app/controllers/profiles/two_factor_auths_controller.rb
app/controllers/profiles/two_factor_auths_controller.rb
+1
-1
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+1
-1
app/controllers/projects/avatars_controller.rb
app/controllers/projects/avatars_controller.rb
+1
-1
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+1
-1
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+1
-1
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+1
-1
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+1
-1
app/controllers/projects/git_http_client_controller.rb
app/controllers/projects/git_http_client_controller.rb
+2
-2
app/controllers/projects/group_links_controller.rb
app/controllers/projects/group_links_controller.rb
+2
-2
app/controllers/projects/hooks_controller.rb
app/controllers/projects/hooks_controller.rb
+2
-2
app/controllers/projects/labels_controller.rb
app/controllers/projects/labels_controller.rb
+2
-2
app/controllers/projects/lfs_api_controller.rb
app/controllers/projects/lfs_api_controller.rb
+1
-1
app/controllers/projects/lfs_storage_controller.rb
app/controllers/projects/lfs_storage_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+1
-1
app/controllers/projects/mirrors_controller.rb
app/controllers/projects/mirrors_controller.rb
+1
-1
app/controllers/projects/pipeline_schedules_controller.rb
app/controllers/projects/pipeline_schedules_controller.rb
+1
-1
app/controllers/projects/releases_controller.rb
app/controllers/projects/releases_controller.rb
+1
-1
app/controllers/projects/repositories_controller.rb
app/controllers/projects/repositories_controller.rb
+1
-1
app/controllers/projects/runner_projects_controller.rb
app/controllers/projects/runner_projects_controller.rb
+1
-1
app/controllers/projects/runners_controller.rb
app/controllers/projects/runners_controller.rb
+1
-1
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
app/controllers/projects/snippets_controller.rb
app/controllers/projects/snippets_controller.rb
+1
-1
app/controllers/projects/tags_controller.rb
app/controllers/projects/tags_controller.rb
+1
-1
app/controllers/projects/templates_controller.rb
app/controllers/projects/templates_controller.rb
+1
-1
app/controllers/projects/triggers_controller.rb
app/controllers/projects/triggers_controller.rb
+1
-1
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+2
-2
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+2
-2
app/controllers/sherlock/transactions_controller.rb
app/controllers/sherlock/transactions_controller.rb
+1
-1
app/controllers/snippets_controller.rb
app/controllers/snippets_controller.rb
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/concerns/protected_ref.rb
app/models/concerns/protected_ref.rb
+1
-1
app/models/project_wiki.rb
app/models/project_wiki.rb
+1
-1
app/models/remote_mirror.rb
app/models/remote_mirror.rb
+1
-1
app/models/user.rb
app/models/user.rb
+2
-2
app/models/wiki_page.rb
app/models/wiki_page.rb
+2
-2
app/services/badges/update_service.rb
app/services/badges/update_service.rb
+1
-1
app/services/commits/change_service.rb
app/services/commits/change_service.rb
+0
-2
app/services/issuable_base_service.rb
app/services/issuable_base_service.rb
+1
-1
app/services/members/update_service.rb
app/services/members/update_service.rb
+1
-1
app/services/merge_requests/rebase_service.rb
app/services/merge_requests/rebase_service.rb
+1
-1
app/services/milestones/update_service.rb
app/services/milestones/update_service.rb
+1
-1
app/services/notes/update_service.rb
app/services/notes/update_service.rb
+1
-1
app/services/notification_recipient_service.rb
app/services/notification_recipient_service.rb
+0
-2
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+1
-1
app/services/projects/fork_service.rb
app/services/projects/fork_service.rb
+1
-1
app/services/projects/update_service.rb
app/services/projects/update_service.rb
+1
-1
app/services/update_release_service.rb
app/services/update_release_service.rb
+1
-1
app/workers/object_storage/migrate_uploads_worker.rb
app/workers/object_storage/migrate_uploads_worker.rb
+0
-2
config/application.rb
config/application.rb
+2
-2
config/environment.rb
config/environment.rb
+1
-1
config/initializers/active_record_locking.rb
config/initializers/active_record_locking.rb
+2
-2
lib/api/deploy_keys.rb
lib/api/deploy_keys.rb
+3
-3
lib/api/project_hooks.rb
lib/api/project_hooks.rb
+1
-1
lib/api/services.rb
lib/api/services.rb
+2
-2
lib/api/users.rb
lib/api/users.rb
+1
-1
lib/banzai/filter/markdown_engines/common_mark.rb
lib/banzai/filter/markdown_engines/common_mark.rb
+1
-1
lib/gitlab/auth/o_auth/user.rb
lib/gitlab/auth/o_auth/user.rb
+1
-1
lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb
...kground_migration/add_merge_request_diff_commits_count.rb
+0
-1
lib/gitlab/background_migration/archive_legacy_traces.rb
lib/gitlab/background_migration/archive_legacy_traces.rb
+0
-1
lib/gitlab/background_migration/create_fork_network_memberships_range.rb
...ground_migration/create_fork_network_memberships_range.rb
+0
-1
lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb
...kground_migration/create_gpg_key_subkeys_from_gpg_keys.rb
+0
-1
lib/gitlab/background_migration/delete_diff_files.rb
lib/gitlab/background_migration/delete_diff_files.rb
+0
-1
lib/gitlab/background_migration/deserialize_merge_request_diffs_and_commits.rb
..._migration/deserialize_merge_request_diffs_and_commits.rb
+0
-1
lib/gitlab/background_migration/fill_file_store_job_artifact.rb
...tlab/background_migration/fill_file_store_job_artifact.rb
+0
-1
lib/gitlab/background_migration/fill_file_store_lfs_object.rb
...gitlab/background_migration/fill_file_store_lfs_object.rb
+0
-1
lib/gitlab/background_migration/fill_store_upload.rb
lib/gitlab/background_migration/fill_store_upload.rb
+0
-1
lib/gitlab/background_migration/migrate_build_stage.rb
lib/gitlab/background_migration/migrate_build_stage.rb
+0
-1
lib/gitlab/background_migration/migrate_events_to_push_event_payloads.rb
...ground_migration/migrate_events_to_push_event_payloads.rb
+0
-1
lib/gitlab/background_migration/migrate_system_uploads_to_new_folder.rb
...kground_migration/migrate_system_uploads_to_new_folder.rb
+0
-1
lib/gitlab/background_migration/move_personal_snippet_files.rb
...itlab/background_migration/move_personal_snippet_files.rb
+0
-1
lib/gitlab/background_migration/normalize_ldap_extern_uids_range.rb
.../background_migration/normalize_ldap_extern_uids_range.rb
+0
-1
lib/gitlab/background_migration/populate_fork_networks_range.rb
...tlab/background_migration/populate_fork_networks_range.rb
+1
-1
lib/gitlab/background_migration/populate_merge_request_metrics_with_events_data.rb
...ration/populate_merge_request_metrics_with_events_data.rb
+0
-3
lib/gitlab/background_migration/populate_untracked_uploads.rb
...gitlab/background_migration/populate_untracked_uploads.rb
+1
-1
lib/gitlab/background_migration/populate_untracked_uploads_dependencies.rb
...ound_migration/populate_untracked_uploads_dependencies.rb
+2
-2
lib/gitlab/background_migration/prepare_untracked_uploads.rb
lib/gitlab/background_migration/prepare_untracked_uploads.rb
+1
-1
lib/gitlab/ci/config/entry/configurable.rb
lib/gitlab/ci/config/entry/configurable.rb
+1
-1
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+1
-1
lib/gitlab/encoding_helper.rb
lib/gitlab/encoding_helper.rb
+1
-1
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-2
lib/gitlab/gpg/commit.rb
lib/gitlab/gpg/commit.rb
+1
-1
lib/gitlab/mail_room.rb
lib/gitlab/mail_room.rb
+1
-1
lib/gitlab/metrics/influx_db.rb
lib/gitlab/metrics/influx_db.rb
+0
-1
lib/gitlab/metrics/method_call.rb
lib/gitlab/metrics/method_call.rb
+0
-2
lib/tasks/gitlab/uploads/migrate.rake
lib/tasks/gitlab/uploads/migrate.rake
+1
-1
qa/qa/runtime/release.rb
qa/qa/runtime/release.rb
+1
-1
spec/controllers/projects/forks_controller_spec.rb
spec/controllers/projects/forks_controller_spec.rb
+1
-1
spec/controllers/projects/group_links_controller_spec.rb
spec/controllers/projects/group_links_controller_spec.rb
+1
-1
spec/controllers/projects/imports_controller_spec.rb
spec/controllers/projects/imports_controller_spec.rb
+4
-4
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+2
-2
spec/factories/issues.rb
spec/factories/issues.rb
+1
-1
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+1
-1
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+3
-3
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+3
-3
spec/features/groups/members/request_access_spec.rb
spec/features/groups/members/request_access_spec.rb
+1
-1
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+1
-1
spec/features/merge_request/user_posts_diff_notes_spec.rb
spec/features/merge_request/user_posts_diff_notes_spec.rb
+1
-1
spec/features/profiles/password_spec.rb
spec/features/profiles/password_spec.rb
+1
-1
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+0
-2
spec/features/projects/jobs/permissions_spec.rb
spec/features/projects/jobs/permissions_spec.rb
+1
-1
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+5
-5
spec/features/projects/members/user_requests_access_spec.rb
spec/features/projects/members/user_requests_access_spec.rb
+1
-1
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+1
-1
spec/features/projects/remote_mirror_spec.rb
spec/features/projects/remote_mirror_spec.rb
+2
-2
spec/features/projects/services/user_activates_slack_notifications_spec.rb
...jects/services/user_activates_slack_notifications_spec.rb
+1
-1
spec/features/projects/show/user_sees_deletion_failure_message_spec.rb
.../projects/show/user_sees_deletion_failure_message_spec.rb
+1
-1
spec/features/signed_commits_spec.rb
spec/features/signed_commits_spec.rb
+1
-1
spec/finders/group_projects_finder_spec.rb
spec/finders/group_projects_finder_spec.rb
+2
-2
spec/finders/joined_groups_finder_spec.rb
spec/finders/joined_groups_finder_spec.rb
+1
-1
spec/finders/move_to_project_finder_spec.rb
spec/finders/move_to_project_finder_spec.rb
+1
-1
spec/finders/personal_projects_finder_spec.rb
spec/finders/personal_projects_finder_spec.rb
+1
-1
spec/lib/gitlab/background_migration/move_personal_snippet_files_spec.rb
.../background_migration/move_personal_snippet_files_spec.rb
+1
-1
spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb
...ame_reserved_paths_migration/v1/rename_namespaces_spec.rb
+1
-1
spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects_spec.rb
...ename_reserved_paths_migration/v1/rename_projects_spec.rb
+1
-1
spec/lib/gitlab/gpg/invalid_gpg_signature_updater_spec.rb
spec/lib/gitlab/gpg/invalid_gpg_signature_updater_spec.rb
+2
-2
spec/migrations/issues_moved_to_id_foreign_key_spec.rb
spec/migrations/issues_moved_to_id_foreign_key_spec.rb
+1
-1
spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb
...igrate_gcp_clusters_to_new_clusters_architectures_spec.rb
+1
-1
spec/models/ci/build_metadata_spec.rb
spec/models/ci/build_metadata_spec.rb
+1
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+8
-8
spec/models/ci/job_artifact_spec.rb
spec/models/ci/job_artifact_spec.rb
+1
-1
spec/models/concerns/batch_destroy_dependent_associations_spec.rb
...els/concerns/batch_destroy_dependent_associations_spec.rb
+2
-2
spec/models/concerns/mentionable_spec.rb
spec/models/concerns/mentionable_spec.rb
+3
-3
spec/models/concerns/routable_spec.rb
spec/models/concerns/routable_spec.rb
+1
-1
spec/models/environment_spec.rb
spec/models/environment_spec.rb
+1
-1
spec/models/group_spec.rb
spec/models/group_spec.rb
+2
-2
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+2
-2
spec/models/notification_setting_spec.rb
spec/models/notification_setting_spec.rb
+1
-1
spec/models/project_feature_spec.rb
spec/models/project_feature_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+9
-9
spec/models/remote_mirror_spec.rb
spec/models/remote_mirror_spec.rb
+4
-4
spec/models/route_spec.rb
spec/models/route_spec.rb
+7
-7
spec/models/service_spec.rb
spec/models/service_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+19
-19
spec/requests/api/access_requests_spec.rb
spec/requests/api/access_requests_spec.rb
+1
-1
spec/requests/api/helpers_spec.rb
spec/requests/api/helpers_spec.rb
+1
-1
spec/requests/api/notes_spec.rb
spec/requests/api/notes_spec.rb
+2
-2
spec/requests/api/pipeline_schedules_spec.rb
spec/requests/api/pipeline_schedules_spec.rb
+1
-1
spec/requests/api/project_import_spec.rb
spec/requests/api/project_import_spec.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+3
-3
spec/requests/api/tags_spec.rb
spec/requests/api/tags_spec.rb
+3
-3
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+1
-1
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+2
-2
spec/services/members/destroy_service_spec.rb
spec/services/members/destroy_service_spec.rb
+2
-2
spec/services/merge_requests/conflicts/list_service_spec.rb
spec/services/merge_requests/conflicts/list_service_spec.rb
+1
-1
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+1
-1
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+1
-1
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+1
-1
spec/services/projects/update_pages_service_spec.rb
spec/services/projects/update_pages_service_spec.rb
+8
-8
spec/services/reset_project_cache_service_spec.rb
spec/services/reset_project_cache_service_spec.rb
+1
-1
spec/services/system_hooks_service_spec.rb
spec/services/system_hooks_service_spec.rb
+1
-1
spec/spec_helper.rb
spec/spec_helper.rb
+1
-1
spec/support/api/repositories_shared_context.rb
spec/support/api/repositories_shared_context.rb
+1
-1
spec/support/api/time_tracking_shared_examples.rb
spec/support/api/time_tracking_shared_examples.rb
+4
-4
spec/support/generate-seed-repo-rb
spec/support/generate-seed-repo-rb
+1
-1
spec/support/helpers/jira_service_helper.rb
spec/support/helpers/jira_service_helper.rb
+1
-1
spec/support/shared_examples/slack_mattermost_notifications_shared_examples.rb
...xamples/slack_mattermost_notifications_shared_examples.rb
+9
-9
spec/views/projects/imports/new.html.haml_spec.rb
spec/views/projects/imports/new.html.haml_spec.rb
+1
-1
spec/views/projects/merge_requests/show.html.haml_spec.rb
spec/views/projects/merge_requests/show.html.haml_spec.rb
+1
-1
spec/workers/repository_import_worker_spec.rb
spec/workers/repository_import_worker_spec.rb
+2
-2
spec/workers/repository_update_remote_mirror_worker_spec.rb
spec/workers/repository_update_remote_mirror_worker_spec.rb
+5
-5
spec/workers/stuck_import_jobs_worker_spec.rb
spec/workers/stuck_import_jobs_worker_spec.rb
+2
-2
No files found.
Rakefile
View file @
4ee08b77
...
...
@@ -2,9 +2,9 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require
File
.
expand_path
(
'
../config/application'
,
__FILE
__
)
require
File
.
expand_path
(
'
config/application'
,
__dir
__
)
relative_url_conf
=
File
.
expand_path
(
'
../config/initializers/relative_url'
,
__FILE
__
)
relative_url_conf
=
File
.
expand_path
(
'
config/initializers/relative_url'
,
__dir
__
)
require
relative_url_conf
if
File
.
exist?
(
"
#{
relative_url_conf
}
.rb"
)
Gitlab
::
Application
.
load_tasks
...
...
app/controllers/admin/deploy_keys_controller.rb
View file @
4ee08b77
...
...
@@ -22,7 +22,7 @@ def edit
end
def
update
if
deploy_key
.
update
_attributes
(
update_params
)
if
deploy_key
.
update
(
update_params
)
flash
[
:notice
]
=
'Deploy key was successfully updated.'
redirect_to
admin_deploy_keys_path
else
...
...
@@ -34,7 +34,7 @@ def destroy
deploy_key
.
destroy
respond_to
do
|
format
|
format
.
html
{
redirect_to
admin_deploy_keys_path
,
status:
302
}
format
.
html
{
redirect_to
admin_deploy_keys_path
,
status:
:found
}
format
.
json
{
head
:ok
}
end
end
...
...
app/controllers/admin/groups_controller.rb
View file @
4ee08b77
...
...
@@ -39,7 +39,7 @@ def create
end
def
update
if
@group
.
update
_attributes
(
group_params
)
if
@group
.
update
(
group_params
)
redirect_to
[
:admin
,
@group
],
notice:
'Group was successfully updated.'
else
render
"edit"
...
...
app/controllers/admin/hooks_controller.rb
View file @
4ee08b77
...
...
@@ -23,7 +23,7 @@ def edit
end
def
update
if
hook
.
update
_attributes
(
hook_params
)
if
hook
.
update
(
hook_params
)
flash
[
:notice
]
=
'System hook was successfully updated.'
redirect_to
admin_hooks_path
else
...
...
@@ -34,7 +34,7 @@ def update
def
destroy
hook
.
destroy
redirect_to
admin_hooks_path
,
status:
302
redirect_to
admin_hooks_path
,
status:
:found
end
def
test
...
...
app/controllers/admin/identities_controller.rb
View file @
4ee08b77
...
...
@@ -25,7 +25,7 @@ def edit
end
def
update
if
@identity
.
update
_attributes
(
identity_params
)
if
@identity
.
update
(
identity_params
)
RepairLdapBlockedUserService
.
new
(
@user
).
execute
redirect_to
admin_user_identities_path
(
@user
),
notice:
'User identity was successfully updated.'
else
...
...
app/controllers/admin/impersonations_controller.rb
View file @
4ee08b77
...
...
@@ -11,7 +11,7 @@ def destroy
session
[
:impersonator_id
]
=
nil
redirect_to
admin_user_path
(
original_user
),
status:
302
redirect_to
admin_user_path
(
original_user
),
status:
:found
end
private
...
...
app/controllers/admin/jobs_controller.rb
View file @
4ee08b77
...
...
@@ -20,6 +20,6 @@ def index
def
cancel_all
Ci
::
Build
.
running_or_pending
.
each
(
&
:cancel
)
redirect_to
admin_jobs_path
,
status:
303
redirect_to
admin_jobs_path
,
status:
:see_other
end
end
app/controllers/admin/runner_projects_controller.rb
View file @
4ee08b77
...
...
@@ -16,7 +16,7 @@ def destroy
runner
=
rp
.
runner
rp
.
destroy
redirect_to
admin_runner_path
(
runner
),
status:
302
redirect_to
admin_runner_path
(
runner
),
status:
:found
end
private
...
...
app/controllers/admin/runners_controller.rb
View file @
4ee08b77
...
...
@@ -28,7 +28,7 @@ def update
def
destroy
@runner
.
destroy
redirect_to
admin_runners_path
,
status:
302
redirect_to
admin_runners_path
,
status:
:found
end
def
resume
...
...
app/controllers/admin/services_controller.rb
View file @
4ee08b77
...
...
@@ -16,7 +16,7 @@ def edit
end
def
update
if
service
.
update
_attributes
(
service_params
[
:service
])
if
service
.
update
(
service_params
[
:service
])
PropagateServiceTemplateWorker
.
perform_async
(
service
.
id
)
if
service
.
active?
redirect_to
admin_application_settings_services_path
,
...
...
app/controllers/admin/users_controller.rb
View file @
4ee08b77
...
...
@@ -163,7 +163,7 @@ def remove_email
format
.
json
{
head
:ok
}
else
format
.
html
{
redirect_back_or_admin_user
(
alert:
'There was an error removing the e-mail.'
)
}
format
.
json
{
render
json:
'There was an error removing the e-mail.'
,
status:
400
}
format
.
json
{
render
json:
'There was an error removing the e-mail.'
,
status:
:bad_request
}
end
end
end
...
...
app/controllers/concerns/issuable_actions.rb
View file @
4ee08b77
...
...
@@ -127,7 +127,7 @@ def render_conflict_response
errors:
[
"Someone edited this
#{
issuable
.
human_class_name
}
at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs."
]
},
status:
409
},
status:
:conflict
end
end
end
...
...
app/controllers/concerns/lfs_request.rb
View file @
4ee08b77
...
...
@@ -27,7 +27,7 @@ def require_lfs_enabled!
message:
'Git LFS is not enabled on this GitLab server, contact your admin.'
,
documentation_url:
help_url
},
status:
501
status:
:not_implemented
)
end
...
...
app/controllers/groups/avatars_controller.rb
View file @
4ee08b77
...
...
@@ -7,6 +7,6 @@ def destroy
@group
.
remove_avatar!
@group
.
save
redirect_to
edit_group_path
(
@group
),
status:
302
redirect_to
edit_group_path
(
@group
),
status:
:found
end
end
app/controllers/groups/runners_controller.rb
View file @
4ee08b77
...
...
@@ -23,7 +23,7 @@ def update
def
destroy
@runner
.
destroy
redirect_to
group_settings_ci_cd_path
(
@group
,
anchor:
'runners-settings'
),
status:
302
redirect_to
group_settings_ci_cd_path
(
@group
,
anchor:
'runners-settings'
),
status:
:found
end
def
resume
...
...
app/controllers/jwt_controller.rb
View file @
4ee08b77
...
...
@@ -41,7 +41,7 @@ def render_missing_personal_access_token
"You must use a personal access token with 'api' scope for Git over HTTP.
\n
"
\
"You can generate one at
#{
profile_personal_access_tokens_url
}
"
}
]
},
status:
401
},
status:
:unauthorized
end
def
render_unauthorized
...
...
@@ -50,7 +50,7 @@ def render_unauthorized
{
code:
'UNAUTHORIZED'
,
message:
'HTTP Basic: Access denied'
}
]
},
status:
401
},
status:
:unauthorized
end
def
auth_params
...
...
app/controllers/notification_settings_controller.rb
View file @
4ee08b77
...
...
@@ -5,14 +5,14 @@ def create
return
render_404
unless
can_read?
(
resource
)
@notification_setting
=
current_user
.
notification_settings_for
(
resource
)
@saved
=
@notification_setting
.
update
_attributes
(
notification_setting_params
)
@saved
=
@notification_setting
.
update
(
notification_setting_params
)
render_response
end
def
update
@notification_setting
=
current_user
.
notification_settings
.
find
(
params
[
:id
])
@saved
=
@notification_setting
.
update
_attributes
(
notification_setting_params
)
@saved
=
@notification_setting
.
update
(
notification_setting_params
)
render_response
end
...
...
app/controllers/profiles/active_sessions_controller.rb
View file @
4ee08b77
...
...
@@ -7,7 +7,7 @@ def destroy
ActiveSession
.
destroy
(
current_user
,
params
[
:id
])
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_active_sessions_url
,
status:
302
}
format
.
html
{
redirect_to
profile_active_sessions_url
,
status:
:found
}
format
.
js
{
head
:ok
}
end
end
...
...
app/controllers/profiles/avatars_controller.rb
View file @
4ee08b77
...
...
@@ -4,6 +4,6 @@ def destroy
Users
::
UpdateService
.
new
(
current_user
,
user:
@user
).
execute
{
|
user
|
user
.
remove_avatar!
}
redirect_to
profile_path
,
status:
302
redirect_to
profile_path
,
status:
:found
end
end
app/controllers/profiles/chat_names_controller.rb
View file @
4ee08b77
...
...
@@ -39,7 +39,7 @@ def destroy
flash
[
:alert
]
=
"Could not delete chat nickname
#{
@chat_name
.
chat_name
}
."
end
redirect_to
profile_chat_names_path
,
status:
302
redirect_to
profile_chat_names_path
,
status:
:found
end
private
...
...
app/controllers/profiles/emails_controller.rb
View file @
4ee08b77
...
...
@@ -19,7 +19,7 @@ def destroy
Emails
::
DestroyService
.
new
(
current_user
,
user:
current_user
).
execute
(
@email
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_emails_url
,
status:
302
}
format
.
html
{
redirect_to
profile_emails_url
,
status:
:found
}
format
.
js
{
head
:ok
}
end
end
...
...
app/controllers/profiles/gpg_keys_controller.rb
View file @
4ee08b77
...
...
@@ -21,7 +21,7 @@ def destroy
@gpg_key
.
destroy
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_gpg_keys_url
,
status:
302
}
format
.
html
{
redirect_to
profile_gpg_keys_url
,
status:
:found
}
format
.
js
{
head
:ok
}
end
end
...
...
@@ -30,7 +30,7 @@ def revoke
@gpg_key
.
revoke
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_gpg_keys_url
,
status:
302
}
format
.
html
{
redirect_to
profile_gpg_keys_url
,
status:
:found
}
format
.
js
{
head
:ok
}
end
end
...
...
app/controllers/profiles/keys_controller.rb
View file @
4ee08b77
...
...
@@ -26,7 +26,7 @@ def destroy
Keys
::
DestroyService
.
new
(
current_user
).
execute
(
@key
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_keys_url
,
status:
302
}
format
.
html
{
redirect_to
profile_keys_url
,
status:
:found
}
format
.
js
{
head
:ok
}
end
end
...
...
app/controllers/profiles/two_factor_auths_controller.rb
View file @
4ee08b77
...
...
@@ -78,7 +78,7 @@ def codes
def
destroy
current_user
.
disable_two_factor!
redirect_to
profile_account_path
,
status:
302
redirect_to
profile_account_path
,
status:
:found
end
def
skip
...
...
app/controllers/projects/application_controller.rb
View file @
4ee08b77
...
...
@@ -61,7 +61,7 @@ def method_missing(method_sym, *arguments, &block)
def
require_non_empty_project
# Be sure to return status code 303 to avoid a double DELETE:
# http://api.rubyonrails.org/classes/ActionController/Redirecting.html
redirect_to
project_path
(
@project
),
status:
303
if
@project
.
empty_repo?
redirect_to
project_path
(
@project
),
status:
:see_other
if
@project
.
empty_repo?
end
def
require_branch_head
...
...
app/controllers/projects/avatars_controller.rb
View file @
4ee08b77
...
...
@@ -21,6 +21,6 @@ def destroy
@project
.
save
redirect_to
edit_project_path
(
@project
),
status:
302
redirect_to
edit_project_path
(
@project
),
status:
:found
end
end
app/controllers/projects/branches_controller.rb
View file @
4ee08b77
...
...
@@ -98,7 +98,7 @@ def destroy
flash_type
=
result
[
:status
]
==
:error
?
:alert
:
:notice
flash
[
flash_type
]
=
result
[
:message
]
redirect_to
project_branches_path
(
@project
),
status:
303
redirect_to
project_branches_path
(
@project
),
status:
:see_other
end
format
.
js
{
render
nothing:
true
,
status:
result
[
:return_code
]
}
...
...
app/controllers/projects/clusters_controller.rb
View file @
4ee08b77
...
...
@@ -62,7 +62,7 @@ def update
def
destroy
if
cluster
.
destroy
flash
[
:notice
]
=
_
(
'Kubernetes cluster integration was successfully removed.'
)
redirect_to
project_clusters_path
(
project
),
status:
302
redirect_to
project_clusters_path
(
project
),
status:
:found
else
flash
[
:notice
]
=
_
(
'Kubernetes cluster integration was not removed.'
)
render
:show
...
...
app/controllers/projects/deploy_keys_controller.rb
View file @
4ee08b77
...
...
@@ -35,7 +35,7 @@ def edit
end
def
update
if
deploy_key
.
update
_attributes
(
update_params
)
if
deploy_key
.
update
(
update_params
)
flash
[
:notice
]
=
'Deploy key was successfully updated.'
redirect_to_repository_settings
(
@project
)
else
...
...
app/controllers/projects/environments_controller.rb
View file @
4ee08b77
...
...
@@ -116,7 +116,7 @@ def terminal_websocket_authorize
set_workhorse_internal_api_content_type
render
json:
Gitlab
::
Workhorse
.
terminal_websocket
(
terminal
)
else
render
text:
'Not found'
,
status:
404
render
text:
'Not found'
,
status:
:not_found
end
end
...
...
app/controllers/projects/git_http_client_controller.rb
View file @
4ee08b77
...
...
@@ -53,7 +53,7 @@ def authenticate_user
end
send_challenges
render
plain:
"HTTP Basic: Access denied
\n
"
,
status:
401
render
plain:
"HTTP Basic: Access denied
\n
"
,
status:
:unauthorized
rescue
Gitlab
::
Auth
::
MissingPersonalAccessTokenError
render_missing_personal_access_token
end
...
...
@@ -83,7 +83,7 @@ def render_missing_personal_access_token
render
plain:
"HTTP Basic: Access denied
\n
"
\
"You must use a personal access token with 'api' scope for Git over HTTP.
\n
"
\
"You can generate one at
#{
profile_personal_access_tokens_url
}
"
,
status:
401
status:
:unauthorized
end
def
repository
...
...
app/controllers/projects/group_links_controller.rb
View file @
4ee08b77
...
...
@@ -24,7 +24,7 @@ def create
def
update
@group_link
=
@project
.
project_group_links
.
find
(
params
[
:id
])
@group_link
.
update
_attributes
(
group_link_params
)
@group_link
.
update
(
group_link_params
)
end
def
destroy
...
...
@@ -34,7 +34,7 @@ def destroy
respond_to
do
|
format
|
format
.
html
do
redirect_to
project_project_members_path
(
project
),
status:
302
redirect_to
project_project_members_path
(
project
),
status:
:found
end
format
.
js
{
head
:ok
}
end
...
...
app/controllers/projects/hooks_controller.rb
View file @
4ee08b77
...
...
@@ -29,7 +29,7 @@ def edit
end
def
update
if
hook
.
update
_attributes
(
hook_params
)
if
hook
.
update
(
hook_params
)
flash
[
:notice
]
=
'Hook was successfully updated.'
redirect_to
project_settings_integrations_path
(
@project
)
else
...
...
@@ -48,7 +48,7 @@ def test
def
destroy
hook
.
destroy
redirect_to
project_settings_integrations_path
(
@project
),
status:
302
redirect_to
project_settings_integrations_path
(
@project
),
status:
:found
end
private
...
...
app/controllers/projects/labels_controller.rb
View file @
4ee08b77
...
...
@@ -39,7 +39,7 @@ def create
else
respond_to
do
|
format
|
format
.
html
{
render
:new
}
format
.
json
{
render
json:
{
message:
@label
.
errors
.
messages
},
status:
400
}
format
.
json
{
render
json:
{
message:
@label
.
errors
.
messages
},
status:
:bad_request
}
end
end
end
...
...
@@ -115,7 +115,7 @@ def promote
flash
[
:notice
]
=
"
#{
@label
.
title
}
promoted to <a href=
\"
#{
group_labels_path
(
@project
.
group
)
}
\"
>group label</a>."
.
html_safe
respond_to
do
|
format
|
format
.
html
do
redirect_to
(
project_labels_path
(
@project
),
status:
303
)
redirect_to
(
project_labels_path
(
@project
),
status:
:see_other
)
end
format
.
json
do
render
json:
{
url:
project_labels_path
(
@project
)
}
...
...
app/controllers/projects/lfs_api_controller.rb
View file @
4ee08b77
...
...
@@ -25,7 +25,7 @@ def deprecated
message:
'Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.'
,
documentation_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/help"
},
status:
501
status:
:not_implemented
)
end
...
...
app/controllers/projects/lfs_storage_controller.rb
View file @
4ee08b77
...
...
@@ -28,7 +28,7 @@ def upload_finalize
if
store_file!
(
oid
,
size
)
head
200
else
render
plain:
'Unprocessable entity'
,
status:
422
render
plain:
'Unprocessable entity'
,
status:
:unprocessable_entity
end
rescue
ActiveRecord
::
RecordInvalid
render_lfs_forbidden
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
4ee08b77
...
...
@@ -227,7 +227,7 @@ def ci_environments_status
def
rebase
RebaseWorker
.
perform_async
(
@merge_request
.
id
,
current_user
.
id
)
render
nothing:
true
,
status:
200
render
nothing:
true
,
status:
:ok
end
protected
...
...
app/controllers/projects/milestones_controller.rb
View file @
4ee08b77
...
...
@@ -96,7 +96,7 @@ def destroy
Milestones
::
DestroyService
.
new
(
project
,
current_user
).
execute
(
milestone
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
namespace_project_milestones_path
,
status:
303
}
format
.
html
{
redirect_to
namespace_project_milestones_path
,
status:
:see_other
}
format
.
js
{
head
:ok
}
end
end
...
...
app/controllers/projects/mirrors_controller.rb
View file @
4ee08b77
...
...
@@ -13,7 +13,7 @@ def show
end
def
update
if
project
.
update
_attributes
(
mirror_params
)
if
project
.
update
(
mirror_params
)
flash
[
:notice
]
=
'Mirroring settings were successfully updated.'
else
flash
[
:alert
]
=
project
.
errors
.
full_messages
.
join
(
', '
).
html_safe
...
...
app/controllers/projects/pipeline_schedules_controller.rb
View file @
4ee08b77
...
...
@@ -64,7 +64,7 @@ def take_ownership
def
destroy
if
schedule
.
destroy
redirect_to
pipeline_schedules_path
(
@project
),
status:
302
redirect_to
pipeline_schedules_path
(
@project
),
status:
:found
else
redirect_to
pipeline_schedules_path
(
@project
),
status: :forbidden
,
...
...
app/controllers/projects/releases_controller.rb
View file @
4ee08b77
...
...
@@ -14,7 +14,7 @@ def update
# it exists only to save a description to each Tag.
# If description is empty we should destroy the existing record.
if
release_params
[
:description
].
present?
release
.
update
_attributes
(
release_params
)
release
.
update
(
release_params
)
else
release
.
destroy
end
...
...
app/controllers/projects/repositories_controller.rb
View file @
4ee08b77
...
...
@@ -24,7 +24,7 @@ def archive
send_git_archive
@repository
,
ref:
@ref
,
format:
params
[
:format
],
append_sha:
append_sha
rescue
=>
ex
logger
.
error
(
"
#{
self
.
class
.
name
}
:
#{
ex
}
"
)
return
git_not_found!
git_not_found!
end
def
assign_archive_vars
...
...
app/controllers/projects/runner_projects_controller.rb
View file @
4ee08b77
...
...
@@ -21,6 +21,6 @@ def destroy
runner_project
=
project
.
runner_projects
.
find
(
params
[
:id
])
runner_project
.
destroy
redirect_to
project_runners_path
(
project
),
status:
302
redirect_to
project_runners_path
(
project
),
status:
:found
end
end
app/controllers/projects/runners_controller.rb
View file @
4ee08b77
...
...
@@ -24,7 +24,7 @@ def destroy
@runner
.
destroy
end
redirect_to
project_runners_path
(
@project
),
status:
302
redirect_to
project_runners_path
(
@project
),
status:
:found
end
def
resume
...
...
app/controllers/projects/services_controller.rb
View file @
4ee08b77
...
...
@@ -34,7 +34,7 @@ def test
private
def
service_test_response
if
@service
.
update
_attributes
(
service_params
[
:service
])
if
@service
.
update
(
service_params
[
:service
])
data
=
@service
.
test_data
(
project
,
current_user
)
outcome
=
@service
.
test
(
data
)
...
...
app/controllers/projects/snippets_controller.rb
View file @
4ee08b77
...
...
@@ -82,7 +82,7 @@ def destroy
@snippet
.
destroy
redirect_to
project_snippets_path
(
@project
),
status:
302
redirect_to
project_snippets_path
(
@project
),
status:
:found
end
protected
...
...
app/controllers/projects/tags_controller.rb
View file @
4ee08b77
...
...
@@ -50,7 +50,7 @@ def destroy
respond_to
do
|
format
|
if
result
[
:status
]
==
:success
format
.
html
do
redirect_to
project_tags_path
(
@project
),
status:
303
redirect_to
project_tags_path
(
@project
),
status:
:see_other
end
format
.
js
...
...
app/controllers/projects/templates_controller.rb
View file @
4ee08b77
...
...
@@ -14,6 +14,6 @@ def show
def
get_template_class
template_types
=
{
issue:
Gitlab
::
Template
::
IssueTemplate
,
merge_request:
Gitlab
::
Template
::
MergeRequestTemplate
}.
with_indifferent_access
@template_type
=
template_types
[
params
[
:template_type
]]
render
json:
[],
status:
404
unless
@template_type
render
json:
[],
status:
:not_found
unless
@template_type
end
end
app/controllers/projects/triggers_controller.rb
View file @
4ee08b77
...
...
@@ -50,7 +50,7 @@ def destroy
flash
[
:alert
]
=
"Could not remove the trigger."
end
redirect_to
project_settings_ci_cd_path
(
@project
),
status:
302