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

Allow use with Rails 6.1 #152

Closed
simukappu opened this issue Dec 13, 2020 · 12 comments
Closed

Allow use with Rails 6.1 #152

simukappu opened this issue Dec 13, 2020 · 12 comments

Comments

@simukappu
Copy link
Owner

Rails 6.1 has been released.
https://edgeguides.rubyonrails.org/6_1_release_notes.html

activity_notification also should support Rails 6.1.

@simukappu
Copy link
Owner Author

simukappu commented Dec 13, 2020

Waiting for devise_token_auth support with Rails 6.1 in order to make existing tests.
The feature request and pull request were opened and already merged to master branch:
lynndylanhurley/devise_token_auth#1443
lynndylanhurley/devise_token_auth#1446

@simukappu
Copy link
Owner Author

simukappu commented Dec 13, 2020

Also waiting for mongoid support with Rails 6.1.
Feature request ticket was opened here: https://jira.mongodb.org/projects/MONGOID/issues/MONGOID-5027

@sjieg
Copy link

sjieg commented Jan 6, 2021

Hey @simukappu looks like the mongoid ticket has been solved. Mind having another look at it? :)

@simukappu
Copy link
Owner Author

Hi @sjieg,
Thank you for letting me know, but the mongoid ticket has not been released in the latest v7.2.0. Still looking at mongoid and devise_token_auth update.

@sjieg
Copy link

sjieg commented Jan 11, 2021

I see, fair enough.

I'm a little bit surprised with these dependencies. As we're using this gem with MySQL and I don't think we use any of the MongoDB dependencies.
I think the same thing counts for the devise_token_auth dependency.

I mean, you're doing a great job maintaining this Gem, really good stuff. Just some food for thought. I wouldn't have a clue what the standards are on having (semi-)optional dependencies.

@apuntovanini
Copy link

I also think that the gem should have less opinionated dependencies, devise_token_auth is needed for the demo I think, not for the gem to work

@simukappu
Copy link
Owner Author

Thank you for your feedback. I got it.
I will try to allow use with Rails 6.1 except for mongoid ORM. API tests are using device_token_auth, so will use master branch as dev dependency.

@apuntovanini
Copy link

Do you need any help with this @simukappu?

@simukappu
Copy link
Owner Author

Thank you @apuntovanini. Can you test this gem from development branch with your app?

@apuntovanini
Copy link

It works! @simukappu
Only issue is

DEPRECATION WARNING: Initialization autoloaded the constants MailerHelper and ActivityNotification::Mailer.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

I already wrapper initializer in Rails.application.reloader.to_prepare do end

@simukappu
Copy link
Owner Author

I've published v2.2.1 working with Rails 6.1.
Note that latest mongoid release does not allow use with Rails 6.1 and this gem is making test with master branch. Also Dynamoid is not tested with Rails 6.1.
Thanks!

@apuntovanini
Copy link

apuntovanini commented Apr 20, 2021

@simukappu just to understand whether the warning comes from the gem or from our side, we're still seeing the

DEPRECATION WARNING: Initialization autoloaded the constants MailerHelper and ActivityNotification::Mailer.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Does it happen to you as well?
This is our initializer

Rails.application.reloader.to_prepare do
  # ...

  # Configure the class responsible to send e-mails.
  config.mailer = 'ActivityNotification::Mailer'

  # Configure the parent class responsible to send e-mails.
  config.parent_mailer = 'ApplicationMailer'

  # Configure the parent job class for delayed notifications.
  config.parent_job = 'ApplicationJob'
  
  # ...
end

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants