summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDe Wet Blomerus <dewet@blomerus.org>2016-08-25 04:55:32 +0200
committerDe Wet Blomerus <dewet@blomerus.org>2016-08-25 04:55:32 +0200
commit23bed91b3fb21a92b836011677cc75c884188f10 (patch)
tree537b13118dcaff623375ee78a1484242361d415a
parent6fb46b604e4feebcbaa92d3d44d7616be709c0e5 (diff)
downloadgitlab-ce-23bed91b3fb21a92b836011677cc75c884188f10.tar.gz
rename Statuseable to HasStatus
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/models/commit_status.rb2
-rw-r--r--app/models/concerns/has_status.rb (renamed from app/models/concerns/statuseable.rb)2
-rw-r--r--app/services/ci/process_pipeline_service.rb2
-rw-r--r--spec/models/concerns/has_status_spec.rb (renamed from spec/models/concerns/statuseable_spec.rb)6
5 files changed, 7 insertions, 7 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 087abe4cbb1..255fb33bdeb 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -1,7 +1,7 @@
module Ci
class Pipeline < ActiveRecord::Base
extend Ci::Model
- include Statuseable
+ include HasStatus
self.table_name = 'ci_commits'
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 84ceeac7d3e..9114af18496 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -1,5 +1,5 @@
class CommitStatus < ActiveRecord::Base
- include Statuseable
+ include HasStatus
include Importable
self.table_name = 'ci_builds'
diff --git a/app/models/concerns/statuseable.rb b/app/models/concerns/has_status.rb
index 750f937b724..f7b8352405c 100644
--- a/app/models/concerns/statuseable.rb
+++ b/app/models/concerns/has_status.rb
@@ -1,4 +1,4 @@
-module Statuseable
+module HasStatus
extend ActiveSupport::Concern
AVAILABLE_STATUSES = %w[created pending running success failed canceled skipped]
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb
index 6f7610d42ba..f049ed628db 100644
--- a/app/services/ci/process_pipeline_service.rb
+++ b/app/services/ci/process_pipeline_service.rb
@@ -34,7 +34,7 @@ module Ci
end
def process_build(build, current_status)
- return false unless Statuseable::COMPLETED_STATUSES.include?(current_status)
+ return false unless HasStatus::COMPLETED_STATUSES.include?(current_status)
if valid_statuses_for_when(build.when).include?(current_status)
build.enqueue
diff --git a/spec/models/concerns/statuseable_spec.rb b/spec/models/concerns/has_status_spec.rb
index 8e0a2a2cbde..e118432d098 100644
--- a/spec/models/concerns/statuseable_spec.rb
+++ b/spec/models/concerns/has_status_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
-describe Statuseable do
+describe HasStatus do
before do
@object = Object.new
- @object.extend(Statuseable::ClassMethods)
+ @object.extend(HasStatus::ClassMethods)
end
describe '.status' do
@@ -12,7 +12,7 @@ describe Statuseable do
end
subject { @object.status }
-
+
shared_examples 'build status summary' do
context 'all successful' do
let(:statuses) { Array.new(2) { create(type, status: :success) } }