fnordmetric 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +69 -0
- data/Procfile +2 -0
- data/Rakefile +28 -0
- data/VERSION +1 -0
- data/doc/example_server.rb +56 -0
- data/fnordmetric.gemspec +145 -0
- data/haml/app.haml +48 -0
- data/haml/widget.haml +9 -0
- data/lib/fnordmetric.rb +21 -0
- data/lib/fnordmetric/app.rb +70 -0
- data/lib/fnordmetric/average_metric.rb +7 -0
- data/lib/fnordmetric/cache.rb +20 -0
- data/lib/fnordmetric/combine_metric.rb +7 -0
- data/lib/fnordmetric/core.rb +66 -0
- data/lib/fnordmetric/count_metric.rb +13 -0
- data/lib/fnordmetric/dashboard.rb +30 -0
- data/lib/fnordmetric/engine.rb +3 -0
- data/lib/fnordmetric/event.rb +28 -0
- data/lib/fnordmetric/funnel_widget.rb +2 -0
- data/lib/fnordmetric/metric.rb +80 -0
- data/lib/fnordmetric/metric_api.rb +37 -0
- data/lib/fnordmetric/numbers_widget.rb +18 -0
- data/lib/fnordmetric/report.rb +29 -0
- data/lib/fnordmetric/sum_metric.rb +13 -0
- data/lib/fnordmetric/timeline_widget.rb +17 -0
- data/lib/fnordmetric/widget.rb +75 -0
- data/pub/fnordmetric/fnordmetric.css +53 -0
- data/pub/fnordmetric/fnordmetric.js +44 -0
- data/pub/fnordmetric/widget_numbers.js +71 -0
- data/pub/fnordmetric/widget_timeline.css +0 -0
- data/pub/fnordmetric/widget_timeline.js +110 -0
- data/pub/highcharts/adapters/mootools-adapter.js +12 -0
- data/pub/highcharts/adapters/mootools-adapter.src.js +243 -0
- data/pub/highcharts/adapters/prototype-adapter.js +14 -0
- data/pub/highcharts/adapters/prototype-adapter.src.js +284 -0
- data/pub/highcharts/highcharts.js +170 -0
- data/pub/highcharts/highcharts.src.js +11103 -0
- data/pub/highcharts/modules/exporting.js +22 -0
- data/pub/highcharts/modules/exporting.src.js +703 -0
- data/pub/highcharts/themes/dark-blue.js +268 -0
- data/pub/highcharts/themes/dark-green.js +268 -0
- data/pub/highcharts/themes/gray.js +262 -0
- data/pub/highcharts/themes/grid.js +97 -0
- data/pub/jquery-1.6.1.min.js +18 -0
- data/pub/sprite.png +0 -0
- data/readme.rdoc +274 -0
- data/spec/app_spec.rb +178 -0
- data/spec/cache_spec.rb +53 -0
- data/spec/combine_metric_spec.rb +19 -0
- data/spec/core_spec.rb +50 -0
- data/spec/count_metric_spec.rb +32 -0
- data/spec/dashboard_spec.rb +67 -0
- data/spec/event_spec.rb +46 -0
- data/spec/metric_spec.rb +118 -0
- data/spec/report_spec.rb +87 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/sum_metric_spec.rb +33 -0
- data/spec/widget_spec.rb +107 -0
- metadata +271 -0
data/spec/metric_spec.rb
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
require ::File.expand_path('../spec_helper.rb', __FILE__)
|
2
|
+
|
3
|
+
describe FnordMetric::Metric do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
FnordMetric::Event.destroy_all
|
7
|
+
FnordMetric.track('my_event_type', :time => 33.hours.ago, :fnord => "a")
|
8
|
+
FnordMetric.track('my_event_type', :time => 32.hours.ago, :fnord => "b")
|
9
|
+
FnordMetric.track('my_event_type', :time => 28.hours.ago, :fnord => "c")
|
10
|
+
FnordMetric.track('my_event_type', :time => 27.hours.ago, :fnord => "d")
|
11
|
+
FnordMetric.track('my_event_type', :time => 26.hours.ago, :fnord => "e")
|
12
|
+
FnordMetric.track('another_event_type', :time => 26.hours.ago, :fnord => "x")
|
13
|
+
FnordMetric.track('my_event_type', :time => 13.hours.ago, :fnord => "f")
|
14
|
+
FnordMetric.track('my_event_type', :time => 12.hours.ago, :fnord => "g")
|
15
|
+
FnordMetric.track('my_event_type', :time => 11.hours.ago, :fnord => "h")
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should find events by event_type" do
|
19
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type, :another_event_type])
|
20
|
+
metric.events.count.should == 9
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should find events by event_type" do
|
24
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type])
|
25
|
+
metric.events.count.should == 8
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should find events by event_type" do
|
29
|
+
metric = FnordMetric::Metric.new(:types => [:another_event_type])
|
30
|
+
metric.events.count.should == 1
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should find events by time range" do
|
34
|
+
metric = FnordMetric::Metric.new({})
|
35
|
+
metric.events_at(30.hours.ago..20.hours.ago).count.should == 4
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should find events by time range and event type" do
|
39
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type, :another_event_type])
|
40
|
+
metric.events_at(30.hours.ago..20.hours.ago).count.should == 4
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should find events by time range and event type" do
|
44
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type])
|
45
|
+
metric.events_at(30.hours.ago..20.hours.ago).count.should == 3
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should find events until time" do
|
49
|
+
metric = FnordMetric::Metric.new({})
|
50
|
+
metric.events_at(20.hours.ago).count.should == 6
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should find events until time and event type" do
|
54
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type, :another_event_type])
|
55
|
+
metric.events_at(20.hours.ago).count.should == 6
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should find events until time and event type" do
|
59
|
+
metric = FnordMetric::Metric.new(:types => [:my_event_type])
|
60
|
+
metric.events_at(20.hours.ago).count.should == 5
|
61
|
+
end
|
62
|
+
|
63
|
+
it "#from_options should return an instance of the right subclass" do
|
64
|
+
FnordMetric::Metric.from_options(:count => true).should be_a(FnordMetric::CountMetric)
|
65
|
+
FnordMetric::Metric.from_options(:sum => :fnord).should be_a(FnordMetric::SumMetric)
|
66
|
+
FnordMetric::Metric.from_options(:average => :f).should be_a(FnordMetric::AverageMetric)
|
67
|
+
FnordMetric::Metric.from_options(:combine => :l).should be_a(FnordMetric::CombineMetric)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "#from_options should raise if none of the mandatory opts is provided" do
|
71
|
+
lambda{ FnordMetric::Metric.from_options({}) }.should raise_error(RuntimeError)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should never cache value_at(time) where time is in the future" do
|
75
|
+
FnordMetric::Metric.new({}).send(:cache_this?, Time.now.to_i+60).should be_false
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should never cache value_at(time) where time is now" do
|
79
|
+
FnordMetric::Metric.new({}).send(:cache_this?, Time.now.to_i).should be_false
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should always cache value_at(time) where time is in the past" do
|
83
|
+
FnordMetric::Metric.new({}).send(:cache_this?, Time.now.to_i-60).should be_true
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should never cache value_at(range) where range is completely in the future" do
|
87
|
+
range = ((Time.now.to_i+60)..(Time.now.to_i+120))
|
88
|
+
FnordMetric::Metric.new({}).send(:cache_this?, range).should be_false
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should never cache value_at(range) where range is partially in the future" do
|
92
|
+
range = ((Time.now.to_i-60)..(Time.now.to_i+120))
|
93
|
+
FnordMetric::Metric.new({}).send(:cache_this?, range).should be_false
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should never cache value_at(range) where range ends now" do
|
97
|
+
range = ((Time.now.to_i-60)..Time.now.to_i)
|
98
|
+
FnordMetric::Metric.new({}).send(:cache_this?, range).should be_false
|
99
|
+
end
|
100
|
+
|
101
|
+
it "should always cache value_at(range) where range is completely in the past" do
|
102
|
+
range = ((Time.now.to_i-120)..(Time.now.to_i-60))
|
103
|
+
FnordMetric::Metric.new({}).send(:cache_this?, range).should be_true
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should generate a cache key for a time" do
|
107
|
+
time = Time.now.to_i - 120
|
108
|
+
metric = FnordMetric::Metric.new(:name => "my_foobar_metric")
|
109
|
+
metric.send(:cache_key, time).should == "my_foobar_metric|t#{time.to_i}"
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should generate a cache key for a range" do
|
113
|
+
range = ((Time.now.to_i-120)..(Time.now.to_i-60))
|
114
|
+
metric = FnordMetric::Metric.new(:name => "my_foobar_metric")
|
115
|
+
metric.send(:cache_key, range).should == "my_foobar_metric|r#{range.first.to_i}-#{range.last.to_i}"
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
data/spec/report_spec.rb
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
require ::File.expand_path('../spec_helper.rb', __FILE__)
|
2
|
+
|
3
|
+
describe FnordMetric::Report do
|
4
|
+
|
5
|
+
describe "Car Report" do
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
FnordMetric.reset_metrics
|
9
|
+
FnordMetric::Event.destroy_all
|
10
|
+
build_car_report_for_test!
|
11
|
+
sleep 1
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should build the car report" do
|
15
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
16
|
+
report.should be_a(FnordMetric::Report)
|
17
|
+
report.metrics.length.should == 4
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should return a metrics object for each defined metric" do
|
21
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
22
|
+
report.colors_total.should be_a(FnordMetric::Metric)
|
23
|
+
report.cars_total.should be_a(FnordMetric::Metric)
|
24
|
+
report.average_speed.should be_a(FnordMetric::Metric)
|
25
|
+
report.passengers_total.should be_a(FnordMetric::Metric)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should have the right total/current values" do
|
29
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
30
|
+
#report.colors_total.current.should == 3 # FIXME ~paul
|
31
|
+
report.cars_total.current.should == 7
|
32
|
+
#report.average_speed.current.should == 113.6 # FIXME ~paul
|
33
|
+
report.passengers_total.current.should == 16
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "Metric Types" do
|
39
|
+
|
40
|
+
before(:each) do
|
41
|
+
FnordMetric.reset_metrics
|
42
|
+
FnordMetric::Event.destroy_all
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should create a sum-metric if the sum-option is provided" do
|
46
|
+
FnordMetric.metric(:testmetric, :sum => :field_name)
|
47
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
48
|
+
report.testmetric.should be_a(FnordMetric::SumMetric)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should create avg-metric if the avg-option is provided" do
|
52
|
+
FnordMetric.metric(:testmetric, :average => :field_name)
|
53
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
54
|
+
report.testmetric.should be_a(FnordMetric::AverageMetric)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should create a count-metric if the count-option is provided" do
|
58
|
+
FnordMetric.metric(:testmetric, :count => true)
|
59
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
60
|
+
report.testmetric.should be_a(FnordMetric::CountMetric)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should create a sum-metric if the sum-option is provided" do
|
64
|
+
FnordMetric.metric(:testmetric, :combine => :lambda)
|
65
|
+
report = FnordMetric.report(:range => (3.days.ago..Time.now))
|
66
|
+
report.testmetric.should be_a(FnordMetric::CombineMetric)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def build_car_report_for_test!
|
74
|
+
FnordMetric.metric(:colors_total, :count => true, :unique => :color, :types => ['car_seen'])
|
75
|
+
FnordMetric.metric(:cars_total, :count => true, :types => ['car_seen'])
|
76
|
+
FnordMetric.metric(:passengers_total, :sum => :passengers, :types => ['car_seen'])
|
77
|
+
FnordMetric.metric(:average_speed, :average => :speed, :types => ['car_seen'])
|
78
|
+
FnordMetric.track('car_seen', :color => "red", :speed => 130, :passengers => 2)
|
79
|
+
FnordMetric.track('car_seen', :color => "pink", :speed => 150, :passengers => 1)
|
80
|
+
FnordMetric.track('car_seen', :color => "red", :speed => 65, :passengers => 4)
|
81
|
+
FnordMetric.track('car_seen', :color => "blue", :speed => 100, :passengers => 2)
|
82
|
+
FnordMetric.track('car_seen', :color => "red", :speed => 123, :passengers => 2)
|
83
|
+
FnordMetric.track('car_seen', :color => "blue", :speed => 130, :passengers => 3)
|
84
|
+
FnordMetric.track('car_seen', :color => "red", :speed => 142, :passengers => 2)
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rspec'
|
3
|
+
require 'mongoid'
|
4
|
+
require 'rack'
|
5
|
+
require 'rack/test'
|
6
|
+
require 'delorean'
|
7
|
+
|
8
|
+
ENV['RACK_ENV'] = "test"
|
9
|
+
|
10
|
+
Mongoid.configure{ |c| c.master = Mongo::Connection.new.db("fnordmetric_test") }
|
11
|
+
|
12
|
+
$: << ::File.expand_path('../../lib', __FILE__)
|
13
|
+
require "fnordmetric"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require ::File.expand_path('../spec_helper.rb', __FILE__)
|
2
|
+
|
3
|
+
describe FnordMetric::SumMetric do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
FnordMetric::Event.destroy_all
|
7
|
+
FnordMetric.track('a_event_type', :time => 33.hours.ago, :myval => 4)
|
8
|
+
FnordMetric.track('a_event_type', :time => 32.hours.ago, :myval => 2)
|
9
|
+
FnordMetric.track('a_event_type', :time => 28.hours.ago, :myval => 9)
|
10
|
+
FnordMetric.track('a_event_type', :time => 27.hours.ago, :myval => 1)
|
11
|
+
FnordMetric.track('a_event_type', :time => 26.hours.ago, :myval => 6)
|
12
|
+
FnordMetric.track('a_event_type', :time => 13.hours.ago, :myval => 3)
|
13
|
+
FnordMetric.track('a_event_type', :time => 12.hours.ago, :myval => 8)
|
14
|
+
FnordMetric.track('a_event_type', :time => 11.hours.ago, :myval => 7)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should sum events until now" do
|
18
|
+
metric = FnordMetric.metric('a_event_count', :sum => :myval, :types => [:a_event_type])
|
19
|
+
metric.current.should == 40
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should sum events until 18 hours ago" do
|
23
|
+
metric = FnordMetric.metric('a_event_count', :sum => :myval, :types => [:a_event_type])
|
24
|
+
metric.at(18.hours.ago).should == 22
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should sum events from 30 to 20 hours ago" do
|
28
|
+
metric = FnordMetric.metric('a_event_count', :sum => :myval, :types => [:a_event_type])
|
29
|
+
metric.at(30.hours.ago..20.hours.ago).should == 16
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
end
|
data/spec/widget_spec.rb
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
require ::File.expand_path('../spec_helper.rb', __FILE__)
|
2
|
+
|
3
|
+
describe FnordMetric::Widget do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
FnordMetric::Event.destroy_all
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should remembe it's own title" do
|
10
|
+
widget = FnordMetric::Widget.new(:title => "My Widget")
|
11
|
+
widget.title.should == "My Widget"
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should add the report on init" do
|
15
|
+
FnordMetric.metric(:my_metric, :sum => :my_field)
|
16
|
+
report = FnordMetric.report(:range => (4.days.ago..Time.now))
|
17
|
+
widget = FnordMetric::Widget.new(:report => report)
|
18
|
+
widget.report.should == report
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should add the report after init" do
|
22
|
+
FnordMetric.metric(:my_metric, :sum => :my_field)
|
23
|
+
report = FnordMetric.report(:range => (4.days.ago..Time.now))
|
24
|
+
widget = FnordMetric::Widget.new
|
25
|
+
widget.report.should be_nil
|
26
|
+
widget.add_report(report)
|
27
|
+
widget.report.should == report
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should define a new widget when given two metric-token" do
|
31
|
+
FnordMetric.metric(:first_metric, :count => :true)
|
32
|
+
FnordMetric.metric(:second_metric, :count => :true)
|
33
|
+
widget = FnordMetric::Widget.new(:metrics => [:first_metric, :second_metric], :title => "My Widget", :type => :timeline)
|
34
|
+
widget.metrics.length.should == 2
|
35
|
+
widget.metrics.first.should be_a(FnordMetric::CountMetric)
|
36
|
+
widget.metrics.first.token.should == :first_metric
|
37
|
+
widget.metrics.last.should be_a(FnordMetric::CountMetric)
|
38
|
+
widget.metrics.last.token.should == :second_metric
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should define a new widget when given two metrics" do
|
42
|
+
my_metrics = [
|
43
|
+
FnordMetric.metric(:first_metric, :count => :true),
|
44
|
+
FnordMetric.metric(:second_metric, :count => :true)
|
45
|
+
]
|
46
|
+
widget = FnordMetric::Widget.new(:metrics => my_metrics, :title => "My Widget", :type => :timeline)
|
47
|
+
widget.metrics.length.should == 2
|
48
|
+
widget.metrics.first.should be_a(FnordMetric::CountMetric)
|
49
|
+
widget.metrics.first.token.should == :first_metric
|
50
|
+
widget.metrics.last.should be_a(FnordMetric::CountMetric)
|
51
|
+
widget.metrics.last.token.should == :second_metric
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should return the right ticks for 1h intervals" do
|
55
|
+
t = Time.now
|
56
|
+
widget = FnordMetric::Widget.new(:range => (t-2.days)..t, :tick => 1.hour)
|
57
|
+
widget.ticks.length.should == 49
|
58
|
+
ranges_should_match! widget.ticks.first, ((t-48.hours)..(t-47.hours))
|
59
|
+
ranges_should_match! widget.ticks.last, (t..(t+1.hour))
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should generate a default range for daily graphs" do
|
63
|
+
widget = FnordMetric::Widget.new(:tick => 1.day)
|
64
|
+
Delorean.time_travel_to(Time.utc(1992,01,13,18,23,23)) do
|
65
|
+
widget.default_range.first.should == Time.utc(1991,12,15,00,00,00)
|
66
|
+
widget.default_range.last.should == Time.utc(1992,1,13,23,59,59)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should generate ticks with default range for daily graphs" do
|
71
|
+
widget = FnordMetric::Widget.new(:tick => 1.day)
|
72
|
+
Delorean.time_travel_to(Time.utc(1992,01,13,18,23,23)) do
|
73
|
+
widget.ticks.length.should == 30
|
74
|
+
widget.ticks.first.first.utc.should == Time.utc(1991,12,15,00,00,00)
|
75
|
+
widget.ticks.first.last.utc.should == Time.utc(1991,12,16,00,00,00)
|
76
|
+
widget.ticks.last.first.utc.should == Time.utc(1992,1,13,0,0,0)
|
77
|
+
widget.ticks.last.last.utc.should == Time.utc(1992,1,14,0,0,0)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should generate a default range for hourly graphs" do
|
82
|
+
widget = FnordMetric::Widget.new(:tick => 1.hour)
|
83
|
+
Delorean.time_travel_to(Time.utc(1992,01,13,18,23,23)) do
|
84
|
+
widget.default_range.first.should == Time.utc(1992,1,12,19,00,00)
|
85
|
+
widget.default_range.last.should == Time.utc(1992,1,13,18,59,59)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should generate a default range for hourly graphs" do
|
90
|
+
widget = FnordMetric::Widget.new(:tick => 1.hour)
|
91
|
+
Delorean.time_travel_to(Time.utc(1992,01,13,18,23,23)) do
|
92
|
+
widget.ticks.length.should == 24
|
93
|
+
widget.ticks.first.first.utc.should == Time.utc(1992,1,12,19,00,00)
|
94
|
+
widget.ticks.first.last.utc.should == Time.utc(1992,1,12,20,00,00)
|
95
|
+
widget.ticks.last.first.utc.should == Time.utc(1992,1,13,18,0,0)
|
96
|
+
widget.ticks.last.last.utc.should == Time.utc(1992,1,13,19,00,00)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
|
102
|
+
def ranges_should_match!(a, b)
|
103
|
+
(a.first.to_i - b.first.to_i).should == 0
|
104
|
+
(a.last.to_i - b.last.to_i).should == 0
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
metadata
ADDED
@@ -0,0 +1,271 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fnordmetric
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.2
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Paul Asmuth
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-11-05 00:00:00 +01:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: mongoid
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.2.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mongo
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.4.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: bson_ext
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.4.0
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: sinatra
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.2.6
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: json
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: haml
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *id006
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rack
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: rack-test
|
95
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
type: :runtime
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: *id008
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: delorean
|
106
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: "0"
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: *id009
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: rspec
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ~>
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 2.6.0
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: *id010
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: shoulda
|
128
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: "0"
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: *id011
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: bundler
|
139
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ~>
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 1.0.0
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: *id012
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: jeweler
|
150
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ~>
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 1.5.2
|
156
|
+
type: :development
|
157
|
+
prerelease: false
|
158
|
+
version_requirements: *id013
|
159
|
+
description: FnordMetric is a Ruby Event-Tracking gem on steroids
|
160
|
+
email: paul@paulasmuth.com
|
161
|
+
executables: []
|
162
|
+
|
163
|
+
extensions: []
|
164
|
+
|
165
|
+
extra_rdoc_files: []
|
166
|
+
|
167
|
+
files:
|
168
|
+
- .document
|
169
|
+
- Gemfile
|
170
|
+
- Gemfile.lock
|
171
|
+
- Procfile
|
172
|
+
- Rakefile
|
173
|
+
- VERSION
|
174
|
+
- doc/example_server.rb
|
175
|
+
- fnordmetric.gemspec
|
176
|
+
- haml/app.haml
|
177
|
+
- haml/widget.haml
|
178
|
+
- lib/fnordmetric.rb
|
179
|
+
- lib/fnordmetric/app.rb
|
180
|
+
- lib/fnordmetric/average_metric.rb
|
181
|
+
- lib/fnordmetric/cache.rb
|
182
|
+
- lib/fnordmetric/combine_metric.rb
|
183
|
+
- lib/fnordmetric/core.rb
|
184
|
+
- lib/fnordmetric/count_metric.rb
|
185
|
+
- lib/fnordmetric/dashboard.rb
|
186
|
+
- lib/fnordmetric/engine.rb
|
187
|
+
- lib/fnordmetric/event.rb
|
188
|
+
- lib/fnordmetric/funnel_widget.rb
|
189
|
+
- lib/fnordmetric/metric.rb
|
190
|
+
- lib/fnordmetric/metric_api.rb
|
191
|
+
- lib/fnordmetric/numbers_widget.rb
|
192
|
+
- lib/fnordmetric/report.rb
|
193
|
+
- lib/fnordmetric/sum_metric.rb
|
194
|
+
- lib/fnordmetric/timeline_widget.rb
|
195
|
+
- lib/fnordmetric/widget.rb
|
196
|
+
- pub/fnordmetric/fnordmetric.css
|
197
|
+
- pub/fnordmetric/fnordmetric.js
|
198
|
+
- pub/fnordmetric/widget_numbers.js
|
199
|
+
- pub/fnordmetric/widget_timeline.css
|
200
|
+
- pub/fnordmetric/widget_timeline.js
|
201
|
+
- pub/highcharts/adapters/mootools-adapter.js
|
202
|
+
- pub/highcharts/adapters/mootools-adapter.src.js
|
203
|
+
- pub/highcharts/adapters/prototype-adapter.js
|
204
|
+
- pub/highcharts/adapters/prototype-adapter.src.js
|
205
|
+
- pub/highcharts/highcharts.js
|
206
|
+
- pub/highcharts/highcharts.src.js
|
207
|
+
- pub/highcharts/modules/exporting.js
|
208
|
+
- pub/highcharts/modules/exporting.src.js
|
209
|
+
- pub/highcharts/themes/dark-blue.js
|
210
|
+
- pub/highcharts/themes/dark-green.js
|
211
|
+
- pub/highcharts/themes/gray.js
|
212
|
+
- pub/highcharts/themes/grid.js
|
213
|
+
- pub/jquery-1.6.1.min.js
|
214
|
+
- pub/sprite.png
|
215
|
+
- readme.rdoc
|
216
|
+
- spec/app_spec.rb
|
217
|
+
- spec/cache_spec.rb
|
218
|
+
- spec/combine_metric_spec.rb
|
219
|
+
- spec/core_spec.rb
|
220
|
+
- spec/count_metric_spec.rb
|
221
|
+
- spec/dashboard_spec.rb
|
222
|
+
- spec/event_spec.rb
|
223
|
+
- spec/metric_spec.rb
|
224
|
+
- spec/report_spec.rb
|
225
|
+
- spec/spec_helper.rb
|
226
|
+
- spec/sum_metric_spec.rb
|
227
|
+
- spec/widget_spec.rb
|
228
|
+
has_rdoc: true
|
229
|
+
homepage: http://github.com/paulasmuth/fnordmetric
|
230
|
+
licenses:
|
231
|
+
- MIT
|
232
|
+
post_install_message:
|
233
|
+
rdoc_options: []
|
234
|
+
|
235
|
+
require_paths:
|
236
|
+
- lib
|
237
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
238
|
+
none: false
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
hash: -12181551
|
243
|
+
segments:
|
244
|
+
- 0
|
245
|
+
version: "0"
|
246
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
247
|
+
none: false
|
248
|
+
requirements:
|
249
|
+
- - ">="
|
250
|
+
- !ruby/object:Gem::Version
|
251
|
+
version: "0"
|
252
|
+
requirements: []
|
253
|
+
|
254
|
+
rubyforge_project:
|
255
|
+
rubygems_version: 1.6.2
|
256
|
+
signing_key:
|
257
|
+
specification_version: 3
|
258
|
+
summary: FnordMetric is a Ruby Event-Tracking gem on steroids
|
259
|
+
test_files:
|
260
|
+
- spec/app_spec.rb
|
261
|
+
- spec/cache_spec.rb
|
262
|
+
- spec/combine_metric_spec.rb
|
263
|
+
- spec/core_spec.rb
|
264
|
+
- spec/count_metric_spec.rb
|
265
|
+
- spec/dashboard_spec.rb
|
266
|
+
- spec/event_spec.rb
|
267
|
+
- spec/metric_spec.rb
|
268
|
+
- spec/report_spec.rb
|
269
|
+
- spec/spec_helper.rb
|
270
|
+
- spec/sum_metric_spec.rb
|
271
|
+
- spec/widget_spec.rb
|