2014-01-09 05:36:55 -05:00
|
|
|
module Search
|
2014-01-16 12:03:42 -05:00
|
|
|
class ProjectService
|
2014-01-09 05:36:55 -05:00
|
|
|
attr_accessor :project, :current_user, :params
|
|
|
|
|
|
|
|
def initialize(project, user, params)
|
|
|
|
@project, @current_user, @params = project, user, params.dup
|
|
|
|
end
|
|
|
|
|
|
|
|
def execute
|
2014-08-27 02:57:50 -04:00
|
|
|
Gitlab::ProjectSearchResults.new(project.id,
|
|
|
|
params[:search],
|
|
|
|
params[:repository_ref])
|
2014-01-09 05:36:55 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|