2013-11-05 05:06:52 -05:00
|
|
|
module Files
|
2017-04-19 20:37:44 -04:00
|
|
|
class BaseService < Commits::CreateService
|
|
|
|
def initialize(*args)
|
|
|
|
super
|
2015-12-18 04:03:34 -05:00
|
|
|
|
2017-04-19 20:37:44 -04:00
|
|
|
@author_email = params[:author_email]
|
|
|
|
@author_name = params[:author_name]
|
2015-08-11 08:33:31 -04:00
|
|
|
@commit_message = params[:commit_message]
|
|
|
|
|
2017-04-19 20:37:44 -04:00
|
|
|
@file_path = params[:file_path]
|
|
|
|
@previous_path = params[:previous_path]
|
2015-08-11 08:33:31 -04:00
|
|
|
|
2017-04-19 20:37:44 -04:00
|
|
|
@file_content = params[:file_content]
|
|
|
|
@file_content = Base64.decode64(@file_content) if params[:file_content_encoding] == 'base64'
|
2015-08-11 04:28:42 -04:00
|
|
|
end
|
2013-11-05 05:06:52 -05:00
|
|
|
end
|
|
|
|
end
|