Skip to content
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

Rails > 6 and Ruby > 3 support #577

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sosolidkk
Copy link

We extensively rely on the ar-octopus gem in various projects within our company. However, due to them being on an older version of Rails that lacks the matured functionalities of the new multiple database support, we are unable to leverage it. Nevertheless, this gem remains crucial for effectively managing our shards and facilitating database replica reading.

To ensure compatibility with Rails version > 6 and Ruby > 3, modifications were required for our application to function correctly. Unfortunately, some of these changes may break existing applications utilizing this gem. However, I think we can collaborate to review these modifications and find a way to incorporate them into the gem, making it adaptable to everyone's use cases.

@sosolidkk sosolidkk mentioned this pull request Jun 15, 2023
@sosolidkk sosolidkk changed the title Compatibility with Rails > 6 and Ruby > 3 Rails > 6 and Ruby > 3 support Jun 15, 2023
Copy link

@kammradt kammradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec/octopus/proxy_spec.rb Outdated Show resolved Hide resolved
if File.exist?(file_name) || File.symlink?(file_name)
config ||= HashWithIndifferentAccess.new(YAML.load(ERB.new(File.read(file_name)).result))[Octopus.env]
config = if File.exist?(file_name) || File.symlink?(file_name)
HashWithIndifferentAccess.new(YAML.safe_load(ERB.new(File.read(file_name)).result))[Octopus.env]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to outsource it in another PR as this one isn't related to rails and would probably help to have it upstreamed faster.

Also, we should allow alisases here (or have a config for that)

@SixiS SixiS mentioned this pull request Jun 22, 2023
@sosolidkk
Copy link
Author

Hey @ylecuyer and @kammradt. Since @SixiS put up #578 and it's way cleaner and more focused on the changes that we really need to put up the upgrade and support for Rails 6 and Ruby 3, feel free to close this PR. I'm happy enough that it served as a starting point for this upgrade to happen.

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.

3 participants