Commit 34a472f6 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'statuseable-hasstatus' into 'master'

rename Statuseable to HasStatus

## What does this MR do?

- Rename all instances of Statuseable in the codebase, to HasStatus
- Rename all files from statuseable to has_status

## What are the relevant issue numbers?

Closes #21103 

See merge request !6003
parents 1cc59ffe 23bed91b
module Ci
class Pipeline < ActiveRecord::Base
extend Ci::Model
include Statuseable
include HasStatus
self.table_name = 'ci_commits'
......
class CommitStatus < ActiveRecord::Base
include Statuseable
include HasStatus
include Importable
self.table_name = 'ci_builds'
......
module Statuseable
module HasStatus
extend ActiveSupport::Concern
AVAILABLE_STATUSES = %w[created pending running success failed canceled skipped]
......
......@@ -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
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment