counter_server 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/counter_server CHANGED
@@ -11,6 +11,7 @@ require "rubygems"
11
11
  require "ostruct"
12
12
  require "optparse"
13
13
  require "counter_server"
14
+ require "counter_server/version"
14
15
 
15
16
  options = OpenStruct.new
16
17
  options.bind_host = '0.0.0.0'
@@ -72,8 +73,8 @@ rescue
72
73
  exit(1)
73
74
  end
74
75
 
75
- StatsD.verbose = options.verbose
76
- StatsD.initialize_redis_backend(redis_options)
76
+ CounterServer.verbose = options.verbose
77
+ CounterServer.initialize_redis_backend(redis_options)
77
78
 
78
79
  $stderr.puts "Counter Server #{CounterServer::VERSION} started!"
79
80
 
@@ -82,16 +83,16 @@ EM.run do
82
83
  EM.add_periodic_timer(options.flush_interval) do
83
84
  EM.defer do
84
85
  begin
85
- StatsD.flush
86
+ CounterServer.flush
86
87
  rescue
87
- StatsD.logger.error("trouble flushing: #{$!}")
88
+ CounterServer.logger.error("trouble flushing: #{$!}")
88
89
  end
89
90
  end
90
91
  end
91
92
 
92
- EM.open_datagram_socket(options.bind_host, options.bind_port, StatsD)
93
+ EM.open_datagram_socket(options.bind_host, options.bind_port, CounterServer)
93
94
  rescue
94
- StatsD.logger.error "Exception inside of EM.run: #{$!}"
95
+ CounterServer.logger.error "Exception inside of EM.run: #{$!}"
95
96
  EM.stop_event_loop
96
97
  exit 1
97
98
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "counter_server"
7
7
  s.version = CounterServer::VERSION
8
8
  s.authors = ["Jason Katz-Brown"]
9
- s.email = ["jasonkb@airbnb.com"]
9
+ s.email = ["jason@airbnb.com"]
10
10
  s.homepage = ""
11
11
  s.summary = %q{Counter Server -- listens for statsd-like counts and aggregates them in Redis}
12
12
  s.description = %q{Count things, saves in Redis}
@@ -12,7 +12,7 @@ require "rubygems"
12
12
  require "socket"
13
13
  require 'redis'
14
14
 
15
- module StatsD
15
+ module CounterServer
16
16
  @@counters = Hash.new { |h, k| h[k] = 0 }
17
17
  @@logger = Logger.new(STDERR)
18
18
  @@logger.progname = File.basename($0)
@@ -1,3 +1,3 @@
1
1
  module CounterServer
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: counter_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-04 00:00:00.000000000 Z
12
+ date: 2013-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -45,7 +45,7 @@ dependencies:
45
45
  version: '0'
46
46
  description: Count things, saves in Redis
47
47
  email:
48
- - jasonkb@airbnb.com
48
+ - jason@airbnb.com
49
49
  executables:
50
50
  - counter_server
51
51
  extensions: []