Draft
Conversation
Here's a summary of the changes: - Ruby has been updated from version 2.7.7 to 3.2.8. - Rails has been updated from approximately version 6.0 to approximately 8.0.2. - I moved StripeEventHelper to lib/stripe_event_handlers. This was done to resolve a NameError that appeared after the Rails update, as initializers now run before helpers are typically loaded, and the lib directory is autoloaded. Please note that further testing and running `rails app:update` couldn't be completed due to the current environment's limitations. You'll need to perform these steps manually in your local environment.
…-rails-upgrade # Conflicts: # .ruby-version # Gemfile.lock # config/application.rb
This involves adding the `.github/workflows/ruby-ci.yml` file to this branch to enable CI runs. The workflow is configured to: - Trigger on pushes to all branches and PRs to main. - Use Ruby 3.2.8. - Cache Bundler dependencies. - Set up the test database using PostgreSQL. - Run RSpec tests.
Adds a direct `require 'stripe_event_handlers/stripe_event_helper'` to the beginning of `config/initializers/stripe.rb`. This is to resolve a `NameError: uninitialized constant StripeEventHelper` that was occurring during CI runs (specifically during `db:create` or `db:schema:load` which run initializers). While autoloading for `lib` is configured, this explicit require ensures the helper is available when the Stripe events are being subscribed, avoiding potential load order issues in the Rake task execution context.
Removes the `protected_attributes_continued` gem to resolve a `TypeError: superclass mismatch for class SchemaMigration` error encountered during CI when running `db:create` or `db:schema:load`. This gem is incompatible with Rails 8 and was used for `attr_accessible` functionality, which is replaced by Strong Parameters in modern Rails. Occurrences of `attr_accessible` were found in User and Authentication models; these will now rely on controller-level Strong Parameters. Note: `Gemfile.lock` was not updated by `bundle install` due to a persistent sandbox error. The CI environment or a local `bundle install` run should correctly update the lockfile based on this Gemfile change.
I've implemented a more comprehensive .devcontainer configuration using a custom Dockerfile and Docker Compose to define your development environment. This setup includes: - `.devcontainer/Dockerfile`: This defines the application environment starting from Ruby 3.2.8, installs system dependencies (PostgreSQL client, Node.js, Yarn), creates a non-root user, and handles gem installation. - `.devcontainer/docker-compose.yml`: This defines `app` and `db` services. The `app` service builds from the Dockerfile and mounts your project code. The `db` service uses a standard PostgreSQL image. - `.devcontainer/devcontainer.json`: I've updated this to use the Docker Compose setup, specifying the `app` service and `/workspace` folder. I removed redundant features and updated the `postCreateCommand` to ensure dependencies are installed and the database is prepared. This provides an integrated environment with the Rails application and a PostgreSQL database service, suitable for GitHub Codespaces and VS Code Remote - Containers.
Member
|
I approved CI to run |
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
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.
What github issue is this PR for, if any?
Resolves #1
What does this code do, and why?
How is this code tested?
Are any database migrations required by this change?
Are there any configuration or environment changes needed?
Screenshots please :)