gitlab-org--gitlab-foss/app/models/blob_viewer/composer_json.rb
2017-08-17 12:54:30 +07:00

23 lines
411 B
Ruby

module BlobViewer
class ComposerJson < DependencyManager
include ServerSide
self.file_types = %i(composer_json)
def manager_name
'Composer'
end
def manager_url
'https://getcomposer.org/'
end
def package_name
@package_name ||= package_name_from_json('name')
end
def package_url
"https://packagist.org/packages/#{package_name}"
end
end
end