diff options
author | Tyler Mauthe <me@tylermauthe.com> | 2017-04-05 23:19:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 23:19:51 -0700 |
commit | 08a11d0a8680124eaec0702d0a9869ed4e6bfef5 (patch) | |
tree | 7e1304c89589f4cee7f839d4264fe9a73c58f634 | |
parent | e1c1c9d1d60fcfb568252776fe90633f0e0c8bc4 (diff) | |
parent | 27c6007b0101695241b38853aa60da6ec899fc9f (diff) |
Merge pull request #52 from teancom/master
Use old-style hash syntax to enable compatibility with ruby 1.8.7
-rw-r--r-- | lib/dashing/app.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index 0ff3085..5ee085f 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -34,16 +34,18 @@ set :root, Dir.pwd set :sprockets, Sprockets::Environment.new(settings.root) set :assets_prefix, '/assets' set :digest_assets, false -set server: 'thin', connections: [], history_file: 'history.yml' +set :server, 'thin' +set :connections, [] +set :history_file, 'history.yml' set :public_folder, File.join(settings.root, 'public') set :views, File.join(settings.root, 'dashboards') set :default_dashboard, nil set :auth_token, nil if File.exists?(settings.history_file) - set history: YAML.load_file(settings.history_file) + set :history, YAML.load_file(settings.history_file) else - set history: {} + set :history, {} end %w(javascripts stylesheets fonts images).each do |path| @@ -55,7 +57,7 @@ end end not_found do - send_file File.join(settings.public_folder, '404.html'), status: 404 + send_file File.join(settings.public_folder, '404.html'), :status => 404 end at_exit do @@ -70,7 +72,7 @@ get '/' do redirect "/" + dashboard end -get '/events', provides: 'text/event-stream' do +get '/events', :provides => 'text/event-stream' do protected! response.headers['X-Accel-Buffering'] = 'no' # Disable buffering for nginx stream :keep_open do |out| |