From 4cdd7dd21a5c65efd8c26a76ac21208a8d6cbcf4 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 20 Feb 2021 09:55:21 -0800 Subject: [PATCH 1/3] Add annotate gem --- Gemfile | 1 + Gemfile.lock | 4 ++++ config/initializers/sentry.rb | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index afae26db..3fa33ff0 100644 --- a/Gemfile +++ b/Gemfile @@ -240,6 +240,7 @@ group :development do gem 'web-console' # as development database gem 'sqlite3' + gem 'annotate' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 9fce2848..fb64fb9b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,6 +70,9 @@ GEM afm (0.2.2) ajax-datatables-rails (0.4.3) railties (>= 4.0) + annotate (3.1.1) + activerecord (>= 3.2, < 7.0) + rake (>= 10.4, < 14.0) archive-zip (0.12.0) io-like (~> 0.3.0) arel (9.0.0) @@ -624,6 +627,7 @@ DEPENDENCIES acts_as_commentable_with_threading acts_as_list ajax-datatables-rails + annotate autoprefixer-rails awesome_nested_set axlsx! diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 1daf0745..e42fcce6 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,4 +1,4 @@ Sentry.init do |config| - config.allowed_environments = %|production staging| + config.enabled_environments = %|production staging| config.dsn = ENV['SENTRY_DSN'] end From 55e853d31deed6ee1061da1e35309e02b77f345b Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 20 Feb 2021 09:56:25 -0800 Subject: [PATCH 2/3] Add annotation task --- lib/tasks/auto_annotate_models.rake | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lib/tasks/auto_annotate_models.rake diff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake new file mode 100644 index 00000000..e96283ea --- /dev/null +++ b/lib/tasks/auto_annotate_models.rake @@ -0,0 +1,59 @@ +# NOTE: only doing this in development as some production environments (Heroku) +# NOTE: are sensitive to local FS writes, and besides -- it's just not proper +# NOTE: to have a dev-mode tool do its thing in production. +if Rails.env.development? + require 'annotate' + task :set_annotation_options do + # You can override any of these by setting an environment variable of the + # same name. + Annotate.set_defaults( + 'active_admin' => 'false', + 'additional_file_patterns' => [], + 'routes' => 'false', + 'models' => 'true', + 'position_in_routes' => 'before', + 'position_in_class' => 'before', + 'position_in_test' => 'before', + 'position_in_fixture' => 'before', + 'position_in_factory' => 'before', + 'position_in_serializer' => 'before', + 'show_foreign_keys' => 'true', + 'show_complete_foreign_keys' => 'false', + 'show_indexes' => 'true', + 'simple_indexes' => 'false', + 'model_dir' => 'app/models', + 'root_dir' => '', + 'include_version' => 'false', + 'require' => '', + 'exclude_tests' => 'false', + 'exclude_fixtures' => 'false', + 'exclude_factories' => 'false', + 'exclude_serializers' => 'false', + 'exclude_scaffolds' => 'true', + 'exclude_controllers' => 'true', + 'exclude_helpers' => 'true', + 'exclude_sti_subclasses' => 'false', + 'ignore_model_sub_dir' => 'false', + 'ignore_columns' => nil, + 'ignore_routes' => nil, + 'ignore_unknown_models' => 'false', + 'hide_limit_column_types' => 'integer,bigint,boolean', + 'hide_default_column_types' => 'json,jsonb,hstore', + 'skip_on_db_migrate' => 'false', + 'format_bare' => 'true', + 'format_rdoc' => 'false', + 'format_yard' => 'false', + 'format_markdown' => 'false', + 'sort' => 'false', + 'force' => 'false', + 'frozen' => 'false', + 'classified_sort' => 'true', + 'trace' => 'false', + 'wrapper_open' => nil, + 'wrapper_close' => nil, + 'with_comment' => 'true' + ) + end + + Annotate.load_tasks +end From d7e24f6521d8bad35e0440ed1f639d90cd55ff24 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 20 Feb 2021 09:57:27 -0800 Subject: [PATCH 3/3] Run annotate_models --- app/models/answer.rb | 9 ++++ app/models/booth.rb | 16 +++++++ app/models/booth_request.rb | 16 +++++++ app/models/cfp.rb | 14 ++++++ app/models/comment.rb | 23 +++++++++ app/models/commercial.rb | 13 +++++ app/models/conference.rb | 35 ++++++++++++++ app/models/contact.rb | 19 ++++++++ app/models/difficulty_level.rb | 12 +++++ app/models/email_settings.rb | 45 ++++++++++++++++++ app/models/event.rb | 29 ++++++++++++ app/models/event_schedule.rb | 20 ++++++++ app/models/event_type.rb | 15 ++++++ app/models/event_user.rb | 12 +++++ app/models/events_registration.rb | 10 ++++ app/models/lodging.rb | 17 +++++++ app/models/openid.rb | 12 +++++ app/models/organization.rb | 10 ++++ app/models/payment.rb | 14 ++++++ app/models/physical_ticket.rb | 14 ++++++ app/models/program.rb | 22 +++++++++ app/models/qanswer.rb | 10 ++++ app/models/question.rb | 12 +++++ app/models/question_type.rb | 9 ++++ app/models/registration.rb | 15 ++++++ app/models/registration_period.rb | 11 +++++ app/models/resource.rb | 11 +++++ app/models/role.rb | 17 +++++++ app/models/room.rb | 12 +++++ app/models/schedule.rb | 15 ++++++ app/models/splashpage.rb | 25 ++++++++++ app/models/sponsor.rb | 15 ++++++ app/models/sponsorship_level.rb | 11 +++++ app/models/subscription.rb | 10 ++++ app/models/survey.rb | 19 ++++++++ app/models/survey_question.rb | 13 +++++ app/models/survey_reply.rb | 11 +++++ app/models/survey_submission.rb | 10 ++++ app/models/ticket.rb | 15 ++++++ app/models/ticket_purchase.rb | 15 ++++++ app/models/ticket_scanning.rb | 9 ++++ app/models/track.rb | 28 +++++++++++ app/models/user.rb | 46 ++++++++++++++++++ app/models/users_role.rb | 12 +++++ app/models/vchoice.rb | 8 ++++ app/models/vday.rb | 11 +++++ app/models/venue.rb | 21 +++++++++ app/models/vote.rb | 11 +++++ app/models/vposition.rb | 11 +++++ app/serializers/conference_serializer.rb | 35 ++++++++++++++ app/serializers/event_schedule_serializer.rb | 20 ++++++++ app/serializers/event_serializer.rb | 29 ++++++++++++ app/serializers/room_serializer.rb | 12 +++++ app/serializers/track_serializer.rb | 28 +++++++++++ spec/factories/booths.rb | 16 +++++++ spec/factories/cfps.rb | 15 +++++- spec/factories/comments.rb | 24 +++++++++- spec/factories/commercials.rb | 14 +++++- spec/factories/conferences.rb | 36 +++++++++++++- spec/factories/contacts.rb | 19 ++++++++ spec/factories/difficulty_levels.rb | 12 +++++ spec/factories/email_settings.rb | 46 +++++++++++++++++- spec/factories/event_types.rb | 16 ++++++- spec/factories/event_users.rb | 13 ++++- spec/factories/events.rb | 30 +++++++++++- spec/factories/events_registrations.rb | 11 ++++- spec/factories/lodgings.rb | 18 ++++++- spec/factories/organizations.rb | 10 ++++ spec/factories/payments.rb | 14 ++++++ spec/factories/programs.rb | 23 ++++++++- spec/factories/registration_periods.rb | 12 ++++- spec/factories/roles.rb | 17 +++++++ spec/factories/rooms.rb | 13 ++++- spec/factories/splashpages.rb | 26 +++++++++- spec/factories/sponsors.rb | 16 ++++++- spec/factories/sponsorship_levels.rb | 12 ++++- spec/factories/subscriptions.rb | 10 ++++ spec/factories/survey_questions.rb | 13 +++++ spec/factories/survey_replies.rb | 11 +++++ spec/factories/survey_submissions.rb | 10 ++++ spec/factories/surveys.rb | 19 ++++++++ spec/factories/ticket_purchases.rb | 15 ++++++ spec/factories/tickets.rb | 15 ++++++ spec/factories/tracks.rb | 28 +++++++++++ spec/factories/users.rb | 47 ++++++++++++++++++- spec/factories/vdays.rb | 11 +++++ spec/factories/venues.rb | 22 ++++++++- spec/factories/votes.rb | 11 +++++ spec/factories/vpositions.rb | 11 +++++ spec/models/booth_spec.rb | 16 +++++++ spec/models/cfp_spec.rb | 14 ++++++ spec/models/comment_spec.rb | 23 +++++++++ spec/models/commercial_spec.rb | 13 +++++ spec/models/conference_spec.rb | 38 ++++++++++++++- spec/models/email_settings_spec.rb | 45 ++++++++++++++++++ spec/models/event_schedule_spec.rb | 20 ++++++++ spec/models/event_spec.rb | 29 ++++++++++++ spec/models/event_type_spec.rb | 15 ++++++ spec/models/organization_spec.rb | 10 ++++ spec/models/payment_spec.rb | 14 ++++++ spec/models/physical_ticket_spec.rb | 14 ++++++ spec/models/program_spec.rb | 22 +++++++++ spec/models/registration_period_spec.rb | 11 +++++ spec/models/registration_spec.rb | 15 ++++++ spec/models/resource_spec.rb | 11 +++++ spec/models/role_spec.rb | 17 +++++++ spec/models/room_spec.rb | 12 +++++ spec/models/schedule_spec.rb | 15 ++++++ spec/models/sponsor_spec.rb | 15 ++++++ spec/models/sponsorship_level_spec.rb | 11 +++++ spec/models/survey_question_spec.rb | 13 +++++ spec/models/survey_reply_spec.rb | 11 +++++ spec/models/survey_spec.rb | 19 ++++++++ spec/models/survey_submission_spec.rb | 10 ++++ spec/models/ticket_purchase_spec.rb | 15 ++++++ spec/models/ticket_scanning_spec.rb | 9 ++++ spec/models/ticket_spec.rb | 15 ++++++ spec/models/track_spec.rb | 28 +++++++++++ spec/models/user_spec.rb | 46 ++++++++++++++++++ spec/models/vote_spec.rb | 11 +++++ .../serializers/conference_serializer_spec.rb | 35 ++++++++++++++ spec/serializers/event_serializer_spec.rb | 29 ++++++++++++ spec/serializers/room_serializer_spec.rb | 12 +++++ spec/serializers/track_serializer_spec.rb | 28 +++++++++++ 124 files changed, 2192 insertions(+), 19 deletions(-) diff --git a/app/models/answer.rb b/app/models/answer.rb index abada979..31c32bf1 100644 --- a/app/models/answer.rb +++ b/app/models/answer.rb @@ -1,5 +1,14 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: answers +# +# id :bigint not null, primary key +# title :string +# created_at :datetime +# updated_at :datetime +# class Answer < ApplicationRecord has_many :qanswers has_many :questions, through: :qanswers diff --git a/app/models/booth.rb b/app/models/booth.rb index 85c6c7a8..705c6a64 100644 --- a/app/models/booth.rb +++ b/app/models/booth.rb @@ -1,5 +1,21 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: booths +# +# id :bigint not null, primary key +# description :text +# logo_link :string +# reasoning :text +# state :string +# submitter_relationship :text +# title :string +# website_url :string +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer +# class Booth < ApplicationRecord include ActiveRecord::Transitions has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } diff --git a/app/models/booth_request.rb b/app/models/booth_request.rb index 5cce46a1..b7ce7b95 100644 --- a/app/models/booth_request.rb +++ b/app/models/booth_request.rb @@ -1,5 +1,21 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: booth_requests +# +# id :bigint not null, primary key +# role :string +# created_at :datetime not null +# updated_at :datetime not null +# booth_id :integer +# user_id :integer +# +# Indexes +# +# index_booth_requests_on_booth_id (booth_id) +# index_booth_requests_on_user_id (user_id) +# class BoothRequest < ApplicationRecord belongs_to :booth belongs_to :user diff --git a/app/models/cfp.rb b/app/models/cfp.rb index 6571e701..55e542f7 100644 --- a/app/models/cfp.rb +++ b/app/models/cfp.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: cfps +# +# id :bigint not null, primary key +# cfp_type :string +# description :text +# enable_registrations :boolean default(FALSE) +# end_date :date not null +# start_date :date not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# # cannot delete program if there are events submitted class Cfp < ApplicationRecord diff --git a/app/models/comment.rb b/app/models/comment.rb index ee1a07a8..190d2233 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,5 +1,28 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: comments +# +# id :bigint not null, primary key +# body :text +# commentable_type :string +# lft :integer +# rgt :integer +# subject :string +# title :string(50) default("") +# created_at :datetime +# updated_at :datetime +# commentable_id :integer +# parent_id :integer +# user_id :integer +# +# Indexes +# +# index_comments_on_commentable_id (commentable_id) +# index_comments_on_commentable_type (commentable_type) +# index_comments_on_user_id (user_id) +# class Comment < ApplicationRecord acts_as_nested_set scope: %i(commentable_id commentable_type) validates :body, presence: true diff --git a/app/models/commercial.rb b/app/models/commercial.rb index 51f8b7f5..1d39f9c5 100644 --- a/app/models/commercial.rb +++ b/app/models/commercial.rb @@ -1,5 +1,18 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: commercials +# +# id :bigint not null, primary key +# commercial_type :string +# commercialable_type :string +# url :string +# created_at :datetime +# updated_at :datetime +# commercial_id :string +# commercialable_id :integer +# class Commercial < ApplicationRecord require 'oembed' diff --git a/app/models/conference.rb b/app/models/conference.rb index f4b87791..3bf67dd2 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -1,5 +1,40 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: conferences +# +# id :bigint not null, primary key +# booth_limit :integer default(0) +# color :string +# custom_css :text +# custom_domain :string +# description :text +# end_date :date not null +# end_hour :integer default(20) +# events_per_week :text +# guid :string not null +# logo_file_name :string +# picture :string +# registration_limit :integer default(0) +# revision :integer default(0), not null +# short_title :string not null +# start_date :date not null +# start_hour :integer default(9) +# ticket_layout :integer default("portrait") +# timezone :string not null +# title :string not null +# use_vdays :boolean default(FALSE) +# use_volunteers :boolean +# use_vpositions :boolean default(FALSE) +# created_at :datetime +# updated_at :datetime +# organization_id :integer +# +# Indexes +# +# index_conferences_on_organization_id (organization_id) +# class Conference < ApplicationRecord include RevisionCount require 'uri' diff --git a/app/models/contact.rb b/app/models/contact.rb index e69f9dbb..eb5139f5 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -1,5 +1,24 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: contacts +# +# id :bigint not null, primary key +# blog :string +# email :string +# facebook :string +# googleplus :string +# instagram :string +# mastodon :string +# social_tag :string +# sponsor_email :string +# twitter :string +# youtube :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Contact < ApplicationRecord has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id } diff --git a/app/models/difficulty_level.rb b/app/models/difficulty_level.rb index 98186693..5006f877 100644 --- a/app/models/difficulty_level.rb +++ b/app/models/difficulty_level.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: difficulty_levels +# +# id :bigint not null, primary key +# color :string +# description :text +# title :string +# created_at :datetime +# updated_at :datetime +# program_id :integer +# class DifficultyLevel < ApplicationRecord belongs_to :program, touch: true has_many :events, dependent: :nullify diff --git a/app/models/email_settings.rb b/app/models/email_settings.rb index 55487496..8a8ab0b5 100644 --- a/app/models/email_settings.rb +++ b/app/models/email_settings.rb @@ -1,5 +1,50 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: email_settings +# +# id :bigint not null, primary key +# accepted_body :text +# accepted_subject :string +# booths_acceptance_body :text +# booths_acceptance_subject :string +# booths_rejection_body :text +# booths_rejection_subject :string +# cfp_dates_updated_body :text +# cfp_dates_updated_subject :string +# conference_dates_updated_body :text +# conference_dates_updated_subject :string +# conference_registration_dates_updated_body :text +# conference_registration_dates_updated_subject :string +# confirmed_without_registration_body :text +# confirmed_without_registration_subject :string +# program_schedule_public_body :text +# program_schedule_public_subject :string +# registration_body :text +# registration_subject :string +# rejected_body :text +# rejected_subject :string +# send_on_accepted :boolean default(FALSE) +# send_on_booths_acceptance :boolean default(FALSE) +# send_on_booths_rejection :boolean default(FALSE) +# send_on_cfp_dates_updated :boolean default(FALSE) +# send_on_conference_dates_updated :boolean default(FALSE) +# send_on_conference_registration_dates_updated :boolean default(FALSE) +# send_on_confirmed_without_registration :boolean default(FALSE) +# send_on_program_schedule_public :boolean default(FALSE) +# send_on_registration :boolean default(FALSE) +# send_on_rejected :boolean default(FALSE) +# send_on_submitted_proposal :boolean default(FALSE) +# send_on_venue_updated :boolean default(FALSE) +# submitted_proposal_body :text +# submitted_proposal_subject :string +# venue_updated_body :text +# venue_updated_subject :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class EmailSettings < ApplicationRecord belongs_to :conference diff --git a/app/models/event.rb b/app/models/event.rb index 2007dec6..4978fbf9 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,5 +1,34 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# abstract :text +# comments_count :integer default(0), not null +# description :text +# guid :string not null +# is_highlight :boolean default(FALSE) +# language :string +# max_attendees :integer +# progress :string default("new"), not null +# proposal_additional_speakers :text +# public :boolean default(TRUE) +# require_registration :boolean +# start_time :datetime +# state :string default("new"), not null +# subtitle :string +# title :string not null +# week :integer +# created_at :datetime +# updated_at :datetime +# difficulty_level_id :integer +# event_type_id :integer +# program_id :integer +# room_id :integer +# track_id :integer +# class Event < ApplicationRecord include ActiveRecord::Transitions include RevisionCount diff --git a/app/models/event_schedule.rb b/app/models/event_schedule.rb index 01557abe..07b31a30 100644 --- a/app/models/event_schedule.rb +++ b/app/models/event_schedule.rb @@ -1,5 +1,25 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_schedules +# +# id :bigint not null, primary key +# enabled :boolean default(TRUE) +# start_time :datetime +# created_at :datetime not null +# updated_at :datetime not null +# event_id :integer +# room_id :integer +# schedule_id :integer +# +# Indexes +# +# index_event_schedules_on_event_id (event_id) +# index_event_schedules_on_event_id_and_schedule_id (event_id,schedule_id) UNIQUE +# index_event_schedules_on_room_id (room_id) +# index_event_schedules_on_schedule_id (schedule_id) +# class EventSchedule < ApplicationRecord default_scope { where(enabled: true) } belongs_to :schedule diff --git a/app/models/event_type.rb b/app/models/event_type.rb index 691744c4..67d7fb20 100644 --- a/app/models/event_type.rb +++ b/app/models/event_type.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_types +# +# id :bigint not null, primary key +# color :string +# description :string +# length :integer default(30) +# maximum_abstract_length :integer default(500) +# minimum_abstract_length :integer default(0) +# title :string not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# class EventType < ApplicationRecord belongs_to :program, touch: true has_many :events, dependent: :restrict_with_error diff --git a/app/models/event_user.rb b/app/models/event_user.rb index f8a2b66a..3bf3cb2b 100644 --- a/app/models/event_user.rb +++ b/app/models/event_user.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_users +# +# id :bigint not null, primary key +# comment :string +# event_role :string default("participant"), not null +# created_at :datetime +# updated_at :datetime +# event_id :integer +# user_id :integer +# class EventUser < ApplicationRecord ROLES = [%w[Speaker speaker], %w[Submitter submitter], %w[Moderator moderator], %w[Volunteer volunteer]] diff --git a/app/models/events_registration.rb b/app/models/events_registration.rb index 735df2a7..6e9a0972 100644 --- a/app/models/events_registration.rb +++ b/app/models/events_registration.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: events_registrations +# +# id :bigint not null, primary key +# attended :boolean default(FALSE), not null +# created_at :datetime +# event_id :integer +# registration_id :integer +# class EventsRegistration < ApplicationRecord belongs_to :registration belongs_to :event diff --git a/app/models/lodging.rb b/app/models/lodging.rb index 2f7a87ad..822f38bd 100644 --- a/app/models/lodging.rb +++ b/app/models/lodging.rb @@ -1,5 +1,22 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: lodgings +# +# id :bigint not null, primary key +# description :text +# name :string +# photo_content_type :string +# photo_file_name :string +# photo_file_size :integer +# photo_updated_at :datetime +# picture :string +# website_link :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Lodging < ApplicationRecord belongs_to :conference diff --git a/app/models/openid.rb b/app/models/openid.rb index feaa6a9d..043427f6 100644 --- a/app/models/openid.rb +++ b/app/models/openid.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: openids +# +# id :bigint not null, primary key +# email :string +# provider :string +# uid :string +# created_at :datetime +# updated_at :datetime +# user_id :integer +# class Openid < ApplicationRecord belongs_to :user validates :provider, :uid, :email, presence: true diff --git a/app/models/organization.rb b/app/models/organization.rb index 877de9df..d1930403 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: organizations +# +# id :bigint not null, primary key +# code_of_conduct :text +# description :text +# name :string not null +# picture :string +# class Organization < ApplicationRecord resourcify :roles, dependent: :delete_all diff --git a/app/models/payment.rb b/app/models/payment.rb index 870e82cc..559faf54 100644 --- a/app/models/payment.rb +++ b/app/models/payment.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: payments +# +# id :bigint not null, primary key +# amount :integer +# authorization_code :string +# last4 :string +# status :integer default("unpaid"), not null +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer not null +# user_id :integer not null +# class Payment < ApplicationRecord has_many :ticket_purchases belongs_to :user diff --git a/app/models/physical_ticket.rb b/app/models/physical_ticket.rb index 2493cbbe..a476888a 100644 --- a/app/models/physical_ticket.rb +++ b/app/models/physical_ticket.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: physical_tickets +# +# id :bigint not null, primary key +# token :string +# created_at :datetime not null +# updated_at :datetime not null +# ticket_purchase_id :integer not null +# +# Indexes +# +# index_physical_tickets_on_token (token) UNIQUE +# class PhysicalTicket < ApplicationRecord belongs_to :ticket_purchase has_one :ticket, through: :ticket_purchase diff --git a/app/models/program.rb b/app/models/program.rb index 7dc45f06..45b8f65c 100644 --- a/app/models/program.rb +++ b/app/models/program.rb @@ -1,5 +1,27 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: programs +# +# id :bigint not null, primary key +# blind_voting :boolean default(FALSE) +# languages :string +# rating :integer default(0) +# schedule_fluid :boolean default(FALSE) +# schedule_interval :integer default(15), not null +# schedule_public :boolean default(FALSE) +# voting_end_date :datetime +# voting_start_date :datetime +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# selected_schedule_id :integer +# +# Indexes +# +# index_programs_on_selected_schedule_id (selected_schedule_id) +# # cannot delete program if there are events submitted class Program < ApplicationRecord diff --git a/app/models/qanswer.rb b/app/models/qanswer.rb index 535da321..0e532032 100644 --- a/app/models/qanswer.rb +++ b/app/models/qanswer.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: qanswers +# +# id :bigint not null, primary key +# created_at :datetime +# updated_at :datetime +# answer_id :integer +# question_id :integer +# class Qanswer < ApplicationRecord belongs_to :question belongs_to :answer, dependent: :delete diff --git a/app/models/question.rb b/app/models/question.rb index 702a3784..e9ca7f8c 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: questions +# +# id :bigint not null, primary key +# global :boolean +# title :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# question_type_id :integer +# class Question < ApplicationRecord belongs_to :question_type has_and_belongs_to_many :conferences diff --git a/app/models/question_type.rb b/app/models/question_type.rb index 2a5ebc24..17bdc8c6 100644 --- a/app/models/question_type.rb +++ b/app/models/question_type.rb @@ -1,5 +1,14 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: question_types +# +# id :bigint not null, primary key +# title :string +# created_at :datetime +# updated_at :datetime +# class QuestionType < ApplicationRecord has_many :questions end diff --git a/app/models/registration.rb b/app/models/registration.rb index 102a4141..6fd64a1d 100644 --- a/app/models/registration.rb +++ b/app/models/registration.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: registrations +# +# id :bigint not null, primary key +# accepted_code_of_conduct :boolean +# attended :boolean default(FALSE) +# other_special_needs :text +# volunteer :boolean +# week :integer +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# user_id :integer +# class Registration < ApplicationRecord require 'csv' belongs_to :user diff --git a/app/models/registration_period.rb b/app/models/registration_period.rb index 66f02fe0..cde8d18e 100644 --- a/app/models/registration_period.rb +++ b/app/models/registration_period.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: registration_periods +# +# id :bigint not null, primary key +# end_date :date +# start_date :date +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class RegistrationPeriod < ApplicationRecord belongs_to :conference diff --git a/app/models/resource.rb b/app/models/resource.rb index 991ce0cf..a5e435fa 100644 --- a/app/models/resource.rb +++ b/app/models/resource.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: resources +# +# id :bigint not null, primary key +# description :text +# name :string +# quantity :integer +# used :integer default(0) +# conference_id :integer +# class Resource < ApplicationRecord belongs_to :conference validates :name, :used, :quantity, presence: true diff --git a/app/models/role.rb b/app/models/role.rb index 7b67a158..e430b4c1 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -1,5 +1,22 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: roles +# +# id :bigint not null, primary key +# description :string +# name :string +# resource_type :string +# created_at :datetime +# updated_at :datetime +# resource_id :integer +# +# Indexes +# +# index_roles_on_name (name) +# index_roles_on_name_and_resource_type_and_resource_id (name,resource_type,resource_id) +# class Role < ApplicationRecord belongs_to :resource, polymorphic: true has_many :users_roles diff --git a/app/models/room.rb b/app/models/room.rb index 027e9c83..7ad00387 100644 --- a/app/models/room.rb +++ b/app/models/room.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: rooms +# +# id :bigint not null, primary key +# guid :string not null +# name :string not null +# order :integer +# size :integer +# url :string +# venue_id :integer not null +# class Room < ApplicationRecord include RevisionCount belongs_to :venue diff --git a/app/models/schedule.rb b/app/models/schedule.rb index 1584733f..6873e193 100644 --- a/app/models/schedule.rb +++ b/app/models/schedule.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: schedules +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# program_id :integer +# track_id :integer +# +# Indexes +# +# index_schedules_on_program_id (program_id) +# index_schedules_on_track_id (track_id) +# class Schedule < ApplicationRecord belongs_to :program belongs_to :track diff --git a/app/models/splashpage.rb b/app/models/splashpage.rb index 5cd9ef0d..cf4576db 100644 --- a/app/models/splashpage.rb +++ b/app/models/splashpage.rb @@ -1,5 +1,30 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: splashpages +# +# id :bigint not null, primary key +# banner_photo_content_type :string +# banner_photo_file_name :string +# banner_photo_file_size :integer +# banner_photo_updated_at :datetime +# include_booths :boolean +# include_cfp :boolean default(FALSE) +# include_lodgings :boolean +# include_program :boolean +# include_registrations :boolean +# include_social_media :boolean +# include_sponsors :boolean +# include_tickets :boolean +# include_tracks :boolean +# include_venue :boolean +# public :boolean +# shuffle_highlights :boolean default(FALSE), not null +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Splashpage < ApplicationRecord belongs_to :conference diff --git a/app/models/sponsor.rb b/app/models/sponsor.rb index fa63411f..4f7b21cc 100644 --- a/app/models/sponsor.rb +++ b/app/models/sponsor.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: sponsors +# +# id :bigint not null, primary key +# description :text +# logo_file_name :string +# name :string +# picture :string +# website_url :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# sponsorship_level_id :integer +# class Sponsor < ApplicationRecord belongs_to :sponsorship_level belongs_to :conference diff --git a/app/models/sponsorship_level.rb b/app/models/sponsorship_level.rb index 48f41594..63634e27 100644 --- a/app/models/sponsorship_level.rb +++ b/app/models/sponsorship_level.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: sponsorship_levels +# +# id :bigint not null, primary key +# position :integer +# title :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class SponsorshipLevel < ApplicationRecord validates :title, presence: true belongs_to :conference diff --git a/app/models/subscription.rb b/app/models/subscription.rb index 0bb96640..106a588e 100644 --- a/app/models/subscription.rb +++ b/app/models/subscription.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: subscriptions +# +# id :bigint not null, primary key +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# user_id :integer +# class Subscription < ApplicationRecord belongs_to :conference belongs_to :user diff --git a/app/models/survey.rb b/app/models/survey.rb index 50e251a7..35c15c8e 100644 --- a/app/models/survey.rb +++ b/app/models/survey.rb @@ -1,5 +1,24 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: surveys +# +# id :bigint not null, primary key +# description :text +# end_date :datetime +# start_date :datetime +# surveyable_type :string +# target :integer default("after_conference") +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# surveyable_id :integer +# +# Indexes +# +# index_surveys_on_surveyable_type_and_surveyable_id (surveyable_type,surveyable_id) +# class Survey < ActiveRecord::Base belongs_to :surveyable, polymorphic: true has_many :survey_questions, dependent: :destroy diff --git a/app/models/survey_question.rb b/app/models/survey_question.rb index e1cb0427..6b365236 100644 --- a/app/models/survey_question.rb +++ b/app/models/survey_question.rb @@ -1,5 +1,18 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_questions +# +# id :bigint not null, primary key +# kind :integer default("boolean") +# mandatory :boolean default(FALSE) +# max_choices :integer +# min_choices :integer +# possible_answers :text +# title :string +# survey_id :integer +# class SurveyQuestion < ActiveRecord::Base belongs_to :survey has_many :survey_replies, dependent: :destroy diff --git a/app/models/survey_reply.rb b/app/models/survey_reply.rb index bfba843b..4659ac99 100644 --- a/app/models/survey_reply.rb +++ b/app/models/survey_reply.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_replies +# +# id :bigint not null, primary key +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# survey_question_id :integer +# user_id :integer +# class SurveyReply < ActiveRecord::Base belongs_to :user belongs_to :survey_question diff --git a/app/models/survey_submission.rb b/app/models/survey_submission.rb index f31198d4..4d1e591f 100644 --- a/app/models/survey_submission.rb +++ b/app/models/survey_submission.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_submissions +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# survey_id :integer +# user_id :integer +# class SurveySubmission < ActiveRecord::Base belongs_to :user belongs_to :survey diff --git a/app/models/ticket.rb b/app/models/ticket.rb index ca686115..ca35116d 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tickets +# +# id :bigint not null, primary key +# description :text +# price_cents :integer default(0), not null +# price_currency :string default("USD"), not null +# registration_ticket :boolean default(FALSE) +# title :string not null +# visible :boolean default(TRUE) +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Ticket < ApplicationRecord belongs_to :conference has_many :ticket_purchases, dependent: :destroy diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 1eaa9cf5..6f598c8e 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: ticket_purchases +# +# id :bigint not null, primary key +# amount_paid :float default(0.0) +# paid :boolean default(FALSE) +# quantity :integer default(1) +# week :integer +# created_at :datetime +# conference_id :integer +# payment_id :integer +# ticket_id :integer +# user_id :integer +# class TicketPurchase < ApplicationRecord belongs_to :ticket belongs_to :user diff --git a/app/models/ticket_scanning.rb b/app/models/ticket_scanning.rb index 6b422100..6f9eda7f 100644 --- a/app/models/ticket_scanning.rb +++ b/app/models/ticket_scanning.rb @@ -1,5 +1,14 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: ticket_scannings +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# physical_ticket_id :integer not null +# class TicketScanning < ApplicationRecord belongs_to :physical_ticket diff --git a/app/models/track.rb b/app/models/track.rb index d34bfbef..a425aa88 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -1,5 +1,33 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tracks +# +# id :bigint not null, primary key +# cfp_active :boolean not null +# color :string +# description :text +# end_date :date +# guid :string not null +# name :string not null +# relevance :text +# short_name :string not null +# start_date :date +# state :string default("new"), not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# room_id :integer +# selected_schedule_id :integer +# submitter_id :integer +# +# Indexes +# +# index_tracks_on_room_id (room_id) +# index_tracks_on_selected_schedule_id (selected_schedule_id) +# index_tracks_on_submitter_id (submitter_id) +# class Track < ApplicationRecord include ActiveRecord::Transitions include RevisionCount diff --git a/app/models/user.rb b/app/models/user.rb index d7f23779..f86f8260 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,5 +1,51 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: users +# +# id :bigint not null, primary key +# affiliation :string +# avatar_content_type :string +# avatar_file_name :string +# avatar_file_size :integer +# avatar_updated_at :datetime +# biography :text +# confirmation_sent_at :datetime +# confirmation_token :string +# confirmed_at :datetime +# current_sign_in_at :datetime +# current_sign_in_ip :string +# email :string default(""), not null +# email_public :boolean default(FALSE) +# encrypted_password :string default(""), not null +# is_admin :boolean default(FALSE) +# is_disabled :boolean default(FALSE) +# languages :string +# last_sign_in_at :datetime +# last_sign_in_ip :string +# mobile :string +# name :string +# nickname :string +# picture :string +# remember_created_at :datetime +# reset_password_sent_at :datetime +# reset_password_token :string +# sign_in_count :integer default(0) +# tshirt :string +# unconfirmed_email :string +# username :string +# volunteer_experience :text +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_users_on_confirmation_token (confirmation_token) UNIQUE +# index_users_on_email (email) UNIQUE +# index_users_on_reset_password_token (reset_password_token) UNIQUE +# index_users_on_username (username) UNIQUE +# class IChainRecordNotFound < StandardError end diff --git a/app/models/users_role.rb b/app/models/users_role.rb index eb046f3d..777fdc4a 100644 --- a/app/models/users_role.rb +++ b/app/models/users_role.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: users_roles +# +# id :bigint not null, primary key +# role_id :integer +# user_id :integer +# +# Indexes +# +# index_users_roles_on_user_id_and_role_id (user_id,role_id) +# class UsersRole < ApplicationRecord belongs_to :role belongs_to :user diff --git a/app/models/vchoice.rb b/app/models/vchoice.rb index bf5d05a6..3481338c 100644 --- a/app/models/vchoice.rb +++ b/app/models/vchoice.rb @@ -1,5 +1,13 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: vchoices +# +# id :bigint not null, primary key +# vday_id :integer +# vposition_id :integer +# class Vchoice < ApplicationRecord belongs_to :vday belongs_to :vposition diff --git a/app/models/vday.rb b/app/models/vday.rb index 5a9b52cf..02ce8ecc 100644 --- a/app/models/vday.rb +++ b/app/models/vday.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: vdays +# +# id :bigint not null, primary key +# day :date +# description :text +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Vday < ApplicationRecord belongs_to :conference diff --git a/app/models/venue.rb b/app/models/venue.rb index 5abdcf96..b832c7e9 100644 --- a/app/models/venue.rb +++ b/app/models/venue.rb @@ -1,5 +1,26 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: venues +# +# id :bigint not null, primary key +# city :string +# country :string +# description :text +# guid :string +# latitude :string +# longitude :string +# name :string +# photo_file_name :string +# picture :string +# postalcode :string +# street :string +# website :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Venue < ApplicationRecord belongs_to :conference has_one :commercial, as: :commercialable, dependent: :destroy diff --git a/app/models/vote.rb b/app/models/vote.rb index 64ab74de..4c7419f1 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: votes +# +# id :bigint not null, primary key +# rating :integer +# created_at :datetime +# updated_at :datetime +# event_id :integer +# user_id :integer +# class Vote < ApplicationRecord belongs_to :user belongs_to :event diff --git a/app/models/vposition.rb b/app/models/vposition.rb index 6599bc8a..5d726fe3 100644 --- a/app/models/vposition.rb +++ b/app/models/vposition.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: vpositions +# +# id :bigint not null, primary key +# description :text +# title :string not null +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# class Vposition < ApplicationRecord belongs_to :conference diff --git a/app/serializers/conference_serializer.rb b/app/serializers/conference_serializer.rb index 650dadf8..105d6c04 100644 --- a/app/serializers/conference_serializer.rb +++ b/app/serializers/conference_serializer.rb @@ -1,5 +1,40 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: conferences +# +# id :bigint not null, primary key +# booth_limit :integer default(0) +# color :string +# custom_css :text +# custom_domain :string +# description :text +# end_date :date not null +# end_hour :integer default(20) +# events_per_week :text +# guid :string not null +# logo_file_name :string +# picture :string +# registration_limit :integer default(0) +# revision :integer default(0), not null +# short_title :string not null +# start_date :date not null +# start_hour :integer default(9) +# ticket_layout :integer default("portrait") +# timezone :string not null +# title :string not null +# use_vdays :boolean default(FALSE) +# use_volunteers :boolean +# use_vpositions :boolean default(FALSE) +# created_at :datetime +# updated_at :datetime +# organization_id :integer +# +# Indexes +# +# index_conferences_on_organization_id (organization_id) +# class ConferenceSerializer < ActiveModel::Serializer include ApplicationHelper attributes :short_title, :title, :description, :start_date, :end_date, :picture_url, diff --git a/app/serializers/event_schedule_serializer.rb b/app/serializers/event_schedule_serializer.rb index 71a2ea59..7ee98bb6 100644 --- a/app/serializers/event_schedule_serializer.rb +++ b/app/serializers/event_schedule_serializer.rb @@ -1,5 +1,25 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_schedules +# +# id :bigint not null, primary key +# enabled :boolean default(TRUE) +# start_time :datetime +# created_at :datetime not null +# updated_at :datetime not null +# event_id :integer +# room_id :integer +# schedule_id :integer +# +# Indexes +# +# index_event_schedules_on_event_id (event_id) +# index_event_schedules_on_event_id_and_schedule_id (event_id,schedule_id) UNIQUE +# index_event_schedules_on_room_id (room_id) +# index_event_schedules_on_schedule_id (schedule_id) +# class EventScheduleSerializer < ActiveModel::Serializer include ActionView::Helpers::TextHelper diff --git a/app/serializers/event_serializer.rb b/app/serializers/event_serializer.rb index 26d53801..4e81ef3b 100644 --- a/app/serializers/event_serializer.rb +++ b/app/serializers/event_serializer.rb @@ -1,5 +1,34 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# abstract :text +# comments_count :integer default(0), not null +# description :text +# guid :string not null +# is_highlight :boolean default(FALSE) +# language :string +# max_attendees :integer +# progress :string default("new"), not null +# proposal_additional_speakers :text +# public :boolean default(TRUE) +# require_registration :boolean +# start_time :datetime +# state :string default("new"), not null +# subtitle :string +# title :string not null +# week :integer +# created_at :datetime +# updated_at :datetime +# difficulty_level_id :integer +# event_type_id :integer +# program_id :integer +# room_id :integer +# track_id :integer +# class EventSerializer < ActiveModel::Serializer include ActionView::Helpers::TextHelper diff --git a/app/serializers/room_serializer.rb b/app/serializers/room_serializer.rb index c75db316..ee5a4601 100644 --- a/app/serializers/room_serializer.rb +++ b/app/serializers/room_serializer.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: rooms +# +# id :bigint not null, primary key +# guid :string not null +# name :string not null +# order :integer +# size :integer +# url :string +# venue_id :integer not null +# class RoomSerializer < ActiveModel::Serializer attributes :guid, :name, :description diff --git a/app/serializers/track_serializer.rb b/app/serializers/track_serializer.rb index 0eb7bebb..8462b3fe 100644 --- a/app/serializers/track_serializer.rb +++ b/app/serializers/track_serializer.rb @@ -1,5 +1,33 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tracks +# +# id :bigint not null, primary key +# cfp_active :boolean not null +# color :string +# description :text +# end_date :date +# guid :string not null +# name :string not null +# relevance :text +# short_name :string not null +# start_date :date +# state :string default("new"), not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# room_id :integer +# selected_schedule_id :integer +# submitter_id :integer +# +# Indexes +# +# index_tracks_on_room_id (room_id) +# index_tracks_on_selected_schedule_id (selected_schedule_id) +# index_tracks_on_submitter_id (submitter_id) +# class TrackSerializer < ActiveModel::Serializer attributes :guid, :name, :color end diff --git a/spec/factories/booths.rb b/spec/factories/booths.rb index fa7e9824..e9142763 100644 --- a/spec/factories/booths.rb +++ b/spec/factories/booths.rb @@ -1,5 +1,21 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: booths +# +# id :bigint not null, primary key +# description :text +# logo_link :string +# reasoning :text +# state :string +# submitter_relationship :text +# title :string +# website_url :string +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer +# FactoryBot.define do factory :booth do title { Faker::Hipster.sentence } diff --git a/spec/factories/cfps.rb b/spec/factories/cfps.rb index d134f150..18a7e5f4 100644 --- a/spec/factories/cfps.rb +++ b/spec/factories/cfps.rb @@ -1,6 +1,19 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: cfps +# +# id :bigint not null, primary key +# cfp_type :string +# description :text +# enable_registrations :boolean default(FALSE) +# end_date :date not null +# start_date :date not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# FactoryBot.define do factory :cfp do diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index d30dca9b..9bdab18b 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -1,6 +1,28 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: comments +# +# id :bigint not null, primary key +# body :text +# commentable_type :string +# lft :integer +# rgt :integer +# subject :string +# title :string(50) default("") +# created_at :datetime +# updated_at :datetime +# commentable_id :integer +# parent_id :integer +# user_id :integer +# +# Indexes +# +# index_comments_on_commentable_id (commentable_id) +# index_comments_on_commentable_type (commentable_type) +# index_comments_on_user_id (user_id) +# FactoryBot.define do factory :comment do diff --git a/spec/factories/commercials.rb b/spec/factories/commercials.rb index e6ae1116..53ae8933 100644 --- a/spec/factories/commercials.rb +++ b/spec/factories/commercials.rb @@ -1,6 +1,18 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: commercials +# +# id :bigint not null, primary key +# commercial_type :string +# commercialable_type :string +# url :string +# created_at :datetime +# updated_at :datetime +# commercial_id :string +# commercialable_id :integer +# FactoryBot.define do factory :commercial do diff --git a/spec/factories/conferences.rb b/spec/factories/conferences.rb index dcb0e662..d1ac5032 100644 --- a/spec/factories/conferences.rb +++ b/spec/factories/conferences.rb @@ -1,6 +1,40 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: conferences +# +# id :bigint not null, primary key +# booth_limit :integer default(0) +# color :string +# custom_css :text +# custom_domain :string +# description :text +# end_date :date not null +# end_hour :integer default(20) +# events_per_week :text +# guid :string not null +# logo_file_name :string +# picture :string +# registration_limit :integer default(0) +# revision :integer default(0), not null +# short_title :string not null +# start_date :date not null +# start_hour :integer default(9) +# ticket_layout :integer default("portrait") +# timezone :string not null +# title :string not null +# use_vdays :boolean default(FALSE) +# use_volunteers :boolean +# use_vpositions :boolean default(FALSE) +# created_at :datetime +# updated_at :datetime +# organization_id :integer +# +# Indexes +# +# index_conferences_on_organization_id (organization_id) +# FactoryBot.define do factory :conference do diff --git a/spec/factories/contacts.rb b/spec/factories/contacts.rb index edec9ea9..f23dae53 100644 --- a/spec/factories/contacts.rb +++ b/spec/factories/contacts.rb @@ -1,5 +1,24 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: contacts +# +# id :bigint not null, primary key +# blog :string +# email :string +# facebook :string +# googleplus :string +# instagram :string +# mastodon :string +# social_tag :string +# sponsor_email :string +# twitter :string +# youtube :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :contact do social_tag { SecureRandom.urlsafe_base64(4) } diff --git a/spec/factories/difficulty_levels.rb b/spec/factories/difficulty_levels.rb index b5a8271b..dc1de743 100644 --- a/spec/factories/difficulty_levels.rb +++ b/spec/factories/difficulty_levels.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: difficulty_levels +# +# id :bigint not null, primary key +# color :string +# description :text +# title :string +# created_at :datetime +# updated_at :datetime +# program_id :integer +# FactoryBot.define do factory :difficulty_level do title { 'Example Difficulty Level' } diff --git a/spec/factories/email_settings.rb b/spec/factories/email_settings.rb index 1bbd7c13..c71132cd 100644 --- a/spec/factories/email_settings.rb +++ b/spec/factories/email_settings.rb @@ -1,6 +1,50 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: email_settings +# +# id :bigint not null, primary key +# accepted_body :text +# accepted_subject :string +# booths_acceptance_body :text +# booths_acceptance_subject :string +# booths_rejection_body :text +# booths_rejection_subject :string +# cfp_dates_updated_body :text +# cfp_dates_updated_subject :string +# conference_dates_updated_body :text +# conference_dates_updated_subject :string +# conference_registration_dates_updated_body :text +# conference_registration_dates_updated_subject :string +# confirmed_without_registration_body :text +# confirmed_without_registration_subject :string +# program_schedule_public_body :text +# program_schedule_public_subject :string +# registration_body :text +# registration_subject :string +# rejected_body :text +# rejected_subject :string +# send_on_accepted :boolean default(FALSE) +# send_on_booths_acceptance :boolean default(FALSE) +# send_on_booths_rejection :boolean default(FALSE) +# send_on_cfp_dates_updated :boolean default(FALSE) +# send_on_conference_dates_updated :boolean default(FALSE) +# send_on_conference_registration_dates_updated :boolean default(FALSE) +# send_on_confirmed_without_registration :boolean default(FALSE) +# send_on_program_schedule_public :boolean default(FALSE) +# send_on_registration :boolean default(FALSE) +# send_on_rejected :boolean default(FALSE) +# send_on_submitted_proposal :boolean default(FALSE) +# send_on_venue_updated :boolean default(FALSE) +# submitted_proposal_body :text +# submitted_proposal_subject :string +# venue_updated_body :text +# venue_updated_subject :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :email_settings do diff --git a/spec/factories/event_types.rb b/spec/factories/event_types.rb index a9710ea3..c68d3fae 100644 --- a/spec/factories/event_types.rb +++ b/spec/factories/event_types.rb @@ -1,6 +1,20 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: event_types +# +# id :bigint not null, primary key +# color :string +# description :string +# length :integer default(30) +# maximum_abstract_length :integer default(500) +# minimum_abstract_length :integer default(0) +# title :string not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# FactoryBot.define do factory :event_type do diff --git a/spec/factories/event_users.rb b/spec/factories/event_users.rb index ce872a66..2a4204bb 100644 --- a/spec/factories/event_users.rb +++ b/spec/factories/event_users.rb @@ -1,6 +1,17 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: event_users +# +# id :bigint not null, primary key +# comment :string +# event_role :string default("participant"), not null +# created_at :datetime +# updated_at :datetime +# event_id :integer +# user_id :integer +# FactoryBot.define do factory :event_user do diff --git a/spec/factories/events.rb b/spec/factories/events.rb index f7861705..18d40a3b 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -1,6 +1,34 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# abstract :text +# comments_count :integer default(0), not null +# description :text +# guid :string not null +# is_highlight :boolean default(FALSE) +# language :string +# max_attendees :integer +# progress :string default("new"), not null +# proposal_additional_speakers :text +# public :boolean default(TRUE) +# require_registration :boolean +# start_time :datetime +# state :string default("new"), not null +# subtitle :string +# title :string not null +# week :integer +# created_at :datetime +# updated_at :datetime +# difficulty_level_id :integer +# event_type_id :integer +# program_id :integer +# room_id :integer +# track_id :integer +# FactoryBot.define do factory :event do diff --git a/spec/factories/events_registrations.rb b/spec/factories/events_registrations.rb index 303b1996..56de6229 100644 --- a/spec/factories/events_registrations.rb +++ b/spec/factories/events_registrations.rb @@ -1,6 +1,15 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: events_registrations +# +# id :bigint not null, primary key +# attended :boolean default(FALSE), not null +# created_at :datetime +# event_id :integer +# registration_id :integer +# FactoryBot.define do factory :events_registration do diff --git a/spec/factories/lodgings.rb b/spec/factories/lodgings.rb index 76f74f0a..fc31b1f3 100644 --- a/spec/factories/lodgings.rb +++ b/spec/factories/lodgings.rb @@ -1,6 +1,22 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: lodgings +# +# id :bigint not null, primary key +# description :text +# name :string +# photo_content_type :string +# photo_file_name :string +# photo_file_size :integer +# photo_updated_at :datetime +# picture :string +# website_link :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :lodging do diff --git a/spec/factories/organizations.rb b/spec/factories/organizations.rb index 1fde9081..013b144c 100644 --- a/spec/factories/organizations.rb +++ b/spec/factories/organizations.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: organizations +# +# id :bigint not null, primary key +# code_of_conduct :text +# description :text +# name :string not null +# picture :string +# FactoryBot.define do factory :organization do sequence(:name) { |n| "#{Faker::Company.name} #{n}" } diff --git a/spec/factories/payments.rb b/spec/factories/payments.rb index 1ad2502d..3e85ad2a 100644 --- a/spec/factories/payments.rb +++ b/spec/factories/payments.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: payments +# +# id :bigint not null, primary key +# amount :integer +# authorization_code :string +# last4 :string +# status :integer default("unpaid"), not null +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer not null +# user_id :integer not null +# FactoryBot.define do factory :payment do user diff --git a/spec/factories/programs.rb b/spec/factories/programs.rb index 364c9f0c..8f3a1de9 100644 --- a/spec/factories/programs.rb +++ b/spec/factories/programs.rb @@ -1,6 +1,27 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: programs +# +# id :bigint not null, primary key +# blind_voting :boolean default(FALSE) +# languages :string +# rating :integer default(0) +# schedule_fluid :boolean default(FALSE) +# schedule_interval :integer default(15), not null +# schedule_public :boolean default(FALSE) +# voting_end_date :datetime +# voting_start_date :datetime +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# selected_schedule_id :integer +# +# Indexes +# +# index_programs_on_selected_schedule_id (selected_schedule_id) +# FactoryBot.define do factory :program do diff --git a/spec/factories/registration_periods.rb b/spec/factories/registration_periods.rb index 7127c132..548c7400 100644 --- a/spec/factories/registration_periods.rb +++ b/spec/factories/registration_periods.rb @@ -1,6 +1,16 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: registration_periods +# +# id :bigint not null, primary key +# end_date :date +# start_date :date +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :registration_period do diff --git a/spec/factories/roles.rb b/spec/factories/roles.rb index 990627eb..e7638316 100644 --- a/spec/factories/roles.rb +++ b/spec/factories/roles.rb @@ -1,5 +1,22 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: roles +# +# id :bigint not null, primary key +# description :string +# name :string +# resource_type :string +# created_at :datetime +# updated_at :datetime +# resource_id :integer +# +# Indexes +# +# index_roles_on_name (name) +# index_roles_on_name_and_resource_type_and_resource_id (name,resource_type,resource_id) +# FactoryBot.define do factory :role do name { 'my role' } diff --git a/spec/factories/rooms.rb b/spec/factories/rooms.rb index 6d0ae1ef..6c824594 100644 --- a/spec/factories/rooms.rb +++ b/spec/factories/rooms.rb @@ -1,6 +1,17 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: rooms +# +# id :bigint not null, primary key +# guid :string not null +# name :string not null +# order :integer +# size :integer +# url :string +# venue_id :integer not null +# FactoryBot.define do factory :room do name { "Room #{Faker::Address.country}" } diff --git a/spec/factories/splashpages.rb b/spec/factories/splashpages.rb index e52e8478..aa093f75 100644 --- a/spec/factories/splashpages.rb +++ b/spec/factories/splashpages.rb @@ -1,6 +1,30 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: splashpages +# +# id :bigint not null, primary key +# banner_photo_content_type :string +# banner_photo_file_name :string +# banner_photo_file_size :integer +# banner_photo_updated_at :datetime +# include_booths :boolean +# include_cfp :boolean default(FALSE) +# include_lodgings :boolean +# include_program :boolean +# include_registrations :boolean +# include_social_media :boolean +# include_sponsors :boolean +# include_tickets :boolean +# include_tracks :boolean +# include_venue :boolean +# public :boolean +# shuffle_highlights :boolean default(FALSE), not null +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :splashpage do diff --git a/spec/factories/sponsors.rb b/spec/factories/sponsors.rb index d2cd8db5..0aabf01d 100644 --- a/spec/factories/sponsors.rb +++ b/spec/factories/sponsors.rb @@ -1,6 +1,20 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: sponsors +# +# id :bigint not null, primary key +# description :text +# logo_file_name :string +# name :string +# picture :string +# website_url :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# sponsorship_level_id :integer +# FactoryBot.define do factory :sponsor do diff --git a/spec/factories/sponsorship_levels.rb b/spec/factories/sponsorship_levels.rb index 8778e018..acf28cbf 100644 --- a/spec/factories/sponsorship_levels.rb +++ b/spec/factories/sponsorship_levels.rb @@ -1,6 +1,16 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: sponsorship_levels +# +# id :bigint not null, primary key +# position :integer +# title :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :sponsorship_level do diff --git a/spec/factories/subscriptions.rb b/spec/factories/subscriptions.rb index 174d643e..a9f21732 100644 --- a/spec/factories/subscriptions.rb +++ b/spec/factories/subscriptions.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: subscriptions +# +# id :bigint not null, primary key +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# user_id :integer +# FactoryBot.define do factory :subscription do user diff --git a/spec/factories/survey_questions.rb b/spec/factories/survey_questions.rb index 236b4f0a..2a6a11ed 100644 --- a/spec/factories/survey_questions.rb +++ b/spec/factories/survey_questions.rb @@ -1,5 +1,18 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_questions +# +# id :bigint not null, primary key +# kind :integer default("boolean") +# mandatory :boolean default(FALSE) +# max_choices :integer +# min_choices :integer +# possible_answers :text +# title :string +# survey_id :integer +# FactoryBot.define do factory :survey_question do survey diff --git a/spec/factories/survey_replies.rb b/spec/factories/survey_replies.rb index 19a0fc2b..94dbcbd1 100644 --- a/spec/factories/survey_replies.rb +++ b/spec/factories/survey_replies.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_replies +# +# id :bigint not null, primary key +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# survey_question_id :integer +# user_id :integer +# FactoryBot.define do factory :survey_reply do user diff --git a/spec/factories/survey_submissions.rb b/spec/factories/survey_submissions.rb index 9c4178d1..f25f47b3 100644 --- a/spec/factories/survey_submissions.rb +++ b/spec/factories/survey_submissions.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_submissions +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# survey_id :integer +# user_id :integer +# FactoryBot.define do factory :survey_submission do user diff --git a/spec/factories/surveys.rb b/spec/factories/surveys.rb index cf44f7ed..9884a98c 100644 --- a/spec/factories/surveys.rb +++ b/spec/factories/surveys.rb @@ -1,5 +1,24 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: surveys +# +# id :bigint not null, primary key +# description :text +# end_date :datetime +# start_date :datetime +# surveyable_type :string +# target :integer default("after_conference") +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# surveyable_id :integer +# +# Indexes +# +# index_surveys_on_surveyable_type_and_surveyable_id (surveyable_type,surveyable_id) +# FactoryBot.define do factory :survey do title { 'This is my survey' } diff --git a/spec/factories/ticket_purchases.rb b/spec/factories/ticket_purchases.rb index f54939e3..0103bfbe 100644 --- a/spec/factories/ticket_purchases.rb +++ b/spec/factories/ticket_purchases.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: ticket_purchases +# +# id :bigint not null, primary key +# amount_paid :float default(0.0) +# paid :boolean default(FALSE) +# quantity :integer default(1) +# week :integer +# created_at :datetime +# conference_id :integer +# payment_id :integer +# ticket_id :integer +# user_id :integer +# FactoryBot.define do factory :ticket_purchase do user diff --git a/spec/factories/tickets.rb b/spec/factories/tickets.rb index 42d877d0..9adda4f9 100644 --- a/spec/factories/tickets.rb +++ b/spec/factories/tickets.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tickets +# +# id :bigint not null, primary key +# description :text +# price_cents :integer default(0), not null +# price_currency :string default("USD"), not null +# registration_ticket :boolean default(FALSE) +# title :string not null +# visible :boolean default(TRUE) +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :ticket do title { "#{Faker::Hipster.word} Ticket" } diff --git a/spec/factories/tracks.rb b/spec/factories/tracks.rb index 34bf1b9f..9f80bbd7 100644 --- a/spec/factories/tracks.rb +++ b/spec/factories/tracks.rb @@ -1,5 +1,33 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tracks +# +# id :bigint not null, primary key +# cfp_active :boolean not null +# color :string +# description :text +# end_date :date +# guid :string not null +# name :string not null +# relevance :text +# short_name :string not null +# start_date :date +# state :string default("new"), not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# room_id :integer +# selected_schedule_id :integer +# submitter_id :integer +# +# Indexes +# +# index_tracks_on_room_id (room_id) +# index_tracks_on_selected_schedule_id (selected_schedule_id) +# index_tracks_on_submitter_id (submitter_id) +# FactoryBot.define do factory :track do name { Faker::Commerce.department(2, true) } diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 38fd26d6..fcec2048 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,6 +1,51 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: users +# +# id :bigint not null, primary key +# affiliation :string +# avatar_content_type :string +# avatar_file_name :string +# avatar_file_size :integer +# avatar_updated_at :datetime +# biography :text +# confirmation_sent_at :datetime +# confirmation_token :string +# confirmed_at :datetime +# current_sign_in_at :datetime +# current_sign_in_ip :string +# email :string default(""), not null +# email_public :boolean default(FALSE) +# encrypted_password :string default(""), not null +# is_admin :boolean default(FALSE) +# is_disabled :boolean default(FALSE) +# languages :string +# last_sign_in_at :datetime +# last_sign_in_ip :string +# mobile :string +# name :string +# nickname :string +# picture :string +# remember_created_at :datetime +# reset_password_sent_at :datetime +# reset_password_token :string +# sign_in_count :integer default(0) +# tshirt :string +# unconfirmed_email :string +# username :string +# volunteer_experience :text +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_users_on_confirmation_token (confirmation_token) UNIQUE +# index_users_on_email (email) UNIQUE +# index_users_on_reset_password_token (reset_password_token) UNIQUE +# index_users_on_username (username) UNIQUE +# # It is a feature of our app that first signed up user is admin. This property # is set in a before create callback `setup_role` in user model. diff --git a/spec/factories/vdays.rb b/spec/factories/vdays.rb index 7ed2479c..f4e621a9 100644 --- a/spec/factories/vdays.rb +++ b/spec/factories/vdays.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: vdays +# +# id :bigint not null, primary key +# day :date +# description :text +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :vday do day { Time.zone.today } diff --git a/spec/factories/venues.rb b/spec/factories/venues.rb index 91c6dc36..e81a05e0 100644 --- a/spec/factories/venues.rb +++ b/spec/factories/venues.rb @@ -1,6 +1,26 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_bot +# == Schema Information +# +# Table name: venues +# +# id :bigint not null, primary key +# city :string +# country :string +# description :text +# guid :string +# latitude :string +# longitude :string +# name :string +# photo_file_name :string +# picture :string +# postalcode :string +# street :string +# website :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :venue do name { "#{Faker::Company.name} Office" } diff --git a/spec/factories/votes.rb b/spec/factories/votes.rb index 038b6afe..3639a8a9 100644 --- a/spec/factories/votes.rb +++ b/spec/factories/votes.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: votes +# +# id :bigint not null, primary key +# rating :integer +# created_at :datetime +# updated_at :datetime +# event_id :integer +# user_id :integer +# FactoryBot.define do factory :vote do event diff --git a/spec/factories/vpositions.rb b/spec/factories/vpositions.rb index 69ae8776..119bd2d9 100644 --- a/spec/factories/vpositions.rb +++ b/spec/factories/vpositions.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: vpositions +# +# id :bigint not null, primary key +# description :text +# title :string not null +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# FactoryBot.define do factory :vposition do title { 'Example Volunteer Position' } diff --git a/spec/models/booth_spec.rb b/spec/models/booth_spec.rb index cec4d4ac..6c482155 100644 --- a/spec/models/booth_spec.rb +++ b/spec/models/booth_spec.rb @@ -1,5 +1,21 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: booths +# +# id :bigint not null, primary key +# description :text +# logo_link :string +# reasoning :text +# state :string +# submitter_relationship :text +# title :string +# website_url :string +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer +# require 'spec_helper' describe Booth do diff --git a/spec/models/cfp_spec.rb b/spec/models/cfp_spec.rb index 74d16907..4307948f 100644 --- a/spec/models/cfp_spec.rb +++ b/spec/models/cfp_spec.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: cfps +# +# id :bigint not null, primary key +# cfp_type :string +# description :text +# enable_registrations :boolean default(FALSE) +# end_date :date not null +# start_date :date not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# require 'spec_helper' describe Cfp do diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index e3376e79..30720799 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -1,5 +1,28 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: comments +# +# id :bigint not null, primary key +# body :text +# commentable_type :string +# lft :integer +# rgt :integer +# subject :string +# title :string(50) default("") +# created_at :datetime +# updated_at :datetime +# commentable_id :integer +# parent_id :integer +# user_id :integer +# +# Indexes +# +# index_comments_on_commentable_id (commentable_id) +# index_comments_on_commentable_type (commentable_type) +# index_comments_on_user_id (user_id) +# require 'spec_helper' describe Commercial do diff --git a/spec/models/commercial_spec.rb b/spec/models/commercial_spec.rb index 80c43c7c..bc2e630d 100644 --- a/spec/models/commercial_spec.rb +++ b/spec/models/commercial_spec.rb @@ -1,5 +1,18 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: commercials +# +# id :bigint not null, primary key +# commercial_type :string +# commercialable_type :string +# url :string +# created_at :datetime +# updated_at :datetime +# commercial_id :string +# commercialable_id :integer +# require 'spec_helper' describe Commercial do diff --git a/spec/models/conference_spec.rb b/spec/models/conference_spec.rb index 64cc1aea..14b396e1 100755 --- a/spec/models/conference_spec.rb +++ b/spec/models/conference_spec.rb @@ -1,6 +1,42 @@ -#!/bin/env ruby # encoding: utf-8 # frozen_string_literal: true + +# == Schema Information +# +# Table name: conferences +# +# id :bigint not null, primary key +# booth_limit :integer default(0) +# color :string +# custom_css :text +# custom_domain :string +# description :text +# end_date :date not null +# end_hour :integer default(20) +# events_per_week :text +# guid :string not null +# logo_file_name :string +# picture :string +# registration_limit :integer default(0) +# revision :integer default(0), not null +# short_title :string not null +# start_date :date not null +# start_hour :integer default(9) +# ticket_layout :integer default("portrait") +# timezone :string not null +# title :string not null +# use_vdays :boolean default(FALSE) +# use_volunteers :boolean +# use_vpositions :boolean default(FALSE) +# created_at :datetime +# updated_at :datetime +# organization_id :integer +# +# Indexes +# +# index_conferences_on_organization_id (organization_id) +# +#!/bin/env ruby require 'spec_helper' describe Conference do diff --git a/spec/models/email_settings_spec.rb b/spec/models/email_settings_spec.rb index 875dba6d..b594c60c 100644 --- a/spec/models/email_settings_spec.rb +++ b/spec/models/email_settings_spec.rb @@ -1,5 +1,50 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: email_settings +# +# id :bigint not null, primary key +# accepted_body :text +# accepted_subject :string +# booths_acceptance_body :text +# booths_acceptance_subject :string +# booths_rejection_body :text +# booths_rejection_subject :string +# cfp_dates_updated_body :text +# cfp_dates_updated_subject :string +# conference_dates_updated_body :text +# conference_dates_updated_subject :string +# conference_registration_dates_updated_body :text +# conference_registration_dates_updated_subject :string +# confirmed_without_registration_body :text +# confirmed_without_registration_subject :string +# program_schedule_public_body :text +# program_schedule_public_subject :string +# registration_body :text +# registration_subject :string +# rejected_body :text +# rejected_subject :string +# send_on_accepted :boolean default(FALSE) +# send_on_booths_acceptance :boolean default(FALSE) +# send_on_booths_rejection :boolean default(FALSE) +# send_on_cfp_dates_updated :boolean default(FALSE) +# send_on_conference_dates_updated :boolean default(FALSE) +# send_on_conference_registration_dates_updated :boolean default(FALSE) +# send_on_confirmed_without_registration :boolean default(FALSE) +# send_on_program_schedule_public :boolean default(FALSE) +# send_on_registration :boolean default(FALSE) +# send_on_rejected :boolean default(FALSE) +# send_on_submitted_proposal :boolean default(FALSE) +# send_on_venue_updated :boolean default(FALSE) +# submitted_proposal_body :text +# submitted_proposal_subject :string +# venue_updated_body :text +# venue_updated_subject :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# require 'spec_helper' describe EmailSettings do diff --git a/spec/models/event_schedule_spec.rb b/spec/models/event_schedule_spec.rb index 56cedcd4..b160cf15 100644 --- a/spec/models/event_schedule_spec.rb +++ b/spec/models/event_schedule_spec.rb @@ -1,5 +1,25 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_schedules +# +# id :bigint not null, primary key +# enabled :boolean default(TRUE) +# start_time :datetime +# created_at :datetime not null +# updated_at :datetime not null +# event_id :integer +# room_id :integer +# schedule_id :integer +# +# Indexes +# +# index_event_schedules_on_event_id (event_id) +# index_event_schedules_on_event_id_and_schedule_id (event_id,schedule_id) UNIQUE +# index_event_schedules_on_room_id (room_id) +# index_event_schedules_on_schedule_id (schedule_id) +# require 'spec_helper' describe EventSchedule do diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 92768222..c2dca815 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -1,5 +1,34 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# abstract :text +# comments_count :integer default(0), not null +# description :text +# guid :string not null +# is_highlight :boolean default(FALSE) +# language :string +# max_attendees :integer +# progress :string default("new"), not null +# proposal_additional_speakers :text +# public :boolean default(TRUE) +# require_registration :boolean +# start_time :datetime +# state :string default("new"), not null +# subtitle :string +# title :string not null +# week :integer +# created_at :datetime +# updated_at :datetime +# difficulty_level_id :integer +# event_type_id :integer +# program_id :integer +# room_id :integer +# track_id :integer +# require 'spec_helper' describe Event do diff --git a/spec/models/event_type_spec.rb b/spec/models/event_type_spec.rb index 9fb65950..2cfc57be 100644 --- a/spec/models/event_type_spec.rb +++ b/spec/models/event_type_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: event_types +# +# id :bigint not null, primary key +# color :string +# description :string +# length :integer default(30) +# maximum_abstract_length :integer default(500) +# minimum_abstract_length :integer default(0) +# title :string not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# require 'spec_helper' describe EventType do diff --git a/spec/models/organization_spec.rb b/spec/models/organization_spec.rb index b9d78b7d..8917e364 100644 --- a/spec/models/organization_spec.rb +++ b/spec/models/organization_spec.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: organizations +# +# id :bigint not null, primary key +# code_of_conduct :text +# description :text +# name :string not null +# picture :string +# require 'spec_helper' describe Organization do diff --git a/spec/models/payment_spec.rb b/spec/models/payment_spec.rb index f011a749..feff93a6 100644 --- a/spec/models/payment_spec.rb +++ b/spec/models/payment_spec.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: payments +# +# id :bigint not null, primary key +# amount :integer +# authorization_code :string +# last4 :string +# status :integer default("unpaid"), not null +# created_at :datetime not null +# updated_at :datetime not null +# conference_id :integer not null +# user_id :integer not null +# require 'spec_helper' require 'stripe_mock' diff --git a/spec/models/physical_ticket_spec.rb b/spec/models/physical_ticket_spec.rb index 31afd621..8bee7cd0 100644 --- a/spec/models/physical_ticket_spec.rb +++ b/spec/models/physical_ticket_spec.rb @@ -1,5 +1,19 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: physical_tickets +# +# id :bigint not null, primary key +# token :string +# created_at :datetime not null +# updated_at :datetime not null +# ticket_purchase_id :integer not null +# +# Indexes +# +# index_physical_tickets_on_token (token) UNIQUE +# require 'spec_helper' describe PhysicalTicket do diff --git a/spec/models/program_spec.rb b/spec/models/program_spec.rb index e8db5880..469092e3 100644 --- a/spec/models/program_spec.rb +++ b/spec/models/program_spec.rb @@ -1,5 +1,27 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: programs +# +# id :bigint not null, primary key +# blind_voting :boolean default(FALSE) +# languages :string +# rating :integer default(0) +# schedule_fluid :boolean default(FALSE) +# schedule_interval :integer default(15), not null +# schedule_public :boolean default(FALSE) +# voting_end_date :datetime +# voting_start_date :datetime +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# selected_schedule_id :integer +# +# Indexes +# +# index_programs_on_selected_schedule_id (selected_schedule_id) +# require 'spec_helper' describe Program do diff --git a/spec/models/registration_period_spec.rb b/spec/models/registration_period_spec.rb index 10da0684..80f099d8 100644 --- a/spec/models/registration_period_spec.rb +++ b/spec/models/registration_period_spec.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: registration_periods +# +# id :bigint not null, primary key +# end_date :date +# start_date :date +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# require 'spec_helper' describe RegistrationPeriod do diff --git a/spec/models/registration_spec.rb b/spec/models/registration_spec.rb index d6c86838..03a04872 100644 --- a/spec/models/registration_spec.rb +++ b/spec/models/registration_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: registrations +# +# id :bigint not null, primary key +# accepted_code_of_conduct :boolean +# attended :boolean default(FALSE) +# other_special_needs :text +# volunteer :boolean +# week :integer +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# user_id :integer +# require 'spec_helper' describe Registration do diff --git a/spec/models/resource_spec.rb b/spec/models/resource_spec.rb index d70e3144..c93b0ff6 100644 --- a/spec/models/resource_spec.rb +++ b/spec/models/resource_spec.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: resources +# +# id :bigint not null, primary key +# description :text +# name :string +# quantity :integer +# used :integer default(0) +# conference_id :integer +# require 'spec_helper' describe Resource do diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb index 58c2e287..31cae3a5 100644 --- a/spec/models/role_spec.rb +++ b/spec/models/role_spec.rb @@ -1,5 +1,22 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: roles +# +# id :bigint not null, primary key +# description :string +# name :string +# resource_type :string +# created_at :datetime +# updated_at :datetime +# resource_id :integer +# +# Indexes +# +# index_roles_on_name (name) +# index_roles_on_name_and_resource_type_and_resource_id (name,resource_type,resource_id) +# require 'spec_helper' describe Role do diff --git a/spec/models/room_spec.rb b/spec/models/room_spec.rb index 5aa79643..ef813ccc 100644 --- a/spec/models/room_spec.rb +++ b/spec/models/room_spec.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: rooms +# +# id :bigint not null, primary key +# guid :string not null +# name :string not null +# order :integer +# size :integer +# url :string +# venue_id :integer not null +# require 'spec_helper' describe Room do diff --git a/spec/models/schedule_spec.rb b/spec/models/schedule_spec.rb index d9e2f3f2..585d3bce 100644 --- a/spec/models/schedule_spec.rb +++ b/spec/models/schedule_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: schedules +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# program_id :integer +# track_id :integer +# +# Indexes +# +# index_schedules_on_program_id (program_id) +# index_schedules_on_track_id (track_id) +# require 'spec_helper' describe Schedule do diff --git a/spec/models/sponsor_spec.rb b/spec/models/sponsor_spec.rb index 7f6e3e50..acbae102 100644 --- a/spec/models/sponsor_spec.rb +++ b/spec/models/sponsor_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: sponsors +# +# id :bigint not null, primary key +# description :text +# logo_file_name :string +# name :string +# picture :string +# website_url :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# sponsorship_level_id :integer +# require 'spec_helper' describe Sponsor do diff --git a/spec/models/sponsorship_level_spec.rb b/spec/models/sponsorship_level_spec.rb index c6b71a88..69e52038 100644 --- a/spec/models/sponsorship_level_spec.rb +++ b/spec/models/sponsorship_level_spec.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: sponsorship_levels +# +# id :bigint not null, primary key +# position :integer +# title :string +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# require 'spec_helper' describe SponsorshipLevel do diff --git a/spec/models/survey_question_spec.rb b/spec/models/survey_question_spec.rb index 0f86950d..2c0c0e71 100644 --- a/spec/models/survey_question_spec.rb +++ b/spec/models/survey_question_spec.rb @@ -1,5 +1,18 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_questions +# +# id :bigint not null, primary key +# kind :integer default("boolean") +# mandatory :boolean default(FALSE) +# max_choices :integer +# min_choices :integer +# possible_answers :text +# title :string +# survey_id :integer +# require 'spec_helper' describe SurveyQuestion do diff --git a/spec/models/survey_reply_spec.rb b/spec/models/survey_reply_spec.rb index 358fa134..888ecf55 100644 --- a/spec/models/survey_reply_spec.rb +++ b/spec/models/survey_reply_spec.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_replies +# +# id :bigint not null, primary key +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# survey_question_id :integer +# user_id :integer +# require 'spec_helper' describe SurveyReply do diff --git a/spec/models/survey_spec.rb b/spec/models/survey_spec.rb index 12a87c67..13a23945 100644 --- a/spec/models/survey_spec.rb +++ b/spec/models/survey_spec.rb @@ -1,5 +1,24 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: surveys +# +# id :bigint not null, primary key +# description :text +# end_date :datetime +# start_date :datetime +# surveyable_type :string +# target :integer default("after_conference") +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# surveyable_id :integer +# +# Indexes +# +# index_surveys_on_surveyable_type_and_surveyable_id (surveyable_type,surveyable_id) +# require 'spec_helper' describe Survey do diff --git a/spec/models/survey_submission_spec.rb b/spec/models/survey_submission_spec.rb index e24f644c..df985a53 100644 --- a/spec/models/survey_submission_spec.rb +++ b/spec/models/survey_submission_spec.rb @@ -1,5 +1,15 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: survey_submissions +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# survey_id :integer +# user_id :integer +# require 'spec_helper' describe SurveySubmission do diff --git a/spec/models/ticket_purchase_spec.rb b/spec/models/ticket_purchase_spec.rb index 688864c6..58298627 100644 --- a/spec/models/ticket_purchase_spec.rb +++ b/spec/models/ticket_purchase_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: ticket_purchases +# +# id :bigint not null, primary key +# amount_paid :float default(0.0) +# paid :boolean default(FALSE) +# quantity :integer default(1) +# week :integer +# created_at :datetime +# conference_id :integer +# payment_id :integer +# ticket_id :integer +# user_id :integer +# require 'spec_helper' describe TicketPurchase do diff --git a/spec/models/ticket_scanning_spec.rb b/spec/models/ticket_scanning_spec.rb index ce18e63e..5a10674c 100644 --- a/spec/models/ticket_scanning_spec.rb +++ b/spec/models/ticket_scanning_spec.rb @@ -1,5 +1,14 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: ticket_scannings +# +# id :bigint not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# physical_ticket_id :integer not null +# require 'spec_helper' describe TicketScanning do diff --git a/spec/models/ticket_spec.rb b/spec/models/ticket_spec.rb index 0dcb5cad..a0c6a443 100644 --- a/spec/models/ticket_spec.rb +++ b/spec/models/ticket_spec.rb @@ -1,5 +1,20 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tickets +# +# id :bigint not null, primary key +# description :text +# price_cents :integer default(0), not null +# price_currency :string default("USD"), not null +# registration_ticket :boolean default(FALSE) +# title :string not null +# visible :boolean default(TRUE) +# created_at :datetime +# updated_at :datetime +# conference_id :integer +# require 'spec_helper' describe Ticket do diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index b58fc622..16095f44 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -1,5 +1,33 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tracks +# +# id :bigint not null, primary key +# cfp_active :boolean not null +# color :string +# description :text +# end_date :date +# guid :string not null +# name :string not null +# relevance :text +# short_name :string not null +# start_date :date +# state :string default("new"), not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# room_id :integer +# selected_schedule_id :integer +# submitter_id :integer +# +# Indexes +# +# index_tracks_on_room_id (room_id) +# index_tracks_on_selected_schedule_id (selected_schedule_id) +# index_tracks_on_submitter_id (submitter_id) +# require 'spec_helper' describe Track do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 9d7c8153..16f340f3 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,5 +1,51 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: users +# +# id :bigint not null, primary key +# affiliation :string +# avatar_content_type :string +# avatar_file_name :string +# avatar_file_size :integer +# avatar_updated_at :datetime +# biography :text +# confirmation_sent_at :datetime +# confirmation_token :string +# confirmed_at :datetime +# current_sign_in_at :datetime +# current_sign_in_ip :string +# email :string default(""), not null +# email_public :boolean default(FALSE) +# encrypted_password :string default(""), not null +# is_admin :boolean default(FALSE) +# is_disabled :boolean default(FALSE) +# languages :string +# last_sign_in_at :datetime +# last_sign_in_ip :string +# mobile :string +# name :string +# nickname :string +# picture :string +# remember_created_at :datetime +# reset_password_sent_at :datetime +# reset_password_token :string +# sign_in_count :integer default(0) +# tshirt :string +# unconfirmed_email :string +# username :string +# volunteer_experience :text +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_users_on_confirmation_token (confirmation_token) UNIQUE +# index_users_on_email (email) UNIQUE +# index_users_on_reset_password_token (reset_password_token) UNIQUE +# index_users_on_username (username) UNIQUE +# require 'spec_helper' describe User do diff --git a/spec/models/vote_spec.rb b/spec/models/vote_spec.rb index 39afb352..82026507 100644 --- a/spec/models/vote_spec.rb +++ b/spec/models/vote_spec.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: votes +# +# id :bigint not null, primary key +# rating :integer +# created_at :datetime +# updated_at :datetime +# event_id :integer +# user_id :integer +# require 'spec_helper' describe Vote do diff --git a/spec/serializers/conference_serializer_spec.rb b/spec/serializers/conference_serializer_spec.rb index fc493fe9..0462bc74 100644 --- a/spec/serializers/conference_serializer_spec.rb +++ b/spec/serializers/conference_serializer_spec.rb @@ -1,5 +1,40 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: conferences +# +# id :bigint not null, primary key +# booth_limit :integer default(0) +# color :string +# custom_css :text +# custom_domain :string +# description :text +# end_date :date not null +# end_hour :integer default(20) +# events_per_week :text +# guid :string not null +# logo_file_name :string +# picture :string +# registration_limit :integer default(0) +# revision :integer default(0), not null +# short_title :string not null +# start_date :date not null +# start_hour :integer default(9) +# ticket_layout :integer default("portrait") +# timezone :string not null +# title :string not null +# use_vdays :boolean default(FALSE) +# use_volunteers :boolean +# use_vpositions :boolean default(FALSE) +# created_at :datetime +# updated_at :datetime +# organization_id :integer +# +# Indexes +# +# index_conferences_on_organization_id (organization_id) +# require 'spec_helper' describe ConferenceSerializer, type: :serializer do diff --git a/spec/serializers/event_serializer_spec.rb b/spec/serializers/event_serializer_spec.rb index 2b678319..b365a310 100644 --- a/spec/serializers/event_serializer_spec.rb +++ b/spec/serializers/event_serializer_spec.rb @@ -1,5 +1,34 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# abstract :text +# comments_count :integer default(0), not null +# description :text +# guid :string not null +# is_highlight :boolean default(FALSE) +# language :string +# max_attendees :integer +# progress :string default("new"), not null +# proposal_additional_speakers :text +# public :boolean default(TRUE) +# require_registration :boolean +# start_time :datetime +# state :string default("new"), not null +# subtitle :string +# title :string not null +# week :integer +# created_at :datetime +# updated_at :datetime +# difficulty_level_id :integer +# event_type_id :integer +# program_id :integer +# room_id :integer +# track_id :integer +# require 'spec_helper' describe EventSerializer, type: :serializer do let(:event) { create(:event, title: 'Some Talk', abstract: 'Lorem ipsum dolor sit amet') } diff --git a/spec/serializers/room_serializer_spec.rb b/spec/serializers/room_serializer_spec.rb index bfb3ed86..26a6e125 100644 --- a/spec/serializers/room_serializer_spec.rb +++ b/spec/serializers/room_serializer_spec.rb @@ -1,5 +1,17 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: rooms +# +# id :bigint not null, primary key +# guid :string not null +# name :string not null +# order :integer +# size :integer +# url :string +# venue_id :integer not null +# require 'spec_helper' describe RoomSerializer, type: :serializer do let(:room) { create(:room) } diff --git a/spec/serializers/track_serializer_spec.rb b/spec/serializers/track_serializer_spec.rb index 95c97056..77af4a6a 100644 --- a/spec/serializers/track_serializer_spec.rb +++ b/spec/serializers/track_serializer_spec.rb @@ -1,5 +1,33 @@ # frozen_string_literal: true +# == Schema Information +# +# Table name: tracks +# +# id :bigint not null, primary key +# cfp_active :boolean not null +# color :string +# description :text +# end_date :date +# guid :string not null +# name :string not null +# relevance :text +# short_name :string not null +# start_date :date +# state :string default("new"), not null +# created_at :datetime +# updated_at :datetime +# program_id :integer +# room_id :integer +# selected_schedule_id :integer +# submitter_id :integer +# +# Indexes +# +# index_tracks_on_room_id (room_id) +# index_tracks_on_selected_schedule_id (selected_schedule_id) +# index_tracks_on_submitter_id (submitter_id) +# require 'spec_helper' describe TrackSerializer, type: :serializer do