debian-mirror-gitlab/app/models/blob_viewer/composer_json.rb

24 lines
411 B
Ruby
Raw Normal View History

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
'https://getcomposer.com/'
end
def package_name
@package_name ||= package_name_from_json('name')
end
def package_url
"https://packagist.org/packages/#{package_name}"
end
end
end