appsignal-moped 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- AppSignal Moped
1
+ AppSignal Moped
2
2
  ===============
3
3
 
4
4
  `appsignal-moped` allows AppSignal clients to gain insight in database queries
@@ -8,9 +8,13 @@ such as [Mongoid 3.x](https://github.com/mongoid/mongoid).
8
8
  For more information, visit:
9
9
 
10
10
  * [AppSignal website](http://appsignal.com)
11
- * [AppSignal client gem](https://github.com/80beans/appsignal)
11
+ * [AppSignal docs](http://docs.appsignal.com/tweaks-in-your-code/integration-gems.html)
12
+ * [AppSignal client gem](https://github.com/appsignal/appsignal)
13
+
14
+ [<img src="https://travis-ci.org/appsignal/appsignal-moped.png?branch=master"/>](http://travis-ci.org/appsignal/appsignal-moped)
15
+ [<img src="https://codeclimate.com/github/appsignal/appsignal-moped.png"/>](https://codeclimate.com/github/appsignal/appsignal-moped)
12
16
 
13
17
  Licence
14
18
  =======
15
19
 
16
- See [LICENCE](https://github.com/80beans/appsignal-redis/blob/master/LICENSE)
20
+ See [LICENCE](https://github.com/appsignal/appsignal-moped/blob/master/LICENSE)
@@ -21,6 +21,7 @@ module Appsignal
21
21
  o == :@full_collection_name
22
22
  end.each do |attr|
23
23
  value = op.instance_variable_get(attr)
24
+ value = Appsignal::Moped::Instrumentation.deep_clone(value)
24
25
  hash[attr.to_s.gsub('@', '')] = value unless value.nil?
25
26
  end
26
27
  end
@@ -28,6 +29,21 @@ module Appsignal
28
29
  end
29
30
  end
30
31
 
32
+ def self.deep_clone(value)
33
+ case value
34
+ when Hash
35
+ result = {}
36
+ value.each { |k, v| result[k] = deep_clone(v) }
37
+ result
38
+ when Array
39
+ value.map { |v| deep_clone(v) }
40
+ when Symbol, Numeric, true, false, nil
41
+ value
42
+ else
43
+ value.clone
44
+ end
45
+ end
46
+
31
47
  def operation_name(operation)
32
48
  operation.class.name.split('::').last.tap do |class_name|
33
49
  class_name.gsub!(/([a-z])([A-Z])/,'\1_\2')
@@ -1,5 +1,5 @@
1
1
  module Appsignal
2
2
  module Moped
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal-moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
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: 2013-05-16 00:00:00.000000000 Z
12
+ date: 2013-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appsignal
@@ -103,7 +103,7 @@ files:
103
103
  - lib/appsignal/moped/version.rb
104
104
  - lib/appsignal-moped.rb
105
105
  - README.md
106
- homepage: https://github.com/80beans/appsignal-moped
106
+ homepage: https://github.com/appsignal/appsignal-moped
107
107
  licenses: []
108
108
  post_install_message:
109
109
  rdoc_options: []
@@ -115,15 +115,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
+ segments:
119
+ - 0
120
+ hash: 3956934282980643373
118
121
  required_rubygems_version: !ruby/object:Gem::Requirement
119
122
  none: false
120
123
  requirements:
121
124
  - - ! '>='
122
125
  - !ruby/object:Gem::Version
123
126
  version: '0'
127
+ segments:
128
+ - 0
129
+ hash: 3956934282980643373
124
130
  requirements: []
125
131
  rubyforge_project:
126
- rubygems_version: 1.8.24
132
+ rubygems_version: 1.8.25
127
133
  signing_key:
128
134
  specification_version: 3
129
135
  summary: Add instrument calls to mongodb queries made with moped(or mongoid). For