rorvswild 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6e52c1a22d430fa8b500f62fdd31f181167db81
4
- data.tar.gz: 2f5733d3c6e7dc928d375f16a4aa73e11ec70ffd
3
+ metadata.gz: cd81d31b9aac03a0dc8b5e377cf4dbfb034a993c
4
+ data.tar.gz: afdc143562ff17b190b3e9c3aed065a7e5d51b6f
5
5
  SHA512:
6
- metadata.gz: 4cf9c4add4dc657ced2e51a965d3aa1506582a9c93f9e4176e66560715833b1dde19b2321b42b7bdbdddf537b0e7a32ceb90034b900119eaf9b63a49cb2af716
7
- data.tar.gz: f8fda54c4b7cd69c6aa62100af1dccc2e0c36dc12d15d5a7992d92adc7afa0cf25b8d3ba7be6cbd13a1cdd80da0c4d23a0481618aa482f736060bc9b819fd3d6
6
+ metadata.gz: 377c1613b634aac15d43c729f915562046931d23b0685e78f450546d93d9f31d4fc341e4d23526d627a63a2647419c4b3f7627afe93d36d1317aa3e7680c5a56
7
+ data.tar.gz: 89d197e41c1133c7e7140a7818ecca16d8475e4cb0dae73f53f283f5604101f16bcb38af758de91d1ac82ce56ea7f7f19b85f939046ec8bd4887e46057a62025
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "0.0.9".freeze
2
+ VERSION = "0.1.0".freeze
3
3
  end
data/lib/rorvswild.rb CHANGED
@@ -57,14 +57,14 @@ module RorVsWild
57
57
  end
58
58
 
59
59
  def setup_callbacks
60
+ client = self
60
61
  ActiveSupport::Notifications.subscribe("sql.active_record", &method(:after_sql_query))
61
62
  ActiveSupport::Notifications.subscribe("render_template.action_view", &method(:after_view_rendering))
62
63
  ActiveSupport::Notifications.subscribe("process_action.action_controller", &method(:after_http_request))
63
64
  ActiveSupport::Notifications.subscribe("start_processing.action_controller", &method(:before_http_request))
64
-
65
- client = self
66
65
  ActionController::Base.rescue_from(StandardError) { |exception| client.after_exception(exception, self) }
67
66
 
67
+ Resque::Job.send(:extend, ResquePlugin) if defined?(Resque::Job)
68
68
  Delayed::Worker.lifecycle.around(:invoke_job, &method(:around_delayed_job)) if defined?(Delayed::Worker)
69
69
  end
70
70
 
@@ -291,4 +291,10 @@ module RorVsWild
291
291
  logger.error("[RorVsWild] " + exception.backtrace.join("\n[RorVsWild] "))
292
292
  end
293
293
  end
294
+
295
+ module ResquePlugin
296
+ def around_perform_rorvswild(*args, &block)
297
+ RorVsWild.measure_block(to_s + "#perform", &block)
298
+ end
299
+ end
294
300
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rorvswild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler