fnordmetric 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -2
- data/README.md +1 -1
- data/fnordmetric.gemspec +1 -1
- data/lib/fnordmetric.rb +10 -7
- data/lib/fnordmetric/version.rb +1 -1
- data/lib/fnordmetric/worker.rb +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@ FnordMetric is a highly configurable (and pretty fast) realtime app/event
|
|
5
5
|
tracking thing based on ruby eventmachine and redis. You define your own
|
6
6
|
plotting and counting functions as ruby blocks!
|
7
7
|
|
8
|
-
[ ![Build status - Travis-ci][
|
8
|
+
[ ![Build status - Travis-ci](https://secure.travis-ci.org/paulasmuth/fnordmetric.png) ](http://travis-ci.org/paulasmuth/fnordmetric) [ ![Dependency status - Gemnasium](https://gemnasium.com/paulasmuth/fnordmetric.png) ](https://gemnasium.com/paulasmuth/fnordmetric)
|
9
9
|
|
10
10
|
[SCREENCAST][2]: the FnordMetric-instance we use to track our social dating app.
|
11
11
|
|
data/fnordmetric.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_dependency "activesupport"
|
30
30
|
|
31
31
|
s.add_development_dependency "delorean"
|
32
|
-
s.add_development_dependency "rspec", "~> 2.
|
32
|
+
s.add_development_dependency "rspec", "~> 2.8.0"
|
33
33
|
s.add_development_dependency "shoulda"
|
34
34
|
|
35
35
|
s.files = `git ls-files`.split("\n") - [".gitignore", ".rspec", ".travis.yml"]
|
data/lib/fnordmetric.rb
CHANGED
@@ -5,7 +5,7 @@ require "active_support/core_ext"
|
|
5
5
|
require 'yajl'
|
6
6
|
require 'sinatra/base'
|
7
7
|
require 'haml'
|
8
|
-
require '
|
8
|
+
require 'rack/server'
|
9
9
|
|
10
10
|
require "fnordmetric/version"
|
11
11
|
|
@@ -28,6 +28,7 @@ module FnordMetric
|
|
28
28
|
|
29
29
|
opts[:inbound_stream] ||= ["0.0.0.0", "1337"]
|
30
30
|
opts[:web_interface] ||= ["0.0.0.0", "4242"]
|
31
|
+
opts[:web_interface_server] ||= "thin"
|
31
32
|
|
32
33
|
opts[:start_worker] ||= true
|
33
34
|
opts[:print_stats] ||= 3
|
@@ -53,14 +54,16 @@ module FnordMetric
|
|
53
54
|
app = embedded(opts)
|
54
55
|
|
55
56
|
if opts[:web_interface]
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
rescue Exception => e
|
60
|
-
log "cant start FnordMetric::App. port in use?"
|
57
|
+
server = opts[:web_interface_server].downcase
|
58
|
+
unless ["thin", "hatetepe"].include? server
|
59
|
+
raise "Need an EventMachine webserver, but #{server} isn't"
|
61
60
|
end
|
62
|
-
end
|
63
61
|
|
62
|
+
host, port = *opts[:web_interface]
|
63
|
+
Rack::Server.start :app => app, :server => server,
|
64
|
+
:Host => host, :Port => port
|
65
|
+
log "listening on http://#{host}:#{port}"
|
66
|
+
end
|
64
67
|
end
|
65
68
|
end
|
66
69
|
|
data/lib/fnordmetric/version.rb
CHANGED
data/lib/fnordmetric/worker.rb
CHANGED
@@ -24,7 +24,7 @@ class FnordMetric::Worker
|
|
24
24
|
if event_id
|
25
25
|
@redis.get(event_key(event_id)).callback do |event_data|
|
26
26
|
process_event(event_id, event_data) if event_data
|
27
|
-
FnordMetric.log("event_lost: event_data not found for event-id '#{event_id}'") unless event_data
|
27
|
+
FnordMetric.log("event_lost: event_data not found for event-id '#{event_id}' - maybe expired?") unless event_data
|
28
28
|
@redis.hincrby(stats_key, :events_processed, 1)
|
29
29
|
end
|
30
30
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: fnordmetric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.6.
|
5
|
+
version: 0.6.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paul Asmuth
|
@@ -175,7 +175,7 @@ dependencies:
|
|
175
175
|
requirements:
|
176
176
|
- - ~>
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version: 2.
|
178
|
+
version: 2.8.0
|
179
179
|
type: :development
|
180
180
|
version_requirements: *id015
|
181
181
|
- !ruby/object:Gem::Dependency
|