Skip to content

Commit

Permalink
⚠️ Resolve loading issues
Browse files Browse the repository at this point in the history
This commit will resolve some zeitwerk work issues and also remove the
SavedSearchesController as it is deprecated.

Ref:
- projectblacklight/blacklight_advanced_search#105
  • Loading branch information
kirkkwang committed Dec 10, 2024
1 parent 2adc395 commit 7f7dc3f
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 30 deletions.
2 changes: 2 additions & 0 deletions hydra/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@

# Ignore Byebug command history file.
.byebug_history

public/assets/*
2 changes: 1 addition & 1 deletion hydra/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gem 'bootsnap', '>= 1.4.2', require: false
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'


# OAI-PMH
# OAI-PMH
# =====================================================
gem 'blacklight_oai_provider', github: 'projectblacklight/blacklight_oai_provider', ref: '428da77'

Expand Down
4 changes: 4 additions & 0 deletions hydra/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ GEM
net-http (>= 0.5.0)
fcrepo_wrapper (0.9.0)
ruby-progressbar
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-x86_64-linux-gnu)
fiddle (1.1.5)
fugit (1.11.1)
Expand Down Expand Up @@ -378,6 +379,8 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.17.0-aarch64-linux)
racc (~> 1.4)
nokogiri (1.17.0-x86_64-linux)
racc (~> 1.4)
oai (1.2.1)
Expand Down Expand Up @@ -691,6 +694,7 @@ GEM
zeitwerk (2.7.1)

PLATFORMS
aarch64-linux
x86_64-linux

DEPENDENCIES
Expand Down
4 changes: 4 additions & 0 deletions hydra/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ def authenticate_if_needed
# removing the following 2 lines will re-enable devise auth
def authenticate_user!
end

def current_user
super || guest_user
end
end
6 changes: 0 additions & 6 deletions hydra/app/controllers/saved_searches_controller.rb

This file was deleted.

7 changes: 6 additions & 1 deletion hydra/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Application < Rails::Application
config.load_defaults 5.2

# Autoload lib/ folder including all subdirectories
config.autoload_paths += Dir["#{config.root}/lib/**/"]
config.autoload_paths << Rails.root.join('lib')

# use SideKiq by default
config.active_job.queue_adapter = :sidekiq
Expand All @@ -21,6 +21,11 @@ class Application < Rails::Application
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")).sort.each do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end

Dir.glob(File.join(File.dirname(__FILE__), "../lib/**/*_decorator*.rb")).sort.each do |c|
puts c
Rails.configuration.cache_classes ? require(c) : load(c)
end
end

# Settings in config/environments/* take precedence over those specified here.
Expand Down
8 changes: 4 additions & 4 deletions hydra/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# Suppress logger output for asset requests.
config.assets.quiet = true

# Email Tests
# Email Tests
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
Expand All @@ -75,7 +75,7 @@
port: 25,
enable_starttls_auto: true
}

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

Expand All @@ -84,8 +84,8 @@
config.file_watcher = ActiveSupport::EventedFileUpdateChecker

config.active_job.queue_adapter = :sidekiq

# developers can add their individual ips to this value. This configuration can also take an array
config.web_console.allowed_ips = %w(127.0.0.1 172.0.0.0/8)
config.web_console.allowed_ips = %w(127.0.0.1 172.0.0.0/8 0.0.0.0/0)
config.web_console.development_only = false
end
36 changes: 18 additions & 18 deletions hydra/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
t.bigint "importerexporter_id"
t.text "raw_metadata"
t.text "parsed_metadata"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "last_error_at"
t.datetime "last_succeeded_at"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.datetime "last_error_at", precision: nil
t.datetime "last_succeeded_at", precision: nil
t.string "importerexporter_type", default: "Bulkrax::Importer"
t.integer "import_attempts", default: 0
t.string "status_message", default: "Pending"
Expand Down Expand Up @@ -65,10 +65,10 @@
t.string "export_source"
t.string "export_from"
t.string "export_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "last_error_at"
t.datetime "last_succeeded_at"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.datetime "last_error_at", precision: nil
t.datetime "last_succeeded_at", precision: nil
t.date "start_date"
t.date "finish_date"
t.string "work_visibility"
Expand All @@ -86,8 +86,8 @@
t.integer "processed_records", default: 0
t.integer "deleted_records", default: 0
t.integer "failed_records", default: 0
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "processed_collections", default: 0
t.integer "failed_collections", default: 0
t.integer "total_collection_entries", default: 0
Expand All @@ -111,11 +111,11 @@
t.integer "limit"
t.text "parser_fields"
t.text "field_mapping"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.boolean "validate_only"
t.datetime "last_error_at"
t.datetime "last_succeeded_at"
t.datetime "last_error_at", precision: nil
t.datetime "last_succeeded_at", precision: nil
t.string "status_message", default: "Pending"
t.index ["user_id"], name: "index_bulkrax_importers_on_user_id"
end
Expand All @@ -124,8 +124,8 @@
t.bigint "importer_run_id", null: false
t.string "parent_id", null: false
t.string "child_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "order", default: 0
t.index ["child_id"], name: "index_bulkrax_pending_relationships_on_child_id"
t.index ["importer_run_id"], name: "index_bulkrax_pending_relationships_on_importer_run_id"
Expand All @@ -141,8 +141,8 @@
t.string "statusable_type"
t.integer "runnable_id"
t.string "runnable_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["error_class"], name: "index_bulkrax_statuses_on_error_class"
t.index ["runnable_id", "runnable_type"], name: "bulkrax_statuses_runnable_idx"
t.index ["statusable_id", "statusable_type"], name: "bulkrax_statuses_statusable_idx"
Expand Down

0 comments on commit 7f7dc3f

Please sign in to comment.