Annotate models

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-11-13 19:22:46 +01:00
parent f197b528ff
commit a237999f00
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
48 changed files with 311 additions and 96 deletions

View file

@ -23,6 +23,10 @@
# after_sign_out_path :string(255)
# session_expire_delay :integer default(10080), not null
# import_sources :text
# help_page_text :text
# admin_notification_email :string(255)
# shared_runners_enabled :boolean default(TRUE), not null
# max_artifacts_size :integer default(100), not null
#
class ApplicationSetting < ActiveRecord::Base

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: application_settings
# Table name: ci_application_settings
#
# id :integer not null, primary key
# all_broken_builds :boolean

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: builds
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
@ -11,16 +11,24 @@
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# commit_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# deploy :boolean default(FALSE)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
module Ci

View file

@ -1,18 +1,19 @@
# == Schema Information
#
# Table name: commits
# Table name: ci_commits
#
# id :integer not null, primary key
# project_id :integer
# ref :string(255)
# sha :string(255)
# before_sha :string(255)
# push_data :text
# created_at :datetime
# updated_at :datetime
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# id :integer not null, primary key
# project_id :integer
# ref :string(255)
# sha :string(255)
# before_sha :string(255)
# push_data :text
# created_at :datetime
# updated_at :datetime
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# gl_project_id :integer
#
module Ci

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: events
# Table name: ci_events
#
# id :integer not null, primary key
# project_id :integer

View file

@ -1,9 +1,9 @@
# == Schema Information
#
# Table name: projects
# Table name: ci_projects
#
# id :integer not null, primary key
# name :string(255) not null
# name :string(255)
# timeout :integer default(3600), not null
# created_at :datetime
# updated_at :datetime

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: runners
# Table name: ci_runners
#
# id :integer not null, primary key
# token :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: runner_projects
# Table name: ci_runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: services
# Table name: ci_services
#
# id :integer not null, primary key
# type :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: triggers
# Table name: ci_triggers
#
# id :integer not null, primary key
# token :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: trigger_requests
# Table name: ci_trigger_requests
#
# id :integer not null, primary key
# trigger_id :integer not null

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: variables
# Table name: ci_variables
#
# id :integer not null, primary key
# project_id :integer not null

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: web_hooks
# Table name: ci_web_hooks
#
# id :integer not null, primary key
# url :string(255) not null

View file

@ -1,3 +1,36 @@
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
class CommitStatus < ActiveRecord::Base
self.table_name = 'ci_builds'

View file

@ -1,3 +1,36 @@
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
class GenericCommitStatus < CommitStatus
before_validation :set_default_values

View file

@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require 'carrierwave/orm/activerecord'

View file

@ -2,18 +2,19 @@
#
# Table name: web_hooks
#
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class ProjectHook < WebHook

View file

@ -2,18 +2,19 @@
#
# Table name: web_hooks
#
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class ServiceHook < WebHook

View file

@ -2,18 +2,19 @@
#
# Table name: web_hooks
#
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class SystemHook < WebHook

View file

@ -2,18 +2,19 @@
#
# Table name: web_hooks
#
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
# push_events :boolean default(TRUE), not null
# issues_events :boolean default(FALSE), not null
# merge_requests_events :boolean default(FALSE), not null
# tag_push_events :boolean default(FALSE)
# note_events :boolean default(FALSE), not null
# enable_ssl_verification :boolean default(TRUE)
#
class WebHook < ActiveRecord::Base

View file

@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
class Label < ActiveRecord::Base

View file

@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
require Rails.root.join("app/models/commit")

View file

@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
class Namespace < ActiveRecord::Base

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: services
# Table name: ci_services
#
# id :integer not null, primary key
# type :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: services
# Table name: ci_services
#
# id :integer not null, primary key
# type :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: services
# Table name: ci_services
#
# id :integer not null, primary key
# type :string(255)

View file

@ -1,3 +1,15 @@
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
class Release < ActiveRecord::Base
belongs_to :project

View file

@ -54,6 +54,7 @@
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
#

View file

@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
# Read about factories at https://github.com/thoughtbot/factory_girl

View file

@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
FactoryGirl.define do

View file

@ -1,3 +1,15 @@
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do

View file

@ -23,6 +23,10 @@
# after_sign_out_path :string(255)
# session_expire_delay :integer default(10080), not null
# import_sources :text
# help_page_text :text
# admin_notification_email :string(255)
# shared_runners_enabled :boolean default(TRUE), not null
# max_artifacts_size :integer default(100), not null
#
require 'spec_helper'

View file

@ -1,18 +1,19 @@
# == Schema Information
#
# Table name: commits
# Table name: ci_commits
#
# id :integer not null, primary key
# project_id :integer
# ref :string(255)
# sha :string(255)
# before_sha :string(255)
# push_data :text
# created_at :datetime
# updated_at :datetime
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# id :integer not null, primary key
# project_id :integer
# ref :string(255)
# sha :string(255)
# before_sha :string(255)
# push_data :text
# created_at :datetime
# updated_at :datetime
# tag :boolean default(FALSE)
# yaml_errors :text
# committed_at :datetime
# gl_project_id :integer
#
require 'spec_helper'

View file

@ -1,9 +1,9 @@
# == Schema Information
#
# Table name: projects
# Table name: ci_projects
#
# id :integer not null, primary key
# name :string(255) not null
# name :string(255)
# timeout :integer default(3600), not null
# created_at :datetime
# updated_at :datetime

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: runner_projects
# Table name: ci_runner_projects
#
# id :integer not null, primary key
# runner_id :integer not null

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: runners
# Table name: ci_runners
#
# id :integer not null, primary key
# token :string(255)

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: services
# Table name: ci_services
#
# id :integer not null, primary key
# type :string(255)

View file

@ -1,3 +1,15 @@
# == Schema Information
#
# Table name: ci_triggers
#
# id :integer not null, primary key
# token :string(255)
# project_id :integer not null
# deleted_at :datetime
# created_at :datetime
# updated_at :datetime
#
require 'spec_helper'
describe Ci::Trigger do

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: variables
# Table name: ci_variables
#
# id :integer not null, primary key
# project_id :integer not null

View file

@ -1,6 +1,6 @@
# == Schema Information
#
# Table name: web_hooks
# Table name: ci_web_hooks
#
# id :integer not null, primary key
# url :string(255) not null

View file

@ -1,3 +1,36 @@
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
require 'spec_helper'
describe CommitStatus do

View file

@ -1,3 +1,36 @@
# == Schema Information
#
# Table name: ci_builds
#
# id :integer not null, primary key
# project_id :integer
# status :string(255)
# finished_at :datetime
# trace :text
# created_at :datetime
# updated_at :datetime
# started_at :datetime
# runner_id :integer
# coverage :float
# commit_id :integer
# commands :text
# job_id :integer
# name :string(255)
# deploy :boolean default(FALSE)
# options :text
# allow_failure :boolean default(FALSE), not null
# stage :string(255)
# trigger_request_id :integer
# stage_idx :integer
# tag :boolean
# ref :string(255)
# user_id :integer
# type :string(255)
# target_url :string(255)
# description :string(255)
# artifacts_file :text
#
require 'spec_helper'
describe GenericCommitStatus do

View file

@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require 'spec_helper'

View file

@ -8,6 +8,7 @@
# project_id :integer
# created_at :datetime
# updated_at :datetime
# template :boolean default(FALSE)
#
require 'spec_helper'

View file

@ -20,6 +20,7 @@
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
# merge_error :string(255)
#
require 'spec_helper'

View file

@ -11,6 +11,7 @@
# type :string(255)
# description :string(255) default(""), not null
# avatar :string(255)
# public :boolean default(FALSE)
#
require 'spec_helper'

View file

@ -1,3 +1,15 @@
# == Schema Information
#
# Table name: releases
#
# id :integer not null, primary key
# tag :string(255)
# description :text
# project_id :integer
# created_at :datetime
# updated_at :datetime
#
require 'rails_helper'
RSpec.describe Release, type: :model do

View file

@ -54,6 +54,8 @@
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
# project_view :integer default(0)
# consumed_timestep :integer
# layout :integer default(0)
#
require 'spec_helper'