From bea8b1162cdbf09fedaaee2d1faa2f7c6f35fcc5 Mon Sep 17 00:00:00 2001 From: Dante Soares Date: Fri, 18 Oct 2024 16:39:59 -0500 Subject: [PATCH] Ruby 3 (#1260) * Updated gems for ruby 3 * Rails 6 update (still need to do something about rails-settings-cached and railssettings-ui) * Removed rails-settings-ui but kept rails-settings-cached * Updated to Rails 6.1, updated gems, fixed most warnings * Updated config to 6.1, fixed more warnings * Updated more gems, restored missing access policies inside an after_initialize block * Fixed a bunch of tests, removed render_anywhere * Fix settings and manifest again * Removed spring, removed some legacy tests, fixed database cleaner config * More test fixes * Fixed more tests * Added migration for the Doorkeeper update * Update the Doorkeeper tokens and grants in batches * Fixed a bunch more tests * Fixed more tests, updated openstax_rescue_from * Updated lev, transaction_retry and transaction_isolation to fix more test errors * Fixed remaining tests, normalize describe calls, include ActiveJob::TestHelper everywhere * Added comment about Newflow vs legacy behavior * Attempt to fix bundler error in GH actions * Lock ffi since the latest version has some issue in GH actions * Attempt to fix popup console test * Puma's nakayoshi_fork option was removed * Fix puma crash on OS X * Make belongs_to required by default * Attempt to fix migration test when updating ruby version * Moved puma config around to prevent warning, re-enabled spring, unlocked compass-rails version * Added comment about gssencmode * Removed spring config that's no longer needed * Updated web-console gem, simplified ErrorPageBuilder * Fix error page precompilation in non-prod * Make RescueFrom config match Rails app config for errors Make sure to disable dev routes in prod * Don't ignore rescue_from by default in the test env * Removed is_real_production?, moved the check to the OSU initializer * Added rexml gem to Gemfile * Update to ruby 3.1 but keep Psych 3 for now --- .github/workflows/migrations.yml | 7 +- .github/workflows/tests.yml | 2 +- .ruby-version | 2 +- Gemfile | 68 +- Gemfile.lock | 846 ++++++++++-------- Rakefile | 2 +- app/controllers/admin/users_controller.rb | 2 +- app/controllers/api/v1/users_controller.rb | 18 +- app/controllers/legacy/users_controller.rb | 2 +- app/controllers/newflow/login_controller.rb | 2 +- app/controllers/newflow/signup_controller.rb | 3 + .../oauth/applications_controller.rb | 14 +- app/handlers/signup_start.rb | 2 +- app/models/application_user.rb | 4 +- app/models/contact_info.rb | 1 - app/models/email_address.rb | 6 - app/models/message.rb | 3 +- app/models/message_recipient.rb | 2 +- app/models/pre_auth_state.rb | 2 - app/models/user.rb | 5 +- app/routines/newflow/create_email_for_user.rb | 4 - .../newflow/ensure_unverified_user.rb | 2 +- app/routines/transfer_authentications.rb | 4 +- app/views/faculty_access/apply.html.erb | 12 +- app/views/layouts/admin.html.erb | 2 - app/views/legacy/identities/_set.html.erb | 8 +- .../sessions/_authenticate_options.html.erb | 2 +- app/views/legacy/sessions/start.html.erb | 8 +- app/views/legacy/signup/password.html.erb | 6 +- app/views/legacy/signup/profile.html.erb | 10 +- app/views/legacy/signup/start.html.erb | 8 +- app/views/legacy/signup/verify_email.html.erb | 2 +- bin/rails | 5 +- bin/rake | 5 +- bin/setup | 15 +- bin/spring | 21 +- bin/update | 0 config.ru | 3 +- config/app.yml | 112 --- config/application.rb | 62 +- config/boot.rb | 3 +- config/cable.yml | 2 +- config/database.yml | 1 + config/environment.rb | 11 +- config/environments/development.rb | 25 +- config/environments/production.rb | 114 ++- config/environments/test.rb | 51 +- .../{04-debugger.rb => 1-debugger.rb} | 4 +- .../{constants.rb => 2-constants.rb} | 9 +- .../{05-settings.rb => 3-settings.rb} | 0 config/initializers/4-accounts.rb | 6 + config/initializers/access_policies.rb | 33 +- config/initializers/action_mailer.rb | 20 +- config/initializers/active_job.rb | 2 + config/initializers/apipie.rb | 5 +- .../application_controller_renderer.rb | 8 + config/initializers/assets.rb | 6 +- config/initializers/backtrace_silencers.rb | 7 +- config/initializers/cache_store.rb | 14 + .../initializers/content_security_policy.rb | 28 + config/initializers/controllers.rb | 170 ++-- config/initializers/cors.rb | 14 +- config/initializers/doorkeeper.rb | 2 +- config/initializers/exceptions.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 +- config/initializers/i18n.rb | 3 + config/initializers/inflections.rb | 2 +- config/initializers/lev.rb | 8 +- config/initializers/openstax_utilities.rb | 5 +- config/initializers/permissions_policy.rb | 11 + config/initializers/rails_settings_ui.rb | 30 - config/initializers/rescue_from.rb | 17 +- config/initializers/wrap_parameters.rb | 4 +- config/locales/activerecord.en.yml | 4 +- config/locales/activerecord.pl.yml | 4 +- config/locales/doorkeeper.en.yml | 11 +- config/locales/en.yml | 68 +- config/locales/pl.yml | 3 +- config/puma.rb | 66 +- config/routes.rb | 6 +- config/spring.rb | 12 +- ..._attachments_for_blob_id.active_storage.rb | 10 + ..._to_active_storage_blobs.active_storage.rb | 22 + ..._storage_variant_records.active_storage.rb | 27 + .../20241015172425_set_doorkeeper_scopes.rb | 23 + db/schema.rb | 16 +- lib/error_page_builder.rb | 12 +- lib/json_serialize.rb | 2 +- lib/settings.rb | 137 ++- lib/sso_cookie_jar.rb | 6 +- lib/user_session_management.rb | 2 +- .../contact_info_access_policy_spec.rb | 2 +- .../external_id_access_policy_spec.rb | 18 +- .../identity_access_policy_spec.rb | 2 +- .../user_access_policy_spec.rb | 2 +- ...can_be_set_if_the_Contact_exists_in_SF.yml | 2 +- .../works_on_the_happy_path.yml | 4 +- .../admin/contact_infos_controller_spec.rb | 2 +- .../admin/external_ids_controller_spec.rb | 2 +- .../admin/pre_auth_states_controller_spec.rb | 2 +- .../admin/reports_controller_spec.rb | 2 +- .../admin/security_logs_controller_spec.rb | 2 +- .../admin/users_controller_spec.rb | 2 +- .../v1/application_groups_controller_spec.rb | 2 +- .../v1/application_users_controller_spec.rb | 2 +- .../api/v1/contact_infos_controller_spec.rb | 2 +- .../api/v1/messages_controller_spec.rb | 3 +- .../api/v1/users_controller_spec.rb | 2 +- .../application_controller_spec.rb | 2 +- .../contact_infos_controller_spec.rb | 2 +- spec/controllers/controllers_spec.rb | 2 +- .../authorizations_controller_spec.rb | 16 +- ...ternal_user_credentials_controller_spec.rb | 2 +- .../faculty_access_controller_spec.rb | 2 +- .../educator_signup_controller_spec.rb | 2 +- .../newflow/login_controller_spec.rb | 8 +- .../password_management_controller_spec.rb | 2 +- .../newflow/signup_controller_spec.rb | 2 +- .../newflow/social_auth_controller_spec.rb | 2 +- .../newflow/student_signup_controller_spec.rb | 2 +- spec/controllers/other_controller_spec.rb | 2 +- spec/controllers/terms_controller_spec.rb | 2 +- spec/delayed/worker_spec.rb | 2 +- spec/factories/doorkeeper_access_grant.rb | 3 +- spec/factories/doorkeeper_access_token.rb | 1 + spec/factories/message.rb | 3 +- spec/factories/sheerid_verification.rb | 2 +- spec/features/add_application_spec.rb | 3 +- ...change_salesforce_contact_manually_spec.rb | 5 +- spec/features/admin/create_banners_spec.rb | 3 +- .../admin/oauth_application_crud_spec.rb | 3 +- spec/features/admin/reports_spec.rb | 3 +- spec/features/admin/settings_spec.rb | 21 - spec/features/admin/users_spec.rb | 4 +- spec/features/cache_headers_spec.rb | 4 +- spec/features/log_out_inactive_admins_spec.rb | 14 +- ...ing_and_resetting_password_from_profile.rb | 4 +- .../newflow/educator_signup_flow_spec.rb | 10 +- ..._sign_in_to_change_authentications_spec.rb | 4 +- spec/features/newflow/reset_password_spec.rb | 14 +- .../newflow/student_login_flow_spec.rb | 18 +- .../newflow/student_signup_flow_spec.rb | 63 +- .../newflow/user_cant_sign_in_spec.rb | 12 +- .../newflow/user_claims_account_spec.rb | 1 + ...r_login_signup_with_social_network_spec.rb | 10 +- .../newflow/user_manages_emails_spec.rb | 4 + .../newflow/user_updates_password_spec.rb | 2 +- spec/features/pose_terms_spec.rb | 4 +- spec/features/rate_limit_sign_ins_spec.rb | 30 +- .../remove_accounts_path_prefix_spec.rb | 20 +- .../user_profile_management/README.md | 3 - .../add_social_auth_spec.rb | 67 -- ..._sign_in_to_change_authentications_spec.rb | 127 --- .../user_updates_password_spec.rb | 64 -- .../user_updates_profile_spec.rb | 52 -- .../contact_infos_resend_confirmation_spec.rb | 5 +- .../create_external_user_credentials_spec.rb | 8 +- spec/handlers/messages_create_spec.rb | 3 +- .../newflow/change_signup_email_spec.rb | 5 +- .../newflow/confirm_oauth_info_spec.rb | 4 +- .../educator_signup/sheerid_webhook_spec.rb | 4 +- .../educator_signup/signup_form_spec.rb | 8 +- .../student_signup/signup_form_spec.rb | 8 +- spec/handlers/oauth_callback_spec.rb | 2 +- .../send_reset_password_email_spec.rb | 2 + spec/handlers/sessions_create_spec.rb | 2 +- spec/handlers/signup_password_spec.rb | 2 +- .../signup_profile_instructor_spec.rb | 2 +- spec/handlers/signup_profile_other_spec.rb | 2 +- spec/handlers/signup_profile_student_spec.rb | 2 +- .../newflow/login_signup_helper_spec.rb | 2 +- spec/lib/authenticate_methods_spec.rb | 2 +- spec/lib/domain_mx_validator_spec.rb | 2 +- .../json_and_string_parameter_filter_spec.rb | 2 +- spec/lib/sheerid_api_spec.rb | 2 +- spec/lib/sso_cookie_jar_spec.rb | 2 +- .../lib/tasks/doorkeeper/cleanup_rake_spec.rb | 2 +- ...s_info_to_match_with_consent_forms_spec.rb | 2 +- .../export_users_last_login_date_spec.rb | 2 +- spec/lib/user_session_management_spec.rb | 6 +- spec/mailers/exception_spec.rb | 2 +- spec/models/authentication_spec.rb | 34 +- spec/models/banner_spec.rb | 2 +- spec/models/contact_info_spec.rb | 2 +- spec/models/doorkeeper/application_spec.rb | 2 +- spec/models/external_id_spec.rb | 2 +- spec/models/school_spec.rb | 2 +- spec/models/security_log_spec.rb | 4 +- spec/models/sequential_failure_spec.rb | 2 +- spec/models/user_external_uuid_spec.rb | 2 +- spec/models/user_spec.rb | 11 +- spec/rails_helper.rb | 4 +- .../api/v1/external_id_representer_spec.rb | 2 +- .../api/v1/find_user_representer_spec.rb | 2 +- .../api/v1/user_representer_spec.rb | 2 +- .../api/v1/application_users_requests_spec.rb | 6 +- spec/requests/api/v1/cache_header_spec.rb | 2 +- spec/requests/api/v1/device_id_spec.rb | 3 +- spec/routines/admin/export_users_spec.rb | 2 +- spec/routines/admin/import_users_spec.rb | 2 +- .../admin/search_security_log_spec.rb | 2 +- spec/routines/admin/search_users_spec.rb | 2 +- spec/routines/find_or_create_user_spec.rb | 2 +- .../mark_contact_info_verified_spec.rb | 2 +- .../create_or_update_salesforce_lead_spec.rb | 2 +- .../routines/search_application_users_spec.rb | 2 +- spec/routines/search_users_spec.rb | 4 +- .../send_contact_info_confirmation_spec.rb | 7 + .../routines/transfer_authentications_spec.rb | 3 +- spec/routines/transfer_omniauth_data_spec.rb | 2 +- spec/routines/transfer_pre_auth_state_spec.rb | 2 +- ...pdate_salesforce_assignable_fields_spec.rb | 2 +- .../update_school_salesforce_info_spec.rb | 2 +- .../routines/user_from_pre_auth_state_spec.rb | 2 +- spec/routing/contact_infos_routing_spec.rb | 2 +- .../external_user_credentials_routing_spec.rb | 2 +- spec/routing/users_routing_spec.rb | 2 +- spec/spec_helper.rb | 34 +- spec/support/feature_helpers.rb | 2 +- spec/support/i18n.rb | 4 +- spec/support/newflow_feature_helpers.rb | 10 +- spec/whenever_spec.rb | 2 +- 222 files changed, 1617 insertions(+), 1670 deletions(-) mode change 100644 => 100755 bin/update delete mode 100644 config/app.yml rename config/initializers/{04-debugger.rb => 1-debugger.rb} (84%) rename config/initializers/{constants.rb => 2-constants.rb} (89%) rename config/initializers/{05-settings.rb => 3-settings.rb} (100%) create mode 100644 config/initializers/4-accounts.rb create mode 100644 config/initializers/active_job.rb create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/cache_store.rb create mode 100644 config/initializers/content_security_policy.rb create mode 100644 config/initializers/exceptions.rb create mode 100644 config/initializers/i18n.rb create mode 100644 config/initializers/permissions_policy.rb delete mode 100644 config/initializers/rails_settings_ui.rb create mode 100644 db/migrate/20241004201505_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb create mode 100644 db/migrate/20241008205807_add_service_name_to_active_storage_blobs.active_storage.rb create mode 100644 db/migrate/20241008205808_create_active_storage_variant_records.active_storage.rb create mode 100644 db/migrate/20241015172425_set_doorkeeper_scopes.rb delete mode 100644 spec/features/admin/settings_spec.rb delete mode 100644 spec/features/user_profile_management/README.md delete mode 100644 spec/features/user_profile_management/add_social_auth_spec.rb delete mode 100644 spec/features/user_profile_management/require_recent_sign_in_to_change_authentications_spec.rb delete mode 100644 spec/features/user_profile_management/user_updates_password_spec.rb delete mode 100644 spec/features/user_profile_management/user_updates_profile_spec.rb diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index b256b75d81..87daadf9b8 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -40,7 +40,7 @@ jobs: - run: git checkout HEAD^ - # Install ruby + # Install base commit ruby version - uses: ruby/setup-ruby@v1 with: bundler-cache: true @@ -56,6 +56,11 @@ jobs: bundle exec rails runner '3.times { FactoryBot.create :user }' git checkout --force - + # Install PR ruby version + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + # Migrate the data - name: Migrate env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25525e2aa6..8e2dc73f06 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,4 +39,4 @@ jobs: run: | bundle install --jobs 4 --retry 3 bundle exec rake parallel:create parallel:load_schema parallel:seed --trace - bundle exec rspec ./spec + WORKERS=4 bundle exec rake parallel:spec diff --git a/.ruby-version b/.ruby-version index a4dd9dba4f..9cec7165ab 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.4 +3.1.6 diff --git a/Gemfile b/Gemfile index dc10ed774a..94ac8c47da 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,12 @@ git_source(:github) do |repo_name| end # Rails framework -gem 'rails', '~> 5.2' -gem 'rails-i18n', '~> 5' +gem 'rails', '6.1.7.8' +gem 'rails-i18n' + +# Psych 4 (included in Ruby 3.1) breaks Rails < 7 +# Remove this entry completely when updating to Rails 7 +gem 'psych', '< 4' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', require: false @@ -16,7 +20,7 @@ gem 'bootsnap', require: false gem 'dotenv-rails' # Threaded application server -gem 'puma', '~> 5.6.0' +gem 'puma' # Prevent server memory from growing until OOM gem 'puma_worker_killer' @@ -29,35 +33,40 @@ gem 'pattern-library', git: 'https://github.com/openstax/pattern-library.git', r # Lev framework # - introduces two new concepts: Routines and Handlers -gem 'lev', '~> 10.1.0' - -# Bootstrap front-end framework -gem 'bootstrap-sass', '~> 3.4.1' +gem 'lev', github: 'lml/lev', ref: 'a33c93c83afea63c80b5da6317efec4bfd357df5' +gem 'openstax_transaction_retry', github: 'openstax/transaction_retry', ref: '36e26d0a068756c334b9d1c671d40773bbfc9300' +gem 'openstax_transaction_isolation', github: 'openstax/transaction_isolation', ref: '7387fa091462118704967a7c4b2821cd0f5d9e01' # SCSS stylesheets -gem 'sass-rails', '~> 5.0' +gem 'sass-rails' + +# Bootstrap front-end framework +gem 'bootstrap-sass' # Compass stylesheets -gem 'compass-rails', '~> 3.1.0' +gem 'compass-rails' + +# Prevent deprecation warning coming from Compass in Sass 3.4.20 +gem 'sass', '3.4.19' +gem 'ffi', '< 1.17' # CoffeeScript for .js.coffee assets and views -gem 'coffee-rails', '5.0.0' +gem 'coffee-rails' # JavaScript asset compiler gem 'mini_racer' # JavaScript asset compressor -gem 'uglifier', '>= 1.3.0' +gem 'uglifier' # Nicely-styled static error pages gem 'error_page_assets' -gem 'render_anywhere', require: false # Password hashing -gem 'bcrypt', '~> 3.1.7' +gem 'bcrypt' # OAuth provider -gem 'doorkeeper', '~> 5.1.0' +gem 'doorkeeper' # OAuth clients gem 'omniauth', '~> 1.9' @@ -97,6 +106,7 @@ gem 'smarter_csv' # API documentation gem 'apipie-rails' gem 'maruku' +gem 'rexml' gem 'jbuilder' @@ -110,13 +120,13 @@ gem 'delayed_job_worker_pool' gem 'delayed_job_heartbeat_plugin' # JSON Api builder -gem 'representable', '~> 3.0.0' +gem 'representable' # Keyword search gem 'keyword_search', '~> 1.5.0' # ToS/PP management -gem 'fine_print' +gem 'fine_print', github: 'lml/fine_print', ref: '636023f68e95196dffaf295bfad3ad8051c23542' # Send users back to the correct page after login gem 'action_interceptor' @@ -151,16 +161,13 @@ gem 'awesome_print' gem 'whenever', require: false # Admin toggles -gem 'rails-settings-ui' - -gem 'rails-settings-cached', '0.7.2' -gem 'dry-validation', '0.12.3' +gem 'rails-settings-cached' # Respond to ELB healthchecks in /ping and /ping/ gem 'openstax_healthcheck' # Allow Accounts routes to be accessed under an /accounts prefix (for use in CloudFront) -gem "openstax_path_prefixer", github: "openstax/path_prefixer", ref: "8298c40ec38f132fc23ea946b2b20e855fe73a49" +gem 'openstax_path_prefixer', github: 'openstax/path_prefixer', ref: 'e3edfc70589bc90fcffba63b417260a88c1377d7' # JWE library used by the SSO cookie gem 'json-jwt' @@ -172,7 +179,7 @@ gem 'intl-tel-input-rails', git: 'https://github.com/openstax/intl-tel-input-rai gem 'http_accept_language' # Fast JSON parsing -gem 'oj', '~> 3.7.12' +gem 'oj' # Replace JSON with Oj gem 'oj_mimic_json' @@ -183,9 +190,6 @@ gem 'rack-cors' # Data visualization and query gem 'blazer' -# temp fix until we update old dependencies -# gem "net-http" - group :development, :test do # Run specs in parallel gem 'parallel_tests' @@ -197,9 +201,9 @@ group :development, :test do # # Call 'debugger' anywhere in the code to stop execution and get a debugger console gem 'byebug', require: false - # Debug in VS Code - gem 'ruby-debug-ide', require: false - gem 'debase', require: false + # Debug in VS Code - these do not install properly on the latest OS X + # gem 'ruby-debug-ide', require: false + # gem 'debase', require: false # Use RSpec for tests gem 'rspec-rails' @@ -223,7 +227,7 @@ group :development, :test do gem 'spring' gem 'spring-commands-rspec' gem 'guard-rspec' - gem 'guard-livereload', '~> 2.5', require: false + gem 'guard-livereload', require: false # Stubs HTTP requests gem 'webmock' @@ -232,7 +236,7 @@ group :development, :test do gem 'vcr' # Lint ruby files - gem 'rubocop', '~> 0.76.0', require: false + gem 'rubocop', require: false # Lint RSpec files gem 'rubocop-rspec' @@ -247,7 +251,7 @@ group :development do gem 'listen' # Access an IRB console on exception pages or by using <%= console %> in views - gem 'web-console', '~> 3.7' + gem 'web-console' gem 'i18n-tasks' @@ -263,7 +267,7 @@ group :test do gem 'cgi' # RSpec matchers for convenience - gem 'shoulda-matchers', '~> 3.1' + gem 'shoulda-matchers' # Test database cleanup gem with multiple strategies gem 'database_cleaner' diff --git a/Gemfile.lock b/Gemfile.lock index 50cce74702..9dd659a565 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,29 @@ +GIT + remote: https://github.com/lml/fine_print.git + revision: 636023f68e95196dffaf295bfad3ad8051c23542 + ref: 636023f68e95196dffaf295bfad3ad8051c23542 + specs: + fine_print (6.0.1) + action_interceptor + jquery-rails + rails (< 7) + responders + +GIT + remote: https://github.com/lml/lev.git + revision: a33c93c83afea63c80b5da6317efec4bfd357df5 + ref: a33c93c83afea63c80b5da6317efec4bfd357df5 + specs: + lev (13.0.0) + actionpack (>= 4.2) + active_attr + activejob + activemodel (>= 6.1) + activerecord (>= 4.2) + hashie + openstax_transaction_isolation + openstax_transaction_retry + GIT remote: https://github.com/openstax/intl-tel-input-rails.git revision: 3a63a495822d90bc9ca93e9541ef252fd7a0b50b @@ -9,8 +35,8 @@ GIT GIT remote: https://github.com/openstax/path_prefixer.git - revision: 8298c40ec38f132fc23ea946b2b20e855fe73a49 - ref: 8298c40ec38f132fc23ea946b2b20e855fe73a49 + revision: e3edfc70589bc90fcffba63b417260a88c1377d7 + ref: e3edfc70589bc90fcffba63b417260a88c1377d7 specs: openstax_path_prefixer (0.0.1) addressable @@ -23,128 +49,170 @@ GIT specs: pattern-library (1.1.18) +GIT + remote: https://github.com/openstax/transaction_isolation.git + revision: 7387fa091462118704967a7c4b2821cd0f5d9e01 + ref: 7387fa091462118704967a7c4b2821cd0f5d9e01 + specs: + openstax_transaction_isolation (2.0.0) + activerecord (>= 6) + +GIT + remote: https://github.com/openstax/transaction_retry.git + revision: 36e26d0a068756c334b9d1c671d40773bbfc9300 + ref: 36e26d0a068756c334b9d1c671d40773bbfc9300 + specs: + openstax_transaction_retry (2.0.0) + activerecord (>= 6) + openstax_transaction_isolation (>= 2) + GEM remote: https://rubygems.org/ specs: - action_interceptor (1.2.0) + action_interceptor (1.2.1) addressable rails (>= 3.1) - actioncable (5.2.8.1) - actionpack (= 5.2.8.1) + actioncable (6.1.7.8) + actionpack (= 6.1.7.8) + activesupport (= 6.1.7.8) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.8.1) - actionpack (= 5.2.8.1) - actionview (= 5.2.8.1) - activejob (= 5.2.8.1) + actionmailbox (6.1.7.8) + actionpack (= 6.1.7.8) + activejob (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) + mail (>= 2.7.1) + actionmailer (6.1.7.8) + actionpack (= 6.1.7.8) + actionview (= 6.1.7.8) + activejob (= 6.1.7.8) + activesupport (= 6.1.7.8) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.8.1) - actionview (= 5.2.8.1) - activesupport (= 5.2.8.1) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7.8) + actionview (= 6.1.7.8) + activesupport (= 6.1.7.8) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.8.1) - activesupport (= 5.2.8.1) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.7.8) + actionpack (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) + nokogiri (>= 1.8.5) + actionview (6.1.7.8) + activesupport (= 6.1.7.8) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_attr (0.16.0) - actionpack (>= 3.0.2, < 7.2) - activemodel (>= 3.0.2, < 7.2) - activesupport (>= 3.0.2, < 7.2) - activejob (5.2.8.1) - activesupport (= 5.2.8.1) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + active_attr (0.17.0) + actionpack (>= 3.0.2, < 8.0) + activemodel (>= 3.0.2, < 8.0) + activesupport (>= 3.0.2, < 8.0) + activejob (6.1.7.8) + activesupport (= 6.1.7.8) globalid (>= 0.3.6) - activemodel (5.2.8.1) - activesupport (= 5.2.8.1) - activerecord (5.2.8.1) - activemodel (= 5.2.8.1) - activesupport (= 5.2.8.1) - arel (>= 9.0) - activerecord-import (1.0.8) - activerecord (>= 3.2) - activestorage (5.2.8.1) - actionpack (= 5.2.8.1) - activerecord (= 5.2.8.1) - marcel (~> 1.0.0) - activesupport (5.2.8.1) + activemodel (6.1.7.8) + activesupport (= 6.1.7.8) + activerecord (6.1.7.8) + activemodel (= 6.1.7.8) + activesupport (= 6.1.7.8) + activerecord-import (1.8.1) + activerecord (>= 4.2) + activestorage (6.1.7.8) + actionpack (= 6.1.7.8) + activejob (= 6.1.7.8) + activerecord (= 6.1.7.8) + activesupport (= 6.1.7.8) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.8) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) aes_key_wrap (1.1.0) - apipie-rails (0.5.16) - rails (>= 4.1) - arel (9.0.0) + apipie-rails (1.4.2) + actionpack (>= 5.0) + activesupport (>= 5.0) ast (2.4.2) - autoprefixer-rails (9.6.0) - execjs - awesome_print (1.8.0) + autoprefixer-rails (10.4.19.0) + execjs (~> 2) + awesome_print (1.9.2) aws-eventstream (1.3.0) - aws-partitions (1.968.0) - aws-record (2.5.0) - aws-sdk-dynamodb (~> 1.18) - aws-sdk-autoscaling (1.115.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-partitions (1.987.0) + aws-record (2.13.2) + aws-sdk-dynamodb (~> 1, >= 1.85.0) + aws-sdk-autoscaling (1.121.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-cloudwatch (1.103.0) + aws-sdk-core (~> 3, >= 3.207.0) aws-sigv4 (~> 1.5) - aws-sdk-cloudwatch (1.44.0) - aws-sdk-core (~> 3, >= 3.99.0) - aws-sigv4 (~> 1.1) - aws-sdk-core (3.201.5) + aws-sdk-core (3.209.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-dynamodb (1.53.0) - aws-sdk-core (~> 3, >= 3.99.0) - aws-sigv4 (~> 1.1) - aws-sdk-rails (3.6.0) + aws-sdk-dynamodb (1.125.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-rails (3.13.0) aws-record (~> 2) - aws-sdk-ses (~> 1) - aws-sdk-sqs (~> 1) + aws-sdk-ses (~> 1, >= 1.50.0) + aws-sdk-sesv2 (~> 1, >= 1.34.0) + aws-sdk-sqs (~> 1, >= 1.56.0) aws-sessionstore-dynamodb (~> 2) - concurrent-ruby (~> 1) + concurrent-ruby (>= 1.3.1) railties (>= 5.2.0) - aws-sdk-rds (1.131.0) - aws-sdk-core (~> 3, >= 3.122.0) - aws-sigv4 (~> 1.1) - aws-sdk-ses (1.35.0) - aws-sdk-core (~> 3, >= 3.99.0) - aws-sigv4 (~> 1.1) - aws-sdk-sqs (1.33.0) - aws-sdk-core (~> 3, >= 3.99.0) - aws-sigv4 (~> 1.1) - aws-sessionstore-dynamodb (2.0.1) - aws-sdk-dynamodb (~> 1) - rack (~> 2) - aws-sigv4 (1.9.1) + aws-sdk-rds (1.252.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-ses (1.75.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-sesv2 (1.63.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sdk-sqs (1.86.0) + aws-sdk-core (~> 3, >= 3.207.0) + aws-sigv4 (~> 1.5) + aws-sessionstore-dynamodb (2.2.0) + aws-sdk-dynamodb (~> 1, >= 1.85.0) + rack (>= 2, < 4) + rack-session (>= 1, < 3) + aws-sigv4 (1.10.0) aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) - bcrypt (3.1.18) + bcrypt (3.1.20) + bigdecimal (3.1.8) bindata (2.5.0) bindex (0.8.1) - blazer (2.6.4) + blazer (2.6.5) activerecord (>= 5) chartkick (>= 3.2) railties (>= 5) safely_block (>= 0.1.1) - bootsnap (1.9.1) - msgpack (~> 1.0) + bootsnap (1.18.4) + msgpack (~> 1.2) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) builder (3.3.0) byebug (11.1.3) - capybara (3.35.3) + capybara (3.40.0) addressable + matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) @@ -152,17 +220,19 @@ GEM capybara-email (3.0.2) capybara (>= 2.4, < 4.0) mail - capybara-screenshot (1.0.19) + capybara-screenshot (1.0.26) capybara (>= 1.0, < 4) launchy - cgi (0.3.6) - chartkick (4.2.1) + cgi (0.4.1) + chartkick (5.0.7) + childprocess (5.1.0) + logger (~> 1.5) choice (0.2.0) chronic (0.10.2) chunky_png (1.4.0) codecov (0.6.0) simplecov (>= 0.15, < 0.22) - coderay (1.1.1) + coderay (1.1.3) coffee-rails (5.0.0) coffee-script (>= 2.2.0) railties (>= 5.2.0) @@ -182,92 +252,67 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) - compass-rails (3.1.0) + compass-rails (4.0.0) compass (~> 1.0.0) sass-rails (< 5.1) sprockets (< 4.0) concurrent-ruby (1.3.4) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - css_parser (1.4.5) + css_parser (1.19.0) addressable - database_cleaner (1.8.5) + database_cleaner (2.0.2) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.0) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0.0) + database_cleaner-core (2.0.1) date (3.3.4) - db-query-matchers (0.6.0) - debase (0.2.4.1) - debase-ruby_core_source (>= 0.10.2) - debase-ruby_core_source (0.10.11) + db-query-matchers (0.13.0) + activesupport (>= 4.0, < 7.3) + rspec (>= 3.0) declarative (0.0.20) - declarative-option (0.1.0) - delayed_job (4.1.10) + delayed_job (4.1.12) activesupport (>= 3.0, < 8.0) - delayed_job_active_record (4.1.7) + delayed_job_active_record (4.1.10) activerecord (>= 3.0, < 8.0) delayed_job (>= 3.0, < 5) - delayed_job_heartbeat_plugin (0.4.0) + delayed_job_heartbeat_plugin (0.5.0) delayed_job (>= 4.1.0) delayed_job_active_record (>= 4.1.0) - delayed_job_worker_pool (0.3.0) + delayed_job_worker_pool (1.0.0) delayed_job (>= 3.0, < 4.2) - diff-lcs (1.4.4) + diff-lcs (1.5.1) diffy (3.4.2) - docile (1.4.0) - doorkeeper (5.1.2) + docile (1.4.1) + doorkeeper (5.7.1) railties (>= 5) - dotenv (2.7.6) - dotenv-rails (2.7.6) - dotenv (= 2.7.6) + dotenv (2.8.1) + dotenv-rails (2.8.1) + dotenv (= 2.8.1) railties (>= 3.2) - dry-configurable (0.9.0) - concurrent-ruby (~> 1.0) - dry-core (~> 0.4, >= 0.4.7) - dry-container (0.7.2) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.4.9) - concurrent-ruby (~> 1.0) - dry-equalizer (0.3.0) - dry-inflector (0.2.0) - dry-logic (0.4.2) - dry-container (~> 0.2, >= 0.2.6) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) - dry-types (0.13.4) - concurrent-ruby (~> 1.0) - dry-container (~> 0.3) - dry-core (~> 0.4, >= 0.4.4) - dry-equalizer (~> 0.2) - dry-inflector (~> 0.1, >= 0.1.2) - dry-logic (~> 0.4, >= 0.4.2) - dry-validation (0.12.3) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4.2) - dry-types (~> 0.13.1) - em-websocket (0.5.1) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) - errbase (0.2.2) + http_parser.rb (~> 0) error_page_assets (0.4) erubi (1.13.0) - eventmachine (1.2.0.1) + eventmachine (1.2.7) exception_notification (4.5.0) actionmailer (>= 5.2, < 8) activesupport (>= 5.2, < 8) - execjs (2.8.1) - factory_bot (5.0.2) - activesupport (>= 4.2.0) - factory_bot_rails (5.0.2) - factory_bot (~> 5.0.2) - railties (>= 4.2.0) - faker (2.8.1) - i18n (>= 1.6, < 1.8) - fakeredis (0.6.0) - redis (~> 3.2) - faraday (1.10.3) + execjs (2.9.1) + factory_bot (6.5.0) + activesupport (>= 5.0.0) + factory_bot_rails (6.4.3) + factory_bot (~> 6.4) + railties (>= 5.0.0) + faker (3.4.2) + i18n (>= 1.8.11, < 2) + fakeredis (0.9.2) + redis (~> 4.8) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -294,28 +339,24 @@ GEM faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) - ffi (1.17.0) - fine_print (6.0.1) - action_interceptor - jquery-rails - rails (< 7) - responders - font-awesome-rails (4.7.0.5) - railties (>= 3.2, < 6.1) - formatador (0.2.5) - get_process_mem (0.2.7) + ffi (1.16.3) + font-awesome-rails (4.7.0.8) + railties (>= 3.2, < 8.0) + formatador (1.1.0) + get_process_mem (1.0.0) + bigdecimal (>= 2.0) ffi (~> 1.0) - globalid (1.1.0) - activesupport (>= 5.0) - guard (2.14.0) + globalid (1.2.1) + activesupport (>= 6.1) + guard (2.18.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) + lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) - pry (>= 0.9.12) + pry (>= 0.13.0) shellany (~> 0.0) thor (>= 0.18.1) guard-compat (1.2.1) @@ -324,37 +365,41 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) - guard-rspec (4.7.2) + guard-rspec (4.7.3) guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - hashdiff (1.0.1) + hashdiff (1.1.1) hashie (5.0.0) - highline (2.0.2) + highline (3.1.1) + reline htmlentities (4.3.4) http_accept_language (2.1.1) - http_parser.rb (0.6.0) + http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.7.1) + i18n (1.14.6) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.29) + i18n-tasks (1.0.14) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi highline (>= 2.0.0) i18n - parser (>= 2.2.3.0) + parser (>= 3.2.2.1) rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - jaro_winkler (1.5.3) - jbuilder (2.9.1) - activesupport (>= 4.2.0) + io-console (0.7.2) + jaro_winkler (1.5.6) + jbuilder (2.13.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) jmespath (1.6.2) - jobba (1.4.0) - redis (~> 3.2) + jobba (2.0.0) + oj + redis (>= 4.0) redis-namespace - jquery-rails (4.4.0) + jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -363,29 +408,22 @@ GEM aes_key_wrap bindata httpclient - jwt (2.8.2) + jwt (2.9.3) base64 keyword_search (1.5.0) - knockoutjs-rails (3.5.0) - railties (>= 3.1, < 6) - launchy (2.5.0) - addressable (~> 2.7) - lev (10.1.0) - actionpack (>= 4.2) - active_attr - activejob - activemodel (>= 4.2) - activerecord (>= 4.2) - hashie - transaction_isolation - transaction_retry - libv8-node (16.19.0.1) - libv8-node (16.19.0.1-x86_64-darwin) - libv8-node (16.19.0.1-x86_64-linux) + knockoutjs-rails (3.5.1.1) + railties (>= 3.1) + launchy (3.0.1) + addressable (~> 2.8) + childprocess (~> 5.0) + libv8-node (18.19.0.0) + libv8-node (18.19.0.0-x86_64-darwin) + libv8-node (18.19.0.0-x86_64-linux) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - lograge (0.11.2) + logger (1.6.1) + lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) railties (>= 4) @@ -393,7 +431,7 @@ GEM loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.0.10) + lumberjack (1.2.10) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -401,21 +439,22 @@ GEM net-smtp marcel (1.0.4) maruku (0.7.3) - meta_request (0.7.2) + matrix (0.4.2) + meta_request (0.8.3) rack-contrib (>= 1.1, < 3) - railties (>= 3.0.0, < 7) - method_source (0.8.2) + railties (>= 3.0.0, < 8) + method_source (1.1.0) mini_mime (1.1.5) mini_portile2 (2.8.7) - mini_racer (0.6.4) - libv8-node (~> 16.19.0.0) + mini_racer (0.16.0) + libv8-node (~> 18.19.0.0) minitest (5.25.1) - msgpack (1.5.2) + msgpack (1.7.3) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.4.1) nenv (0.3.0) - net-imap (0.4.15) + net-imap (0.4.16) date net-protocol net-pop (0.1.2) @@ -425,43 +464,53 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.3) - nokogiri (1.15.6) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.6-x86_64-darwin) + nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.6-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) - notiffany (0.1.0) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth (0.5.6) - oauth2 (1.4.4) - faraday (>= 0.8, < 2.0) + oauth (1.1.0) + oauth-tty (~> 1.0, >= 1.0.1) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + oauth-tty (1.0.5) + version_gem (~> 1.1, >= 1.1.1) + oauth2 (1.4.11) + faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - oj (3.7.12) + rack (>= 1.2, < 4) + oj (3.16.6) + bigdecimal (>= 3.0) + ostruct (>= 0.2) oj_mimic_json (1.0.1) omniauth (1.9.2) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-facebook (6.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (0.8.0) + omniauth-facebook (10.0.0) + bigdecimal + omniauth-oauth2 (>= 1.2, < 3) + omniauth-google-oauth2 (0.8.2) jwt (>= 2.0) - omniauth (>= 1.1.1) + oauth2 (~> 1.1) + omniauth (~> 1.1) omniauth-oauth2 (>= 1.6) omniauth-identity (3.0.9) bcrypt omniauth - omniauth-oauth (1.1.0) + omniauth-oauth (1.2.1) oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.6.0) - oauth2 (~> 1.1) - omniauth (~> 1.9) + omniauth (>= 1.0, < 3) + rack (>= 1.6.2, < 4) + omniauth-oauth2 (1.7.3) + oauth2 (>= 1.4, < 3) + omniauth (>= 1.9, < 3) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack @@ -469,26 +518,27 @@ GEM active_attr rails (>= 5.0, < 7.0) restforce - openstax_api (9.4.0) + openstax_api (9.6.1) + addressable doorkeeper exception_notification - lev + lev (>= 12.1.0) openstax_utilities - rails (>= 5.2, < 7) + rails (>= 6, <= 8) representable responders roar - roar-rails + roar-rails (>= 1) uber openstax_healthcheck (1.0.1) rails (>= 3.0) - openstax_rescue_from (4.2.0) + openstax_rescue_from (4.2.2) rails (>= 3.1, < 7.0) - openstax_salesforce (8.0.0) + openstax_salesforce (8.1.0) openstax_active_force rails (>= 5.0, < 7.0) restforce - openstax_utilities (5.1.1) + openstax_utilities (5.1.2) aws-sdk-autoscaling faraday faraday-http-cache @@ -496,160 +546,164 @@ GEM lev rails (>= 5.0, < 8.0) request_store - p3p (1.2.0) - rack - parallel (1.19.2) - parallel_tests (3.1.0) + ostruct (0.6.0) + p3p (2.0.0) + rack (>= 1.6.2) + parallel (1.26.3) + parallel_tests (4.7.2) parallel - parser (3.0.2.0) + parser (3.3.5.0) ast (~> 2.4.1) - pg (0.19.0) - premailer (1.8.7) - css_parser (>= 1.4.5) + racc + pg (1.5.8) + premailer (1.27.0) + addressable + css_parser (>= 1.19.0) htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) + premailer-rails (1.12.0) + actionmailer (>= 3) + net-smtp premailer (~> 1.7, >= 1.7.9) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - public_suffix (5.1.1) - puma (5.6.8) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + psych (3.3.4) + public_suffix (6.0.1) + puma (6.4.3) nio4r (~> 2.0) - puma_worker_killer (0.3.1) - get_process_mem (~> 0.2) + puma_worker_killer (1.0.0) + bigdecimal (>= 2.0) + get_process_mem (>= 0.2) puma (>= 2.7) racc (1.8.1) - rack (2.2.9) + rack (2.2.10) rack-contrib (2.5.0) rack (< 4) - rack-cors (1.1.1) + rack-cors (2.0.2) rack (>= 2.0.0) + rack-session (1.0.2) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (5.2.8.1) - actioncable (= 5.2.8.1) - actionmailer (= 5.2.8.1) - actionpack (= 5.2.8.1) - actionview (= 5.2.8.1) - activejob (= 5.2.8.1) - activemodel (= 5.2.8.1) - activerecord (= 5.2.8.1) - activestorage (= 5.2.8.1) - activesupport (= 5.2.8.1) - bundler (>= 1.3.0) - railties (= 5.2.8.1) + rails (6.1.7.8) + actioncable (= 6.1.7.8) + actionmailbox (= 6.1.7.8) + actionmailer (= 6.1.7.8) + actionpack (= 6.1.7.8) + actiontext (= 6.1.7.8) + actionview (= 6.1.7.8) + activejob (= 6.1.7.8) + activemodel (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) + bundler (>= 1.15.0) + railties (= 6.1.7.8) sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.4) - actionpack (>= 5.0.1.x) - actionview (>= 5.0.1.x) - activesupport (>= 5.0.1.x) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-erd (1.5.2) - activerecord (>= 3.2) - activesupport (>= 3.2) + rails-erd (1.7.2) + activerecord (>= 4.2) + activesupport (>= 4.2) choice (~> 0.2.0) ruby-graphviz (~> 1.2) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - rails-i18n (5.1.3) + rails-i18n (7.0.9) i18n (>= 0.7, < 2) - railties (>= 5.0, < 6) - rails-settings-cached (0.7.2) - rails (>= 4.2.0) - rails-settings-ui (1.3.5) - dry-types - dry-validation (< 1.0) - i18n - rails (>= 3.0) - railties (5.2.8.1) - actionpack (= 5.2.8.1) - activesupport (= 5.2.8.1) + railties (>= 6.0.0, < 8) + rails-settings-cached (2.9.5) + activerecord (>= 5.0.0) + railties (>= 5.0.0) + railties (6.1.7.8) + actionpack (= 6.1.7.8) + activesupport (= 6.1.7.8) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) + rake (>= 12.2) + thor (~> 1.0) + rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - redis (3.3.5) - redis-actionpack (5.0.2) - actionpack (>= 4.0, < 6) - redis-rack (>= 1, < 3) + redis (4.8.1) + redis-actionpack (5.4.0) + actionpack (>= 5, < 8) + redis-rack (>= 2.1.0, < 4) redis-store (>= 1.1.0, < 2) - redis-activesupport (5.0.4) - activesupport (>= 3, < 6) + redis-activesupport (5.3.0) + activesupport (>= 3, < 8) redis-store (>= 1.3, < 2) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (2.0.4) - rack (>= 1.5, < 3) + redis-namespace (1.11.0) + redis (>= 4) + redis-rack (3.0.0) + rack-session (>= 0.2.0) redis-store (>= 1.2, < 2) redis-rails (5.0.2) redis-actionpack (>= 5.0, < 6) redis-activesupport (>= 5.0, < 6) redis-store (>= 1.2, < 2) - redis-store (1.4.1) - redis (>= 2.2, < 5) - regexp_parser (2.1.0) - render_anywhere (0.0.12) - rails (>= 3.0.7) - representable (3.0.4) + redis-store (1.11.0) + redis (>= 4, < 6) + regexp_parser (2.9.2) + reline (0.5.10) + io-console (~> 0.5) + representable (3.2.0) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) request_store (1.7.0) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - restforce (6.2.4) - faraday (>= 1.1.0, < 2.8.0) + restforce (7.5.0) + faraday (>= 1.1.0, < 2.12.0) faraday-follow_redirects (<= 0.3.0, < 1.0.0) faraday-multipart (>= 1.0.0, < 2.0.0) faraday-net_http (< 4.0.0) hashie (>= 1.2.0, < 6.0) jwt (>= 1.5.6) - rexml (3.3.6) - strscan - roar (1.1.1) - representable (~> 3.0) - roar-rails (1.1.0) + rexml (3.3.8) + roar (1.2.0) + representable (~> 3.1) + roar-rails (1.2.0) actionpack railties (>= 3.0.0) responders - roar (~> 1.1.0) + roar (~> 1.2) test_xml (>= 0.1.6) uber (< 0.2.0) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.1) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.13.0) rspec-instafail (1.0.0) rspec - rspec-mocks (3.10.2) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) + rspec-support (~> 3.13.0) + rspec-rails (5.1.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) rspec-core (~> 3.10) rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.2) + rspec-support (3.13.1) rubocop (0.76.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -657,41 +711,37 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-rspec (1.36.0) + rubocop-rspec (1.41.0) rubocop (>= 0.68.1) - ruby-debug-ide (0.7.2) - rake (>= 0.8.1) - ruby-graphviz (1.2.3) - ruby-progressbar (1.10.1) + ruby-graphviz (1.2.5) + rexml + ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.3.2) - safely_block (0.3.0) - errbase (>= 0.1.1) - sass (3.4.25) + safely_block (0.4.1) + sass (3.4.19) sass-rails (5.0.8) railties (>= 5.2.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.0.1) + sassc (2.4.0) ffi (~> 1.9) - rake sd_notify (0.1.1) - selenium-webdriver (4.9.0) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sentry-delayed_job (4.4.0) - sentry-ruby-core (~> 4.4.0.pre.beta) - sentry-rails (5.16.1) + sentry-delayed_job (5.20.1) + delayed_job (>= 4.0) + sentry-ruby (~> 5.20.1) + sentry-rails (5.20.1) railties (>= 5.0) - sentry-ruby (~> 5.16.1) - sentry-ruby (5.16.1) + sentry-ruby (~> 5.20.1) + sentry-ruby (5.20.1) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-ruby-core (4.4.2) - concurrent-ruby - faraday shellany (0.0.1) shoulda-matchers (3.1.3) activesupport (>= 4.0.0) @@ -699,72 +749,71 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) - slop (3.6.0) - smarter_csv (1.1.0) - spring (1.7.2) + smarter_csv (1.12.1) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + spring (4.2.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.3) + sprockets (3.7.5) base64 concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - strscan (3.1.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) test_xml (0.1.8) diffy (~> 3.0) nokogiri (>= 1.3.2) thor (1.3.2) - thread_safe (0.3.6) - tilt (2.0.10) - timecop (0.8.1) + tilt (2.4.0) + timecop (0.9.10) timeout (0.4.1) - transaction_isolation (1.0.5) - activerecord (>= 3.0.11) - transaction_retry (1.0.3) - activerecord (>= 3.0.11) - transaction_isolation (>= 1.0.2) - tzinfo (1.2.11) - thread_safe (~> 0.1) + trailblazer-option (0.1.2) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uber (0.1.0) - uglifier (4.2.0) + uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.0) - vcr (3.0.3) - web-console (3.7.0) - actionview (>= 5.0) - activemodel (>= 5.0) + unicode-display_width (1.6.1) + vcr (6.3.1) + base64 + version_gem (1.1.4) + web-console (4.2.1) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) bindex (>= 0.4.0) - railties (>= 5.0) + railties (>= 6.0.0) webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0, < 4.11) - webmock (3.11.2) - addressable (>= 2.3.6) + webmock (3.24.0) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket (1.2.9) + websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - whenever (0.9.7) + whenever (1.0.0) chronic (>= 0.6.3) whenever-test (1.0.1) whenever - will_paginate (3.3.0) + will_paginate (4.0.1) xpath (3.2.0) nokogiri (~> 1.8) + zeitwerk (2.6.18) PLATFORMS ruby - x86_64-darwin-20 + x86_64-darwin x86_64-linux DEPENDENCIES @@ -776,10 +825,10 @@ DEPENDENCIES aws-sdk-cloudwatch aws-sdk-rails aws-sdk-rds - bcrypt (~> 3.1.7) + bcrypt blazer bootsnap - bootstrap-sass (~> 3.4.1) + bootstrap-sass byebug capybara capybara-email @@ -787,26 +836,25 @@ DEPENDENCIES cgi chronic codecov - coffee-rails (= 5.0.0) - compass-rails (~> 3.1.0) + coffee-rails + compass-rails database_cleaner db-query-matchers - debase delayed_job_active_record delayed_job_heartbeat_plugin delayed_job_worker_pool - doorkeeper (~> 5.1.0) + doorkeeper dotenv-rails - dry-validation (= 0.12.3) error_page_assets factory_bot_rails faker fakeredis faraday faraday_middleware - fine_print + ffi (< 1.17) + fine_print! font-awesome-rails - guard-livereload (~> 2.5) + guard-livereload guard-rspec http_accept_language i18n-tasks @@ -818,13 +866,13 @@ DEPENDENCIES keyword_search (~> 1.5.0) knockoutjs-rails launchy - lev (~> 10.1.0) + lev! listen lograge maruku meta_request mini_racer - oj (~> 3.7.12) + oj oj_mimic_json omniauth (~> 1.9) omniauth-facebook @@ -836,43 +884,45 @@ DEPENDENCIES openstax_path_prefixer! openstax_rescue_from openstax_salesforce + openstax_transaction_isolation! + openstax_transaction_retry! openstax_utilities p3p parallel_tests pattern-library! pg premailer-rails - puma (~> 5.6.0) + psych (< 4) + puma puma_worker_killer rack-cors - rails (~> 5.2) + rails (= 6.1.7.8) rails-controller-testing rails-erd - rails-i18n (~> 5) - rails-settings-cached (= 0.7.2) - rails-settings-ui + rails-i18n + rails-settings-cached redis-rails - render_anywhere - representable (~> 3.0.0) + representable + rexml rspec-instafail rspec-rails - rubocop (~> 0.76.0) + rubocop rubocop-rspec - ruby-debug-ide - sass-rails (~> 5.0) + sass (= 3.4.19) + sass-rails sd_notify selenium-webdriver sentry-delayed_job sentry-rails sentry-ruby - shoulda-matchers (~> 3.1) + shoulda-matchers smarter_csv spring spring-commands-rspec timecop - uglifier (>= 1.3.0) + uglifier vcr - web-console (~> 3.7) + web-console webdrivers webmock whenever @@ -880,4 +930,4 @@ DEPENDENCIES will_paginate BUNDLED WITH - 2.3.13 + 2.3.27 diff --git a/Rakefile b/Rakefile index 5728347294..cbd042a7d8 100644 --- a/Rakefile +++ b/Rakefile @@ -41,4 +41,4 @@ def process_error_files yield src, dst end end -end +end if Rails.env.production? diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index ebecdc12be..acc3ba1669 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -144,7 +144,7 @@ def update_user application_user.roles = au[:roles].split(',').map(&:strip) application_user end - @user.update_attributes! user_params + @user.update! user_params end end end diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 2b7038f40b..174c289f80 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -261,13 +261,12 @@ def create_external_id private def get_sso_token(application, user) - # Note: this method changes to keyword arguments in a future Doorkeeper version access_token = Doorkeeper::AccessToken.find_or_create_for( - application, - user.id, - '', - SSO_TOKEN_INITIAL_DURATION, - false, + application: application, + resource_owner: user.id, + scopes: '', + expires_in: SSO_TOKEN_INITIAL_DURATION, + use_refresh_token: false, ) return access_token.token if access_token.created_at > user.updated_at && @@ -276,10 +275,9 @@ def get_sso_token(application, user) access_token.expires_at >= Time.current + SSO_TOKEN_MIN_DURATION ) - # Note: replace with create_for() in a future Doorkeeper version - access_token = Doorkeeper::AccessToken.create!( - application_id: application.id, - resource_owner_id: user.id, + access_token = Doorkeeper::AccessToken.create_for( + application: application.id, + resource_owner: user.id, scopes: '', expires_in: SSO_TOKEN_INITIAL_DURATION, use_refresh_token: false diff --git a/app/controllers/legacy/users_controller.rb b/app/controllers/legacy/users_controller.rb index 63086fdbd9..150e753ca5 100644 --- a/app/controllers/legacy/users_controller.rb +++ b/app/controllers/legacy/users_controller.rb @@ -18,7 +18,7 @@ def update respond_to do |format| format.json do - if current_user.update_attributes(user_params) + if current_user.update(user_params) security_log :user_updated, user_params: user_params render json: { full_name: current_user.full_name }, status: :ok diff --git a/app/controllers/newflow/login_controller.rb b/app/controllers/newflow/login_controller.rb index 4584418edb..9d6d58029f 100644 --- a/app/controllers/newflow/login_controller.rb +++ b/app/controllers/newflow/login_controller.rb @@ -48,7 +48,7 @@ def login case code when :cannot_find_user, :multiple_users, :incorrect_password, :too_many_login_attempts user = @handler_result.outputs.user - security_log(:sign_in_failed, { reason: code, email: email }) + security_log(:sign_in_failed, { reason: code, email: email, user: user }) end render :login_form diff --git a/app/controllers/newflow/signup_controller.rb b/app/controllers/newflow/signup_controller.rb index 3a6f393143..cf932a45bb 100644 --- a/app/controllers/newflow/signup_controller.rb +++ b/app/controllers/newflow/signup_controller.rb @@ -8,6 +8,9 @@ class SignupController < BaseController before_action(:newflow_authenticate_user!, only: :signup_done) before_action(:skip_signup_done_for_tutor_users, only: :signup_done) + def welcome + end + def verify_email_by_code handle_with( VerifyEmailByCode, diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index 1a012b38fc..abe9ad3671 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -69,9 +69,9 @@ def edit def update OSU::AccessPolicy.require_action_allowed!(:update, @user, @application) - + Doorkeeper::Application.transaction do - if add_application_owners && @application.update_attributes(app_params) + if add_application_owners && @application.update(app_params) security_log :application_updated, application_id: @application.id, application_params: app_params flash[:notice] = I18n.t( @@ -137,18 +137,18 @@ def add_application_owners member_ids = validated_member_ids return false if @application.errors.any? return true if !current_user.is_administrator? && current_user.oauth_applications.include?(@application) - - @application.owner.update_attributes(member_ids: member_ids) + + @application.owner.update(member_ids: member_ids) end def validated_member_ids return [] if !params[:member_ids].present? - + if !params[:member_ids].match(SPACE_SEPARATED_NUMBERS_REGEX) @application.errors.add(:owner, 'Member Ids must be a space separated list of integers') return false end - + member_ids = params[:member_ids].split.map(&:to_i) member_ids.each do |member_id| if !User.where(id: member_id).exists? @@ -165,7 +165,7 @@ def set_current_member_ids def authenticate_admin_or_oauth_application_owner! return if current_user.oauth_applications.any? - admin_authentication! + admin_authentication! end end end diff --git a/app/handlers/signup_start.rb b/app/handlers/signup_start.rb index e9f33254a6..b1bb0e0854 100644 --- a/app/handlers/signup_start.rb +++ b/app/handlers/signup_start.rb @@ -26,7 +26,7 @@ def handle # is there a pre_auth_state and it's email is unchanged if existing_pre_auth_state.try(:contact_info_value) == email - existing_pre_auth_state.update_attributes(role: signup_params.role) + existing_pre_auth_state.update(role: signup_params.role) outputs.pre_auth_state = existing_pre_auth_state # pre_auth_state may have been created in session start # and the the confirmation email will not yet have been sent diff --git a/app/models/application_user.rb b/app/models/application_user.rb index fe693a0a57..da304d91b8 100644 --- a/app/models/application_user.rb +++ b/app/models/application_user.rb @@ -3,9 +3,9 @@ class ApplicationUser < ApplicationRecord inverse_of: :application_users belongs_to :user, inverse_of: :application_users - belongs_to :default_contact_info, class_name: 'ContactInfo' + belongs_to :default_contact_info, optional: true, class_name: 'ContactInfo' - validates_presence_of :user, :application + validates_presence_of :application validates_uniqueness_of :user_id, scope: :application_id validate :contact_info_belongs_to_user diff --git a/app/models/contact_info.rb b/app/models/contact_info.rb index 7a794471b7..8df7047528 100644 --- a/app/models/contact_info.rb +++ b/app/models/contact_info.rb @@ -4,7 +4,6 @@ class ContactInfo < ApplicationRecord before_create :set_confirmation_pin_code before_destroy :check_if_last_verified - validates :user, presence: true validates :type, presence: true validates :value, presence: true, diff --git a/app/models/email_address.rb b/app/models/email_address.rb index e679c55546..16012da35b 100644 --- a/app/models/email_address.rb +++ b/app/models/email_address.rb @@ -33,12 +33,6 @@ def mx_domain_validation end end - def customize_value_error_message(error:, message:) - if self.errors && self.errors.types.fetch(:value, {}).include?(error) - self.errors.messages[:value][0] = message - end - end - protected def is_domain_trusted? diff --git a/app/models/message.rb b/app/models/message.rb index c7db748f29..b38317f514 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -1,6 +1,5 @@ class Message < ApplicationRecord - belongs_to :application, class_name: 'Doorkeeper::Application', - inverse_of: :messages + belongs_to :application, class_name: 'Doorkeeper::Application', inverse_of: :messages belongs_to :user, inverse_of: :sent_messages has_one :body, class_name: 'MessageBody', inverse_of: :message diff --git a/app/models/message_recipient.rb b/app/models/message_recipient.rb index d977d38a21..b580b0add5 100644 --- a/app/models/message_recipient.rb +++ b/app/models/message_recipient.rb @@ -1,7 +1,7 @@ class MessageRecipient < ApplicationRecord belongs_to :message, inverse_of: :message_recipients belongs_to :contact_info, inverse_of: :message_recipients - belongs_to :user, inverse_of: :message_recipients + belongs_to :user, optional: true, inverse_of: :message_recipients validates :message, presence: true validates_uniqueness_of :contact_info_id, scope: :message_id, diff --git a/app/models/pre_auth_state.rb b/app/models/pre_auth_state.rb index 97a63be5eb..b71a076e59 100644 --- a/app/models/pre_auth_state.rb +++ b/app/models/pre_auth_state.rb @@ -1,6 +1,4 @@ class PreAuthState < ApplicationRecord - belongs_to :user - enum contact_info_kind: [:email_address] before_validation :prepare diff --git a/app/models/user.rb b/app/models/user.rb index d83b6baa3d..d32591a2bd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -135,7 +135,8 @@ class User < ApplicationRecord belongs_to :school, optional: true, inverse_of: :users - belongs_to :source_application, class_name: "Doorkeeper::Application", foreign_key: "source_application_id" + belongs_to :source_application, optional: true, + class_name: 'Doorkeeper::Application', foreign_key: :source_application_id has_one :identity, dependent: :destroy, inverse_of: :user has_one :pre_auth_state @@ -270,7 +271,7 @@ def step_3_complete? # A User can also be created by a one of the consumer applications as a stand-in # for a person who has not yet (or may never) created an account. In this case # the User model will be in the "unclaimed" state. When the User does signup, they - # can claim the account and recieve all the permissions and tasks + # can claim the account and receive all the permissions and tasks # that were assigned to it in the interm. # # Once a User model is cleared for use, the state is set to "activated" diff --git a/app/routines/newflow/create_email_for_user.rb b/app/routines/newflow/create_email_for_user.rb index 2f74613ed6..05014c85f3 100644 --- a/app/routines/newflow/create_email_for_user.rb +++ b/app/routines/newflow/create_email_for_user.rb @@ -9,10 +9,6 @@ def exec(email:, user:, is_school_issued: nil) @email = EmailAddress.find_or_create_by(value: email&.downcase, user_id: user.id) @email.is_school_issued = is_school_issued - @email.customize_value_error_message( - error: :missing_mx_records, - message: I18n.t(:"login_signup_form.invalid_email_provider", email: @email.value) - ) transfer_errors_from(@email, { scope: :email }, :fail_if_errors) if @email.new_record? || !@email.verified? diff --git a/app/routines/newflow/ensure_unverified_user.rb b/app/routines/newflow/ensure_unverified_user.rb index ade20b548c..8458f7c9e0 100644 --- a/app/routines/newflow/ensure_unverified_user.rb +++ b/app/routines/newflow/ensure_unverified_user.rb @@ -7,7 +7,7 @@ class EnsureUnverifiedUser def exec(user) if user.state == 'needs_profile' - user.update_attributes(state: 'unverified', is_newflow: true) + user.update(state: 'unverified', is_newflow: true) transfer_errors_from(user, { type: :verbatim }, :fail_if_errors) SecurityLog.create( diff --git a/app/routines/transfer_authentications.rb b/app/routines/transfer_authentications.rb index dd56a9ea9d..c6aecfea7f 100644 --- a/app/routines/transfer_authentications.rb +++ b/app/routines/transfer_authentications.rb @@ -1,4 +1,4 @@ -# Firstly, persists or updates (with `update_attributes`) an `Authentication` for the given user. +# Firstly, persists or updates (with `update`) an `Authentication` for the given user. # # Secondly, if the authentication(s) already belonged to a user, and # that user can be destroyed, then we destroy that user. @@ -13,7 +13,7 @@ def exec(authentications, newer_user) authentications = [authentications] if !(authentications.is_a?(Array)) authentications.each do |authentication| existing_user = authentication.user - authentication.update_attributes(user_id: newer_user.id) + authentication.update(user_id: newer_user.id) transfer_errors_from(authentication, {type: :verbatim}, :fail_if_errors) if existing_user && can_be_destroyed?(existing_user) diff --git a/app/views/faculty_access/apply.html.erb b/app/views/faculty_access/apply.html.erb index e618fcd4dd..74289922bc 100644 --- a/app/views/faculty_access/apply.html.erb +++ b/app/views/faculty_access/apply.html.erb @@ -24,12 +24,12 @@ <%= lev_form_for :apply, url: faculty_access_apply_path, html: {class: 'full-width'} do |f| %> - <% fh = FormHelper::One.new(f: f, - limit_to: :any, - context: self, - params: params, - errors: @handler_result.try(:errors), - error_field_classes: "alert alert-danger") %> + <% fh = ::FormHelper::One.new(f: f, + limit_to: :any, + context: self, + params: params, + errors: @handler_result.try(:errors), + error_field_classes: "alert alert-danger") %>

<%= t :".instructions" %>

diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index b3908d5a79..80ddb75acd 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -50,8 +50,6 @@
  • <%= link_to 'Security Log', main_app.routes.url_helpers.admin_security_log_path %>
  • -
  • <%= link_to 'Settings', main_app.routes.url_helpers.admin_rails_settings_ui_path %>
  • -