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

ignore test/ folder for gem building #21

Merged
merged 1 commit into from
Apr 23, 2021
Merged

Conversation

cprodhomme
Copy link
Contributor

When you build the gem, you add the files that will be download for all users. The test/ folder is useless for external application 😉

I have made this change because you have deprecation warning in your tests and the result is that all user show this deprecation in our application 😢 :

DEPRECATION WARNING: Initialization autoloaded the constants ApplicationHelper, StructureHelper,
ActiveAdmin::ViewsHelper, DeviseHelper, ApplicationController, InheritedResources::Base, DeviseController, Devise::SessionsController, Devise::PasswordsController, Devise::UnlocksController, Devise::RegistrationsController, and Devise::ConfirmationsController.

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

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ApplicationHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:

Rails.application.reloader.to_prepare do
  # Autoload classes and modules needed at boot time here.
end

That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.

Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.

After merge this pull request, can you please make a new version of your amazing gem ? 🙏 thanks !

cprodhomme added a commit to betagouv/eva-serveur that referenced this pull request Apr 9, 2021
Ce fork permet de ne plus avoir de deprecation warning dans nos tests.

en attendant que le correctif soit mergé : thambley/activeadmin-xls#21

Co-authored-by: Étienne Charignon <etienne.charignon@beta.gouv.fr>
etienneCharignon added a commit to betagouv/eva-serveur that referenced this pull request Apr 9, 2021
Ce fork permet de ne plus avoir de deprecation warning dans nos tests.

en attendant que le correctif soit mergé : thambley/activeadmin-xls#21

Co-authored-by: Étienne Charignon <etienne.charignon@beta.gouv.fr>
shanser pushed a commit to betagouv/eva-serveur that referenced this pull request Apr 12, 2021
Ce fork permet de ne plus avoir de deprecation warning dans nos tests.

en attendant que le correctif soit mergé : thambley/activeadmin-xls#21

Co-authored-by: Étienne Charignon <etienne.charignon@beta.gouv.fr>
@cprodhomme
Copy link
Contributor Author

cprodhomme commented Apr 20, 2021

@thambley could you please ckeck this PR ?
the deprecation warning create many frustration for me 😭 🙏

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.

2 participants