Commit 6e35aceff29ddeae6282de31e81e48446ab927fa
1 parent
78680a81
Exists in
master
and in
4 other branches
Annotated
Showing
42 changed files
with
198 additions
and
68 deletions
Show diff stats
app/models/campfire_service.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | class CampfireService < Service | 18 | class CampfireService < Service |
app/models/deploy_key.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: keys | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# user_id :integer | ||
| 7 | +# created_at :datetime | ||
| 8 | +# updated_at :datetime | ||
| 9 | +# key :text | ||
| 10 | +# title :string(255) | ||
| 11 | +# identifier :string(255) | ||
| 12 | +# type :string(255) | ||
| 13 | +# | ||
| 14 | + | ||
| 1 | class DeployKey < Key | 15 | class DeployKey < Key |
| 2 | has_many :deploy_keys_projects, dependent: :destroy | 16 | has_many :deploy_keys_projects, dependent: :destroy |
| 3 | has_many :projects, through: :deploy_keys_projects | 17 | has_many :projects, through: :deploy_keys_projects |
app/models/deploy_keys_project.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: deploy_keys_projects | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# deploy_key_id :integer not null | ||
| 7 | +# project_id :integer not null | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# | ||
| 11 | + | ||
| 1 | class DeployKeysProject < ActiveRecord::Base | 12 | class DeployKeysProject < ActiveRecord::Base |
| 2 | attr_accessible :key_id, :project_id | 13 | attr_accessible :key_id, :project_id |
| 3 | 14 |
app/models/forked_project_link.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: forked_project_links | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# forked_to_project_id :integer not null | ||
| 7 | +# forked_from_project_id :integer not null | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# | ||
| 11 | + | ||
| 1 | class ForkedProjectLink < ActiveRecord::Base | 12 | class ForkedProjectLink < ActiveRecord::Base |
| 2 | attr_accessible :forked_from_project_id, :forked_to_project_id | 13 | attr_accessible :forked_from_project_id, :forked_to_project_id |
| 3 | 14 |
app/models/gitlab_ci_service.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | class GitlabCiService < Service | 18 | class GitlabCiService < Service |
app/models/hipchat_service.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | class HipchatService < Service | 18 | class HipchatService < Service |
| @@ -70,4 +72,4 @@ class HipchatService < Service | @@ -70,4 +72,4 @@ class HipchatService < Service | ||
| 70 | message | 72 | message |
| 71 | end | 73 | end |
| 72 | 74 | ||
| 73 | -end | ||
| 74 | \ No newline at end of file | 75 | \ No newline at end of file |
| 76 | +end |
app/models/issue.rb
| @@ -7,8 +7,8 @@ | @@ -7,8 +7,8 @@ | ||
| 7 | # assignee_id :integer | 7 | # assignee_id :integer |
| 8 | # author_id :integer | 8 | # author_id :integer |
| 9 | # project_id :integer | 9 | # project_id :integer |
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 10 | +# created_at :datetime |
| 11 | +# updated_at :datetime | ||
| 12 | # position :integer default(0) | 12 | # position :integer default(0) |
| 13 | # branch_name :string(255) | 13 | # branch_name :string(255) |
| 14 | # description :text | 14 | # description :text |
app/models/key.rb
| @@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
| 4 | # | 4 | # |
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # user_id :integer | 6 | # user_id :integer |
| 7 | -# created_at :datetime not null | ||
| 8 | -# updated_at :datetime not null | 7 | +# created_at :datetime |
| 8 | +# updated_at :datetime | ||
| 9 | # key :text | 9 | # key :text |
| 10 | # title :string(255) | 10 | # title :string(255) |
| 11 | # identifier :string(255) | 11 | # identifier :string(255) |
| 12 | -# project_id :integer | 12 | +# type :string(255) |
| 13 | # | 13 | # |
| 14 | 14 | ||
| 15 | require 'digest/md5' | 15 | require 'digest/md5' |
app/models/merge_request.rb
| @@ -9,8 +9,8 @@ | @@ -9,8 +9,8 @@ | ||
| 9 | # author_id :integer | 9 | # author_id :integer |
| 10 | # assignee_id :integer | 10 | # assignee_id :integer |
| 11 | # title :string(255) | 11 | # title :string(255) |
| 12 | -# created_at :datetime not null | ||
| 13 | -# updated_at :datetime not null | 12 | +# created_at :datetime |
| 13 | +# updated_at :datetime | ||
| 14 | # st_commits :text(2147483647) | 14 | # st_commits :text(2147483647) |
| 15 | # st_diffs :text(2147483647) | 15 | # st_diffs :text(2147483647) |
| 16 | # milestone_id :integer | 16 | # milestone_id :integer |
app/models/note.rb
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | # note :text | 6 | # note :text |
| 7 | # noteable_type :string(255) | 7 | # noteable_type :string(255) |
| 8 | # author_id :integer | 8 | # author_id :integer |
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | 9 | +# created_at :datetime |
| 10 | +# updated_at :datetime | ||
| 11 | # project_id :integer | 11 | # project_id :integer |
| 12 | # attachment :string(255) | 12 | # attachment :string(255) |
| 13 | # line_code :string(255) | 13 | # line_code :string(255) |
app/models/personal_snippet.rb
| @@ -6,13 +6,14 @@ | @@ -6,13 +6,14 @@ | ||
| 6 | # title :string(255) | 6 | # title :string(255) |
| 7 | # content :text | 7 | # content :text |
| 8 | # author_id :integer not null | 8 | # author_id :integer not null |
| 9 | -# project_id :integer not null | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 9 | +# project_id :integer |
| 10 | +# created_at :datetime | ||
| 11 | +# updated_at :datetime | ||
| 12 | # file_name :string(255) | 12 | # file_name :string(255) |
| 13 | # expires_at :datetime | 13 | # expires_at :datetime |
| 14 | +# private :boolean default(TRUE), not null | ||
| 14 | # type :string(255) | 15 | # type :string(255) |
| 15 | -# private :boolean | 16 | +# |
| 16 | 17 | ||
| 17 | class PersonalSnippet < Snippet | 18 | class PersonalSnippet < Snippet |
| 18 | end | 19 | end |
app/models/project.rb
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | # name :string(255) | 6 | # name :string(255) |
| 7 | # path :string(255) | 7 | # path :string(255) |
| 8 | # description :text | 8 | # description :text |
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | 9 | +# created_at :datetime |
| 10 | +# updated_at :datetime | ||
| 11 | # creator_id :integer | 11 | # creator_id :integer |
| 12 | # default_branch :string(255) | 12 | # default_branch :string(255) |
| 13 | # issues_enabled :boolean default(TRUE), not null | 13 | # issues_enabled :boolean default(TRUE), not null |
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | # issues_tracker_id :string(255) | 20 | # issues_tracker_id :string(255) |
| 21 | # snippets_enabled :boolean default(TRUE), not null | 21 | # snippets_enabled :boolean default(TRUE), not null |
| 22 | # last_activity_at :datetime | 22 | # last_activity_at :datetime |
| 23 | +# imported :boolean default(FALSE), not null | ||
| 23 | # | 24 | # |
| 24 | 25 | ||
| 25 | require "grit" | 26 | require "grit" |
app/models/project_hook.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
app/models/project_snippet.rb
| @@ -6,13 +6,14 @@ | @@ -6,13 +6,14 @@ | ||
| 6 | # title :string(255) | 6 | # title :string(255) |
| 7 | # content :text | 7 | # content :text |
| 8 | # author_id :integer not null | 8 | # author_id :integer not null |
| 9 | -# project_id :integer not null | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 9 | +# project_id :integer |
| 10 | +# created_at :datetime | ||
| 11 | +# updated_at :datetime | ||
| 12 | # file_name :string(255) | 12 | # file_name :string(255) |
| 13 | # expires_at :datetime | 13 | # expires_at :datetime |
| 14 | +# private :boolean default(TRUE), not null | ||
| 14 | # type :string(255) | 15 | # type :string(255) |
| 15 | -# private :boolean | 16 | +# |
| 16 | 17 | ||
| 17 | class ProjectSnippet < Snippet | 18 | class ProjectSnippet < Snippet |
| 18 | belongs_to :project | 19 | belongs_to :project |
app/models/service.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | # To add new service you should build a class inherited from Service | 18 | # To add new service you should build a class inherited from Service |
app/models/service_hook.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
app/models/snippet.rb
| @@ -6,13 +6,14 @@ | @@ -6,13 +6,14 @@ | ||
| 6 | # title :string(255) | 6 | # title :string(255) |
| 7 | # content :text | 7 | # content :text |
| 8 | # author_id :integer not null | 8 | # author_id :integer not null |
| 9 | -# project_id :integer not null | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 9 | +# project_id :integer |
| 10 | +# created_at :datetime | ||
| 11 | +# updated_at :datetime | ||
| 12 | # file_name :string(255) | 12 | # file_name :string(255) |
| 13 | # expires_at :datetime | 13 | # expires_at :datetime |
| 14 | +# private :boolean default(TRUE), not null | ||
| 14 | # type :string(255) | 15 | # type :string(255) |
| 15 | -# private :boolean | 16 | +# |
| 16 | 17 | ||
| 17 | class Snippet < ActiveRecord::Base | 18 | class Snippet < ActiveRecord::Base |
| 18 | include Linguist::BlobHelper | 19 | include Linguist::BlobHelper |
app/models/system_hook.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
app/models/user.rb
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | # | 4 | # |
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # email :string(255) default(""), not null | 6 | # email :string(255) default(""), not null |
| 7 | -# encrypted_password :string(255) default(""), not null | 7 | +# encrypted_password :string(128) default(""), not null |
| 8 | # reset_password_token :string(255) | 8 | # reset_password_token :string(255) |
| 9 | # reset_password_sent_at :datetime | 9 | # reset_password_sent_at :datetime |
| 10 | # remember_created_at :datetime | 10 | # remember_created_at :datetime |
| @@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
| 13 | # last_sign_in_at :datetime | 13 | # last_sign_in_at :datetime |
| 14 | # current_sign_in_ip :string(255) | 14 | # current_sign_in_ip :string(255) |
| 15 | # last_sign_in_ip :string(255) | 15 | # last_sign_in_ip :string(255) |
| 16 | -# created_at :datetime not null | ||
| 17 | -# updated_at :datetime not null | 16 | +# created_at :datetime |
| 17 | +# updated_at :datetime | ||
| 18 | # name :string(255) | 18 | # name :string(255) |
| 19 | # admin :boolean default(FALSE), not null | 19 | # admin :boolean default(FALSE), not null |
| 20 | # projects_limit :integer default(10) | 20 | # projects_limit :integer default(10) |
| @@ -34,6 +34,8 @@ | @@ -34,6 +34,8 @@ | ||
| 34 | # state :string(255) | 34 | # state :string(255) |
| 35 | # color_scheme_id :integer default(1), not null | 35 | # color_scheme_id :integer default(1), not null |
| 36 | # notification_level :integer default(1), not null | 36 | # notification_level :integer default(1), not null |
| 37 | +# password_expires_at :datetime | ||
| 38 | +# created_by_id :integer | ||
| 37 | # | 39 | # |
| 38 | 40 | ||
| 39 | class User < ActiveRecord::Base | 41 | class User < ActiveRecord::Base |
app/models/users_group.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: users_groups | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# group_access :integer not null | ||
| 7 | +# group_id :integer not null | ||
| 8 | +# user_id :integer not null | ||
| 9 | +# created_at :datetime not null | ||
| 10 | +# updated_at :datetime not null | ||
| 11 | +# | ||
| 12 | + | ||
| 1 | class UsersGroup < ActiveRecord::Base | 13 | class UsersGroup < ActiveRecord::Base |
| 2 | GUEST = 10 | 14 | GUEST = 10 |
| 3 | REPORTER = 20 | 15 | REPORTER = 20 |
app/models/users_project.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # user_id :integer not null | 6 | # user_id :integer not null |
| 7 | # project_id :integer not null | 7 | # project_id :integer not null |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # project_access :integer default(0), not null | 10 | # project_access :integer default(0), not null |
| 11 | # notification_level :integer default(3), not null | 11 | # notification_level :integer default(3), not null |
| 12 | # | 12 | # |
app/models/web_hook.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
spec/factories/forked_project_links.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: forked_project_links | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# forked_to_project_id :integer not null | ||
| 7 | +# forked_from_project_id :integer not null | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# | ||
| 11 | + | ||
| 1 | # Read about factories at https://github.com/thoughtbot/factory_girl | 12 | # Read about factories at https://github.com/thoughtbot/factory_girl |
| 2 | 13 | ||
| 3 | FactoryGirl.define do | 14 | FactoryGirl.define do |
spec/factories/users_groups.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: users_groups | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# group_access :integer not null | ||
| 7 | +# group_id :integer not null | ||
| 8 | +# user_id :integer not null | ||
| 9 | +# created_at :datetime not null | ||
| 10 | +# updated_at :datetime not null | ||
| 11 | +# | ||
| 12 | + | ||
| 1 | FactoryGirl.define do | 13 | FactoryGirl.define do |
| 2 | factory :users_group do | 14 | factory :users_group do |
| 3 | group_access { UsersGroup::OWNER } | 15 | group_access { UsersGroup::OWNER } |
spec/models/deploy_key_spec.rb
| @@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
| 4 | # | 4 | # |
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # user_id :integer | 6 | # user_id :integer |
| 7 | -# created_at :datetime not null | ||
| 8 | -# updated_at :datetime not null | 7 | +# created_at :datetime |
| 8 | +# updated_at :datetime | ||
| 9 | # key :text | 9 | # key :text |
| 10 | # title :string(255) | 10 | # title :string(255) |
| 11 | # identifier :string(255) | 11 | # identifier :string(255) |
| 12 | -# project_id :integer | 12 | +# type :string(255) |
| 13 | # | 13 | # |
| 14 | 14 | ||
| 15 | require 'spec_helper' | 15 | require 'spec_helper' |
spec/models/deploy_keys_project_spec.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: deploy_keys_projects | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# deploy_key_id :integer not null | ||
| 7 | +# project_id :integer not null | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# | ||
| 11 | + | ||
| 1 | require 'spec_helper' | 12 | require 'spec_helper' |
| 2 | 13 | ||
| 3 | describe DeployKeysProject do | 14 | describe DeployKeysProject do |
spec/models/forked_project_link_spec.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: forked_project_links | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# forked_to_project_id :integer not null | ||
| 7 | +# forked_from_project_id :integer not null | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# | ||
| 11 | + | ||
| 1 | require 'spec_helper' | 12 | require 'spec_helper' |
| 2 | 13 | ||
| 3 | describe ForkedProjectLink, "add link on fork" do | 14 | describe ForkedProjectLink, "add link on fork" do |
spec/models/gitlab_ci_service_spec.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | require 'spec_helper' | 18 | require 'spec_helper' |
spec/models/issue_spec.rb
| @@ -7,8 +7,8 @@ | @@ -7,8 +7,8 @@ | ||
| 7 | # assignee_id :integer | 7 | # assignee_id :integer |
| 8 | # author_id :integer | 8 | # author_id :integer |
| 9 | # project_id :integer | 9 | # project_id :integer |
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 10 | +# created_at :datetime |
| 11 | +# updated_at :datetime | ||
| 12 | # position :integer default(0) | 12 | # position :integer default(0) |
| 13 | # branch_name :string(255) | 13 | # branch_name :string(255) |
| 14 | # description :text | 14 | # description :text |
spec/models/key_spec.rb
| @@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
| 4 | # | 4 | # |
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # user_id :integer | 6 | # user_id :integer |
| 7 | -# created_at :datetime not null | ||
| 8 | -# updated_at :datetime not null | 7 | +# created_at :datetime |
| 8 | +# updated_at :datetime | ||
| 9 | # key :text | 9 | # key :text |
| 10 | # title :string(255) | 10 | # title :string(255) |
| 11 | # identifier :string(255) | 11 | # identifier :string(255) |
| 12 | -# project_id :integer | 12 | +# type :string(255) |
| 13 | # | 13 | # |
| 14 | 14 | ||
| 15 | require 'spec_helper' | 15 | require 'spec_helper' |
spec/models/merge_request_spec.rb
| @@ -9,8 +9,8 @@ | @@ -9,8 +9,8 @@ | ||
| 9 | # author_id :integer | 9 | # author_id :integer |
| 10 | # assignee_id :integer | 10 | # assignee_id :integer |
| 11 | # title :string(255) | 11 | # title :string(255) |
| 12 | -# created_at :datetime not null | ||
| 13 | -# updated_at :datetime not null | 12 | +# created_at :datetime |
| 13 | +# updated_at :datetime | ||
| 14 | # st_commits :text(2147483647) | 14 | # st_commits :text(2147483647) |
| 15 | # st_diffs :text(2147483647) | 15 | # st_diffs :text(2147483647) |
| 16 | # milestone_id :integer | 16 | # milestone_id :integer |
spec/models/note_spec.rb
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | # note :text | 6 | # note :text |
| 7 | # noteable_type :string(255) | 7 | # noteable_type :string(255) |
| 8 | # author_id :integer | 8 | # author_id :integer |
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | 9 | +# created_at :datetime |
| 10 | +# updated_at :datetime | ||
| 11 | # project_id :integer | 11 | # project_id :integer |
| 12 | # attachment :string(255) | 12 | # attachment :string(255) |
| 13 | # line_code :string(255) | 13 | # line_code :string(255) |
spec/models/project_snippet_spec.rb
| @@ -6,11 +6,13 @@ | @@ -6,11 +6,13 @@ | ||
| 6 | # title :string(255) | 6 | # title :string(255) |
| 7 | # content :text | 7 | # content :text |
| 8 | # author_id :integer not null | 8 | # author_id :integer not null |
| 9 | -# project_id :integer not null | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 9 | +# project_id :integer |
| 10 | +# created_at :datetime | ||
| 11 | +# updated_at :datetime | ||
| 12 | # file_name :string(255) | 12 | # file_name :string(255) |
| 13 | # expires_at :datetime | 13 | # expires_at :datetime |
| 14 | +# private :boolean default(TRUE), not null | ||
| 15 | +# type :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | require 'spec_helper' | 18 | require 'spec_helper' |
spec/models/project_spec.rb
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | # name :string(255) | 6 | # name :string(255) |
| 7 | # path :string(255) | 7 | # path :string(255) |
| 8 | # description :text | 8 | # description :text |
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | 9 | +# created_at :datetime |
| 10 | +# updated_at :datetime | ||
| 11 | # creator_id :integer | 11 | # creator_id :integer |
| 12 | # default_branch :string(255) | 12 | # default_branch :string(255) |
| 13 | # issues_enabled :boolean default(TRUE), not null | 13 | # issues_enabled :boolean default(TRUE), not null |
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | # issues_tracker_id :string(255) | 20 | # issues_tracker_id :string(255) |
| 21 | # snippets_enabled :boolean default(TRUE), not null | 21 | # snippets_enabled :boolean default(TRUE), not null |
| 22 | # last_activity_at :datetime | 22 | # last_activity_at :datetime |
| 23 | +# imported :boolean default(FALSE), not null | ||
| 23 | # | 24 | # |
| 24 | 25 | ||
| 25 | require 'spec_helper' | 26 | require 'spec_helper' |
spec/models/service_hook_spec.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
spec/models/service_spec.rb
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | # updated_at :datetime not null | 11 | # updated_at :datetime not null |
| 12 | # active :boolean default(FALSE), not null | 12 | # active :boolean default(FALSE), not null |
| 13 | # project_url :string(255) | 13 | # project_url :string(255) |
| 14 | +# subdomain :string(255) | ||
| 15 | +# room :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | require 'spec_helper' | 18 | require 'spec_helper' |
spec/models/snippet_spec.rb
| @@ -6,11 +6,13 @@ | @@ -6,11 +6,13 @@ | ||
| 6 | # title :string(255) | 6 | # title :string(255) |
| 7 | # content :text | 7 | # content :text |
| 8 | # author_id :integer not null | 8 | # author_id :integer not null |
| 9 | -# project_id :integer not null | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | 9 | +# project_id :integer |
| 10 | +# created_at :datetime | ||
| 11 | +# updated_at :datetime | ||
| 12 | # file_name :string(255) | 12 | # file_name :string(255) |
| 13 | # expires_at :datetime | 13 | # expires_at :datetime |
| 14 | +# private :boolean default(TRUE), not null | ||
| 15 | +# type :string(255) | ||
| 14 | # | 16 | # |
| 15 | 17 | ||
| 16 | require 'spec_helper' | 18 | require 'spec_helper' |
spec/models/system_hook_spec.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |
spec/models/user_spec.rb
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | # | 4 | # |
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # email :string(255) default(""), not null | 6 | # email :string(255) default(""), not null |
| 7 | -# encrypted_password :string(255) default(""), not null | 7 | +# encrypted_password :string(128) default(""), not null |
| 8 | # reset_password_token :string(255) | 8 | # reset_password_token :string(255) |
| 9 | # reset_password_sent_at :datetime | 9 | # reset_password_sent_at :datetime |
| 10 | # remember_created_at :datetime | 10 | # remember_created_at :datetime |
| @@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
| 13 | # last_sign_in_at :datetime | 13 | # last_sign_in_at :datetime |
| 14 | # current_sign_in_ip :string(255) | 14 | # current_sign_in_ip :string(255) |
| 15 | # last_sign_in_ip :string(255) | 15 | # last_sign_in_ip :string(255) |
| 16 | -# created_at :datetime not null | ||
| 17 | -# updated_at :datetime not null | 16 | +# created_at :datetime |
| 17 | +# updated_at :datetime | ||
| 18 | # name :string(255) | 18 | # name :string(255) |
| 19 | # admin :boolean default(FALSE), not null | 19 | # admin :boolean default(FALSE), not null |
| 20 | # projects_limit :integer default(10) | 20 | # projects_limit :integer default(10) |
| @@ -34,6 +34,8 @@ | @@ -34,6 +34,8 @@ | ||
| 34 | # state :string(255) | 34 | # state :string(255) |
| 35 | # color_scheme_id :integer default(1), not null | 35 | # color_scheme_id :integer default(1), not null |
| 36 | # notification_level :integer default(1), not null | 36 | # notification_level :integer default(1), not null |
| 37 | +# password_expires_at :datetime | ||
| 38 | +# created_by_id :integer | ||
| 37 | # | 39 | # |
| 38 | 40 | ||
| 39 | require 'spec_helper' | 41 | require 'spec_helper' |
spec/models/users_group_spec.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: users_groups | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# group_access :integer not null | ||
| 7 | +# group_id :integer not null | ||
| 8 | +# user_id :integer not null | ||
| 9 | +# created_at :datetime not null | ||
| 10 | +# updated_at :datetime not null | ||
| 11 | +# | ||
| 12 | + | ||
| 1 | require 'spec_helper' | 13 | require 'spec_helper' |
| 2 | 14 | ||
| 3 | describe UsersGroup do | 15 | describe UsersGroup do |
spec/models/users_project_spec.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # user_id :integer not null | 6 | # user_id :integer not null |
| 7 | # project_id :integer not null | 7 | # project_id :integer not null |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # project_access :integer default(0), not null | 10 | # project_access :integer default(0), not null |
| 11 | # notification_level :integer default(3), not null | 11 | # notification_level :integer default(3), not null |
| 12 | # | 12 | # |
spec/models/web_hook_spec.rb
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | # id :integer not null, primary key | 5 | # id :integer not null, primary key |
| 6 | # url :string(255) | 6 | # url :string(255) |
| 7 | # project_id :integer | 7 | # project_id :integer |
| 8 | -# created_at :datetime not null | ||
| 9 | -# updated_at :datetime not null | 8 | +# created_at :datetime |
| 9 | +# updated_at :datetime | ||
| 10 | # type :string(255) default("ProjectHook") | 10 | # type :string(255) default("ProjectHook") |
| 11 | # service_id :integer | 11 | # service_id :integer |
| 12 | # | 12 | # |