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 CHANGED
@@ -2,6 +2,5 @@ source :rubygems
2
2
 
3
3
  gemspec
4
4
 
5
- gem "yajl-ruby", :git => "git://github.com/brianmario/yajl-ruby.git"
6
-
7
5
  gem "rake"
6
+ gem "yajl-ruby", :git => "git://github.com/brianmario/yajl-ruby.git"
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][3] ][4]
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.6.0"
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 'thin'
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
- begin
57
- Thin::Server.start(*opts[:web_interface], app)
58
- log "listening on http##{opts[:web_interface].join(":")}"
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
 
@@ -1,3 +1,3 @@
1
1
  module FnordMetric
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
@@ -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
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.6.0
178
+ version: 2.8.0
179
179
  type: :development
180
180
  version_requirements: *id015
181
181
  - !ruby/object:Gem::Dependency