Rename Files::DeleteService to Files::DestroyService

Reason for renaming is to comply with naming convention of services in
codebase.
This commit is contained in:
dixpac 2017-02-09 20:32:09 +01:00
parent 6cbfe1396d
commit fa2339641f
5 changed files with 11 additions and 7 deletions

View file

@ -61,7 +61,7 @@ class Projects::BlobController < Projects::ApplicationController
end
def destroy
create_commit(Files::DeleteService, success_notice: "The file has been successfully deleted.",
create_commit(Files::DestroyService, success_notice: "The file has been successfully deleted.",
success_path: namespace_project_tree_path(@project.namespace, @project, @target_branch),
failure_view: :show,
failure_path: namespace_project_blob_path(@project.namespace, @project, @id))

View file

@ -1,5 +1,5 @@
module Files
class DeleteService < Files::BaseService
class DestroyService < Files::BaseService
def commit
repository.remove_file(
current_user,

View file

@ -0,0 +1,4 @@
---
title: Rename Files::DeleteService to Files::DestroyService
merge_request: 9110
author: dixpac

View file

@ -117,7 +117,7 @@ module API
authorize! :push_code, user_project
file_params = declared_params(include_missing: false)
result = ::Files::DeleteService.new(user_project, current_user, commit_params(file_params)).execute
result = ::Files::DestroyService.new(user_project, current_user, commit_params(file_params)).execute
if result[:status] == :success
status(200)

View file

@ -122,7 +122,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
end
def delete_file(branch_name, file_name)
Files::DeleteService.new(
Files::DestroyService.new(
project,
current_user,
start_branch: branch_name,