Skip to content

Commit

Permalink
HYDRA-428 moving definition of require_plugin_dependency into hydra-h…
Browse files Browse the repository at this point in the history
…ead.rb
  • Loading branch information
flyingzumwalt committed May 1, 2011
1 parent 0a84694 commit e11b640
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
11 changes: 0 additions & 11 deletions init.rb
@@ -1,12 +1 @@
# Include hook code here
require "solrizer"
require "solrizer-fedora"

module ActiveSupport::Dependencies::Loadable
# Provides a hook for intercepting calls to require_dependency that are referencing other plugins
def require_plugin_dependency(dependency_path)
modified_path = dependency_path
p "requiring #{modified_path}"
require_dependency modified_path
end
end
2 changes: 1 addition & 1 deletion lib/blacklight.rb
@@ -1,4 +1,4 @@
require "init" # This is a hacky way of ensuring that require_plugin_dependency is defined.
require "hydra-head" # This is a hacky way of ensuring that require_plugin_dependency is defined.
module Blacklight

require_plugin_dependency "vendor/plugins/blacklight/lib/blacklight.rb"
Expand Down
10 changes: 10 additions & 0 deletions lib/hydra-head.rb
@@ -1,11 +1,21 @@
require "active-fedora"
require "solrizer"
require "solrizer-fedora"

module Hydra
module Head
# require 'hydra-head/engine' if defined?(Rails)
require 'hydra-head/version'
end
end

module ActiveSupport::Dependencies::Loadable
# Provides a hook for intercepting calls to require_dependency that are referencing other plugins
def require_plugin_dependency(dependency_path)
require_dependency modified_path
end
end

Dir[File.join(File.dirname(__FILE__), "hydra", "**", "*.rb")].each {|f| require f}
require "hydra"
require "stanford_blacklight_extensions"
Expand Down

0 comments on commit e11b640

Please sign in to comment.