Created
March 1, 2012 03:07
-
-
Save knewter/1946938 to your computer and use it in GitHub Desktop.
I N C E P T I O N . . .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nested_vendored_plugins = Dir["./vendor/plugins/mapto/vendor/plugins/**"] | |
nested_vendored_plugins = Dir["./vendor/plugins/mapto/vendor/cms/vendor/plugins/**"] + nested_vendored_plugins | |
# THIS DOES NEAT STUFF DON'T REMOVE | |
inject_nested_plugin = Proc.new do |plugin| | |
eval <<-EOF | |
config.plugin_locators.unshift( | |
Class.new(Rails::Plugin::Locator) do | |
def plugins | |
[Rails::Plugin.new(File.expand_path("#{plugin}"))] | |
end | |
end | |
) | |
EOF | |
end | |
# Just take paperclip plugins from mapto, rather than both mapto and cms. Was causing problems. | |
Dir["./vendor/plugins/mapto/vendor/plugins/paperclip*"].each do |nested_plugin| | |
inject_nested_plugin.call(nested_plugin) | |
end | |
nested_vendored_plugins.each do |nested_plugin| | |
next if nested_plugin =~ /paperclip/ | |
inject_nested_plugin.call(nested_plugin) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment