CallBaecker 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/lib/CallBaecker.rb +4 -2
- data/lib/CallBaecker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4976db8687de742373453ee657e26d46c2fc86c
|
|
4
|
+
data.tar.gz: e18da3c5922e39acc38ef8b5ff915016ab8e2edf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b420e926c273b49b4e9445b7df24ba2cdffbb64fab3d214b5690ead0f14946157cf9b53af8d7bf66f14fe7e1315dd7a723ae470129f307364f35dd932eacd9a
|
|
7
|
+
data.tar.gz: 87fb50c96ec93b2a4bba0a185363a0d381e22211726a3c88a7d9df306de837f0f4b5e0e67a03b2e28e9fd6670e3b48ef9232a4bcad4018cb3a473e93526b7f7d
|
data/lib/CallBaecker.rb
CHANGED
|
@@ -22,13 +22,14 @@ module CallBaecker
|
|
|
22
22
|
@__last_methods_added = [name, with, without]
|
|
23
23
|
_self = self
|
|
24
24
|
define_method with do |*args, &block|
|
|
25
|
+
callee = caller.first
|
|
25
26
|
@__last_args = *args
|
|
26
27
|
catch :CallBaeckerDone do
|
|
27
28
|
# before hook
|
|
28
29
|
# TODO make it pluggable
|
|
29
30
|
# it shouldnt be limited to rubisierung
|
|
30
31
|
if has_before_hook
|
|
31
|
-
*args = _self.instance_variable_get(:@__before_hook).call(params, args[0])
|
|
32
|
+
*args = _self.instance_variable_get(:@__before_hook).call(params, args[0], callee)
|
|
32
33
|
end
|
|
33
34
|
send without, *args, &block
|
|
34
35
|
end
|
|
@@ -56,12 +57,13 @@ module CallBaecker
|
|
|
56
57
|
@__last_methods_added = [name, with, without]
|
|
57
58
|
define_singleton_method with do |*args, &block|
|
|
58
59
|
@__last_args = *args
|
|
60
|
+
callee = caller.first
|
|
59
61
|
catch :CallBaeckerDone do
|
|
60
62
|
# before hook
|
|
61
63
|
# TODO make it pluggable
|
|
62
64
|
# it shouldnt be limited to rubisierung
|
|
63
65
|
if has_before_hook
|
|
64
|
-
*args = @__before_hook.call(params, args[0])
|
|
66
|
+
*args = @__before_hook.call(params, args[0], callee)
|
|
65
67
|
end
|
|
66
68
|
send without, *args, &block
|
|
67
69
|
end
|
data/lib/CallBaecker/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: CallBaecker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- doodzik
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|