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
Kazuhiko Shiozaki
gitlab-ce
Commits
98ee4a1f
Commit
98ee4a1f
authored
Jan 22, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate models
parent
a5b255fb
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
94 additions
and
17 deletions
+94
-17
app/models/application_setting.rb
app/models/application_setting.rb
+15
-0
app/models/identity.rb
app/models/identity.rb
+11
-1
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
app/models/project.rb
app/models/project.rb
+2
-0
app/models/project_services/bamboo_service.rb
app/models/project_services/bamboo_service.rb
+14
-0
app/models/project_services/teamcity_service.rb
app/models/project_services/teamcity_service.rb
+14
-0
app/models/protected_branch.rb
app/models/protected_branch.rb
+6
-5
app/models/user.rb
app/models/user.rb
+2
-3
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+1
-0
spec/factories/projects.rb
spec/factories/projects.rb
+2
-0
spec/models/application_setting_spec.rb
spec/models/application_setting_spec.rb
+15
-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
spec/models/protected_branch_spec.rb
spec/models/protected_branch_spec.rb
+6
-5
spec/models/user_spec.rb
spec/models/user_spec.rb
+2
-3
No files found.
app/models/application_setting.rb
View file @
98ee4a1f
# == Schema Information
#
# 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)
#
class
ApplicationSetting
<
ActiveRecord
::
Base
validates
:home_page_url
,
allow_blank:
true
,
format:
{
with:
URI
::
regexp
(
%w(http https)
),
message:
"should be a valid url"
},
...
...
app/models/identity.rb
View file @
98ee4a1f
# == Schema Information
#
# Table name: identities
#
# id :integer not null, primary key
# extern_uid :string(255)
# provider :string(255)
# user_id :integer
#
class
Identity
<
ActiveRecord
::
Base
belongs_to
:user
validates
:extern_uid
,
allow_blank:
true
,
uniqueness:
{
scope: :provider
}
end
\ No newline at end of file
end
app/models/merge_request.rb
View file @
98ee4a1f
...
...
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
...
...
app/models/project.rb
View file @
98ee4a1f
...
...
@@ -24,6 +24,8 @@
# import_status :string(255)
# repository_size :float default(0.0)
# star_count :integer default(0), not null
# import_type :string(255)
# import_source :string(255)
#
class
Project
<
ActiveRecord
::
Base
...
...
app/models/project_services/bamboo_service.rb
View file @
98ee4a1f
# == Schema Information
#
# Table name: services
#
# id :integer not null, primary key
# type :string(255)
# title :string(255)
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# active :boolean default(FALSE), not null
# properties :text
#
class
BambooService
<
CiService
include
HTTParty
...
...
app/models/project_services/teamcity_service.rb
View file @
98ee4a1f
# == Schema Information
#
# Table name: services
#
# id :integer not null, primary key
# type :string(255)
# title :string(255)
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# active :boolean default(FALSE), not null
# properties :text
#
class
TeamcityService
<
CiService
include
HTTParty
...
...
app/models/protected_branch.rb
View file @
98ee4a1f
...
...
@@ -2,11 +2,12 @@
#
# Table name: protected_branches
#
# id :integer not null, primary key
# project_id :integer not null
# name :string(255) not null
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# project_id :integer not null
# name :string(255) not null
# created_at :datetime
# updated_at :datetime
# developers_can_push :boolean default(FALSE), not null
#
class
ProtectedBranch
<
ActiveRecord
::
Base
...
...
app/models/user.rb
View file @
98ee4a1f
...
...
@@ -26,8 +26,6 @@
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# extern_uid :string(255)
# provider :string(255)
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
...
...
@@ -36,7 +34,6 @@
# 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
...
...
@@ -44,6 +41,8 @@
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# last_credential_check_at :datetime
# github_access_token :string(255)
#
require
'carrierwave/orm/activerecord'
...
...
spec/factories/merge_requests.rb
View file @
98ee4a1f
...
...
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
#
FactoryGirl
.
define
do
...
...
spec/factories/projects.rb
View file @
98ee4a1f
...
...
@@ -24,6 +24,8 @@
# import_status :string(255)
# repository_size :float default(0.0)
# star_count :integer default(0), not null
# import_type :string(255)
# import_source :string(255)
#
FactoryGirl
.
define
do
...
...
spec/models/application_setting_spec.rb
View file @
98ee4a1f
# == Schema Information
#
# 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)
#
require
'spec_helper'
describe
ApplicationSetting
,
models:
true
do
...
...
spec/models/merge_request_spec.rb
View file @
98ee4a1f
...
...
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
#
require
'spec_helper'
...
...
spec/models/project_spec.rb
View file @
98ee4a1f
...
...
@@ -24,6 +24,8 @@
# import_status :string(255)
# repository_size :float default(0.0)
# star_count :integer default(0), not null
# import_type :string(255)
# import_source :string(255)
#
require
'spec_helper'
...
...
spec/models/protected_branch_spec.rb
View file @
98ee4a1f
...
...
@@ -2,11 +2,12 @@
#
# Table name: protected_branches
#
# id :integer not null, primary key
# project_id :integer not null
# name :string(255) not null
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# project_id :integer not null
# name :string(255) not null
# created_at :datetime
# updated_at :datetime
# developers_can_push :boolean default(FALSE), not null
#
require
'spec_helper'
...
...
spec/models/user_spec.rb
View file @
98ee4a1f
...
...
@@ -26,8 +26,6 @@
# bio :string(255)
# failed_attempts :integer default(0)
# locked_at :datetime
# extern_uid :string(255)
# provider :string(255)
# username :string(255)
# can_create_group :boolean default(TRUE), not null
# can_create_team :boolean default(TRUE), not null
...
...
@@ -36,7 +34,6 @@
# 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
...
...
@@ -44,6 +41,8 @@
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# last_credential_check_at :datetime
# github_access_token :string(255)
#
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