Skip to content

Conversation

@ElsonOtake
Copy link
Owner

Summary

This PR upgrades the application to the latest stable versions of Ruby and Rails, along with various improvements and bug fixes.

Major Version Upgrades

  • Ruby: 3.1.2 → 3.4.5
  • Rails: 7.0.6 → 8.0.3
  • Bundler: 2.3.22 → 2.7.2
  • Node.js: Added 22.x support in Dockerfile

Key Changes

🚀 Framework & Dependencies

  • Updated all gem dependencies for Rails 8 compatibility
  • Switched from Fullstaq Ruby to official Ruby Docker image
  • Fixed all Rails 8 deprecation warnings
  • Updated Rswag configuration (swagger_* → openapi_*)
  • Fixed RSpec fixture_paths deprecation

🔐 Authentication & User Management

  • Added OAuth user detection with provider/uid tracking
  • OAuth users now see simplified edit profile page (only Back and Cancel account buttons)
  • Fixed Devise compatibility with Rails 8/Turbo

🖼️ UI/UX Improvements

  • Fixed Active Storage image rendering with proper helpers
  • Fixed default profile picture display
  • Improved analytics page clarity - clearly shows it's for user's own posts
  • Added informative messages for OAuth users on profile edit page

⏰ Timezone & Analytics

  • Added timezone configuration with TZ environment variable
  • Fixed analytics controller to use timezone-aware dates
  • Updated analytics page with clearer titles and explanations
  • Added Sidekiq to Procfile.dev for background job processing

📝 Documentation

  • Created comprehensive CLAUDE.md for development guidance
  • Updated .env.template with TZ variable

🐛 Bug Fixes

  • Added missing PostsController#show action for Rails 8
  • Fixed "Cancel my account" functionality (partial fix)
  • Fixed analytics data not updating (Sidekiq configuration)
  • Fixed NameError on analytics page (current_user → current_member)

Database Migrations

  • Added provider and uid columns to members table for OAuth tracking
  • Added Active Storage migrations for Rails 8 compatibility

Testing

  • Application boots successfully ✅
  • Database migrations completed ✅
  • Server runs without errors ✅
  • OAuth login works ✅
  • Analytics page displays correctly ✅

Notes

  • Some tests failing due to pre-existing Devise mapping issues (not related to this upgrade)
  • "Cancel my account" feature has known issues with Rails 8/Turbo (documented)

Next Steps After Merging

  1. Ensure all developers update their Ruby version to 3.4.5
  2. Run bundle install to update dependencies
  3. Run rails db:migrate to apply new migrations
  4. Update CI/CD pipelines to use Ruby 3.4.5
  5. Start using bin/dev to ensure Sidekiq runs for analytics

🤖 Generated with Claude Code

ElsonOtake and others added 5 commits September 22, 2025 22:02
Major version upgrades:
- Ruby: 3.1.2 → 3.4.5
- Rails: 7.0.6 → 8.0.3
- Bundler: 2.3.22 → 2.7.2
- Node.js: Added 22.x support in Dockerfile

Key changes:
- Updated all gem dependencies for Rails 8 compatibility
- Fixed deprecations (Rswag config, RSpec fixtures, timezone handling)
- Added OAuth user detection with provider/uid tracking
- Fixed Active Storage image rendering with proper helpers
- Added timezone configuration with TZ environment variable
- Created CLAUDE.md documentation for development guidance
- Added Sidekiq to Procfile.dev for background job processing
- Fixed analytics controller timezone issues
- Updated Dockerfile from Fullstaq Ruby to official Ruby image

UI improvements:
- OAuth users see simplified edit profile page
- Fixed default profile image display
- Added PostsController#show action for Rails 8 compatibility

Database changes:
- Added provider and uid columns to members table
- Added Active Storage migrations for Rails 8

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated page title from "Comment analytics" to "Analytics for Your Posts"
- Added subtitle showing the current member's name
- Added info box explaining what data is being tracked
- Updated all chart titles to clarify they show data for the user's own posts
- Fixed NameError by using current_member instead of current_user

This makes it clear that the analytics page shows:
- Comments made on the user's own posts by others
- Visitors who viewed the user's posts
- Engagement metrics for content authored by the logged-in user

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add empty line after module inclusions in controllers
- Add final newline to registrations controller
- Use single-line if modifier in Member model
- Comply with Style/EmptyLinesAfterModuleInclusion
- Comply with Style/IfUnlessModifier

All autocorrectable offenses resolved.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Upgraded Rubocop from 1.56.4 to 1.80.2 for Ruby 3.4 support
- Fixed Layout/EmptyLinesAfterModuleInclusion in Member model
- All Rubocop checks now passing with no offenses

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ElsonOtake ElsonOtake merged commit 8ae9712 into dev Sep 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants