datascope 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78fb337cb02f0ecd0fa8f95023653e5183661e2c
4
- data.tar.gz: 3fae0d13362dd041b763f75a3597eb21b7db8deb
3
+ metadata.gz: 281438ec6bf435cf98848920f227afb12fdb1c33
4
+ data.tar.gz: cbbd126b40f5a5369c57408d4a748e615174ae52
5
5
  SHA512:
6
- metadata.gz: 6482ba16540df9519bc3e2185e39f5c102478bb7c4dc213310472ab7fb7cc98923fe34a99ecd0a4a63777e2a4ee448ae35fc147722ae97cb81af697c164bb0a4
7
- data.tar.gz: 831bed427c098351b560b64143feeec74020ce733593ab10c2227b1d6774a6bc43670d4f2c26300201803f4b86dbdf42eb90f7d1f0175532525e8e694b7affce
6
+ metadata.gz: 351980c6f70437a437230e56b3031c5ea76b02a70f25a0041adcdffcf9cbed9ce426758968032235c2815b6f13da3a1823ec13fe4a5fddebf660f2d26751f861
7
+ data.tar.gz: 16a1cfbc889058ea96054da02c36a378ccc692708f3b2de774a59dd6a967963435ddd822c0c75a9f0d85e629af9dc931da2be4e25b47e7c07317d1c92443d007
data/datascope.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "datascope"
7
- gem.version = "0.0.3"
7
+ gem.version = "0.0.4"
8
8
  gem.authors = ["Will Leinweber"]
9
9
  gem.email = []
10
10
  gem.description = %q{postgres 9.2 visibility}
@@ -4,7 +4,7 @@ context = cubism.context()
4
4
 
5
5
  getThing = (name, selector) ->
6
6
  context.metric( (start,stop,step,callback)->
7
- url = "/metric?selector=#{selector}&start=#{start.toISOString()}&stop=#{stop.toISOString()}&step=#{step}"
7
+ url = "metric?selector=#{selector}&start=#{start.toISOString()}&stop=#{stop.toISOString()}&step=#{step}"
8
8
  d3.json url, (data) ->
9
9
  return callback(new Error('could not load data')) unless data
10
10
  callback(null, data)
@@ -13,7 +13,7 @@ getThing = (name, selector) ->
13
13
 
14
14
 
15
15
 
16
- $.getJSON('/queries', (data) ->
16
+ $.getJSON('queries', (data) ->
17
17
  console.log(data)
18
18
  $ -> _.each(data, (it) -> $('#queries').append("<li><em>#{it.calls}c, #{it.total_time}ms</em> #{it.query}</li>"))
19
19
  )
data/lib/datascope.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'sinatra/base'
2
+ require 'rack/coffee'
2
3
  require 'sequel'
3
4
  require 'json'
4
5
  require 'haml'
@@ -12,6 +13,12 @@ class Datascope < Sinatra::Base
12
13
  end
13
14
  end
14
15
 
16
+ set :root, File.expand_path(File.dirname(__FILE__) + "/../")
17
+ set :public_folder, Proc.new { "#{root}/public" }
18
+ set :views, Proc.new { "#{root}/views" }
19
+
20
+ use Rack::Coffee, :root => root
21
+
15
22
  get '/' do
16
23
  haml :index
17
24
  end
data/views/index.haml CHANGED
@@ -1,13 +1,13 @@
1
1
  !!!
2
2
 
3
- %link{rel: 'stylesheet', href: '/css/style.css'}
3
+ %link{rel: 'stylesheet', href: 'css/style.css'}
4
4
  %script{src: '//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js'}
5
- %script{src: '/javascripts/underscore-min.js'}
6
- %script{src: '/javascripts/d3.v2.js'}
7
- %script{src: '/javascripts/cubism.v1.js'}
5
+ %script{src: 'javascripts/underscore-min.js'}
6
+ %script{src: 'javascripts/d3.v2.js'}
7
+ %script{src: 'javascripts/cubism.v1.js'}
8
8
 
9
9
  %body
10
- %script{src: '/javascripts/client.js'}
10
+ %script{src: 'javascripts/client.js'}
11
11
 
12
12
  %h1 datascope
13
13
  #cubism
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datascope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Leinweber