statsd-instrument 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,3 +6,5 @@ Rake::TestTask.new('test') do |t|
6
6
  t.libs << 'lib'
7
7
  t.test_files = FileList['test/*.rb']
8
8
  end
9
+
10
+ task :default => :test
@@ -1,6 +1,12 @@
1
1
  require 'socket'
2
2
  require 'benchmark'
3
3
 
4
+ class << Benchmark
5
+ def ms
6
+ 1000 * realtime { yield }
7
+ end
8
+ end
9
+
4
10
  module StatsD
5
11
  class << self
6
12
  attr_accessor :host, :port, :mode, :logger, :enabled, :default_sample_rate
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "statsd-instrument"
3
- s.version = '1.1.0'
3
+ s.version = '1.1.1'
4
4
  s.authors = ["Jesse Storimer"]
5
5
  s.email = ["jesse@shopify.com"]
6
6
  s.homepage = "http://github.com/shopify/statsd-instrument"
@@ -100,7 +100,7 @@ class StatsDTest < Test::Unit::TestCase
100
100
  def test_statsd_measure
101
101
  ActiveMerchant::UniqueGateway.statsd_measure :ssl_post, 'ActiveMerchant.Gateway.ssl_post'
102
102
 
103
- StatsD.expects(:measure).with(includes('ssl_post')).returns({:success => true})
103
+ StatsD.expects(:write).with('ActiveMerchant.Gateway.ssl_post', is_a(Float), :ms).returns({:success => true})
104
104
  ActiveMerchant::UniqueGateway.new.purchase(true)
105
105
  end
106
106
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-05 00:00:00.000000000 Z
12
+ date: 2011-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mocha
16
- requirement: &2156605620 !ruby/object:Gem::Requirement
16
+ requirement: &2164776740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2156605620
24
+ version_requirements: *2164776740
25
25
  description: A StatsD client for Ruby apps. Provides metaprogramming methods to inject
26
26
  StatsD instrumentation into your code.
27
27
  email: