bearcat 1.5.24 → 1.5.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dfc188f90b9e9ecbb6dca39381af0881c04279c2e28a51dc37155e396411589
4
- data.tar.gz: e315e2df134089927326d0a36654fee28b01d85c8c556c1dfe33992e4c5a9924
3
+ metadata.gz: f2ea134c7e66bf2daa91d55d61c1c0910f9c336e62da63d16d40010cf5b29dac
4
+ data.tar.gz: 0e16cbdc30f93ec22996d8f8a00ccf81d8daea1e9487906b6cd087ad91eb13d6
5
5
  SHA512:
6
- metadata.gz: 40722c095a27ed44dbd42e9a0152a4791d6f8d3e3e045762085f59fc0dba02cc487ba43f534cccc4d703a6a85cb1b6ad4e1ca32c45205a0c579589b65dfb4047
7
- data.tar.gz: a0593f571e593bfe1faa313ccc4692900e693377a31d8c292f44dca68d0141ea0411554b3232dbb48aa06d52f9a2cc4730135188e99b7eef0ce632b93495722b
6
+ metadata.gz: c7e6648bee8bc032772b769192d706177b4f0394f57b7a0cacfca19b7d66c6ea1add68da25f51b0face4ea9a7dcd274058733af5e47cdb632e9c9efaaa5bca80
7
+ data.tar.gz: f6a458aa6cc4456bef08c14ec4965a34b5a1a008a6990c3c5b7c6b692c06615a7e97097ccaa6f1c5ea43f2de91981b48a9553faf90f477a3b11353c710f86858
@@ -19,6 +19,10 @@ module Bearcat
19
19
  # Begin a migration to push to associated courses
20
20
  # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.queue_migration
21
21
  post :start_blueprint_migration, "blueprint_templates/:template_id/migrations", defaults: { template_id: 'default' }
22
+
23
+ # List a blueprint's migrations
24
+ # https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.migrations_index
25
+ get :blueprint_template_migrations, "blueprint_templates/:template_id/migrations", defaults: { template_id: 'default' }
22
26
  end
23
27
  end
24
28
  end
@@ -13,6 +13,7 @@ module Bearcat
13
13
  put :edit_quiz
14
14
  post :quiz_extensions, "extensions"
15
15
  get :quiz_questions, "questions"
16
+ post :create_quiz_question, "questions"
16
17
  post :create_quiz_report, "reports"
17
18
  get :get_quiz_report, "reports/:report"
18
19
  end
@@ -0,0 +1,11 @@
1
+ #!lua name=bearcat_rate_limiting
2
+
3
+ local function checkin_time(keys, args)
4
+ local return_time = args[1]
5
+ local true_remaining = args[2]
6
+
7
+ local hash = keys[1]
8
+ return redis.call('HGET', hash, '_last_modified_')
9
+ end
10
+
11
+ redis.register_function('my_hset', my_hset)
@@ -11,8 +11,8 @@ module Bearcat
11
11
  KNOWN_REDIS_URL_ENVS = %w[REDIS_URL REDISTOGO_URL REDISCLOUD_URL].freeze
12
12
 
13
13
  class << self
14
- def configured?(prefix, explicit: false)
15
- determine_redis_provider(prefix: prefix, explicit: true)
14
+ def configured?(prefix, explicit: true)
15
+ determine_redis_provider(prefix: prefix, explicit: explicit).present?
16
16
  end
17
17
 
18
18
  def create(options = {})
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.5.24' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.5.26' unless defined?(Bearcat::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.24
4
+ version: 1.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-14 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -220,6 +220,7 @@ files:
220
220
  - lib/bearcat/client/users.rb
221
221
  - lib/bearcat/client_module.rb
222
222
  - lib/bearcat/rate_limiting.rb
223
+ - lib/bearcat/rate_limiting/functions.lua
223
224
  - lib/bearcat/rate_limiting/increment_bucket.lua
224
225
  - lib/bearcat/rate_limiting/redis_script.rb
225
226
  - lib/bearcat/redis_connection.rb
@@ -427,10 +428,10 @@ files:
427
428
  - spec/fixtures/user_page_views.json
428
429
  - spec/fixtures/user_profile.json
429
430
  - spec/helper.rb
430
- homepage:
431
+ homepage:
431
432
  licenses: []
432
433
  metadata: {}
433
- post_install_message:
434
+ post_install_message:
434
435
  rdoc_options: []
435
436
  require_paths:
436
437
  - lib
@@ -445,199 +446,199 @@ required_rubygems_version: !ruby/object:Gem::Requirement
445
446
  - !ruby/object:Gem::Version
446
447
  version: '0'
447
448
  requirements: []
448
- rubygems_version: 3.4.10
449
- signing_key:
449
+ rubygems_version: 3.1.6
450
+ signing_key:
450
451
  specification_version: 4
451
452
  summary: Canvas API
452
453
  test_files:
454
+ - spec/bearcat_spec.rb
455
+ - spec/helper.rb
456
+ - spec/bearcat/client_spec.rb
453
457
  - spec/bearcat/api_array_spec.rb
454
- - spec/bearcat/client/accounts_spec.rb
455
- - spec/bearcat/client/analytics_spec.rb
456
- - spec/bearcat/client/assignment_groups_spec.rb
457
- - spec/bearcat/client/assignments_spec.rb
458
+ - spec/bearcat/client/external_tools_spec.rb
459
+ - spec/bearcat/client/groups_spec.rb
460
+ - spec/bearcat/client/outcomes_spec.rb
461
+ - spec/bearcat/client/submissions_spec.rb
462
+ - spec/bearcat/client/sections_spec.rb
458
463
  - spec/bearcat/client/blueprint_courses_spec.rb
459
- - spec/bearcat/client/calendar_events_spec.rb
460
- - spec/bearcat/client/canvas_files_spec.rb
464
+ - spec/bearcat/client/outcome_groups_spec.rb
465
+ - spec/bearcat/client/quizzes_spec.rb
461
466
  - spec/bearcat/client/conferences_spec.rb
462
- - spec/bearcat/client/content_exports_spec.rb
463
- - spec/bearcat/client/content_migrations_spec.rb
464
- - spec/bearcat/client/conversations_spec.rb
465
- - spec/bearcat/client/courses_spec.rb
466
- - spec/bearcat/client/custom_gradebook_columns_spec.rb
467
- - spec/bearcat/client/discussions_spec.rb
468
- - spec/bearcat/client/enrollments_spec.rb
469
- - spec/bearcat/client/external_tools_spec.rb
470
- - spec/bearcat/client/files_spec.rb
471
- - spec/bearcat/client/folders_spec.rb
472
- - spec/bearcat/client/graph_ql_spec.rb
467
+ - spec/bearcat/client/search_spec.rb
468
+ - spec/bearcat/client/reports_spec.rb
473
469
  - spec/bearcat/client/group_categories_spec.rb
470
+ - spec/bearcat/client/content_migrations_spec.rb
471
+ - spec/bearcat/client/assignments_spec.rb
474
472
  - spec/bearcat/client/group_membership_spec.rb
475
- - spec/bearcat/client/group_memberships_spec.rb
476
- - spec/bearcat/client/groups_spec.rb
477
- - spec/bearcat/client/learning_outcomes_spec.rb
473
+ - spec/bearcat/client/analytics_spec.rb
478
474
  - spec/bearcat/client/module_items_spec.rb
479
475
  - spec/bearcat/client/modules_spec.rb
480
- - spec/bearcat/client/o_auth2_spec.rb
481
- - spec/bearcat/client/outcome_groups_spec.rb
482
- - spec/bearcat/client/outcomes_spec.rb
483
- - spec/bearcat/client/pages_spec.rb
484
- - spec/bearcat/client/quizzes_spec.rb
485
- - spec/bearcat/client/reports_spec.rb
476
+ - spec/bearcat/client/rubric_association_spec.rb
486
477
  - spec/bearcat/client/roles_spec.rb
487
478
  - spec/bearcat/client/rubric_assessment_spec.rb
488
- - spec/bearcat/client/rubric_association_spec.rb
479
+ - spec/bearcat/client/folders_spec.rb
489
480
  - spec/bearcat/client/rubric_spec.rb
490
- - spec/bearcat/client/search_spec.rb
491
- - spec/bearcat/client/sections_spec.rb
492
- - spec/bearcat/client/submissions_spec.rb
481
+ - spec/bearcat/client/files_spec.rb
482
+ - spec/bearcat/client/accounts_spec.rb
483
+ - spec/bearcat/client/canvas_files_spec.rb
484
+ - spec/bearcat/client/pages_spec.rb
485
+ - spec/bearcat/client/content_exports_spec.rb
486
+ - spec/bearcat/client/graph_ql_spec.rb
487
+ - spec/bearcat/client/o_auth2_spec.rb
488
+ - spec/bearcat/client/courses_spec.rb
489
+ - spec/bearcat/client/custom_gradebook_columns_spec.rb
490
+ - spec/bearcat/client/enrollments_spec.rb
491
+ - spec/bearcat/client/conversations_spec.rb
492
+ - spec/bearcat/client/learning_outcomes_spec.rb
493
+ - spec/bearcat/client/group_memberships_spec.rb
493
494
  - spec/bearcat/client/users_spec.rb
494
- - spec/bearcat/client_spec.rb
495
+ - spec/bearcat/client/calendar_events_spec.rb
496
+ - spec/bearcat/client/assignment_groups_spec.rb
497
+ - spec/bearcat/client/discussions_spec.rb
495
498
  - spec/bearcat/rate_limiting_spec.rb
496
499
  - spec/bearcat/stub_bearcat_spec.rb
497
- - spec/bearcat_spec.rb
498
- - spec/fixtures/access_token.json
499
- - spec/fixtures/account_admin_create.json
500
- - spec/fixtures/account_admin_delete.json
501
- - spec/fixtures/account_admins.json
502
- - spec/fixtures/account_courses.json
503
- - spec/fixtures/account_grading_standards.json
504
- - spec/fixtures/account_groups.json
505
- - spec/fixtures/account_reports.json
506
- - spec/fixtures/account_reports_index.json
507
- - spec/fixtures/account_reports_result_success.json
508
- - spec/fixtures/account_reports_start_result.json
509
- - spec/fixtures/account_role.json
510
- - spec/fixtures/account_roles.json
511
- - spec/fixtures/account_sis_imports.json
512
- - spec/fixtures/account_sub_accounts.json
513
- - spec/fixtures/account_user.json
514
- - spec/fixtures/account_users.json
515
- - spec/fixtures/accounts.json
516
- - spec/fixtures/add_custom_user_data.json
517
500
  - spec/fixtures/add_user.json
518
- - spec/fixtures/assignment.json
501
+ - spec/fixtures/calendar_event.json
519
502
  - spec/fixtures/assignment_group.json
520
- - spec/fixtures/assignment_groups.json
521
- - spec/fixtures/assignment_section_override.json
522
- - spec/fixtures/assignments.json
523
- - spec/fixtures/bearcat.jpg
524
- - spec/fixtures/blueprint_migration.json
525
- - spec/fixtures/blueprint_subscriptions.json
526
- - spec/fixtures/blueprint_template.json
503
+ - spec/fixtures/outcome_result.json
504
+ - spec/fixtures/pages.json
505
+ - spec/fixtures/course_grading_standards.json
506
+ - spec/fixtures/user_avatars.json
507
+ - spec/fixtures/account_user.json
508
+ - spec/fixtures/course_folder.json
509
+ - spec/fixtures/rubric_association.json
510
+ - spec/fixtures/outcome_group_import.json
511
+ - spec/fixtures/edited_group_category.json
512
+ - spec/fixtures/course_copy.json
513
+ - spec/fixtures/single_account.json
514
+ - spec/fixtures/module.json
527
515
  - spec/fixtures/blueprint_update_assocations_success.json
528
- - spec/fixtures/calendar_event.json
529
- - spec/fixtures/calendar_events.json
530
- - spec/fixtures/canvas_files/declare_file.json
531
- - spec/fixtures/canvas_files/upload_success.json
516
+ - spec/fixtures/account_admin_create.json
532
517
  - spec/fixtures/cc.imscc
533
- - spec/fixtures/communication_channels.json
534
- - spec/fixtures/conclude_enrollment.json
535
- - spec/fixtures/content_export.json
536
- - spec/fixtures/content_migration_files/content_migration.json
537
- - spec/fixtures/content_migration_files/response.json
538
- - spec/fixtures/content_migration_files/upload_success.json
518
+ - spec/fixtures/discussion_topics.json
519
+ - spec/fixtures/account_sub_accounts.json
520
+ - spec/fixtures/created_group_category.json
521
+ - spec/fixtures/user_page_views.json
522
+ - spec/fixtures/delete_custom_data_scope.json
523
+ - spec/fixtures/file.csv
524
+ - spec/fixtures/dashboard.json
525
+ - spec/fixtures/submissions/submission.json
526
+ - spec/fixtures/create_course_discussion.json
539
527
  - spec/fixtures/conversation.json
540
- - spec/fixtures/course.json
541
- - spec/fixtures/course_conferences.json
542
- - spec/fixtures/course_copy.json
543
- - spec/fixtures/course_enrollments.json
528
+ - spec/fixtures/communication_channels.json
529
+ - spec/fixtures/account_users.json
530
+ - spec/fixtures/accounts.json
531
+ - spec/fixtures/deleted_group.json
544
532
  - spec/fixtures/course_files.json
545
- - spec/fixtures/course_folder.json
546
- - spec/fixtures/course_folders.json
547
- - spec/fixtures/course_grading_standards.json
548
- - spec/fixtures/course_groups.json
549
- - spec/fixtures/course_sections.json
550
- - spec/fixtures/course_settings.json
551
- - spec/fixtures/course_students.json
552
- - spec/fixtures/create_course_discussion.json
553
- - spec/fixtures/create_group_discussion.json
554
- - spec/fixtures/create_outcome_in_group.json
555
- - spec/fixtures/create_section.json
556
- - spec/fixtures/created_assignment.json
557
- - spec/fixtures/created_course.json
558
- - spec/fixtures/created_group.json
559
- - spec/fixtures/created_group_category.json
560
- - spec/fixtures/created_group_membership.json
561
- - spec/fixtures/created_module.json
562
- - spec/fixtures/custom_data.json
563
- - spec/fixtures/custom_food_data.json
564
- - spec/fixtures/custom_gradebook_columns/column_data.json
565
- - spec/fixtures/custom_gradebook_columns/custom_gradebook_column.json
533
+ - spec/fixtures/group_membership.json
534
+ - spec/fixtures/content_migration_files/upload_success.json
535
+ - spec/fixtures/content_migration_files/response.json
536
+ - spec/fixtures/content_migration_files/content_migration.json
537
+ - spec/fixtures/outcome_subgroup.json
538
+ - spec/fixtures/gradebook_history.json
566
539
  - spec/fixtures/custom_gradebook_columns/custom_gradebook_columns.json
567
540
  - spec/fixtures/custom_gradebook_columns/gradebook_column_progress.json
568
- - spec/fixtures/dashboard.json
569
- - spec/fixtures/delete_course.json
570
- - spec/fixtures/delete_custom_data_scope.json
571
- - spec/fixtures/delete_group_category.json
572
- - spec/fixtures/delete_section.json
573
- - spec/fixtures/deleted_conversation.json
574
- - spec/fixtures/deleted_group.json
575
- - spec/fixtures/department_level_participation.json
576
- - spec/fixtures/department_level_statistics.json
577
- - spec/fixtures/discussion_entries.json
541
+ - spec/fixtures/custom_gradebook_columns/column_data.json
542
+ - spec/fixtures/custom_gradebook_columns/custom_gradebook_column.json
543
+ - spec/fixtures/update_section.json
544
+ - spec/fixtures/user_logins.json
545
+ - spec/fixtures/paged_body.json
546
+ - spec/fixtures/course_settings.json
547
+ - spec/fixtures/outcomes.json
578
548
  - spec/fixtures/discussion_entry_replies.json
579
- - spec/fixtures/discussion_topic.json
580
- - spec/fixtures/discussion_topics.json
581
- - spec/fixtures/edited_group.json
582
- - spec/fixtures/edited_group_category.json
583
- - spec/fixtures/enroll_student.json
584
- - spec/fixtures/enrollment_terms.json
585
- - spec/fixtures/external_tool.json
586
- - spec/fixtures/external_tools.json
587
- - spec/fixtures/file.csv
588
- - spec/fixtures/gradebook_history.json
549
+ - spec/fixtures/course_groups.json
550
+ - spec/fixtures/account_reports_start_result.json
551
+ - spec/fixtures/no_custom_data.json
552
+ - spec/fixtures/bearcat.jpg
553
+ - spec/fixtures/report_list.json
589
554
  - spec/fixtures/graph_ql_scores.json
590
- - spec/fixtures/group.json
591
- - spec/fixtures/group_categories.json
592
- - spec/fixtures/group_category.json
555
+ - spec/fixtures/link_unlink_outcome.json
593
556
  - spec/fixtures/group_category_groups.json
594
- - spec/fixtures/group_conferences.json
595
- - spec/fixtures/group_membership.json
557
+ - spec/fixtures/ok.json
558
+ - spec/fixtures/add_custom_user_data.json
559
+ - spec/fixtures/report_status.json
560
+ - spec/fixtures/account_role.json
561
+ - spec/fixtures/account_roles.json
562
+ - spec/fixtures/user_enrollments.json
563
+ - spec/fixtures/course_enrollments.json
596
564
  - spec/fixtures/learning_outcome.json
597
- - spec/fixtures/link_unlink_outcome.json
598
- - spec/fixtures/merge_user.json
599
- - spec/fixtures/module.json
600
- - spec/fixtures/module_item.json
601
- - spec/fixtures/module_item_sequence.json
602
565
  - spec/fixtures/module_items.json
603
- - spec/fixtures/modules.json
604
- - spec/fixtures/no_custom_data.json
605
- - spec/fixtures/ok.json
606
- - spec/fixtures/outcome_group_import.json
607
- - spec/fixtures/outcome_groups.json
608
- - spec/fixtures/outcome_result.json
609
- - spec/fixtures/outcome_subgroup.json
566
+ - spec/fixtures/department_level_participation.json
567
+ - spec/fixtures/group_category.json
568
+ - spec/fixtures/section_enrollments.json
569
+ - spec/fixtures/create_group_discussion.json
570
+ - spec/fixtures/user_profile.json
571
+ - spec/fixtures/external_tools.json
572
+ - spec/fixtures/create_section.json
573
+ - spec/fixtures/assignment_groups.json
610
574
  - spec/fixtures/outcome_subgroups.json
611
- - spec/fixtures/outcomes.json
612
- - spec/fixtures/paged_body.json
613
- - spec/fixtures/pages.json
614
- - spec/fixtures/progress.json
575
+ - spec/fixtures/updated_course.json
576
+ - spec/fixtures/account_sis_imports.json
577
+ - spec/fixtures/account_admins.json
578
+ - spec/fixtures/department_level_statistics.json
579
+ - spec/fixtures/course_folders.json
580
+ - spec/fixtures/account_admin_delete.json
581
+ - spec/fixtures/content_export.json
582
+ - spec/fixtures/enroll_student.json
583
+ - spec/fixtures/external_tool.json
584
+ - spec/fixtures/discussion_entries.json
585
+ - spec/fixtures/assignment.json
586
+ - spec/fixtures/report_history.json
587
+ - spec/fixtures/edited_group.json
588
+ - spec/fixtures/account_reports_index.json
589
+ - spec/fixtures/created_module.json
590
+ - spec/fixtures/account_reports.json
591
+ - spec/fixtures/quizzes/quiz_extension.json
592
+ - spec/fixtures/quizzes/quiz_assignment_override.json
615
593
  - spec/fixtures/quizzes/course_quiz.json
616
- - spec/fixtures/quizzes/course_quiz_questions.json
617
594
  - spec/fixtures/quizzes/course_quizzes.json
618
- - spec/fixtures/quizzes/quiz_assignment_override.json
619
- - spec/fixtures/quizzes/quiz_extension.json
595
+ - spec/fixtures/quizzes/course_quiz_questions.json
596
+ - spec/fixtures/course.json
597
+ - spec/fixtures/search_find_recipients.json
620
598
  - spec/fixtures/reactivate_enrollment.json
621
- - spec/fixtures/report_history.json
622
- - spec/fixtures/report_list.json
623
- - spec/fixtures/report_status.json
599
+ - spec/fixtures/enrollment_terms.json
600
+ - spec/fixtures/created_group_membership.json
624
601
  - spec/fixtures/rubric.json
625
- - spec/fixtures/rubric_assessment.json
626
- - spec/fixtures/rubric_association.json
627
- - spec/fixtures/search_find_recipients.json
602
+ - spec/fixtures/merge_user.json
628
603
  - spec/fixtures/section.json
629
- - spec/fixtures/section_enrollments.json
630
- - spec/fixtures/single_account.json
631
- - spec/fixtures/start_report.json
632
- - spec/fixtures/submissions/submission.json
633
- - spec/fixtures/update_outcome.json
604
+ - spec/fixtures/blueprint_migration.json
605
+ - spec/fixtures/blueprint_subscriptions.json
606
+ - spec/fixtures/create_outcome_in_group.json
607
+ - spec/fixtures/assignments.json
608
+ - spec/fixtures/group_categories.json
609
+ - spec/fixtures/blueprint_template.json
610
+ - spec/fixtures/delete_section.json
634
611
  - spec/fixtures/update_outcome_group.json
635
- - spec/fixtures/update_section.json
636
- - spec/fixtures/updated_course.json
637
- - spec/fixtures/user_avatars.json
612
+ - spec/fixtures/group_conferences.json
613
+ - spec/fixtures/created_group.json
614
+ - spec/fixtures/outcome_groups.json
615
+ - spec/fixtures/progress.json
616
+ - spec/fixtures/delete_course.json
617
+ - spec/fixtures/canvas_files/upload_success.json
618
+ - spec/fixtures/canvas_files/declare_file.json
619
+ - spec/fixtures/account_grading_standards.json
620
+ - spec/fixtures/course_sections.json
621
+ - spec/fixtures/course_conferences.json
638
622
  - spec/fixtures/user_details.json
639
- - spec/fixtures/user_enrollments.json
640
- - spec/fixtures/user_logins.json
641
- - spec/fixtures/user_page_views.json
642
- - spec/fixtures/user_profile.json
643
- - spec/helper.rb
623
+ - spec/fixtures/module_item_sequence.json
624
+ - spec/fixtures/custom_food_data.json
625
+ - spec/fixtures/update_outcome.json
626
+ - spec/fixtures/discussion_topic.json
627
+ - spec/fixtures/group.json
628
+ - spec/fixtures/assignment_section_override.json
629
+ - spec/fixtures/account_reports_result_success.json
630
+ - spec/fixtures/rubric_assessment.json
631
+ - spec/fixtures/calendar_events.json
632
+ - spec/fixtures/deleted_conversation.json
633
+ - spec/fixtures/created_assignment.json
634
+ - spec/fixtures/start_report.json
635
+ - spec/fixtures/conclude_enrollment.json
636
+ - spec/fixtures/custom_data.json
637
+ - spec/fixtures/created_course.json
638
+ - spec/fixtures/account_groups.json
639
+ - spec/fixtures/modules.json
640
+ - spec/fixtures/course_students.json
641
+ - spec/fixtures/access_token.json
642
+ - spec/fixtures/delete_group_category.json
643
+ - spec/fixtures/module_item.json
644
+ - spec/fixtures/account_courses.json