move `lib/ci/model.rb` into `lib/gitlab/ci/model.rb`
This commit is contained in:
parent
f364cc34ea
commit
c295d3362b
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class GroupVariable < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include HasVariable
|
||||
include Presentable
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class Pipeline < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include HasStatus
|
||||
include Importable
|
||||
include AfterCommitQueue
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class PipelineSchedule < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include Importable
|
||||
|
||||
acts_as_paranoid
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class PipelineScheduleVariable < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include HasVariable
|
||||
|
||||
belongs_to :pipeline_schedule
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class PipelineVariable < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include HasVariable
|
||||
|
||||
belongs_to :pipeline
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class Runner < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
|
||||
RUNNER_QUEUE_EXPIRY_TIME = 60.minutes
|
||||
ONLINE_CONTACT_TIMEOUT = 1.hour
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class RunnerProject < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
|
||||
belongs_to :runner
|
||||
belongs_to :project
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class Stage < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include Importable
|
||||
include HasStatus
|
||||
include Gitlab::OptimisticLocking
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class Trigger < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
|
||||
acts_as_paranoid
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class TriggerRequest < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
|
||||
belongs_to :trigger
|
||||
belongs_to :pipeline, foreign_key: :commit_id
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Ci
|
||||
class Variable < ActiveRecord::Base
|
||||
extend Ci::Model
|
||||
extend Gitlab::Ci::Model
|
||||
include HasVariable
|
||||
include Presentable
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
module Ci
|
||||
module Model
|
||||
def table_name_prefix
|
||||
"ci_"
|
||||
end
|
||||
|
||||
def model_name
|
||||
@model_name ||= ActiveModel::Name.new(self, nil, self.name.split("::").last)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,13 @@
|
|||
module Gitlab
|
||||
module Ci
|
||||
module Model
|
||||
def table_name_prefix
|
||||
"ci_"
|
||||
end
|
||||
|
||||
def model_name
|
||||
@model_name ||= ActiveModel::Name.new(self, nil, self.name.split("::").last)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue