2013-11-05 05:06:52 -05:00
|
|
|
module Files
|
2014-01-16 12:03:42 -05:00
|
|
|
class BaseService < ::BaseService
|
2013-11-05 05:06:52 -05:00
|
|
|
attr_reader :ref, :path
|
|
|
|
|
|
|
|
def initialize(project, user, params, ref, path = nil)
|
|
|
|
@project, @current_user, @params = project, user, params.dup
|
|
|
|
@ref = ref
|
|
|
|
@path = path
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def success
|
2014-09-21 04:29:52 -04:00
|
|
|
out = super()
|
|
|
|
out[:error] = ''
|
|
|
|
out
|
2013-11-05 05:06:52 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def repository
|
|
|
|
project.repository
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|