move `lib/ci/model.rb` into `lib/gitlab/ci/model.rb`

This commit is contained in:
Maxim Rydkin 2017-09-06 14:13:52 +03:00
parent f364cc34ea
commit c295d3362b
No known key found for this signature in database
GPG Key ID: B7BCD8B7C2B9E3B3
13 changed files with 24 additions and 22 deletions

View File

@ -1,6 +1,6 @@
module Ci
class GroupVariable < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include HasVariable
include Presentable

View File

@ -1,6 +1,6 @@
module Ci
class Pipeline < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include HasStatus
include Importable
include AfterCommitQueue

View File

@ -1,6 +1,6 @@
module Ci
class PipelineSchedule < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include Importable
acts_as_paranoid

View File

@ -1,6 +1,6 @@
module Ci
class PipelineScheduleVariable < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include HasVariable
belongs_to :pipeline_schedule

View File

@ -1,6 +1,6 @@
module Ci
class PipelineVariable < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include HasVariable
belongs_to :pipeline

View File

@ -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

View File

@ -1,6 +1,6 @@
module Ci
class RunnerProject < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
belongs_to :runner
belongs_to :project

View File

@ -1,6 +1,6 @@
module Ci
class Stage < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include Importable
include HasStatus
include Gitlab::OptimisticLocking

View File

@ -1,6 +1,6 @@
module Ci
class Trigger < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
acts_as_paranoid

View File

@ -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

View File

@ -1,6 +1,6 @@
module Ci
class Variable < ActiveRecord::Base
extend Ci::Model
extend Gitlab::Ci::Model
include HasVariable
include Presentable

View File

@ -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

13
lib/gitlab/ci/model.rb Normal file
View File

@ -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