2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
module BlobViewer
|
|
|
|
class ComposerJson < DependencyManager
|
|
|
|
include ServerSide
|
|
|
|
|
|
|
|
self.file_types = %i(composer_json)
|
|
|
|
|
|
|
|
def manager_name
|
|
|
|
'Composer'
|
|
|
|
end
|
|
|
|
|
|
|
|
def manager_url
|
2018-03-17 18:26:18 +05:30
|
|
|
'https://getcomposer.org/'
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def package_name
|
2023-06-20 00:43:36 +05:30
|
|
|
@package_name ||= fetch_from_json('name')
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def package_url
|
|
|
|
"https://packagist.org/packages/#{package_name}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|