lib/shirinji-rails/railtie.rb in shirinji-rails-0.0.2 vs lib/shirinji-rails/railtie.rb in shirinji-rails-0.0.3
- old
+ new
@@ -9,23 +9,24 @@
initializer 'shirinji-rails.load_config' do
init!
end
def init!
- return unless config_path
+ return unless (conf = config_path)
- map = eval File.read(config_path)
+ map = eval File.read(conf)
config.shirinji.resolver = Shirinji::Resolver.new(map)
ActiveSupport::Reloader.to_prepare do
- ::Rails.application.config.shirinji.resolver.reset_cache
+ map = eval File.read(conf)
+ ::Rails.application.config.shirinji.resolver.reload(map)
end
end
private
def config_path
::Rails.application.config.shirinji.config_path ||
::Rails.root.join('config/dependencies.rb')
end
end
-end
\ No newline at end of file
+end