appsignal-mongo 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWUwNzA0NmMzNTFmMzI0ZjcyYzZhY2YxZGRmZTJkMTJkMmM0YzYwNA==
5
+ data.tar.gz: !binary |-
6
+ NjQ4NjEzYjFkM2Y2ODBlODM5NGVjMGIzNzMxODQ5N2EyZWUxZDI1ZQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MjhmNjhkZGFjZjRmZDA5N2Q4MzkzOWZiYTFiODQ2M2IxNGUwZDhiNGJkZTI1
10
+ YzU3NjkzY2U5NWVkN2U3NDZkYjQ5YjRlOTE1MTJjNDI2NDNhNzU1YWVhMjVh
11
+ M2VlODJmODNlZjAzMmY5ZDBiMGEyNGI3OTlhODYwMWY4MDY4NGU=
12
+ data.tar.gz: !binary |-
13
+ ZDFkODNjOTUzMDgxNzg5NzFjZGMwMzQ1NjU5YmQ3ZTIzYWUwNDA4NjBkNzQ2
14
+ ZDUxYTE2ZWU2ODkzNDAxMjljYTJjZjRkYzY0NTVkMDA3YTIyOWQ4MDBkNmYw
15
+ NDc0MjU3NTRiYTdkOWNlMTRhM2JmOGQzZGIzNTg3NzcyNTE3ZGY=
data/README.md CHANGED
@@ -13,6 +13,7 @@ For more information, visit:
13
13
  * [AppSignal client gem](https://github.com/appsignal/appsignal)
14
14
 
15
15
  [<img src="https://travis-ci.org/appsignal/appsignal-mongo.png?branch=master"/>](http://travis-ci.org/appsignal/appsignal-mongo)
16
+ [<img src="https://codeclimate.com/github/appsignal/appsignal-mongo.png"/>](https://codeclimate.com/github/appsignal/appsignal-mongo)
16
17
 
17
18
  Licence
18
19
  =======
@@ -3,13 +3,30 @@ module Appsignal
3
3
  module Instrumentation
4
4
  EVENT_NAME = 'query.mongodb'.freeze
5
5
 
6
+ def self.deep_clone(value)
7
+ case value
8
+ when Hash
9
+ result = {}
10
+ value.each { |k, v| result[k] = deep_clone(v) }
11
+ result
12
+ when Array
13
+ value.map { |v| deep_clone(v) }
14
+ when Symbol, Numeric, true, false, nil
15
+ value
16
+ else
17
+ value.clone
18
+ end
19
+ end
20
+
6
21
  private
7
22
 
8
23
  def instrument_with_appsignal_instrumentation(name, payload={}, &block)
9
24
  ActiveSupport::Notifications.instrument(
10
- EVENT_NAME, name => Marshal.load(Marshal.dump(payload))) do
11
- instrument_without_appsignal_instrumentation(name, payload, &block)
12
- end
25
+ EVENT_NAME,
26
+ name => Appsignal::Mongo::Instrumentation.deep_clone(payload)
27
+ ) do
28
+ instrument_without_appsignal_instrumentation(name, payload, &block)
29
+ end
13
30
  end
14
31
 
15
32
  end
@@ -1,5 +1,5 @@
1
1
  module Appsignal
2
2
  module Mongo
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
5
- prerelease:
4
+ version: 0.1.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Thijs Cadier
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-05-16 00:00:00.000000000 Z
12
+ date: 2013-05-17 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: mongo
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ! '>'
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ! '>'
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: activesupport
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ~>
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: appsignal
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ~>
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ~>
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: bson_ext
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ! '>='
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ! '>='
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rake
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ! '>='
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ! '>='
93
82
  - !ruby/object:Gem::Version
@@ -95,7 +84,6 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rspec
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - ~>
101
89
  - !ruby/object:Gem::Version
@@ -103,7 +91,6 @@ dependencies:
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - ~>
109
96
  - !ruby/object:Gem::Version
@@ -111,7 +98,6 @@ dependencies:
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: pry
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ! '>='
117
103
  - !ruby/object:Gem::Version
@@ -119,7 +105,6 @@ dependencies:
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
109
  - - ! '>='
125
110
  - !ruby/object:Gem::Version
@@ -139,32 +124,25 @@ files:
139
124
  - README.md
140
125
  homepage: https://github.com/appsignal/appsignal-mongo
141
126
  licenses: []
127
+ metadata: {}
142
128
  post_install_message:
143
129
  rdoc_options: []
144
130
  require_paths:
145
131
  - lib
146
132
  required_ruby_version: !ruby/object:Gem::Requirement
147
- none: false
148
133
  requirements:
149
134
  - - ! '>='
150
135
  - !ruby/object:Gem::Version
151
136
  version: '0'
152
- segments:
153
- - 0
154
- hash: 2442974179887413600
155
137
  required_rubygems_version: !ruby/object:Gem::Requirement
156
- none: false
157
138
  requirements:
158
139
  - - ! '>='
159
140
  - !ruby/object:Gem::Version
160
141
  version: '0'
161
- segments:
162
- - 0
163
- hash: 2442974179887413600
164
142
  requirements: []
165
143
  rubyforge_project:
166
- rubygems_version: 1.8.25
144
+ rubygems_version: 2.0.3
167
145
  signing_key:
168
- specification_version: 3
146
+ specification_version: 4
169
147
  summary: Add instrument calls to mongodb queries made with mongo. For use with Appsignal.
170
148
  test_files: []