ad_agent 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/ad_agent.rb +19 -0
  2. metadata +78 -0
data/lib/ad_agent.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'aquarium'
2
+
3
+ include Aquarium::DSL
4
+ include Aquarium::Aspects
5
+
6
+ puts 'Starting adagent...'
7
+
8
+ ActiveSupport::Notifications.subscribe do |name, start, finish, id, payload|
9
+ Rails.logger.debug(["NOTIFICATION:", name, start, finish, payload].join(' '))
10
+ end
11
+
12
+ Aspect.new :around, :method_options => [:exclude_ancestor_methods], :on_types => %r(.*Controller) do |join_point, object, *args|
13
+ p "Entering: #{join_point.target_type.name}##{join_point.method_name} for object #{object}"
14
+ result = join_point.proceed
15
+ p "Leaving: #{join_point.target_type.name}##{join_point.method_name} for object #{object}"
16
+ result # block needs to return the result of the "proceed"!
17
+ end
18
+
19
+ puts 'Adagent started'
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ad_agent
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Volodymyr Sorokin
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-05-16 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: aquarium
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ description: A simple Hello World RoR Application Diagnostics Agent
35
+ email: volodymyr_sorokin_cw@bmc.com
36
+ executables: []
37
+
38
+ extensions: []
39
+
40
+ extra_rdoc_files: []
41
+
42
+ files:
43
+ - lib/ad_agent.rb
44
+ homepage:
45
+ licenses: []
46
+
47
+ post_install_message:
48
+ rdoc_options: []
49
+
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ hash: 3
67
+ segments:
68
+ - 0
69
+ version: "0"
70
+ requirements: []
71
+
72
+ rubyforge_project:
73
+ rubygems_version: 1.8.24
74
+ signing_key:
75
+ specification_version: 3
76
+ summary: RoR Application Diagnostics Agent
77
+ test_files: []
78
+