summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/application_setting.rb15
-rw-r--r--app/models/identity.rb12
-rw-r--r--app/models/merge_request.rb1
-rw-r--r--app/models/project.rb2
-rw-r--r--app/models/project_services/bamboo_service.rb14
-rw-r--r--app/models/project_services/teamcity_service.rb14
-rw-r--r--app/models/protected_branch.rb11
-rw-r--r--app/models/user.rb5
-rw-r--r--spec/factories/merge_requests.rb1
-rw-r--r--spec/factories/projects.rb2
-rw-r--r--spec/models/application_setting_spec.rb15
-rw-r--r--spec/models/merge_request_spec.rb1
-rw-r--r--spec/models/project_spec.rb2
-rw-r--r--spec/models/protected_branch_spec.rb11
-rw-r--r--spec/models/user_spec.rb5
15 files changed, 94 insertions, 17 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index aed4068f309..45ae79a75cc 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -1,3 +1,18 @@
+# == 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" },
diff --git a/app/models/identity.rb b/app/models/identity.rb
index 5fb1850c30b..c7cdb63e3d2 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -1,5 +1,15 @@
+# == 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
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index ae6f88c2e6a..715257f905f 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
+# locked_at :datetime
#
require Rails.root.join("app/models/commit")
diff --git a/app/models/project.rb b/app/models/project.rb
index 4785199b14c..f102c477404 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -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
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb
index b9eec9ab21e..16e1b83da4b 100644
--- a/app/models/project_services/bamboo_service.rb
+++ b/app/models/project_services/bamboo_service.rb
@@ -1,3 +1,17 @@
+# == 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
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index 52b5862e4d1..dca718b5e8c 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -1,3 +1,17 @@
+# == 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
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 1b06dd77523..97207ba1272 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -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
diff --git a/app/models/user.rb b/app/models/user.rb
index 852f3fc48cf..69fe674df83 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -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'
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index 0ae8ea5f878..6ce1d7446fe 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
+# locked_at :datetime
#
FactoryGirl.define do
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index 60eb73e4a95..1738b20fab2 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -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
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index 039775dddda..1723eba9ec3 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -1,3 +1,18 @@
+# == 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
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 7b0d261d72f..9585cf09768 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -18,6 +18,7 @@
# iid :integer
# description :text
# position :integer default(0)
+# locked_at :datetime
#
require 'spec_helper'
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 70a15cac1a8..2a278176371 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -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'
diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb
index af48c2c6d9e..b0f57e8a206 100644
--- a/spec/models/protected_branch_spec.rb
+++ b/spec/models/protected_branch_spec.rb
@@ -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'
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 8be7f733a5b..83341e516a5 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -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'