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
Léo-Paul Géneau
gitlab-ce
Commits
92deb451
Commit
92deb451
authored
Aug 25, 2014
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
1a9b2a47
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
172 additions
and
8 deletions
+172
-8
app/models/issue.rb
app/models/issue.rb
+0
-1
app/models/label.rb
app/models/label.rb
+12
-0
app/models/label_link.rb
app/models/label_link.rb
+12
-0
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+1
-1
app/models/project.rb
app/models/project.rb
+2
-1
app/models/project_services/ci_service.rb
app/models/project_services/ci_service.rb
+19
-0
app/models/users_star_project.rb
app/models/users_star_project.rb
+5
-5
spec/factories/label_links.rb
spec/factories/label_links.rb
+12
-0
spec/factories/labels.rb
spec/factories/labels.rb
+12
-0
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+22
-0
spec/factories/notes.rb
spec/factories/notes.rb
+19
-0
spec/factories/projects.rb
spec/factories/projects.rb
+28
-0
spec/models/label_link_spec.rb
spec/models/label_link_spec.rb
+12
-0
spec/models/label_spec.rb
spec/models/label_spec.rb
+12
-0
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+2
-0
No files found.
app/models/issue.rb
View file @
92deb451
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
# milestone_id :integer
# milestone_id :integer
# state :string(255)
# state :string(255)
# iid :integer
# iid :integer
# attachment :string(255)
#
#
require
'carrierwave/orm/activerecord'
require
'carrierwave/orm/activerecord'
...
...
app/models/label.rb
View file @
92deb451
# == Schema Information
#
# Table name: labels
#
# id :integer not null, primary key
# title :string(255)
# color :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
class
Label
<
ActiveRecord
::
Base
class
Label
<
ActiveRecord
::
Base
DEFAULT_COLOR
=
'#428BCA'
DEFAULT_COLOR
=
'#428BCA'
...
...
app/models/label_link.rb
View file @
92deb451
# == Schema Information
#
# Table name: label_links
#
# id :integer not null, primary key
# label_id :integer
# target_id :integer
# target_type :string(255)
# created_at :datetime
# updated_at :datetime
#
class
LabelLink
<
ActiveRecord
::
Base
class
LabelLink
<
ActiveRecord
::
Base
belongs_to
:target
,
polymorphic:
true
belongs_to
:target
,
polymorphic:
true
belongs_to
:label
belongs_to
:label
...
...
app/models/merge_request.rb
View file @
92deb451
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
# target_project_id :integer not null
# target_project_id :integer not null
# iid :integer
# iid :integer
# description :text
# description :text
# position :integer default(0)
#
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
require
Rails
.
root
.
join
(
"app/models/commit"
)
...
...
app/models/merge_request_diff.rb
View file @
92deb451
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Table name: merge_request_diffs
# Table name: merge_request_diffs
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# state :string(255)
default("collected"), not null
# state :string(255)
# st_commits :text
# st_commits :text
# st_diffs :text
# st_diffs :text
# merge_request_id :integer not null
# merge_request_id :integer not null
...
...
app/models/project.rb
View file @
92deb451
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
# visibility_level :integer default(0), not null
# visibility_level :integer default(0), not null
# archived :boolean default(FALSE), not null
# archived :boolean default(FALSE), not null
# import_status :string(255)
# import_status :string(255)
# star_count :integer
# repository_size :float default(0.0)
# star_count :integer default(0), not null
#
#
class
Project
<
ActiveRecord
::
Base
class
Project
<
ActiveRecord
::
Base
...
...
app/models/project_services/ci_service.rb
View file @
92deb451
# == Schema Information
#
# Table name: services
#
# id :integer not null, primary key
# type :string(255)
# title :string(255)
# token :string(255)
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# active :boolean default(FALSE), not null
# project_url :string(255)
# subdomain :string(255)
# room :string(255)
# recipients :text
# api_key :string(255)
#
# Base class for CI services
# Base class for CI services
# List methods you need to implement to get your CI service
# List methods you need to implement to get your CI service
# working with GitLab Merge Requests
# working with GitLab Merge Requests
...
...
app/models/users_star_project.rb
View file @
92deb451
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
# Table name: users_star_projects
# Table name: users_star_projects
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# starrer_id :integer not null
# project_id :integer not null
# project_id :integer not null
# user_id :integer not null
# created_at :datetime
# created_at :datetime
# updated_at :datetime
# updated_at :datetime
#
#
...
...
spec/factories/label_links.rb
View file @
92deb451
# == Schema Information
#
# Table name: label_links
#
# id :integer not null, primary key
# label_id :integer
# target_id :integer
# target_type :string(255)
# created_at :datetime
# updated_at :datetime
#
# Read about factories at https://github.com/thoughtbot/factory_girl
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl
.
define
do
FactoryGirl
.
define
do
...
...
spec/factories/labels.rb
View file @
92deb451
# == Schema Information
#
# Table name: labels
#
# id :integer not null, primary key
# title :string(255)
# color :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
# Read about factories at https://github.com/thoughtbot/factory_girl
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl
.
define
do
FactoryGirl
.
define
do
...
...
spec/factories/merge_requests.rb
View file @
92deb451
# == Schema Information
#
# 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)
#
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:merge_request
do
factory
:merge_request
do
title
title
...
...
spec/factories/notes.rb
View file @
92deb451
# == Schema Information
#
# Table name: notes
#
# id :integer not null, primary key
# note :text
# noteable_type :string(255)
# author_id :integer
# created_at :datetime
# updated_at :datetime
# project_id :integer
# attachment :string(255)
# line_code :string(255)
# commit_id :string(255)
# noteable_id :integer
# system :boolean default(FALSE), not null
# st_diff :text
#
require_relative
'../support/repo_helpers'
require_relative
'../support/repo_helpers'
FactoryGirl
.
define
do
FactoryGirl
.
define
do
...
...
spec/factories/projects.rb
View file @
92deb451
# == Schema Information
#
# Table name: projects
#
# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# creator_id :integer
# issues_enabled :boolean default(TRUE), not null
# wall_enabled :boolean default(TRUE), not null
# merge_requests_enabled :boolean default(TRUE), not null
# wiki_enabled :boolean default(TRUE), not null
# namespace_id :integer
# issues_tracker :string(255) default("gitlab"), not null
# issues_tracker_id :string(255)
# snippets_enabled :boolean default(TRUE), not null
# last_activity_at :datetime
# import_url :string(255)
# visibility_level :integer default(0), not null
# archived :boolean default(FALSE), not null
# import_status :string(255)
# repository_size :float default(0.0)
# star_count :integer default(0), not null
#
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:empty_project
,
class:
'Project'
do
factory
:empty_project
,
class:
'Project'
do
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
...
...
spec/models/label_link_spec.rb
View file @
92deb451
# == Schema Information
#
# Table name: label_links
#
# id :integer not null, primary key
# label_id :integer
# target_id :integer
# target_type :string(255)
# created_at :datetime
# updated_at :datetime
#
require
'spec_helper'
require
'spec_helper'
describe
LabelLink
do
describe
LabelLink
do
...
...
spec/models/label_spec.rb
View file @
92deb451
# == Schema Information
#
# Table name: labels
#
# id :integer not null, primary key
# title :string(255)
# color :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
require
'spec_helper'
require
'spec_helper'
describe
Label
do
describe
Label
do
...
...
spec/models/merge_request_spec.rb
View file @
92deb451
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
# target_project_id :integer not null
# target_project_id :integer not null
# iid :integer
# iid :integer
# description :text
# description :text
# position :integer default(0)
#
#
require
'spec_helper'
require
'spec_helper'
...
...
spec/models/project_spec.rb
View file @
92deb451
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
# visibility_level :integer default(0), not null
# visibility_level :integer default(0), not null
# archived :boolean default(FALSE), not null
# archived :boolean default(FALSE), not null
# import_status :string(255)
# import_status :string(255)
# repository_size :float default(0.0)
# star_count :integer default(0), not null
#
#
require
'spec_helper'
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