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 +1 -1
- data/lib/remnant/discover.rb +1 -1
- data/lib/remnant/rails.rb +1 -1
- data/lib/remnant/version.rb +1 -1
- data/spec/discover_spec.rb +2 -2
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/remnant/discover.rb
CHANGED
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
|
data/lib/remnant/version.rb
CHANGED
data/spec/discover_spec.rb
CHANGED
@@ -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
|
|