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
Add Sequel preliminary support #242
base: master
Are you sure you want to change the base?
Conversation
@sanks02 Hello, thank you for your work and for advancing the agenda! This feature is indeed important, especially since there isn't a record tracker within the Sequel ecosystem. There are just 2 things left to address:
The required steps would be:
@sanks02, would you be interested to help with these tasks? If you're busy, I'll hope to address these issues this week. |
@ardecvz Thanks for the heads up! It doesn't sound complicated, so I think I can do it. |
I'm halfway through adding There is a problem with generators depending on ActiveRecord. I'm not sure how to remove this dependency, so I'll remove Sequel-specific code from generators and associated specs for now. Later we can see what sequel-rails does, and try to do a similar thing to add the generators back. Does this sound good? |
@ardecvz Would you mind helping me from this point? |
Hi again! Oh, you've found an interesting edge case! And we're so close to the proper merge. According to Sequel's philosophy, you don't need generators - the authors recommend using your normal text editor environment. So, your recent removal of generators is fine, but in this case, we need to prepare a separate, detailed guide on how to craft installation and model migrations as done in Sequel. However, in my opinion, Logidze migrations are much harder to copy and paste manually without mistakes. Yes, we'll keep a dependency on Railties (and ActionPack, unfortunately), but we'll remove the redundant dependency on ActiveRecord. On the other hand, Sequel is popular among minimal environments, so ActionPack may be overkill for them. Also, I'm not aware of any lightweight alternatives to Rails generators (sequel-rails seems to rely on Railties). It's a decision with drawbacks, so let's get @palkan to decide:
|
We can use plain Thor; that would, probably, require adding a standalone
Another option is to add an application template via Ruby Bytes: https://github.com/palkan/rbytes Basically, the same idea as using Thor but without dealing with CLIs, etc. |
It looks like Ruby Bytes does not support RSpec, which is used in this project. |
@ardecvz I added the Sequel generators back. My knowledge of Rails generators, Thor and Ruby Bytes is limited, so if you don't mind picking the PR up, I'd appreciate it. The issues with the current generators are:
|
It would be great to have this PR merged. I think the easiest solution is to add the ActiveRecord/ActiveSupport dependency back (but keep all other fixes and mention the ActiveRecord/ActiveSupport dependency in Or do you have any other suggestions/recommendations? |
Yes, I'm with your plan - adding support gradually is the only path forward right now. |
And we should create an issue with future improvements - to keep a plan forward. |
Thanks. The branch is in a half-baked state right now. I'll fix it and let you know when it can be reviewed. |
Should be ready for a review. Suggestions from the original PR have been taken into account and small changes have been made to further separate Logidze from ActiveSupport. I didn't finish adding a separate Sequel demo as it would be impossible to test if it works without ActiveRecord anyway, but I mentioned it in the newly created issue. The difference between this and the original PR. I hope this helps. Let me know if anything else is needed. :) |
Thanks @sanks02! Please, take a look at the RuboCop offenses (look legit) and RSpec failures. @ardecvz Waiting for your approval 🙂 (and the green CI, of course) |
Sorry about that, I may have accidentally tested |
I've started using this in a real world application and it seems to work just fine |
@sanks02 Thanks! @ardecvz I'm still waiting for your pair of eyes 👀 |
Thanks for the amazing library!
Fixes #28.
What is the purpose of this pull request?
This is an attempt to get the original Sequel preliminary support PR merged.
What changes did you make? (overview)
Merged
master
from upstream, fixed conflicts, took the comments from the original PR into account.Is there anything you'd like reviewers to focus on?
The original PR is a brilliant piece of work, so I just wanted it merged so I could use upstream Logidze for a project. Not sure if there's anything else to say. :)
Checklist
^ All of this was already done.