From bd47af5744c4e68cadffb395463d717a7f2c42ff Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 19 Dec 2012 09:42:55 -0800 Subject: [PATCH] alternative asset_host initializer --- middleman-more/lib/middleman-more/extensions/asset_host.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/middleman-more/lib/middleman-more/extensions/asset_host.rb b/middleman-more/lib/middleman-more/extensions/asset_host.rb index d43e9a39..deb708d3 100644 --- a/middleman-more/lib/middleman-more/extensions/asset_host.rb +++ b/middleman-more/lib/middleman-more/extensions/asset_host.rb @@ -9,10 +9,13 @@ module Middleman class << self # Once registered - def registered(app) - # Default to no host + def registered(app, options={}) app.config.define_setting :asset_host, false, 'The asset host to use, or false for no asset host, or a Proc to determine asset host' + if options[:host] + config[:asset_host] = options[:host] + end + # Include methods app.send :include, InstanceMethods end