Commit 23bed91b authored by De Wet Blomerus's avatar De Wet Blomerus

rename Statuseable to HasStatus

parent 6fb46b60
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