Class: BlobViewer::ComposerJson

Inherits:
DependencyManager show all
Includes:
ServerSide
Defined in:
app/models/blob_viewer/composer_json.rb

Constant Summary

Constants inherited from Base

Base::PARTIAL_PATH_PREFIX

Instance Attribute Summary

Attributes inherited from Base

#blob

Instance Method Summary collapse

Methods included from ServerSide

#prepare!, #render_error

Methods inherited from DependencyManager

#package_type

Methods included from Auxiliary

#visible_to?

Methods included from Gitlab::Allowable

#can?

Methods inherited from Base

auxiliary?, binary?, #binary_detected_after_load?, can_render?, #collapsed?, #initialize, load_async?, loading_partial_path, partial_path, #prepare!, #render_error, rich?, simple?, text?, #too_large?

Constructor Details

This class inherits a constructor from BlobViewer::Base

Instance Method Details

#manager_nameObject


9
10
11
# File 'app/models/blob_viewer/composer_json.rb', line 9

def manager_name
  'Composer'
end

#manager_urlObject


13
14
15
# File 'app/models/blob_viewer/composer_json.rb', line 13

def manager_url
  'https://getcomposer.org/'
end

#package_nameObject


17
18
19
# File 'app/models/blob_viewer/composer_json.rb', line 17

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

#package_urlObject


21
22
23
# File 'app/models/blob_viewer/composer_json.rb', line 21

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