BigW Consortium Gitlab

composer_json.rb 411 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
module BlobViewer
  class ComposerJson < DependencyManager
    include ServerSide

    self.file_types = %i(composer_json)

    def manager_name
      'Composer'
    end

    def manager_url
12
      'https://getcomposer.org/'
13 14 15 16 17 18 19 20 21 22 23
    end

    def package_name
      @package_name ||= package_name_from_json('name')
    end

    def package_url
      "https://packagist.org/packages/#{package_name}"
    end
  end
end