lib/app.rb in puppetdb_rundeck-0.3.1 vs lib/app.rb in puppetdb_rundeck-1.0.0

- old
+ new

@@ -11,11 +11,11 @@ class PuppetDBRunDeck < Sinatra::Base def initialize(app = nil, params = {}) super(app) puppetdb_helper = Helpers::PuppetDB.new(settings.puppetdb_host, settings.puppetdb_port) - @endpoint = EndPoint.new(puppetdb_helper) + @endpoint = EndPoint.new(puppetdb_helper, settings.cache_timeout, settings.thread_count) end get '/' do redirect to('/api') end @@ -24,20 +24,20 @@ haml :api end get '/api/yaml' do content_type 'text/yaml' - content = @endpoint.to_yaml() + content = @endpoint.to_yaml(true) end get '/api/xml' do content_type 'application/xml' - content = @endpoint.to_xml() + content = @endpoint.to_xml(true) end get '/api/json' do content_type 'application/json' - content = @endpoint.to_json() + content = @endpoint.to_json(true) end get '/cache' do haml :cache end