Open nimmolo opened 2 years ago
interesting PR, thanks, need to think more about it.
Just to confirm - you have reduced the amount of dependencies, and not added any new?
@igorkasyanchuk That's right, no new dependencies. But see answer to your question above, sorry.
@nimmolo could you please check this PR again, sorry long time, but maybe it still can be finished
Thanks Igor, I will check it next week.
I hope you are doing ok and safe as possible.
On May 12, 2023, at 2:53 AM, Igor Kasyanchuk @.***> wrote:
@nimmolo https://github.com/nimmolo could you please check this PR again, sorry long time, but maybe it still can be finished
— Reply to this email directly, view it on GitHub https://github.com/igorkasyanchuk/rails_db/pull/127#issuecomment-1545484510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO3TPZJKTOZXT4S6FOJZR3XFYCBDANCNFSM5XPDRFBA. You are receiving this because you were mentioned.
This commit removes Rails as a dependency, requiring only the Rails component gems/classes necessary to run Rails DB. It is intended to make the gem more compatible with Rails apps that are similarly configured. Tests are passing for me.
Note that the
require
statements inbin/rails
andtest/config/application.rb
are now more specific — they must specifically require the classes loaded by the gems, not justrequire 'rails'
. The list is slightly different from the gem list, but this is a fairly standard setup that was easy to find examples on the web.I moved the gemfiles list into
rails_db.gemspec
. I believe that with gems, the.gemspec
takes precedence overGemfile
, and is redundant where the Gemfile listsgemspec
. When the gems were listed in both places, Bundler was complaining that several gems were included twice.I read in several places that for gem development, the
Gemfile.lock
should not be checked into version control. So I added it to.gitignore
, but it doesn't seem to be ignored :) Anyway you can check the differences.In
test_helper.rb
, to get therails version
, it's now checking the version ofactiverecord
, which should always be the same as Rails anyway.