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

fix(tests): fix check of autoloaders #395

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ matrix:
env: RAILS_VERSION=6.0 SEQUEL_VERSION=5.0

before_install:
- wget http://api-key-dealer.herokuapp.com/clients/algolia-keys && chmod +x algolia-keys
- which bundle || true
- find /home/travis/.rvm -wholename "*/bundler-*.gemspec" -print -delete || true
- bundle --version || true
Expand All @@ -59,4 +58,4 @@ install: rm -f Gemfile.lock && bundle install --without development
cache: bundler

script:
- eval $(./algolia-keys export) && bundle exec rake
- bundle exec rake
2 changes: 1 addition & 1 deletion lib/algoliasearch/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module AlgoliaSearch
module Utilities
class << self
def get_model_classes
if defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
if Rails.application && defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
Zeitwerk::Loader.eager_load_all
elsif Rails.application
Rails.application.eager_load!
Expand Down