Class: Gitlab::CodeNavigationPath

Inherits:
Object
  • Object
show all
Includes:
Routing, Utils::StrongMemoize
Defined in:
lib/gitlab/code_navigation_path.rb

Constant Summary collapse

LATEST_COMMITS_LIMIT =
2
ARTIFACT_TIMEOUT =
10.seconds

Instance Method Summary collapse

Methods included from Routing

includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(project, commit_sha) ⇒ CodeNavigationPath

Returns a new instance of CodeNavigationPath.



11
12
13
14
# File 'lib/gitlab/code_navigation_path.rb', line 11

def initialize(project, commit_sha)
  @project = project
  @commit_sha = commit_sha
end

Instance Method Details

#full_json_path_for(path) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/gitlab/code_navigation_path.rb', line 16

def full_json_path_for(path)
  with_circuit_breaker do
    break unless build

    raw_project_job_artifacts_path(project, build, path: "lsif/#{path}.json", file_type: :lsif)
  end
end