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

Add support for Rails 7 #460

Merged
merged 7 commits into from
Jan 11, 2022

Conversation

peterberkenbosch
Copy link
Contributor

No description provided.

@mindtonic
Copy link

mindtonic commented Dec 29, 2021

+1 Please!
+2 Please!

@akodkod
Copy link

akodkod commented Jan 2, 2022

+1

@akodkod
Copy link

akodkod commented Jan 2, 2022

As a temporary solution you can add this to your Gemfile:

gem "awesome_nested_set", github: "peterberkenbosch/awesome_nested_set", branch: "rails-7-support"

@peterberkenbosch
Copy link
Contributor Author

Looking at fixing the failing specs around ruby versions:

Bundler found conflicting requirements for the Ruby version:
    In rails_7_0.gemfile:
      Ruby
  
      awesome_nested_set was resolved to 3.4.0, which depends on
        Ruby (>= 2.0.0)
  
      rails (~> 7.0.0) was resolved to 7.0.0, which depends on
        Ruby (>= 2.7.0)
  Took   3.44 seconds

@parndt
Copy link
Collaborator

parndt commented Jan 4, 2022

@peterberkenbosch perhaps we can address different versions like this one so the library itself isn't coupled to what Rails 7 supports
norman/friendly_id#984

thanks for looking at this

@peterberkenbosch
Copy link
Contributor Author

Hey @parndt. Good find.. on it! Thanks.

@andrewhampton
Copy link
Contributor

@peterberkenbosch I've finished getting the tests passing and opened a PR to this branch on your repository.

@parndt as part of that change, I had to drop the combustion gem. The older version currently required by awesome_nested_set doesn't work with rails 7. I initially tried updating combustion, but the API has changed and you can no longer pass in the database config you want. So I'm just using the rails tasks directly and dropped that dependency. Hopefully that's ok?

@peterberkenbosch
Copy link
Contributor Author

Thanks @andrewhampton!

The older version of combustion used by awesome_nested_set doesn't
appear to be compatible with rails 7, and the latest version of
combustion no longer has an API that lets you pass in a config.

So this commit drops the dependency on combustion and just uses the
rails task for database setup and teardown.
@parndt parndt merged commit 0272e84 into collectiveidea:master Jan 11, 2022
@kennyadsl kennyadsl mentioned this pull request Feb 4, 2022
14 tasks
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.

5 participants