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

Rename MeiliSearch to Meilisearch #384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ellnix
Copy link
Collaborator

@ellnix ellnix commented Jan 14, 2025

Depends on meilisearch-ruby 0.30 where MeiliSearch was also renamed. Used this shell command to automatically rename, and then used the git diff to manually look through and make sure nothing was wrong:

find lib/ -type f -exec sed -i 's/MeiliSearch/Meilisearch/g' {} \; 

(of course also ran it for spec/ and playground/ after making sure the soft deprecation allowed all tests to pass).

Ran into issues with the regular const_missing + const_get deprecation having issues with autoload-ed methods. Added a temporary workaround just for the Rails module. With this workaround there may be cases where users are not warned for using MeiliSearch, which should be investigated.

Pull Request

Related issue

Fixes #347

Depends on meilisearch-ruby 0.30 where MeiliSearch was also renamed.
Used this shell command to automatically rename, and then used the git
diff to manually look through and make sure nothing was wrong:
find lib/ -type f -exec sed -i 's/MeiliSearch/Meilisearch/g' {} \;
(of course also ran it for spec/ and playground/ after making sure the
soft deprecation allowed all tests to pass).

Ran into issues with the regular `const_missing` + `const_get`
deprecation having issues with autoload-ed methods. Added a temporary
workaround just for the Rails module. With this workaround there may be
cases where users are not warned for using MeiliSearch, which should be
investigated.
@ellnix ellnix added the breaking-change The related changes are breaking for the users label Jan 14, 2025
@ellnix
Copy link
Collaborator Author

ellnix commented Jan 14, 2025

Please do not merge until the time comes to update to meilisearch-ruby 0.30. Development can happen in the meantime on the current version and I'll make sure to keep this PR updated.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.97%. Comparing base (d0a6f1a) to head (0b48285).

Files with missing lines Patch % Lines
lib/meilisearch-rails.rb 94.44% 1 Missing ⚠️
lib/meilisearch/rails/pagination/kaminari.rb 50.00% 1 Missing ⚠️
lib/meilisearch/rails/pagination/will_paginate.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
+ Coverage   88.96%   88.97%   +0.01%     
==========================================
  Files          13       13              
  Lines         761      762       +1     
==========================================
+ Hits          677      678       +1     
  Misses         84       84              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename root module to Meilisearch instead of MeiliSearch
1 participant