co_aspects 0.1.1 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6bb76c1733ed9e04c038330902a41c5988ee64a
|
4
|
+
data.tar.gz: 823a7f324eaf090a1d4e51946514dde9eb9c8dfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea0d9be92f14f244926dd9e9a3358f6ecd9a5c80e8d7c1dc50d319fab0ca244aa483c65ce475c578b7cf3e09b8689464931a19d71cfd383212ffdb6767931e1
|
7
|
+
data.tar.gz: 4c34bdb2542ec172c769b9d1a5cebbd964ab69c9bb81b583a1ef5a91b04d16028474bc27e2476fcc05a46a1daf66a44122540d126faa8bbb7ddcbf37094a53aa
|
@@ -11,6 +11,10 @@ module CoAspects
|
|
11
11
|
# added at the end using a block that receives the same arguments as the
|
12
12
|
# method.
|
13
13
|
#
|
14
|
+
# Note: The default key is used if both `as` and block are missing. If
|
15
|
+
# either is present, the default is not used and if both are present, then
|
16
|
+
# they are simply concatenated.
|
17
|
+
#
|
14
18
|
# Examples
|
15
19
|
#
|
16
20
|
# module MyModule
|
@@ -12,6 +12,10 @@ module CoAspects
|
|
12
12
|
# added at the end using a block that receives the same arguments as the
|
13
13
|
# method.
|
14
14
|
#
|
15
|
+
# Note: The default key is used if both `as` and block are missing. If
|
16
|
+
# either is present, the default is not used and if both are present, then
|
17
|
+
# they are simply concatenated.
|
18
|
+
#
|
15
19
|
# Examples
|
16
20
|
#
|
17
21
|
# module MyModule
|
@@ -8,9 +8,13 @@ module CoAspects
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def key(klass, method_name, method_args, statsd_prefix, statsd_block)
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
if statsd_prefix || statsd_block
|
12
|
+
key = statsd_prefix.to_s
|
13
|
+
key += statsd_block.call(*method_args) if statsd_block
|
14
|
+
key.downcase
|
15
|
+
else
|
16
|
+
default_prefix(klass, method_name)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|
data/lib/co_aspects/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: co_aspects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaston Jorquera
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|