bearcat 1.5.39 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bearcat.gemspec +1 -1
- data/lib/bearcat/client/reports.rb +0 -2
- data/lib/bearcat/client.rb +0 -1
- data/lib/bearcat/version.rb +1 -1
- data/lib/bearcat.rb +4 -8
- data/spec/helper.rb +1 -0
- metadata +166 -169
- data/lib/bearcat/redis_connection.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c07b05ef9a13345ec573729530858cfc0572aaf1e81f8b708b7c4e809d16635
|
4
|
+
data.tar.gz: 62f84a5dff7c6f990caff1b026c7756eb7669f60b08a5db9a53d88a2ba70adfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80ab1c45eab1f52f7951155926a0286d622b1cc300330e7fc9f467304786bff985f7c37edcd480b6a5db2c271603c50a7cfbd40f3f8aa19b9c957deb60a664b9
|
7
|
+
data.tar.gz: c596d8cc4dfa6af924515e75fc2eaa3184a6e8134375bea0513247afab1900899373de0f94e965ec7b989b5c592afe8b6640a773dd2b38995cd16d2ab7e4991b
|
data/bearcat.gemspec
CHANGED
data/lib/bearcat/client.rb
CHANGED
data/lib/bearcat/version.rb
CHANGED
data/lib/bearcat.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'bearcat/version'
|
2
2
|
require 'bearcat/client'
|
3
|
-
require 'bearcat/redis_connection'
|
4
3
|
|
5
4
|
module Bearcat
|
6
5
|
class << self
|
@@ -37,15 +36,12 @@ module Bearcat
|
|
37
36
|
end
|
38
37
|
|
39
38
|
def redis_pool
|
40
|
-
require '
|
41
|
-
@redis_pool ||=
|
39
|
+
require 'rediconn'
|
40
|
+
@redis_pool ||= RediConn::RedisConnection.create(env_prefix: "BEARCAT")
|
42
41
|
end
|
43
42
|
|
44
|
-
def redis
|
45
|
-
|
46
|
-
redis_pool.with do |conn|
|
47
|
-
yield conn
|
48
|
-
end
|
43
|
+
def redis(&blk)
|
44
|
+
redis_pool.lazy_with(&blk)
|
49
45
|
end
|
50
46
|
end
|
51
47
|
end
|
data/spec/helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure CustomDev
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2025-09-10 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: rake
|
@@ -136,25 +137,19 @@ dependencies:
|
|
136
137
|
- !ruby/object:Gem::Version
|
137
138
|
version: 0.2.2
|
138
139
|
- !ruby/object:Gem::Dependency
|
139
|
-
name:
|
140
|
+
name: rediconn
|
140
141
|
requirement: !ruby/object:Gem::Requirement
|
141
142
|
requirements:
|
142
|
-
- - "
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: 2.2.0
|
145
|
-
- - "<"
|
143
|
+
- - "~>"
|
146
144
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
145
|
+
version: 0.1.0
|
148
146
|
type: :runtime
|
149
147
|
prerelease: false
|
150
148
|
version_requirements: !ruby/object:Gem::Requirement
|
151
149
|
requirements:
|
152
|
-
- - "
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 2.2.0
|
155
|
-
- - "<"
|
150
|
+
- - "~>"
|
156
151
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
152
|
+
version: 0.1.0
|
158
153
|
description: Ruby interface for interacting with the canvas API
|
159
154
|
email:
|
160
155
|
- pseng@instructure.com
|
@@ -223,7 +218,6 @@ files:
|
|
223
218
|
- lib/bearcat/rate_limiting/functions.lua
|
224
219
|
- lib/bearcat/rate_limiting/increment_bucket.lua
|
225
220
|
- lib/bearcat/rate_limiting/redis_script.rb
|
226
|
-
- lib/bearcat/redis_connection.rb
|
227
221
|
- lib/bearcat/spec_helpers.rb
|
228
222
|
- lib/bearcat/version.rb
|
229
223
|
- lib/catalogcat.rb
|
@@ -428,8 +422,10 @@ files:
|
|
428
422
|
- spec/fixtures/user_page_views.json
|
429
423
|
- spec/fixtures/user_profile.json
|
430
424
|
- spec/helper.rb
|
425
|
+
homepage:
|
431
426
|
licenses: []
|
432
427
|
metadata: {}
|
428
|
+
post_install_message:
|
433
429
|
rdoc_options: []
|
434
430
|
require_paths:
|
435
431
|
- lib
|
@@ -444,198 +440,199 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
444
440
|
- !ruby/object:Gem::Version
|
445
441
|
version: '0'
|
446
442
|
requirements: []
|
447
|
-
rubygems_version: 3.6
|
443
|
+
rubygems_version: 3.1.6
|
444
|
+
signing_key:
|
448
445
|
specification_version: 4
|
449
446
|
summary: Canvas API
|
450
447
|
test_files:
|
448
|
+
- spec/bearcat_spec.rb
|
449
|
+
- spec/bearcat/client_spec.rb
|
451
450
|
- spec/bearcat/api_array_spec.rb
|
452
|
-
- spec/bearcat/
|
453
|
-
- spec/bearcat/
|
454
|
-
- spec/bearcat/client/assignment_groups_spec.rb
|
455
|
-
- spec/bearcat/client/assignments_spec.rb
|
456
|
-
- spec/bearcat/client/blueprint_courses_spec.rb
|
457
|
-
- spec/bearcat/client/calendar_events_spec.rb
|
451
|
+
- spec/bearcat/rate_limiting_spec.rb
|
452
|
+
- spec/bearcat/stub_bearcat_spec.rb
|
458
453
|
- spec/bearcat/client/canvas_files_spec.rb
|
454
|
+
- spec/bearcat/client/folders_spec.rb
|
459
455
|
- spec/bearcat/client/conferences_spec.rb
|
460
|
-
- spec/bearcat/client/content_exports_spec.rb
|
461
|
-
- spec/bearcat/client/content_migrations_spec.rb
|
462
456
|
- spec/bearcat/client/conversations_spec.rb
|
463
|
-
- spec/bearcat/client/
|
464
|
-
- spec/bearcat/client/
|
457
|
+
- spec/bearcat/client/outcome_groups_spec.rb
|
458
|
+
- spec/bearcat/client/assignment_groups_spec.rb
|
459
|
+
- spec/bearcat/client/assignments_spec.rb
|
460
|
+
- spec/bearcat/client/rubric_association_spec.rb
|
461
|
+
- spec/bearcat/client/o_auth2_spec.rb
|
462
|
+
- spec/bearcat/client/search_spec.rb
|
463
|
+
- spec/bearcat/client/calendar_events_spec.rb
|
464
|
+
- spec/bearcat/client/group_memberships_spec.rb
|
465
|
+
- spec/bearcat/client/pages_spec.rb
|
466
|
+
- spec/bearcat/client/modules_spec.rb
|
465
467
|
- spec/bearcat/client/discussions_spec.rb
|
466
|
-
- spec/bearcat/client/enrollments_spec.rb
|
467
|
-
- spec/bearcat/client/external_tools_spec.rb
|
468
468
|
- spec/bearcat/client/files_spec.rb
|
469
|
-
- spec/bearcat/client/
|
469
|
+
- spec/bearcat/client/roles_spec.rb
|
470
470
|
- spec/bearcat/client/graph_ql_spec.rb
|
471
471
|
- spec/bearcat/client/group_categories_spec.rb
|
472
|
-
- spec/bearcat/client/
|
473
|
-
- spec/bearcat/client/
|
474
|
-
- spec/bearcat/client/
|
475
|
-
- spec/bearcat/client/learning_outcomes_spec.rb
|
472
|
+
- spec/bearcat/client/rubric_assessment_spec.rb
|
473
|
+
- spec/bearcat/client/blueprint_courses_spec.rb
|
474
|
+
- spec/bearcat/client/submissions_spec.rb
|
476
475
|
- spec/bearcat/client/module_items_spec.rb
|
477
|
-
- spec/bearcat/client/
|
478
|
-
- spec/bearcat/client/
|
479
|
-
- spec/bearcat/client/
|
476
|
+
- spec/bearcat/client/content_migrations_spec.rb
|
477
|
+
- spec/bearcat/client/custom_gradebook_columns_spec.rb
|
478
|
+
- spec/bearcat/client/enrollments_spec.rb
|
479
|
+
- spec/bearcat/client/analytics_spec.rb
|
480
|
+
- spec/bearcat/client/content_exports_spec.rb
|
481
|
+
- spec/bearcat/client/external_tools_spec.rb
|
482
|
+
- spec/bearcat/client/rubric_spec.rb
|
483
|
+
- spec/bearcat/client/accounts_spec.rb
|
484
|
+
- spec/bearcat/client/learning_outcomes_spec.rb
|
480
485
|
- spec/bearcat/client/outcomes_spec.rb
|
481
|
-
- spec/bearcat/client/
|
482
|
-
- spec/bearcat/client/quizzes_spec.rb
|
486
|
+
- spec/bearcat/client/courses_spec.rb
|
483
487
|
- spec/bearcat/client/reports_spec.rb
|
484
|
-
- spec/bearcat/client/roles_spec.rb
|
485
|
-
- spec/bearcat/client/rubric_assessment_spec.rb
|
486
|
-
- spec/bearcat/client/rubric_association_spec.rb
|
487
|
-
- spec/bearcat/client/rubric_spec.rb
|
488
|
-
- spec/bearcat/client/search_spec.rb
|
489
|
-
- spec/bearcat/client/sections_spec.rb
|
490
|
-
- spec/bearcat/client/submissions_spec.rb
|
491
488
|
- spec/bearcat/client/users_spec.rb
|
492
|
-
- spec/bearcat/
|
493
|
-
- spec/bearcat/
|
494
|
-
- spec/bearcat/
|
495
|
-
- spec/
|
496
|
-
- spec/
|
497
|
-
- spec/fixtures/account_admin_create.json
|
498
|
-
- spec/fixtures/account_admin_delete.json
|
499
|
-
- spec/fixtures/account_admins.json
|
500
|
-
- spec/fixtures/account_courses.json
|
489
|
+
- spec/bearcat/client/sections_spec.rb
|
490
|
+
- spec/bearcat/client/group_membership_spec.rb
|
491
|
+
- spec/bearcat/client/groups_spec.rb
|
492
|
+
- spec/bearcat/client/quizzes_spec.rb
|
493
|
+
- spec/helper.rb
|
501
494
|
- spec/fixtures/account_grading_standards.json
|
502
|
-
- spec/fixtures/account_groups.json
|
503
|
-
- spec/fixtures/account_reports.json
|
504
|
-
- spec/fixtures/account_reports_index.json
|
505
|
-
- spec/fixtures/account_reports_result_success.json
|
506
|
-
- spec/fixtures/account_reports_start_result.json
|
507
|
-
- spec/fixtures/account_role.json
|
508
|
-
- spec/fixtures/account_roles.json
|
509
|
-
- spec/fixtures/account_sis_imports.json
|
510
|
-
- spec/fixtures/account_sub_accounts.json
|
511
|
-
- spec/fixtures/account_user.json
|
512
|
-
- spec/fixtures/account_users.json
|
513
|
-
- spec/fixtures/accounts.json
|
514
495
|
- spec/fixtures/add_custom_user_data.json
|
515
|
-
- spec/fixtures/add_user.json
|
516
|
-
- spec/fixtures/assignment.json
|
517
496
|
- spec/fixtures/assignment_group.json
|
518
|
-
- spec/fixtures/
|
519
|
-
- spec/fixtures/
|
497
|
+
- spec/fixtures/account_groups.json
|
498
|
+
- spec/fixtures/update_outcome.json
|
499
|
+
- spec/fixtures/section_enrollments.json
|
500
|
+
- spec/fixtures/outcome_groups.json
|
520
501
|
- spec/fixtures/assignments.json
|
502
|
+
- spec/fixtures/course_files.json
|
503
|
+
- spec/fixtures/assignment_section_override.json
|
504
|
+
- spec/fixtures/delete_course.json
|
505
|
+
- spec/fixtures/course_folder.json
|
506
|
+
- spec/fixtures/ok.json
|
507
|
+
- spec/fixtures/account_sub_accounts.json
|
508
|
+
- spec/fixtures/course_sections.json
|
509
|
+
- spec/fixtures/merge_user.json
|
521
510
|
- spec/fixtures/bearcat.jpg
|
522
|
-
- spec/fixtures/
|
523
|
-
- spec/fixtures/
|
524
|
-
- spec/fixtures/
|
525
|
-
- spec/fixtures/
|
526
|
-
- spec/fixtures/calendar_event.json
|
527
|
-
- spec/fixtures/calendar_events.json
|
528
|
-
- spec/fixtures/canvas_files/declare_file.json
|
529
|
-
- spec/fixtures/canvas_files/upload_success.json
|
530
|
-
- spec/fixtures/cc.imscc
|
511
|
+
- spec/fixtures/create_group_discussion.json
|
512
|
+
- spec/fixtures/course_enrollments.json
|
513
|
+
- spec/fixtures/account_users.json
|
514
|
+
- spec/fixtures/no_custom_data.json
|
531
515
|
- spec/fixtures/communication_channels.json
|
532
|
-
- spec/fixtures/
|
533
|
-
- spec/fixtures/
|
516
|
+
- spec/fixtures/edited_group_category.json
|
517
|
+
- spec/fixtures/rubric_assessment.json
|
518
|
+
- spec/fixtures/paged_body.json
|
519
|
+
- spec/fixtures/canvas_files/upload_success.json
|
520
|
+
- spec/fixtures/canvas_files/declare_file.json
|
521
|
+
- spec/fixtures/account_reports.json
|
522
|
+
- spec/fixtures/outcomes.json
|
523
|
+
- spec/fixtures/search_find_recipients.json
|
524
|
+
- spec/fixtures/content_migration_files/upload_success.json
|
534
525
|
- spec/fixtures/content_migration_files/content_migration.json
|
535
526
|
- spec/fixtures/content_migration_files/response.json
|
536
|
-
- spec/fixtures/
|
537
|
-
- spec/fixtures/conversation.json
|
538
|
-
- spec/fixtures/course.json
|
527
|
+
- spec/fixtures/created_assignment.json
|
539
528
|
- spec/fixtures/course_conferences.json
|
540
|
-
- spec/fixtures/course_copy.json
|
541
|
-
- spec/fixtures/course_enrollments.json
|
542
|
-
- spec/fixtures/course_files.json
|
543
|
-
- spec/fixtures/course_folder.json
|
544
|
-
- spec/fixtures/course_folders.json
|
545
|
-
- spec/fixtures/course_grading_standards.json
|
546
|
-
- spec/fixtures/course_groups.json
|
547
|
-
- spec/fixtures/course_sections.json
|
548
|
-
- spec/fixtures/course_settings.json
|
549
|
-
- spec/fixtures/course_students.json
|
550
|
-
- spec/fixtures/create_course_discussion.json
|
551
|
-
- spec/fixtures/create_group_discussion.json
|
552
529
|
- spec/fixtures/create_outcome_in_group.json
|
553
|
-
- spec/fixtures/
|
554
|
-
- spec/fixtures/created_assignment.json
|
555
|
-
- spec/fixtures/created_course.json
|
556
|
-
- spec/fixtures/created_group.json
|
530
|
+
- spec/fixtures/delete_custom_data_scope.json
|
557
531
|
- spec/fixtures/created_group_category.json
|
558
|
-
- spec/fixtures/
|
559
|
-
- spec/fixtures/
|
532
|
+
- spec/fixtures/created_course.json
|
533
|
+
- spec/fixtures/assignment_groups.json
|
534
|
+
- spec/fixtures/section.json
|
535
|
+
- spec/fixtures/create_section.json
|
536
|
+
- spec/fixtures/user_page_views.json
|
537
|
+
- spec/fixtures/account_admin_create.json
|
538
|
+
- spec/fixtures/assignment.json
|
539
|
+
- spec/fixtures/calendar_event.json
|
540
|
+
- spec/fixtures/blueprint_subscriptions.json
|
541
|
+
- spec/fixtures/blueprint_update_assocations_success.json
|
542
|
+
- spec/fixtures/course.json
|
543
|
+
- spec/fixtures/rubric_association.json
|
544
|
+
- spec/fixtures/external_tools.json
|
545
|
+
- spec/fixtures/conversation.json
|
546
|
+
- spec/fixtures/external_tool.json
|
547
|
+
- spec/fixtures/course_students.json
|
548
|
+
- spec/fixtures/updated_course.json
|
549
|
+
- spec/fixtures/discussion_topics.json
|
550
|
+
- spec/fixtures/user_enrollments.json
|
551
|
+
- spec/fixtures/account_roles.json
|
552
|
+
- spec/fixtures/add_user.json
|
553
|
+
- spec/fixtures/discussion_entry_replies.json
|
554
|
+
- spec/fixtures/report_history.json
|
555
|
+
- spec/fixtures/gradebook_history.json
|
556
|
+
- spec/fixtures/account_sis_imports.json
|
557
|
+
- spec/fixtures/update_section.json
|
558
|
+
- spec/fixtures/conclude_enrollment.json
|
559
|
+
- spec/fixtures/start_report.json
|
560
560
|
- spec/fixtures/custom_data.json
|
561
|
-
- spec/fixtures/
|
562
|
-
- spec/fixtures/
|
563
|
-
- spec/fixtures/
|
564
|
-
- spec/fixtures/
|
565
|
-
- spec/fixtures/
|
566
|
-
- spec/fixtures/
|
567
|
-
- spec/fixtures/
|
568
|
-
- spec/fixtures/delete_custom_data_scope.json
|
561
|
+
- spec/fixtures/rubric.json
|
562
|
+
- spec/fixtures/account_role.json
|
563
|
+
- spec/fixtures/update_outcome_group.json
|
564
|
+
- spec/fixtures/module_item.json
|
565
|
+
- spec/fixtures/report_status.json
|
566
|
+
- spec/fixtures/enroll_student.json
|
567
|
+
- spec/fixtures/group_category.json
|
569
568
|
- spec/fixtures/delete_group_category.json
|
570
|
-
- spec/fixtures/
|
571
|
-
- spec/fixtures/deleted_conversation.json
|
572
|
-
- spec/fixtures/deleted_group.json
|
573
|
-
- spec/fixtures/department_level_participation.json
|
574
|
-
- spec/fixtures/department_level_statistics.json
|
575
|
-
- spec/fixtures/discussion_entries.json
|
576
|
-
- spec/fixtures/discussion_entry_replies.json
|
577
|
-
- spec/fixtures/discussion_topic.json
|
578
|
-
- spec/fixtures/discussion_topics.json
|
569
|
+
- spec/fixtures/dashboard.json
|
579
570
|
- spec/fixtures/edited_group.json
|
580
|
-
- spec/fixtures/
|
581
|
-
- spec/fixtures/
|
582
|
-
- spec/fixtures/enrollment_terms.json
|
583
|
-
- spec/fixtures/external_tool.json
|
584
|
-
- spec/fixtures/external_tools.json
|
571
|
+
- spec/fixtures/department_level_participation.json
|
572
|
+
- spec/fixtures/outcome_result.json
|
585
573
|
- spec/fixtures/file.csv
|
586
|
-
- spec/fixtures/
|
587
|
-
- spec/fixtures/
|
588
|
-
- spec/fixtures/group.json
|
589
|
-
- spec/fixtures/group_categories.json
|
590
|
-
- spec/fixtures/group_category.json
|
591
|
-
- spec/fixtures/group_category_groups.json
|
592
|
-
- spec/fixtures/group_conferences.json
|
593
|
-
- spec/fixtures/group_membership.json
|
594
|
-
- spec/fixtures/learning_outcome.json
|
595
|
-
- spec/fixtures/link_unlink_outcome.json
|
596
|
-
- spec/fixtures/merge_user.json
|
597
|
-
- spec/fixtures/module.json
|
598
|
-
- spec/fixtures/module_item.json
|
574
|
+
- spec/fixtures/course_copy.json
|
575
|
+
- spec/fixtures/user_logins.json
|
599
576
|
- spec/fixtures/module_item_sequence.json
|
577
|
+
- spec/fixtures/course_settings.json
|
578
|
+
- spec/fixtures/enrollment_terms.json
|
579
|
+
- spec/fixtures/blueprint_migration.json
|
580
|
+
- spec/fixtures/cc.imscc
|
581
|
+
- spec/fixtures/user_profile.json
|
582
|
+
- spec/fixtures/create_course_discussion.json
|
583
|
+
- spec/fixtures/custom_food_data.json
|
584
|
+
- spec/fixtures/created_module.json
|
585
|
+
- spec/fixtures/course_groups.json
|
586
|
+
- spec/fixtures/reactivate_enrollment.json
|
587
|
+
- spec/fixtures/blueprint_template.json
|
588
|
+
- spec/fixtures/account_courses.json
|
589
|
+
- spec/fixtures/calendar_events.json
|
590
|
+
- spec/fixtures/submissions/submission.json
|
591
|
+
- spec/fixtures/link_unlink_outcome.json
|
592
|
+
- spec/fixtures/account_reports_index.json
|
600
593
|
- spec/fixtures/module_items.json
|
601
|
-
- spec/fixtures/
|
602
|
-
- spec/fixtures/
|
603
|
-
- spec/fixtures/
|
594
|
+
- spec/fixtures/access_token.json
|
595
|
+
- spec/fixtures/progress.json
|
596
|
+
- spec/fixtures/module.json
|
597
|
+
- spec/fixtures/group_categories.json
|
598
|
+
- spec/fixtures/course_folders.json
|
599
|
+
- spec/fixtures/department_level_statistics.json
|
600
|
+
- spec/fixtures/account_admin_delete.json
|
601
|
+
- spec/fixtures/account_reports_result_success.json
|
602
|
+
- spec/fixtures/deleted_conversation.json
|
603
|
+
- spec/fixtures/learning_outcome.json
|
604
|
+
- spec/fixtures/user_details.json
|
604
605
|
- spec/fixtures/outcome_group_import.json
|
605
|
-
- spec/fixtures/
|
606
|
-
- spec/fixtures/
|
606
|
+
- spec/fixtures/modules.json
|
607
|
+
- spec/fixtures/group.json
|
607
608
|
- spec/fixtures/outcome_subgroup.json
|
608
609
|
- spec/fixtures/outcome_subgroups.json
|
609
|
-
- spec/fixtures/
|
610
|
-
- spec/fixtures/
|
611
|
-
- spec/fixtures/
|
612
|
-
- spec/fixtures/
|
613
|
-
- spec/fixtures/
|
614
|
-
- spec/fixtures/
|
610
|
+
- spec/fixtures/delete_section.json
|
611
|
+
- spec/fixtures/account_user.json
|
612
|
+
- spec/fixtures/accounts.json
|
613
|
+
- spec/fixtures/account_admins.json
|
614
|
+
- spec/fixtures/report_list.json
|
615
|
+
- spec/fixtures/group_membership.json
|
615
616
|
- spec/fixtures/quizzes/course_quizzes.json
|
617
|
+
- spec/fixtures/quizzes/course_quiz_questions.json
|
616
618
|
- spec/fixtures/quizzes/quiz_assignment_override.json
|
617
619
|
- spec/fixtures/quizzes/quiz_extension.json
|
618
|
-
- spec/fixtures/
|
619
|
-
- spec/fixtures/
|
620
|
-
- spec/fixtures/
|
621
|
-
- spec/fixtures/
|
622
|
-
- spec/fixtures/
|
623
|
-
- spec/fixtures/rubric_assessment.json
|
624
|
-
- spec/fixtures/rubric_association.json
|
625
|
-
- spec/fixtures/search_find_recipients.json
|
626
|
-
- spec/fixtures/section.json
|
627
|
-
- spec/fixtures/section_enrollments.json
|
620
|
+
- spec/fixtures/quizzes/course_quiz.json
|
621
|
+
- spec/fixtures/content_export.json
|
622
|
+
- spec/fixtures/created_group.json
|
623
|
+
- spec/fixtures/pages.json
|
624
|
+
- spec/fixtures/discussion_entries.json
|
628
625
|
- spec/fixtures/single_account.json
|
629
|
-
- spec/fixtures/
|
630
|
-
- spec/fixtures/
|
631
|
-
- spec/fixtures/update_outcome.json
|
632
|
-
- spec/fixtures/update_outcome_group.json
|
633
|
-
- spec/fixtures/update_section.json
|
634
|
-
- spec/fixtures/updated_course.json
|
626
|
+
- spec/fixtures/group_category_groups.json
|
627
|
+
- spec/fixtures/created_group_membership.json
|
635
628
|
- spec/fixtures/user_avatars.json
|
636
|
-
- spec/fixtures/
|
637
|
-
- spec/fixtures/
|
638
|
-
- spec/fixtures/
|
639
|
-
- spec/fixtures/
|
640
|
-
- spec/fixtures/
|
641
|
-
- spec/
|
629
|
+
- spec/fixtures/graph_ql_scores.json
|
630
|
+
- spec/fixtures/custom_gradebook_columns/gradebook_column_progress.json
|
631
|
+
- spec/fixtures/custom_gradebook_columns/custom_gradebook_column.json
|
632
|
+
- spec/fixtures/custom_gradebook_columns/custom_gradebook_columns.json
|
633
|
+
- spec/fixtures/custom_gradebook_columns/column_data.json
|
634
|
+
- spec/fixtures/account_reports_start_result.json
|
635
|
+
- spec/fixtures/course_grading_standards.json
|
636
|
+
- spec/fixtures/group_conferences.json
|
637
|
+
- spec/fixtures/discussion_topic.json
|
638
|
+
- spec/fixtures/deleted_group.json
|
@@ -1,106 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "connection_pool"
|
4
|
-
require "redis"
|
5
|
-
require "uri"
|
6
|
-
|
7
|
-
# Adapted from Sidekiq 6.x Implementation
|
8
|
-
|
9
|
-
module Bearcat
|
10
|
-
module RedisConnection
|
11
|
-
KNOWN_REDIS_URL_ENVS = %w[REDIS_URL REDISTOGO_URL REDISCLOUD_URL].freeze
|
12
|
-
|
13
|
-
class << self
|
14
|
-
def configured?(prefix, explicit: true)
|
15
|
-
determine_redis_provider(prefix: prefix, explicit: explicit).present?
|
16
|
-
end
|
17
|
-
|
18
|
-
def create(options = {})
|
19
|
-
symbolized_options = options.transform_keys(&:to_sym)
|
20
|
-
|
21
|
-
if !symbolized_options[:url] && (u = determine_redis_provider(prefix: options[:env_prefix]))
|
22
|
-
symbolized_options[:url] = u
|
23
|
-
end
|
24
|
-
|
25
|
-
size = if symbolized_options[:size]
|
26
|
-
symbolized_options[:size]
|
27
|
-
elsif symbolized_options[:env_prefix] && (v = ENV["#{symbolized_options[:env_prefix]}_REDIS_POOL_SIZE"])
|
28
|
-
Integer(v)
|
29
|
-
elsif ENV["RAILS_MAX_THREADS"]
|
30
|
-
Integer(ENV["RAILS_MAX_THREADS"])
|
31
|
-
else
|
32
|
-
5
|
33
|
-
end
|
34
|
-
|
35
|
-
pool_timeout = symbolized_options[:pool_timeout] || 1
|
36
|
-
|
37
|
-
ConnectionPool.new(timeout: pool_timeout, size: size) do
|
38
|
-
namespace = symbolized_options[:namespace]
|
39
|
-
client = Redis.new client_opts(symbolized_options)
|
40
|
-
|
41
|
-
if namespace
|
42
|
-
begin
|
43
|
-
require "redis/namespace"
|
44
|
-
Redis::Namespace.new(namespace, redis: client)
|
45
|
-
rescue LoadError
|
46
|
-
Rails.logger.error("Your Redis configuration uses the namespace '#{namespace}' but the redis-namespace gem is not included in the Gemfile." \
|
47
|
-
"Add the gem to your Gemfile to continue using a namespace. Otherwise, remove the namespace parameter.")
|
48
|
-
exit(-127)
|
49
|
-
end
|
50
|
-
else
|
51
|
-
client
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
def client_opts(options)
|
59
|
-
opts = options.dup
|
60
|
-
if opts[:namespace]
|
61
|
-
opts.delete(:namespace)
|
62
|
-
end
|
63
|
-
|
64
|
-
opts.delete(:size)
|
65
|
-
opts.delete(:env_prefix)
|
66
|
-
|
67
|
-
if opts[:network_timeout]
|
68
|
-
opts[:timeout] = opts[:network_timeout]
|
69
|
-
opts.delete(:network_timeout)
|
70
|
-
end
|
71
|
-
|
72
|
-
opts[:reconnect_attempts] ||= 1
|
73
|
-
|
74
|
-
opts
|
75
|
-
end
|
76
|
-
|
77
|
-
def determine_redis_provider(prefix: nil, explicit: false)
|
78
|
-
vars = []
|
79
|
-
|
80
|
-
if prefix.present?
|
81
|
-
if (ptr = ENV["#{prefix}_REDIS_PROVIDER"]).present?
|
82
|
-
return ENV[ptr]
|
83
|
-
else
|
84
|
-
vars.push(*KNOWN_REDIS_URL_ENVS.map { |e| ENV["#{prefix}_#{e}"] })
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
if !explicit || !prefix.present?
|
89
|
-
if (ptr = ENV["REDIS_PROVIDER"]).present?
|
90
|
-
vars << ptr # Intentionally not a return
|
91
|
-
else
|
92
|
-
vars.push(*KNOWN_REDIS_URL_ENVS)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
vars.select!(&:present?)
|
97
|
-
|
98
|
-
vars.each do |e|
|
99
|
-
return ENV[e] if ENV[e].present?
|
100
|
-
end
|
101
|
-
|
102
|
-
nil
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|