2018-08-03 03:15:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-08 19:50:23 -04:00
|
|
|
module BlobViewer
|
|
|
|
class License < Base
|
|
|
|
include Auxiliary
|
2017-05-12 15:43:06 -04:00
|
|
|
include Static
|
2017-05-08 19:50:23 -04:00
|
|
|
|
|
|
|
self.partial_name = 'license'
|
2017-05-12 15:31:29 -04:00
|
|
|
self.file_types = %i(license)
|
2017-05-08 19:50:23 -04:00
|
|
|
self.binary = false
|
|
|
|
|
|
|
|
def license
|
2017-05-17 14:00:13 -04:00
|
|
|
project.repository.license
|
2017-05-08 19:50:23 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def render_error
|
|
|
|
return if license
|
|
|
|
|
|
|
|
:unknown_license
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|