-
Notifications
You must be signed in to change notification settings - Fork 24
Upgrade from Rails 6.1 to 7.0 #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aaronlippold
wants to merge
25
commits into
master
Choose a base branch
from
upgrade-rails
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ccf68e1
to
675993c
Compare
Co-Authored-By: Aaron Lippold <[email protected]>
Co-Authored-By: Aaron Lippold <[email protected]>
- Update .rubocop.yml to use plugins syntax - Fix Style/DigChain offenses - Fix Rails/RedundantActiveRecordAllMethod offenses - Fix Style/GlobalStdStream offense - Fix Rails/RootPathnameMethods offenses - Fix Style/ZeroLengthPredicate offense - Add frozen string literal comment Co-Authored-By: Aaron Lippold <[email protected]>
- Fix Rails/FindEach offenses in export_helper and seeds - Fix Rails/Pluck offenses - Fix Lint/RedundantSafeNavigation - Fix Style/MapIntoArray - Fix Naming/PredicateMethod (validate_prefix to validate_prefix?) - Add documentation comments to model classes - Reduce offenses from 38 to 26 Co-Authored-By: Aaron Lippold <[email protected]>
- Added I18n translations for validation messages to config/locales/en.yml - Fixed Rails/FindEach offense in export_helper.rb - Fixed Lint/RedundantSafeNavigation in component.rb - Added documentation comments to XCCDF classes - Fixed Style/SafeNavigationChainLength issues using try method - Fixed Style/Lambda and Lint/UnusedBlockArgument in membership.rb - Fixed Lint/UselessOr by removing redundant || 0 - Disabled Layout/LineLength for Rails-generated config file - Disabled Metrics/CollectionLiteralLength for CCI constants - Updated all model validations to use I18n instead of hardcoded messages Co-Authored-By: Aaron Lippold <[email protected]>
- Add explicit require for 'audited/audit' to ensure proper load order - Change VulcanAudit to inherit from Audited::Audit directly - This fixes the 'uninitialized constant Audited::Audit' error in Rails 7 - The issue was caused by load order - the audit class needs to be loaded before inheritance Co-Authored-By: Aaron Lippold <[email protected]>
b2491b3
to
73bc415
Compare
- Clear parent validators and re-add with custom conditions - Add system_generated flag to skip user validation for system audits - Use write_attribute to avoid triggering user association methods - Fixes 'undefined method marked_for_destruction?' error Co-Authored-By: Aaron Lippold <[email protected]>
Co-Authored-By: Aaron Lippold <[email protected]>
- Set Ruby version to 3.0.6 in .ruby-version file - Update Gemfile to read version from .ruby-version - This ensures consistency across development environments - Rails 7 requires Ruby 3.0+ Co-Authored-By: Aaron Lippold <[email protected]>
- Rename start-okta-dev to dev-setup for general use - Add support for --local, --okta, and --ldap auth modes - Improve environment configuration handling - Add comprehensive documentation - Make script more modular and reusable The script now handles: - Ruby/Node version management - Dependency installation - Database setup with Docker - Multiple authentication configurations - Environment file loading Co-Authored-By: Aaron Lippold <[email protected]>
- Remove user presence validation from VulcanAudit - Rails 7 requires belongs_to associations by default - Audits can be created without users (e.g., system-generated) - Updated audited gem from 5.3.3 to 5.8.0 for better Rails 7 support Co-Authored-By: Aaron Lippold <[email protected]>
- Fixed trailing whitespace in vulcan_audit.rb - Fixed trailing whitespace in rule.rb line 69 Co-Authored-By: Aaron Lippold <[email protected]>
- Configure RuboCop with auto-correction for Ruby files - Add ESLint for JavaScript/Vue files - Enable Rails-specific hooks (schema checks, bundle checks) - Add commit message validation hooks - Configure post-checkout/merge hooks for dependencies
- Remove presence validations from VulcanAudit for user and associated fields - Add proper audit context infrastructure for tests (AuditHelper, DeviseAuditHelper) - Update all affected specs to use VulcanAudit.as_user pattern - Add admin user factory trait for cleaner test setup - Ensure Warden hooks properly set audit context on authentication This resolves all 'Audits is invalid' errors in the test suite while maintaining proper audit trails. The solution allows system-generated audits without requiring a user context, which is more flexible and Rails 7 compliant. Co-authored-by: Aaron Lippold <[email protected]>
- Add audit context to ProjectAccessRequestsController tests - Add audit context to ProjectAccessRequest model tests - Add audit context to User model tests - Fix SessionsController OIDC test ENV mocking (use fetch instead of []) This ensures all tests pass with proper audit trails and no environment variable leakage in tests. Co-authored-by: Aaron Lippold <[email protected]>
- Update factory_bot_rails from 5.2.0 to 6.4.4 - Update rspec-rails from 4.0.2 to 6.0.4 - Fix local login feature test to handle Bootstrap-Vue tab active states (checks parent element and aria-selected attribute) These gem updates provide better Rails 7 support and are backwards compatible with our Rails 7.0.8.7 setup. Co-authored-by: Aaron Lippold <[email protected]>
- Fix navbar users_path passing nil to Vue (now uses empty string) - Fix component/STIG pages queried-rule nil handling (now uses 'null') - Fix login page boolean type error - use v-bind:active for proper boolean binding - Update local login test to verify user experience rather than implementation details - Restore yarn.lock from master to fix Node.js compatibility issues These issues were caused by Rails 7's stricter handling of nil values in view attributes. Vue.js doesn't accept empty strings for v-bind expressions, so we now provide appropriate fallback values. Co-Authored-By: Aaron Lippold <[email protected]>
The test was looking for #new_local_user but the actual form ID is new_user. Since there are multiple forms with the same ID (Local Login and Register), we now use the form action attribute to specifically target the login form. This ensures the test reliably finds the correct form element. Co-Authored-By: Aaron Lippold <[email protected]>
…default) - Remove redundant bin/start-okta-dev script (use ./bin/dev-setup --okta instead) - Update Procfile.dev to handle Node.js 17+ compatibility automatically - Add clear documentation about Node.js --openssl-legacy-provider requirement - Update README with clear version requirements and setup instructions - Add comprehensive header to dev-setup script explaining its purpose - Add ShellCheck to pre-commit hooks (disabled for now due to existing issues) - Fix ShellCheck warnings in dev-setup script - Fix trailing whitespace in dev-setup These changes consolidate our development setup scripts and make it easier for new developers to get started with the correct versions and configuration. Note: ShellCheck is added but disabled by default to avoid blocking commits on existing issues. It can be enabled once all shell scripts are cleaned up. Co-Authored-By: Aaron Lippold <[email protected]>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.