Class: Repositories::Go

Inherits:
Base
  • Object
show all
Defined in:
app/models/repositories/go.rb

Constant Summary collapse

HAS_VERSIONS =
false
HAS_DEPENDENCIES =
false
LIBRARIAN_SUPPORT =
true
URL =
'http://go-search.org/'
COLOR =
'#375eab'

Constants inherited from Base

Base::HIDDEN, Base::LIBRARIAN_PLANNED, Base::SECURITY_PLANNED

Class Method Summary collapse

Methods inherited from Base

color, dependencies, download_dependencies, formatted_name, get, get_html, get_json, get_raw, import, import_async, import_new, import_new_async, import_recent, import_recent_async, new_names, package_link, repo_fallback, save, save_dependencies, update

Class Method Details

.mapping(project) ⇒ Object


17
18
19
20
21
22
23
24
# File 'app/models/repositories/go.rb', line 17

def self.mapping(project)
  {
    name: project['Package'],
    description: project['Synopsis'],
    homepage: project['ProjectURL'],
    repository_url: "https://#{project['Package']}"
  }
end

.project(name) ⇒ Object


13
14
15
# File 'app/models/repositories/go.rb', line 13

def self.project(name)
  get("http://go-search.org/api?action=package&id=#{name}")
end

.project_namesObject


9
10
11
# File 'app/models/repositories/go.rb', line 9

def self.project_names
  get("http://go-search.org/api?action=packages")
end