wd_sinatra 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Weasel Diesel Sinatra Changelog
2
2
 
3
+ ## 1.0.5
4
+ * Minor update to the `WeaselDiesel` class and the
5
+ newrelic instrumentation to be compatible with the latest version and to
6
+ fix a bug which prevented some tracing.
7
+
3
8
  ## 1.0.4
4
9
  * Minor change to the Rakefile to support the new
5
10
  `wd_sinatra_active_record` gem.
@@ -4,6 +4,11 @@ require 'json'
4
4
 
5
5
  class WeaselDiesel
6
6
 
7
+ # @return [RequestHandler] The reference handler that gets cloned for each request.
8
+ # Every time you call `service.handler`, you get a clone of the alpha_handler. This getter
9
+ # is here in case you need to change something to the reference handler.
10
+ attr_reader :alpha_handler
11
+
7
12
  class RequestHandler
8
13
  extend Forwardable
9
14
 
@@ -1,5 +1,5 @@
1
1
  module WD
2
2
  module Sinatra
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  if defined?(NewRelic)
2
- if RACK_ENV == 'development'
3
- require 'new_relic/rack/developer_mode'
4
- use NewRelic::Rack::DeveloperMode
5
- end
6
- if NewRelic::Control.instance.agent_enabled?
2
+ #if RACK_ENV == 'development'
3
+ #require 'new_relic/rack/developer_mode'
4
+ #use NewRelic::Rack::DeveloperMode
5
+ #end
6
+ if NewRelic::Agent.config[:agent_enabled]
7
7
  LOGGER.info "New Relic monitoring enabled App name: '#{NewRelic::Control.instance['app_name']}', Mode: '#{NewRelic::Control.instance.app}'"
8
8
  end
9
9
  end
@@ -23,9 +23,10 @@ DependencyDetection.defer do
23
23
  end
24
24
  # Monitor the actual dispatch of each service
25
25
  WSList.all.each do |service|
26
- service.handler.class_eval do
26
+ # Ruby 1.9 only - time to update!
27
+ service.alpha_handler.singleton_class.class_eval do
27
28
  add_method_tracer :service_dispatch, 'Service/Dispatch'
28
- end
29
+ end if service.alpha_handler && service.alpha_handler.respond_to?(:singleton_class)
29
30
  end
30
31
  end
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wd_sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
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: 2012-11-14 00:00:00.000000000 Z
12
+ date: 2013-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  segments:
226
226
  - 0
227
- hash: 3412356469792400961
227
+ hash: -4151625272018246957
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  none: false
230
230
  requirements:
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  version: '0'
234
234
  segments:
235
235
  - 0
236
- hash: 3412356469792400961
236
+ hash: -4151625272018246957
237
237
  requirements: []
238
238
  rubyforge_project:
239
239
  rubygems_version: 1.8.24