Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a237999f
Commit
a237999f
authored
Nov 13, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate models
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f197b528
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
311 additions
and
96 deletions
+311
-96
app/models/application_setting.rb
app/models/application_setting.rb
+4
-0
app/models/ci/application_setting.rb
app/models/ci/application_setting.rb
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+11
-3
app/models/ci/commit.rb
app/models/ci/commit.rb
+13
-12
app/models/ci/event.rb
app/models/ci/event.rb
+1
-1
app/models/ci/project.rb
app/models/ci/project.rb
+2
-2
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-1
app/models/ci/runner_project.rb
app/models/ci/runner_project.rb
+1
-1
app/models/ci/service.rb
app/models/ci/service.rb
+1
-1
app/models/ci/trigger.rb
app/models/ci/trigger.rb
+1
-1
app/models/ci/trigger_request.rb
app/models/ci/trigger_request.rb
+1
-1
app/models/ci/variable.rb
app/models/ci/variable.rb
+1
-1
app/models/ci/web_hook.rb
app/models/ci/web_hook.rb
+1
-1
app/models/commit_status.rb
app/models/commit_status.rb
+33
-0
app/models/generic_commit_status.rb
app/models/generic_commit_status.rb
+33
-0
app/models/group.rb
app/models/group.rb
+1
-0
app/models/hooks/project_hook.rb
app/models/hooks/project_hook.rb
+13
-12
app/models/hooks/service_hook.rb
app/models/hooks/service_hook.rb
+13
-12
app/models/hooks/system_hook.rb
app/models/hooks/system_hook.rb
+13
-12
app/models/hooks/web_hook.rb
app/models/hooks/web_hook.rb
+13
-12
app/models/label.rb
app/models/label.rb
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
app/models/namespace.rb
app/models/namespace.rb
+1
-0
app/models/project_services/ci/hip_chat_service.rb
app/models/project_services/ci/hip_chat_service.rb
+1
-1
app/models/project_services/ci/mail_service.rb
app/models/project_services/ci/mail_service.rb
+1
-1
app/models/project_services/ci/slack_service.rb
app/models/project_services/ci/slack_service.rb
+1
-1
app/models/release.rb
app/models/release.rb
+12
-0
app/models/user.rb
app/models/user.rb
+1
-0
spec/factories/labels.rb
spec/factories/labels.rb
+1
-0
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+1
-0
spec/factories/releases.rb
spec/factories/releases.rb
+12
-0
spec/models/application_setting_spec.rb
spec/models/application_setting_spec.rb
+4
-0
spec/models/ci/commit_spec.rb
spec/models/ci/commit_spec.rb
+13
-12
spec/models/ci/project_spec.rb
spec/models/ci/project_spec.rb
+2
-2
spec/models/ci/runner_project_spec.rb
spec/models/ci/runner_project_spec.rb
+1
-1
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+1
-1
spec/models/ci/service_spec.rb
spec/models/ci/service_spec.rb
+1
-1
spec/models/ci/trigger_spec.rb
spec/models/ci/trigger_spec.rb
+12
-0
spec/models/ci/variable_spec.rb
spec/models/ci/variable_spec.rb
+1
-1
spec/models/ci/web_hook_spec.rb
spec/models/ci/web_hook_spec.rb
+1
-1
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+33
-0
spec/models/generic_commit_status_spec.rb
spec/models/generic_commit_status_spec.rb
+33
-0
spec/models/group_spec.rb
spec/models/group_spec.rb
+1
-0
spec/models/label_spec.rb
spec/models/label_spec.rb
+1
-0
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-0
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+1
-0
spec/models/release_spec.rb
spec/models/release_spec.rb
+12
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+2
-0
No files found.
app/models/application_setting.rb
View file @
a237999f
...
...
@@ -23,6 +23,10 @@
# after_sign_out_path :string(255)
# session_expire_delay :integer default(10080), not null
# import_sources :text
# help_page_text :text
# admin_notification_email :string(255)
# shared_runners_enabled :boolean default(TRUE), not null
# max_artifacts_size :integer default(100), not null
#
class
ApplicationSetting
<
ActiveRecord
::
Base
...
...
app/models/ci/application_setting.rb
View file @
a237999f
# == Schema Information
#
# Table name: application_settings
# Table name:
ci_
application_settings
#
# id :integer not null, primary key
# all_broken_builds :boolean
...
...
app/models/ci/build.rb
View file @
a237999f
# == Schema Information
#
# Table name: builds
# Table name:
ci_
builds
#
# id :integer not null, primary key
# project_id :integer
...
...
@@ -11,16 +11,24 @@
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# commit_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# deploy :boolean default(FALSE)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
module
Ci
...
...
app/models/ci/commit.rb
View file @
a237999f
# == Schema Information
#
# Table name: commits
# Table name: c
i_c
ommits
#
# id :integer not null, primary key
# project_id :integer
...
...
@@ -13,6 +13,7 @@
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# gl_project_id :integer
#
module
Ci
...
...
app/models/ci/event.rb
View file @
a237999f
# == Schema Information
#
# Table name: events
# Table name:
ci_
events
#
# id :integer not null, primary key
# project_id :integer
...
...
app/models/ci/project.rb
View file @
a237999f
# == Schema Information
#
# Table name: projects
# Table name:
ci_
projects
#
# id :integer not null, primary key
# name :string(255)
not null
# name :string(255)
# timeout :integer default(3600), not null
# created_at :datetime
# updated_at :datetime
...
...
app/models/ci/runner.rb
View file @
a237999f
# == Schema Information
#
# Table name: runners
# Table name:
ci_
runners
#
# id :integer not null, primary key
# token :string(255)
...
...
app/models/ci/runner_project.rb
View file @
a237999f
# == Schema Information
#
# Table name: runner_projects
# Table name:
ci_
runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null
...
...
app/models/ci/service.rb
View file @
a237999f
# == Schema Information
#
# Table name: services
# Table name:
ci_
services
#
# id :integer not null, primary key
# type :string(255)
...
...
app/models/ci/trigger.rb
View file @
a237999f
# == Schema Information
#
# Table name: triggers
# Table name:
ci_
triggers
#
# id :integer not null, primary key
# token :string(255)
...
...
app/models/ci/trigger_request.rb
View file @
a237999f
# == Schema Information
#
# Table name: trigger_requests
# Table name:
ci_
trigger_requests
#
# id :integer not null, primary key
# trigger_id :integer not null
...
...
app/models/ci/variable.rb
View file @
a237999f
# == Schema Information
#
# Table name: variables
# Table name:
ci_
variables
#
# id :integer not null, primary key
# project_id :integer not null
...
...
app/models/ci/web_hook.rb
View file @
a237999f
# == Schema Information
#
# Table name: web_hooks
# Table name:
ci_
web_hooks
#
# id :integer not null, primary key
# url :string(255) not null
...
...
app/models/commit_status.rb
View file @
a237999f
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
class
CommitStatus
<
ActiveRecord
::
Base
self
.
table_name
=
'ci_builds'
...
...
app/models/generic_commit_status.rb
View file @
a237999f
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
class
GenericCommitStatus
<
CommitStatus
before_validation
:set_default_values
...
...
app/models/group.rb
View file @
a237999f
...
...
@@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require
'carrierwave/orm/activerecord'
...
...
app/models/hooks/project_hook.rb
View file @
a237999f
...
...
@@ -14,6 +14,7 @@
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class
ProjectHook
<
WebHook
...
...
app/models/hooks/service_hook.rb
View file @
a237999f
...
...
@@ -14,6 +14,7 @@
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class
ServiceHook
<
WebHook
...
...
app/models/hooks/system_hook.rb
View file @
a237999f
...
...
@@ -14,6 +14,7 @@
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class
SystemHook
<
WebHook
...
...
app/models/hooks/web_hook.rb
View file @
a237999f
...
...
@@ -14,6 +14,7 @@
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class
WebHook
<
ActiveRecord
::
Base
...
...
app/models/label.rb
View file @
a237999f
...
...
@@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
class
Label
<
ActiveRecord
::
Base
...
...
app/models/merge_request.rb
View file @
a237999f
...
...
@@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
...
...
app/models/namespace.rb
View file @
a237999f
...
...
@@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
class
Namespace
<
ActiveRecord
::
Base
...
...
app/models/project_services/ci/hip_chat_service.rb
View file @
a237999f
# == Schema Information
#
# Table name: services
# Table name:
ci_
services
#
# id :integer not null, primary key
# type :string(255)
...
...
app/models/project_services/ci/mail_service.rb
View file @
a237999f
# == Schema Information
#
# Table name: services
# Table name:
ci_
services
#
# id :integer not null, primary key
# type :string(255)
...
...
app/models/project_services/ci/slack_service.rb
View file @
a237999f
# == Schema Information
#
# Table name: services
# Table name:
ci_
services
#
# id :integer not null, primary key
# type :string(255)
...
...
app/models/release.rb
View file @
a237999f
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
class
Release
<
ActiveRecord
::
Base
belongs_to
:project
...
...
app/models/user.rb
View file @
a237999f
...
...
@@ -54,6 +54,7 @@
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
#
...
...
spec/factories/labels.rb
View file @
a237999f
...
...
@@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
# Read about factories at https://github.com/thoughtbot/factory_girl
...
...
spec/factories/merge_requests.rb
View file @
a237999f
...
...
@@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
FactoryGirl
.
define
do
...
...
spec/factories/releases.rb
View file @
a237999f
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl
.
define
do
...
...
spec/models/application_setting_spec.rb
View file @
a237999f
...
...
@@ -23,6 +23,10 @@
# after_sign_out_path :string(255)
# session_expire_delay :integer default(10080), not null
# import_sources :text
# help_page_text :text
# admin_notification_email :string(255)
# shared_runners_enabled :boolean default(TRUE), not null
# max_artifacts_size :integer default(100), not null
#
require
'spec_helper'
...
...
spec/models/ci/commit_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: commits
# Table name: c
i_c
ommits
#
# id :integer not null, primary key
# project_id :integer
...
...
@@ -13,6 +13,7 @@
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/ci/project_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: projects
# Table name:
ci_
projects
#
# id :integer not null, primary key
# name :string(255)
not null
# name :string(255)
# timeout :integer default(3600), not null
# created_at :datetime
# updated_at :datetime
...
...
spec/models/ci/runner_project_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: runner_projects
# Table name:
ci_
runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null
...
...
spec/models/ci/runner_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: runners
# Table name:
ci_
runners
#
# id :integer not null, primary key
# token :string(255)
...
...
spec/models/ci/service_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: services
# Table name:
ci_
services
#
# id :integer not null, primary key
# type :string(255)
...
...
spec/models/ci/trigger_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: ci_triggers
#
# id :integer not null, primary key
# token :string(255)
# project_id :integer not null
# deleted_at :datetime
# created_at :datetime
# updated_at :datetime
#
require
'spec_helper'
describe
Ci
::
Trigger
do
...
...
spec/models/ci/variable_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: variables
# Table name:
ci_
variables
#
# id :integer not null, primary key
# project_id :integer not null
...
...
spec/models/ci/web_hook_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: web_hooks
# Table name:
ci_
web_hooks
#
# id :integer not null, primary key
# url :string(255) not null
...
...
spec/models/commit_status_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
require
'spec_helper'
describe
CommitStatus
do
...
...
spec/models/generic_commit_status_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
require
'spec_helper'
describe
GenericCommitStatus
do
...
...
spec/models/group_spec.rb
View file @
a237999f
...
...
@@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require
'spec_helper'
...
...
spec/models/label_spec.rb
View file @
a237999f
...
...
@@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
require
'spec_helper'
...
...
spec/models/merge_request_spec.rb
View file @
a237999f
...
...
@@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
require
'spec_helper'
...
...
spec/models/namespace_spec.rb
View file @
a237999f
...
...
@@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require
'spec_helper'
...
...
spec/models/release_spec.rb
View file @
a237999f
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
require
'rails_helper'
RSpec
.
describe
Release
,
type: :model
do
...
...
spec/models/user_spec.rb
View file @
a237999f
...
...
@@ -54,6 +54,8 @@
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
#
require
'spec_helper'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment