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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
79c0e721
Commit
79c0e721
authored
Jan 06, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate models
parent
8b39b8cd
Changes
57
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
350 additions
and
254 deletions
+350
-254
app/models/application_setting.rb
app/models/application_setting.rb
+13
-2
app/models/ci/build.rb
app/models/ci/build.rb
+1
-0
app/models/ci/runner_project.rb
app/models/ci/runner_project.rb
+6
-5
app/models/ci/trigger.rb
app/models/ci/trigger.rb
+7
-6
app/models/ci/variable.rb
app/models/ci/variable.rb
+2
-1
app/models/commit_status.rb
app/models/commit_status.rb
+30
-25
app/models/generic_commit_status.rb
app/models/generic_commit_status.rb
+1
-0
app/models/group.rb
app/models/group.rb
+0
-1
app/models/hooks/project_hook.rb
app/models/hooks/project_hook.rb
+1
-0
app/models/hooks/service_hook.rb
app/models/hooks/service_hook.rb
+1
-0
app/models/hooks/system_hook.rb
app/models/hooks/system_hook.rb
+1
-0
app/models/hooks/web_hook.rb
app/models/hooks/web_hook.rb
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+22
-22
app/models/namespace.rb
app/models/namespace.rb
+0
-1
app/models/project.rb
app/models/project.rb
+7
-0
app/models/project_services/asana_service.rb
app/models/project_services/asana_service.rb
+2
-0
app/models/project_services/assembla_service.rb
app/models/project_services/assembla_service.rb
+1
-0
app/models/project_services/bamboo_service.rb
app/models/project_services/bamboo_service.rb
+1
-0
app/models/project_services/buildkite_service.rb
app/models/project_services/buildkite_service.rb
+1
-0
app/models/project_services/builds_email_service.rb
app/models/project_services/builds_email_service.rb
+1
-0
app/models/project_services/campfire_service.rb
app/models/project_services/campfire_service.rb
+1
-0
app/models/project_services/ci_service.rb
app/models/project_services/ci_service.rb
+1
-0
app/models/project_services/custom_issue_tracker_service.rb
app/models/project_services/custom_issue_tracker_service.rb
+1
-0
app/models/project_services/drone_ci_service.rb
app/models/project_services/drone_ci_service.rb
+1
-0
app/models/project_services/emails_on_push_service.rb
app/models/project_services/emails_on_push_service.rb
+1
-0
app/models/project_services/external_wiki_service.rb
app/models/project_services/external_wiki_service.rb
+1
-0
app/models/project_services/flowdock_service.rb
app/models/project_services/flowdock_service.rb
+1
-0
app/models/project_services/gemnasium_service.rb
app/models/project_services/gemnasium_service.rb
+1
-0
app/models/project_services/gitlab_ci_service.rb
app/models/project_services/gitlab_ci_service.rb
+1
-0
app/models/project_services/gitlab_issue_tracker_service.rb
app/models/project_services/gitlab_issue_tracker_service.rb
+1
-0
app/models/project_services/hipchat_service.rb
app/models/project_services/hipchat_service.rb
+1
-0
app/models/project_services/irker_service.rb
app/models/project_services/irker_service.rb
+1
-0
app/models/project_services/issue_tracker_service.rb
app/models/project_services/issue_tracker_service.rb
+1
-0
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+1
-0
app/models/project_services/pivotaltracker_service.rb
app/models/project_services/pivotaltracker_service.rb
+1
-0
app/models/project_services/pushover_service.rb
app/models/project_services/pushover_service.rb
+1
-0
app/models/project_services/redmine_service.rb
app/models/project_services/redmine_service.rb
+1
-0
app/models/project_services/slack_service.rb
app/models/project_services/slack_service.rb
+1
-0
app/models/project_services/teamcity_service.rb
app/models/project_services/teamcity_service.rb
+1
-0
app/models/service.rb
app/models/service.rb
+1
-0
app/models/user.rb
app/models/user.rb
+57
-56
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+22
-19
spec/factories/projects.rb
spec/factories/projects.rb
+7
-0
spec/models/application_setting_spec.rb
spec/models/application_setting_spec.rb
+39
-26
spec/models/ci/commit_spec.rb
spec/models/ci/commit_spec.rb
+1
-1
spec/models/ci/runner_project_spec.rb
spec/models/ci/runner_project_spec.rb
+6
-5
spec/models/ci/trigger_spec.rb
spec/models/ci/trigger_spec.rb
+7
-6
spec/models/ci/variable_spec.rb
spec/models/ci/variable_spec.rb
+2
-1
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+1
-0
spec/models/external_wiki_service_spec.rb
spec/models/external_wiki_service_spec.rb
+1
-0
spec/models/generic_commit_status_spec.rb
spec/models/generic_commit_status_spec.rb
+1
-0
spec/models/group_spec.rb
spec/models/group_spec.rb
+0
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+22
-19
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+0
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+7
-0
spec/models/service_spec.rb
spec/models/service_spec.rb
+1
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+57
-56
No files found.
app/models/application_setting.rb
View file @
79c0e721
...
...
@@ -27,9 +27,20 @@
# admin_notification_email :string(255)
# shared_runners_enabled :boolean default(TRUE), not null
# max_artifacts_size :integer default(100), not null
# runners_registration_token :string
(255)
# require_two_factor_authentication :boolean default(
TRU
E)
# runners_registration_token :string
# require_two_factor_authentication :boolean default(
FALS
E)
# two_factor_grace_period :integer default(48)
# metrics_enabled :boolean default(FALSE)
# metrics_host :string default("localhost")
# metrics_username :string
# metrics_password :string
# metrics_pool_size :integer default(16)
# metrics_timeout :integer default(10)
# metrics_method_call_threshold :integer default(10)
# recaptcha_enabled :boolean default(FALSE)
# recaptcha_site_key :string
# recaptcha_private_key :string
# metrics_port :integer default(8089)
#
class
ApplicationSetting
<
ActiveRecord
::
Base
...
...
app/models/ci/build.rb
View file @
79c0e721
...
...
@@ -29,6 +29,7 @@
# target_url :string(255)
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
#
module
Ci
...
...
app/models/ci/runner_project.rb
View file @
79c0e721
...
...
@@ -2,11 +2,12 @@
#
# Table name: ci_runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# runner_id :integer not null
# project_id :integer
# created_at :datetime
# updated_at :datetime
# gl_project_id :integer
#
module
Ci
...
...
app/models/ci/trigger.rb
View file @
79c0e721
...
...
@@ -2,12 +2,13 @@
#
# 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
# id :integer not null, primary key
# token :string(255)
# project_id :integer
# deleted_at :datetime
# created_at :datetime
# updated_at :datetime
# gl_project_id :integer
#
module
Ci
...
...
app/models/ci/variable.rb
View file @
79c0e721
...
...
@@ -3,12 +3,13 @@
# Table name: ci_variables
#
# id :integer not null, primary key
# project_id :integer
not null
# project_id :integer
# key :string(255)
# value :text
# encrypted_value :text
# encrypted_value_salt :string(255)
# encrypted_value_iv :string(255)
# gl_project_id :integer
#
module
Ci
...
...
app/models/commit_status.rb
View file @
79c0e721
# == Schema Information
#
# project_id integer
# status string
# 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
# deploy boolean default: false
# options text
# allow_failure boolean default: false, null: false
# stage string
# trigger_request_id integer
# stage_idx integer
# tag boolean
# ref string
# user_id integer
# type string
# target_url string
# description string
# 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
# gl_project_id :integer
#
class
CommitStatus
<
ActiveRecord
::
Base
...
...
app/models/generic_commit_status.rb
View file @
79c0e721
...
...
@@ -29,6 +29,7 @@
# target_url :string(255)
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
#
class
GenericCommitStatus
<
CommitStatus
...
...
app/models/group.rb
View file @
79c0e721
...
...
@@ -11,7 +11,6 @@
# 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 @
79c0e721
...
...
@@ -15,6 +15,7 @@
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
# build_events :boolean default(FALSE), not null
#
class
ProjectHook
<
WebHook
...
...
app/models/hooks/service_hook.rb
View file @
79c0e721
...
...
@@ -15,6 +15,7 @@
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
# build_events :boolean default(FALSE), not null
#
class
ServiceHook
<
WebHook
...
...
app/models/hooks/system_hook.rb
View file @
79c0e721
...
...
@@ -15,6 +15,7 @@
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
# build_events :boolean default(FALSE), not null
#
class
SystemHook
<
WebHook
...
...
app/models/hooks/web_hook.rb
View file @
79c0e721
...
...
@@ -15,6 +15,7 @@
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
# build_events :boolean default(FALSE), not null
#
class
WebHook
<
ActiveRecord
::
Base
...
...
app/models/merge_request.rb
View file @
79c0e721
...
...
@@ -2,28 +2,28 @@
#
# Table name: merge_requests
#
# id
:integer not null, primary key
# target_branch
:string(255) not null
# source_branch
:string(255) not null
# source_project_id
:integer not null
# author_id
:integer
# assignee_id
:integer
# title
:string(255)
# created_at
:datetime
# updated_at
:datetime
# milestone_id
:integer
# state
:string(255)
# merge_status
:string(255)
# target_project_id
:integer not null
# iid
:integer
# description
:text
# position
:integer default(0)
# locked_at
:datetime
# updated_by_id
:integer
# merge_error
:string(255)
# merge_params
:text (serialized to hash)
# merge_when_build_succeeds
:boolean default(false
), not null
# merge_user_id
:integer
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# source_project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# milestone_id :integer
# state :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
# merge_params
:text
# merge_when_build_succeeds
:boolean default(FALSE
), not null
# merge_user_id :integer
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
...
...
app/models/namespace.rb
View file @
79c0e721
...
...
@@ -11,7 +11,6 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
class
Namespace
<
ActiveRecord
::
Base
...
...
app/models/project.rb
View file @
79c0e721
...
...
@@ -29,6 +29,13 @@
# import_source :string(255)
# commit_count :integer default(0)
# import_error :text
# ci_id :integer
# builds_enabled :boolean default(TRUE), not null
# shared_runners_enabled :boolean default(TRUE), not null
# runners_token :string
# build_coverage_regex :string
# build_allow_git_fetch :boolean default(TRUE), not null
# build_timeout :integer default(3600), not null
#
require
'carrierwave/orm/activerecord'
...
...
app/models/project_services/asana_service.rb
View file @
79c0e721
...
...
@@ -16,7 +16,9 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
'asana'
class
AsanaService
<
Service
...
...
app/models/project_services/assembla_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
AssemblaService
<
Service
...
...
app/models/project_services/bamboo_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
BambooService
<
CiService
...
...
app/models/project_services/buildkite_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
"addressable/uri"
...
...
app/models/project_services/builds_email_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
BuildsEmailService
<
Service
...
...
app/models/project_services/campfire_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
CampfireService
<
Service
...
...
app/models/project_services/ci_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
# Base class for CI services
...
...
app/models/project_services/custom_issue_tracker_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
CustomIssueTrackerService
<
IssueTrackerService
...
...
app/models/project_services/drone_ci_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
DroneCiService
<
CiService
...
...
app/models/project_services/emails_on_push_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
EmailsOnPushService
<
Service
...
...
app/models/project_services/external_wiki_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
ExternalWikiService
<
Service
...
...
app/models/project_services/flowdock_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
"flowdock-git-hook"
...
...
app/models/project_services/gemnasium_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
"gemnasium/gitlab_service"
...
...
app/models/project_services/gitlab_ci_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
# TODO(ayufan): The GitLabCiService is deprecated and the type should be removed when the database entries are removed
...
...
app/models/project_services/gitlab_issue_tracker_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
GitlabIssueTrackerService
<
IssueTrackerService
...
...
app/models/project_services/hipchat_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
HipchatService
<
Service
...
...
app/models/project_services/irker_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
'uri'
...
...
app/models/project_services/issue_tracker_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
IssueTrackerService
<
Service
...
...
app/models/project_services/jira_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
JiraService
<
IssueTrackerService
...
...
app/models/project_services/pivotaltracker_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
PivotaltrackerService
<
Service
...
...
app/models/project_services/pushover_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
PushoverService
<
Service
...
...
app/models/project_services/redmine_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
RedmineService
<
IssueTrackerService
...
...
app/models/project_services/slack_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
SlackService
<
Service
...
...
app/models/project_services/teamcity_service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
class
TeamcityService
<
CiService
...
...
app/models/service.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
# To add new service you should build a class inherited from Service
...
...
app/models/user.rb
View file @
79c0e721
...
...
@@ -2,62 +2,63 @@
#
# Table name: users
#
# id :integer not null, primary key
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# created_at :datetime
# updated_at :datetime
# name :string(255)
# admin :boolean default(FALSE), not null
# projects_limit :integer default(10)
# skype :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# theme_id :integer default(1), not null
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# unlock_token :string(255)
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
# state :string(255)
# color_scheme_id :integer default(1), not null
# notification_level :integer default(1), not null
# password_expires_at :datetime
# created_by_id :integer
# last_credential_check_at :datetime
# avatar :string(255)
# confirmation_token :string(255)
# confirmed_at :datetime
# confirmation_sent_at :datetime
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# notification_email :string(255)
# hide_no_password :boolean default(FALSE)
# password_automatically_set :boolean default(FALSE)
# location :string(255)
# encrypted_otp_secret :string(255)
# encrypted_otp_secret_iv :string(255)
# encrypted_otp_secret_salt :string(255)
# otp_required_for_login :boolean default(FALSE), not null
# otp_backup_codes :text
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
# hide_project_limit :boolean default(FALSE)
# id :integer not null, primary key
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# created_at :datetime
# updated_at :datetime
# name :string(255)
# admin :boolean default(FALSE), not null
# projects_limit :integer default(10)
# skype :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# theme_id :integer default(1), not null
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
# state :string(255)
# color_scheme_id :integer default(1), not null
# notification_level :integer default(1), not null
# password_expires_at :datetime
# created_by_id :integer
# last_credential_check_at :datetime
# avatar :string(255)
# confirmation_token :string(255)
# confirmed_at :datetime
# confirmation_sent_at :datetime
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# notification_email :string(255)
# hide_no_password :boolean default(FALSE)
# password_automatically_set :boolean default(FALSE)
# location :string(255)
# encrypted_otp_secret :string(255)
# encrypted_otp_secret_iv :string(255)
# encrypted_otp_secret_salt :string(255)
# otp_required_for_login :boolean default(FALSE), not null
# otp_backup_codes :text
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
# hide_project_limit :boolean default(FALSE)
# unlock_token :string
# otp_grace_period_started_at :datetime
#
require
'carrierwave/orm/activerecord'
...
...
spec/factories/merge_requests.rb
View file @
79c0e721
...
...
@@ -2,25 +2,28 @@
#
# Table name: merge_requests
#
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# source_project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# milestone_id :integer
# state :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# source_project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# milestone_id :integer
# state :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
# merge_params :text
# merge_when_build_succeeds :boolean default(FALSE), not null
# merge_user_id :integer
#
FactoryGirl
.
define
do
...
...
spec/factories/projects.rb
View file @
79c0e721
...
...
@@ -29,6 +29,13 @@
# import_source :string(255)
# commit_count :integer default(0)
# import_error :text
# ci_id :integer
# builds_enabled :boolean default(TRUE), not null
# shared_runners_enabled :boolean default(TRUE), not null
# runners_token :string
# build_coverage_regex :string
# build_allow_git_fetch :boolean default(TRUE), not null
# build_timeout :integer default(3600), not null
#
FactoryGirl
.
define
do
...
...
spec/models/application_setting_spec.rb
View file @
79c0e721
...
...
@@ -2,32 +2,45 @@
#
# Table name: application_settings
#
# id :integer not null, primary key
# default_projects_limit :integer
# signup_enabled :boolean
# signin_enabled :boolean
# gravatar_enabled :boolean
# sign_in_text :text
# created_at :datetime
# updated_at :datetime
# home_page_url :string(255)
# default_branch_protection :integer default(2)
# twitter_sharing_enabled :boolean default(TRUE)
# restricted_visibility_levels :text
# version_check_enabled :boolean default(TRUE)
# max_attachment_size :integer default(10), not null
# default_project_visibility :integer
# default_snippet_visibility :integer
# restricted_signup_domains :text
# user_oauth_applications :boolean default(TRUE)
# 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
# runners_registration_token :string(255)
# id :integer not null, primary key
# default_projects_limit :integer
# signup_enabled :boolean
# signin_enabled :boolean
# gravatar_enabled :boolean
# sign_in_text :text
# created_at :datetime
# updated_at :datetime
# home_page_url :string(255)
# default_branch_protection :integer default(2)
# twitter_sharing_enabled :boolean default(TRUE)
# restricted_visibility_levels :text
# version_check_enabled :boolean default(TRUE)
# max_attachment_size :integer default(10), not null
# default_project_visibility :integer
# default_snippet_visibility :integer
# restricted_signup_domains :text
# user_oauth_applications :boolean default(TRUE)
# 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
# runners_registration_token :string
# require_two_factor_authentication :boolean default(FALSE)
# two_factor_grace_period :integer default(48)
# metrics_enabled :boolean default(FALSE)
# metrics_host :string default("localhost")
# metrics_username :string
# metrics_password :string
# metrics_pool_size :integer default(16)
# metrics_timeout :integer default(10)
# metrics_method_call_threshold :integer default(10)
# recaptcha_enabled :boolean default(FALSE)
# recaptcha_site_key :string
# recaptcha_private_key :string
# metrics_port :integer default(8089)
#
require
'spec_helper'
...
...
spec/models/ci/commit_spec.rb
View file @
79c0e721
...
...
@@ -13,7 +13,7 @@
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# project_id :integer
#
gl_
project_id :integer
#
require
'spec_helper'
...
...
spec/models/ci/runner_project_spec.rb
View file @
79c0e721
...
...
@@ -2,11 +2,12 @@
#
# Table name: ci_runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# runner_id :integer not null
# project_id :integer
# created_at :datetime
# updated_at :datetime
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/ci/trigger_spec.rb
View file @
79c0e721
...
...
@@ -2,12 +2,13 @@
#
# 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
# id :integer not null, primary key
# token :string(255)
# project_id :integer
# deleted_at :datetime
# created_at :datetime
# updated_at :datetime
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/ci/variable_spec.rb
View file @
79c0e721
...
...
@@ -3,12 +3,13 @@
# Table name: ci_variables
#
# id :integer not null, primary key
# project_id :integer
not null
# project_id :integer
# key :string(255)
# value :text
# encrypted_value :text
# encrypted_value_salt :string(255)
# encrypted_value_iv :string(255)
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/commit_status_spec.rb
View file @
79c0e721
...
...
@@ -29,6 +29,7 @@
# target_url :string(255)
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/external_wiki_service_spec.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
'spec_helper'
...
...
spec/models/generic_commit_status_spec.rb
View file @
79c0e721
...
...
@@ -29,6 +29,7 @@
# target_url :string(255)
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
#
require
'spec_helper'
...
...
spec/models/group_spec.rb
View file @
79c0e721
...
...
@@ -11,7 +11,6 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require
'spec_helper'
...
...
spec/models/merge_request_spec.rb
View file @
79c0e721
...
...
@@ -2,25 +2,28 @@
#
# Table name: merge_requests
#
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# source_project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# milestone_id :integer
# state :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# source_project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# milestone_id :integer
# state :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
# merge_params :text
# merge_when_build_succeeds :boolean default(FALSE), not null
# merge_user_id :integer
#
require
'spec_helper'
...
...
spec/models/namespace_spec.rb
View file @
79c0e721
...
...
@@ -11,7 +11,6 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require
'spec_helper'
...
...
spec/models/project_spec.rb
View file @
79c0e721
...
...
@@ -29,6 +29,13 @@
# import_source :string(255)
# commit_count :integer default(0)
# import_error :text
# ci_id :integer
# builds_enabled :boolean default(TRUE), not null
# shared_runners_enabled :boolean default(TRUE), not null
# runners_token :string
# build_coverage_regex :string
# build_allow_git_fetch :boolean default(TRUE), not null
# build_timeout :integer default(3600), not null
#
require
'spec_helper'
...
...
spec/models/service_spec.rb
View file @
79c0e721
...
...
@@ -16,6 +16,7 @@
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
# build_events :boolean default(FALSE), not null
#
require
'spec_helper'
...
...
spec/models/user_spec.rb
View file @
79c0e721
...
...
@@ -2,62 +2,63 @@
#
# Table name: users
#
# id :integer not null, primary key
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# created_at :datetime
# updated_at :datetime
# name :string(255)
# admin :boolean default(FALSE), not null
# projects_limit :integer default(10)
# skype :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# theme_id :integer default(1), not null
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# unlock_token :string(255)
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
# state :string(255)
# color_scheme_id :integer default(1), not null
# notification_level :integer default(1), not null
# password_expires_at :datetime
# created_by_id :integer
# last_credential_check_at :datetime
# avatar :string(255)
# confirmation_token :string(255)
# confirmed_at :datetime
# confirmation_sent_at :datetime
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# notification_email :string(255)
# hide_no_password :boolean default(FALSE)
# password_automatically_set :boolean default(FALSE)
# location :string(255)
# encrypted_otp_secret :string(255)
# encrypted_otp_secret_iv :string(255)
# encrypted_otp_secret_salt :string(255)
# otp_required_for_login :boolean default(FALSE), not null
# otp_backup_codes :text
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
# hide_project_limit :boolean default(FALSE)
# id :integer not null, primary key
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# created_at :datetime
# updated_at :datetime
# name :string(255)
# admin :boolean default(FALSE), not null
# projects_limit :integer default(10)
# skype :string(255) default(""), not null
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
# theme_id :integer default(1), not null
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
# state :string(255)
# color_scheme_id :integer default(1), not null
# notification_level :integer default(1), not null
# password_expires_at :datetime
# created_by_id :integer
# last_credential_check_at :datetime
# avatar :string(255)
# confirmation_token :string(255)
# confirmed_at :datetime
# confirmation_sent_at :datetime
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# notification_email :string(255)
# hide_no_password :boolean default(FALSE)
# password_automatically_set :boolean default(FALSE)
# location :string(255)
# encrypted_otp_secret :string(255)
# encrypted_otp_secret_iv :string(255)
# encrypted_otp_secret_salt :string(255)
# otp_required_for_login :boolean default(FALSE), not null
# otp_backup_codes :text
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
# hide_project_limit :boolean default(FALSE)
# unlock_token :string
# otp_grace_period_started_at :datetime
#
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