build_artifact_entity.rb 274 Bytes
Newer Older
1
class BuildArtifactEntity < Grape::Entity
Kamil Trzcinski's avatar
Kamil Trzcinski committed
2 3 4 5 6 7
  include RequestAwareEntity

  expose :name do |build|
    build.name
  end

8
  expose :path do |build|
Kamil Trzcinski's avatar
Kamil Trzcinski committed
9
    download_namespace_project_build_artifacts_path(
Kamil Trzcinski's avatar
Kamil Trzcinski committed
10 11
      build.project.namespace,
      build.project,
Kamil Trzcinski's avatar
Kamil Trzcinski committed
12 13 14
      build)
  end
end