summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-04-03 09:09:11 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-04-07 17:24:11 +0200
commit02072e17ab484d7c99dc485fc3ef8348f8da8bf1 (patch)
tree2147010a5d3463550db36ca35a0aba9f2d27dac8
parenta6d313001a9df7f44402b1a0fca8bbd631b9fd87 (diff)
downloadgitlab-ce-02072e17ab484d7c99dc485fc3ef8348f8da8bf1.tar.gz
Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/models/project.rb2
-rw-r--r--lib/gitlab/cache/ci/project_pipeline_status.rb (renamed from lib/gitlab/cache/ci/project_build_status.rb)2
-rw-r--r--spec/helpers/ci_status_helper_spec.rb2
-rw-r--r--spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb (renamed from spec/lib/gitlab/cache/ci/project_build_status_spec.rb)2
-rw-r--r--spec/models/ci/pipeline_spec.rb2
-rw-r--r--spec/models/project_spec.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 1506a6bf6ab..b8d77e62494 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -393,7 +393,7 @@ module Ci
end
def refresh_project_build_status_cache
- Gitlab::Cache::Ci::ProjectBuildStatus.update_for_pipeline(self)
+ Gitlab::Cache::Ci::ProjectPipelineStatus.update_for_pipeline(self)
end
private
diff --git a/app/models/project.rb b/app/models/project.rb
index f6b66232346..5ff997faa63 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1197,7 +1197,7 @@ class Project < ActiveRecord::Base
end
def pipeline_status
- @pipeline_status ||= Gitlab::Cache::Ci::ProjectBuildStatus.load_for_project(self)
+ @pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self)
end
def mark_import_as_failed(error_message)
diff --git a/lib/gitlab/cache/ci/project_build_status.rb b/lib/gitlab/cache/ci/project_pipeline_status.rb
index 3982caa4a47..882b4da1725 100644
--- a/lib/gitlab/cache/ci/project_build_status.rb
+++ b/lib/gitlab/cache/ci/project_pipeline_status.rb
@@ -4,7 +4,7 @@
module Gitlab
module Cache
module Ci
- class ProjectBuildStatus
+ class ProjectPipelineStatus
attr_accessor :sha, :status, :project, :loaded
delegate :commit, to: :project
diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb
index 9174db59ee3..c795fe5a2a3 100644
--- a/spec/helpers/ci_status_helper_spec.rb
+++ b/spec/helpers/ci_status_helper_spec.rb
@@ -19,7 +19,7 @@ describe CiStatusHelper do
describe "#pipeline_status_cache_key" do
it "builds a cache key for pipeline status" do
- pipeline_status = Gitlab::Cache::Ci::ProjectBuildStatus.new(
+ pipeline_status = Gitlab::Cache::Ci::ProjectPipelineStatus.new(
build(:project),
sha: "123abc",
status: "success"
diff --git a/spec/lib/gitlab/cache/ci/project_build_status_spec.rb b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
index 7b9e959b087..ada9bf136f4 100644
--- a/spec/lib/gitlab/cache/ci/project_build_status_spec.rb
+++ b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Gitlab::Cache::Ci::ProjectBuildStatus do
+describe Gitlab::Cache::Ci::ProjectPipelineStatus do
let(:project) { create(:project) }
let(:pipeline_status) { described_class.new(project) }
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 504442392ea..b71fd794d4c 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -1083,7 +1083,7 @@ describe Ci::Pipeline, models: true do
let(:pipeline) { create(:ci_pipeline, sha: '123456') }
it 'updates the cached status' do
- expect(Gitlab::Cache::Ci::ProjectBuildStatus).to receive(:update_for_pipeline).
+ expect(Gitlab::Cache::Ci::ProjectPipelineStatus).to receive(:update_for_pipeline).
with(pipeline)
pipeline.block
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index c721b79f5d8..e9bd0180ad9 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1949,7 +1949,7 @@ describe Project, models: true do
describe '#pipeline_status' do
let(:project) { create(:project) }
it 'builds a pipeline status' do
- expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectBuildStatus)
+ expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectPipelineStatus)
end
it 'hase a loaded pipeline status' do