Skip to content

Commit 3d5c744

Browse files
author
Andre Lewis
committed
changed chart color scheme, fixed environment detection, and removed sinatra from gemspec (since it's vendored)
1 parent b9184e2 commit 3d5c744

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

Rakefile

+15
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
require "bundler/gem_tasks"
2+
3+
4+
# put the current packaged version of the gem in dropbox
5+
desc "copies the current packaged .gem file to dropbox and prints the URL"
6+
task :dropbox do
7+
8+
path=File.dirname(__FILE__)+"/pkg/scout_realtime-#{Scout::Realtime::VERSION}.gem"
9+
if !File.exists?(path)
10+
puts "Doesn't exist: #{path}. Try rake build"
11+
exit(0)
12+
end
13+
14+
FileUtils.copy(path, "/Users/andre/Dropbox/Public/")
15+
puts "wget https://dl.dropboxusercontent.com/u/18554/scout_realtime-#{Scout::Realtime::VERSION}.gem; sudo gem install scout_realtime"
16+
end

lib/scout_realtime/web/javascripts/application.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var tv = 1000;
2-
palette = new Rickshaw.Color.Palette({ scheme: 'spectrum14' });
2+
palette = new Rickshaw.Color.Palette({ scheme: 'munin' });
33

44
var chartDefs = {
55
/* CPU */
@@ -71,7 +71,7 @@ $(function () {
7171

7272
var graph = new Rickshaw.Graph({
7373
element: this,
74-
renderer: 'stack',
74+
renderer: 'line',
7575
series: new Rickshaw.Series.FixedDuration(hash,
7676
palette, {
7777
timeInterval: tv,

lib/scout_realtime/web_app.rb

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
require 'sinatra'
2-
require 'sinatra/reloader' if development?
2+
require 'sinatra/reloader' if ENV["RACK_ENV"].to_s == "development"
33
require 'ostruct'
44

55
class Scout::Realtime::WebApp < Sinatra::Base
66

7-
configure :development do
8-
register Sinatra::Reloader
9-
end
10-
117
set :port, 5555
128
set :static, true # set up static file routing
139
set :public_dir, File.expand_path('../web', __FILE__) # set up the static dir (with images/js/css inside)
1410
set :views, File.expand_path('../web/views', __FILE__) # set up the views dir
11+
set :environment, ENV["RACK_ENV"] && ENV["RACK_ENV"] != '' ? ENV["RACK_ENV"] : :production
12+
13+
configure :development do
14+
register Sinatra::Reloader
15+
end
1516

1617
get '/' do
1718
latest_run = Scout::Realtime::Main.instance.collector.latest_run

scout_realtime.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
2626
spec.add_development_dependency "sinatra-contrib"
2727

2828
spec.add_runtime_dependency "server_metrics"
29-
spec.add_runtime_dependency "sinatra"
29+
#spec.add_runtime_dependency "sinatra" # vendored for now
3030
end

0 commit comments

Comments
 (0)