2018-08-03 03:15:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-17 12:27:30 -04:00
|
|
|
module BlobViewer
|
|
|
|
class ComposerJson < DependencyManager
|
|
|
|
include ServerSide
|
|
|
|
|
|
|
|
self.file_types = %i(composer_json)
|
|
|
|
|
|
|
|
def manager_name
|
|
|
|
'Composer'
|
|
|
|
end
|
|
|
|
|
|
|
|
def manager_url
|
2017-08-17 01:54:30 -04:00
|
|
|
'https://getcomposer.org/'
|
2017-05-17 12:27:30 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def package_name
|
|
|
|
@package_name ||= package_name_from_json('name')
|
|
|
|
end
|
|
|
|
|
|
|
|
def package_url
|
|
|
|
"https://packagist.org/packages/#{package_name}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|