weasel 0.2.1 → 0.2.2
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/weasel/concerns/auditable.rb +9 -1
- data/lib/weasel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5a5350b71d83ea8157ad7d9dea7ad8650eb98db
|
|
4
|
+
data.tar.gz: cefb142c9d5451ba7afd7a964d9655e7b919153c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dda8de588f2e66ae52f20edc0d668ba8694d0fd294fd91320ae03f79df031270c82027ba405262b25ab56344579eb92fb5efa0e673c1d55a2e9fd63138672426
|
|
7
|
+
data.tar.gz: 6c3b2783c6fa3eeca9949f45d31b5c6872c0fac844234e22ca2dd2b9aae22d574a31af9cbef34801e7887fd438517123e62a00de65191a56d0ae865630a954db
|
|
@@ -7,13 +7,21 @@ module Weasel
|
|
|
7
7
|
def audit
|
|
8
8
|
yield
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
return unless user.present?
|
|
11
11
|
|
|
12
12
|
Weasel::EventsWorker.perform_async(user.id, thin_request)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
|
+
def user
|
|
18
|
+
if defined?(current_user)
|
|
19
|
+
current_user
|
|
20
|
+
elsif defined?(current_admin)
|
|
21
|
+
current_admin
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
17
25
|
def thin_request
|
|
18
26
|
parameters = request.params
|
|
19
27
|
|
data/lib/weasel/version.rb
CHANGED