canvas-lms/app/models
Jon Jensen 5480c8fecd spec: speed up api specs
liberal applicataion of once-ler and bulk_insert helpers, reduce runtime
from 50min -> 25min

Change-Id: I07c1952c4ead0a1c6caafc389de0b9586b27dc68
Reviewed-on: https://gerrit.instructure.com/37794
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-29 16:11:16 +00:00
..
alerts move all DelayedJob Alert code into separate class 2014-05-02 21:48:55 +00:00
attachments use binmode for s3 download file 2014-04-14 16:25:49 +00:00
auditors log auditor events to the rails log 2014-07-23 14:26:25 +00:00
broadcast_policies prevent notifications when a course is soft concluded 2014-06-11 19:36:34 +00:00
context_module_progressions rework module progressions evaluation 2014-05-01 16:42:07 +00:00
courses extract student to teacher mapping 2014-05-02 21:47:31 +00:00
data_exports_api validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
discussion_topic fix discussion topic materialized view for sharding 2014-02-26 15:17:44 +00:00
enrollment API tweaks to support querying upcoming enrollments/courses 2014-05-23 18:50:25 +00:00
exporters user submission export 2014-07-29 14:56:03 +00:00
group_categories Automatically Assign group leaders 2014-05-23 17:23:53 +00:00
importers fix date shifting issues 2014-07-28 22:22:58 +00:00
incoming_mail extract incoming mail into gem 2014-04-25 23:06:02 +00:00
live_assessments improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
lti add lti2 models and registration endpoints 2014-07-18 16:42:10 +00:00
messages Use source user as "FROM" for emails 2014-05-31 01:02:14 +00:00
polling improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
quizzes don't set graded_at in the future for quiz submissions 2014-07-25 20:12:09 +00:00
abstract_course.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
access_token.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
account.rb fix permission checks for available roles 2014-07-21 16:32:23 +00:00
account_authorization_config.rb split yaml file loading out of Setting 2014-05-21 18:27:06 +00:00
account_notification.rb add api endpoint to post global annoucement 2014-07-25 22:16:18 +00:00
account_notification_role.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
account_report.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
account_user.rb restrict admins from creating or deleting more powerful admins 2014-06-30 20:58:26 +00:00
alert.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
alert_criterion.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
announcement.rb prevent notifications when a course is soft concluded 2014-06-11 19:36:34 +00:00
appointment_group.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
appointment_group_context.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
appointment_group_sub_context.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
assessment_question.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
assessment_question_bank.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
assessment_question_bank_user.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
assessment_request.rb Adds peer review notification for assigning peer reviewers 2014-07-25 19:56:57 +00:00
asset_user_access.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
assignment.rb Revert "DA - assignments_needing_submitting" 2014-07-28 22:17:35 +00:00
assignment_group.rb DA - assignment indices 2014-07-17 18:23:25 +00:00
assignment_override.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
assignment_override_student.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
assignment_student_visibility.rb DA - sql view and shared methods 2014-07-15 18:03:57 +00:00
attachment.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
attachment_association.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
auditors.rb log auditor events to the rails log 2014-07-23 14:26:25 +00:00
authorization_code.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
big_blue_button_conference.rb BBB: request recordings only if conference was recorded 2013-12-18 22:45:56 +00:00
bookmark_service.rb i18n Bookmark Service 2011-06-16 07:16:10 -06:00
calendar_event.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
canvadoc.rb canvadocs: configurable mime types 2014-05-13 18:48:07 +00:00
cloned_item.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
collaboration.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
collaborator.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
communication_channel.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
content_export.rb user submission export 2014-07-29 14:56:03 +00:00
content_migration.rb run domain substitutions on module item and external tool urls 2014-07-08 19:57:52 +00:00
content_participation.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
content_participation_count.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
content_tag.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
context.rb prevent notifications when a course is soft concluded 2014-06-11 19:36:34 +00:00
context_external_tool.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
context_module.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
context_module_item.rb avoid dynamic finders on an assocition with an include 2014-02-21 12:52:39 +00:00
context_module_progression.rb fix module unlocking via date 2014-05-28 22:41:59 +00:00
context_module_sub_header.rb optimize AdheresToPolicy 2011-07-14 13:25:28 -06:00
conversation.rb conversations: clear unread_conversations_count cache 2014-06-25 03:19:23 +00:00
conversation_batch.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
conversation_message.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
conversation_message_participant.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
conversation_participant.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
course.rb fix overrides in subaccounts changing permissions for parent accounts 2014-07-19 00:42:32 +00:00
course_account_association.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
course_import.rb remove some of the less useful associations from export 2014-05-27 15:44:00 +00:00
course_profile.rb improve acts_as_list 2013-12-17 19:55:43 +00:00
course_progress.rb ignore unpublished module items for course progress 2014-06-02 22:56:46 +00:00
course_section.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
crocodoc_document.rb canvadocs 2014-05-09 22:38:57 +00:00
custom_data.rb add serializable hash of CustomData for User models 2014-03-24 21:52:43 +00:00
custom_gradebook_column.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
custom_gradebook_column_datum.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
delayed_message.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
delayed_notification.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
designer_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
developer_key.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
discussion_entry.rb remove broken conditional in discussion entry replies 2014-07-11 22:06:26 +00:00
discussion_entry_participant.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
discussion_topic.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
discussion_topic_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
document_service.rb Initial commit. 2011-01-31 18:57:29 -07:00
enrollment.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
enrollment_dates_override.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
enrollment_term.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
eportfolio.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
eportfolio_category.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
eportfolio_entry.rb clean up permission blocks a little 2014-06-12 22:10:41 +00:00
error_report.rb include hostname and pid in error reports 2014-05-15 19:20:43 +00:00
etherpad_collaboration.rb don't re-calculate the etherpad url when a new user joins 2013-11-08 21:45:44 +00:00
external_feed.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
external_feed_entry.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
external_url.rb optimize AdheresToPolicy 2011-07-14 13:25:28 -06:00
favorite.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
feature_flag.rb feature flags infrastructure and API 2013-11-19 20:50:03 +00:00
folder.rb spec: speed up api specs 2014-07-29 16:11:16 +00:00
google_docs_collaboration.rb Move google_docs code into a gem 2014-04-25 21:50:43 +00:00
gradebook_upload.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
grading_standard.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
group.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
group_category.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
group_leadership.rb Automatically Assign group leaders 2014-05-23 17:23:53 +00:00
group_membership.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
ignore.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
importers.rb fix autoloading of the Importers module 2014-07-25 19:14:12 +00:00
inbox_item.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
learning_outcome.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
learning_outcome_group.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
learning_outcome_result.rb live assessments api 2014-06-10 14:53:40 +00:00
live_assessments.rb improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
lti.rb add lti2 models and registration endpoints 2014-07-18 16:42:10 +00:00
mailer.rb Use source user as "FROM" for emails 2014-05-31 01:02:14 +00:00
media_object.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
media_source_fetcher.rb Prefer mp3 for audio comments in api_user_content 2014-04-30 20:00:13 +00:00
media_track.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
message.rb use absolute url for avatar in notifications 2014-07-18 14:18:25 +00:00
migration_issue.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
notification.rb remove submission comment mark as read notification preference 2014-07-14 22:21:01 +00:00
notification_policy.rb remove some of the less useful associations from export 2014-05-27 15:44:00 +00:00
oauth_request.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
observer_enrollment.rb arel-ify models 2013-04-01 18:42:38 +00:00
open_object.rb simplify OpenStruct/OpenObject json serialization 2013-08-29 16:44:13 +00:00
page_comment.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
page_view.rb fix page view controller and action logging in rails 3 2014-06-26 16:47:42 +00:00
plugin_setting.rb fix plugin setting after_initialize for rails 3 compatibility 2014-01-20 17:03:52 +00:00
polling.rb improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
polymorphic_type_override.rb rails3: fix issues with polymorphic type overrides 2014-02-28 21:15:57 +00:00
profile.rb add explicit table_name for Profile class 2013-12-31 18:52:15 +00:00
progress.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
pseudonym.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
pseudonym_session.rb rails3: fix issues found in integration/security_spec 2014-03-05 05:35:50 +00:00
report_snapshot.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
role.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
role_override.rb fix overrides in subaccounts changing permissions for parent accounts 2014-07-19 00:42:32 +00:00
rubric.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
rubric_assessment.rb clean up permission calls for grants_rights? 2014-06-19 18:10:30 +00:00
rubric_association.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
scribd_mime_type.rb set ScribdMimeType shard category for rails 3 2014-01-22 20:15:33 +00:00
session_persistence_token.rb fix session persistence tokens for out-of-shard users 2013-06-27 20:01:47 +00:00
setting.rb no more Setting backcompat 2014-05-27 19:20:39 +00:00
sharded_bookmarked_collection.rb extract bookmarked_collection gem 2014-04-17 18:16:13 +00:00
sis_batch.rb avoid temp tables in sis batch batch mode 2014-07-11 16:35:15 +00:00
stream_item.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
stream_item_instance.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
student_enrollment.rb Minor fixes to StudentEnrollment associations. 2012-05-04 16:46:43 -06:00
student_view_enrollment.rb fix viewing test student grades by teacher 2014-05-30 04:35:59 +00:00
submission.rb DA - grade calculation works on backend 2014-07-17 21:27:59 +00:00
submission_comment.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
submission_comment_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
submission_version.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
ta_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
tableless.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
teacher_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
thumbnail.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
user.rb user submission export 2014-07-29 14:56:03 +00:00
user_account_association.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
user_note.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
user_observer.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
user_profile.rb add observees page to user profile 2014-07-09 16:30:20 +00:00
user_profile_link.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
user_service.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
web_conference.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
web_conference_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
wiki.rb clean up permission calls for grants_rights? 2014-06-19 18:10:30 +00:00
wiki_page.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
wimba_conference.rb handle wimba conference date parsing in ruby18/ruby19. 2013-02-08 12:43:19 -07:00
zip_file_import.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00