lib/murlsh/dispatch.rb in murlsh-1.2.1 vs lib/murlsh/dispatch.rb in murlsh-1.3.0

- old
+ new

@@ -13,18 +13,18 @@ # Set up database connection and dispatch table. def initialize(config) @config = config url_server = Murlsh::UrlServer.new(config) - config_server = Murlsh::ConfigServer.new(config) + json_server = Murlsh::JsonServer.new(config) root_path = URI(config.fetch('root_url')).path @routes = [ [%r{^HEAD #{root_path}(url)?$}, url_server.method(:head)], [%r{^GET #{root_path}(url)?$}, url_server.method(:get)], [%r{^POST #{root_path}(url)?$}, url_server.method(:post)], - [%r{^HEAD #{root_path}config$}, config_server.method(:head)], - [%r{^GET #{root_path}config$}, config_server.method(:get)], + [%r{^HEAD #{root_path}json\.json$}, json_server.method(:head)], + [%r{^GET #{root_path}json\.json$}, json_server.method(:get)], ] db_init end