Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
1caa54003fa6
Commit
1caa5400
authored
Jan 22, 2015
by
Dmitriy Zaporozhets
Browse files
Annotate models
parent
f445ab55dcfb
Changes
15
Hide whitespace changes
Inline
Side-by-side
app/models/application_setting.rb
View file @
1caa5400
# == 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 @
1caa5400
# == 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
}
...
...
@@ -1,5 +11,5 @@
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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -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 @
1caa5400
# == 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 @
1caa5400
# == 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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
# locked_at :datetime
#
FactoryGirl
.
define
do
...
...
spec/factories/projects.rb
View file @
1caa5400
...
...
@@ -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 @
1caa5400
# == 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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -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 @
1caa5400
...
...
@@ -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
Supports
Markdown
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