remnant 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remnant (0.1.3)
4
+ remnant (0.2.0)
5
5
  statsd-ruby (= 1.0.0)
6
6
 
7
7
  GEM
@@ -24,7 +24,7 @@ class Remnant
24
24
  result = nil
25
25
  Remnant::Discover.running << key
26
26
  begin
27
- Remnant::Discover.results[key] += Benchmark.ms { result = yield }
27
+ Remnant::Discover.results[key] += Benchmark.ms { result = yield }.to_i
28
28
  rescue
29
29
  raise
30
30
  ensure
data/lib/remnant/rails.rb CHANGED
@@ -62,7 +62,7 @@ class Remnant
62
62
  # hook into perform_action for the extra remnant key
63
63
  ::ActionController::Base.class_eval do
64
64
  def perform_action_with_remnant_key(*args, &block) #:nodoc:
65
- ::Remnant::Discover.results[:extra_remnant_key] = "#{params[:controller]}.#{params[:action]}"
65
+ ::Remnant::Discover.results[:extra_remnant_key] = "#{params[:controller].to_s.underscore}.#{params[:action]}"
66
66
  perform_action_without_remnant_key(*args, &block)
67
67
  end
68
68
  alias_method_chain :perform_action, :remnant_key
@@ -1,3 +1,3 @@
1
1
  class Remnant
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -14,10 +14,10 @@ describe Remnant::Discover do
14
14
  it "should add to existing result" do
15
15
  Remnant::Discover.results['fragment'].should == 0
16
16
 
17
- Remnant::Discover.measure('fragment') { 'shattered' }
17
+ Remnant::Discover.measure('fragment') { 'shattered'; sleep 0.1 }
18
18
  shattered_measurement = Remnant::Discover.results['fragment']
19
19
 
20
- Remnant::Discover.measure('fragment') { 'intact' }
20
+ Remnant::Discover.measure('fragment') { 'intact'; sleep 0.1 }
21
21
  Remnant::Discover.results['fragment'].should > shattered_measurement
22
22
  end
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remnant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: