From cdd8ff258582f5eba7e3941a5a18007e7aabbbfa Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Thu, 2 Aug 2012 13:38:19 -0400 Subject: Better generators, sample widgets, and more! --- lib/allthethings.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/allthethings.rb b/lib/allthethings.rb index 904a991..8fbef07 100644 --- a/lib/allthethings.rb +++ b/lib/allthethings.rb @@ -54,7 +54,6 @@ get '/views/:widget?.html' do end post '/widgets/:id' do - protected! request.body.rewind body = JSON.parse(request.body.read) auth_token = body.delete("auth_token") @@ -125,5 +124,6 @@ def first_dashboard files.first end -files = Dir[Dir.pwd + '/jobs/*.rb'] +job_path = ENV["JOB_PATH"] || 'jobs' +files = Dir[Dir.pwd + "/#{job_path}/*.rb"] files.each { |job| require(job) } \ No newline at end of file -- cgit v1.2.3