webdrone 1.18.0 → 1.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/webdrone/logg.rb +59 -25
- data/lib/webdrone/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 835b95e7d4d0fc1c897e509b8453275e6592995316e9d98a93731d1db66f6700
|
4
|
+
data.tar.gz: 5cf48bef62eb1c88a8b0d01f24353c96a4e49a77239bbdbd219ecbec72257dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45bf5023816225a22bdbf5f91edb5577d2c321af36db254004b3434bf848604088584da733212e7732ef6082df4a29a495cccc73de41580a2ea559b9f4a4ebe
|
7
|
+
data.tar.gz: 2e9fecee89b66cafd117c515edce83216dc20e6d64e83da11408371aaf97bf5d96353dbc5ae255081268c72c718d71e63afa109af595f784a9bfd9f8c98db9df
|
data/CHANGELOG.md
CHANGED
data/lib/webdrone/logg.rb
CHANGED
@@ -12,32 +12,66 @@ module Webdrone
|
|
12
12
|
@methods = methods
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
15
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7')
|
16
|
+
def included(base)
|
17
|
+
@methods ||= base.instance_methods(false)
|
18
|
+
method_list = @methods
|
19
|
+
base.class_eval do
|
20
|
+
method_list.each do |method_name|
|
21
|
+
original_method = instance_method(method_name)
|
22
|
+
define_method method_name do |*args, &block|
|
23
|
+
caller_location = Kernel.caller_locations[0]
|
24
|
+
cl_path = caller_location.path
|
25
|
+
cl_line = caller_location.lineno
|
26
|
+
if @a0.conf.logger && Gem.path.none? { |path| cl_path.include? path }
|
27
|
+
ini = ::Webdrone::MethodLogger.last_time ||= Time.new
|
28
|
+
::Webdrone::MethodLogger.screenshot = nil
|
29
|
+
args_log = [args].compact.reject(&:empty?).map(&:to_s).join(' ')
|
30
|
+
begin
|
31
|
+
result = original_method.bind(self).call(*args, &block)
|
32
|
+
fin = ::Webdrone::MethodLogger.last_time = Time.new
|
33
|
+
@a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, result, nil, ::Webdrone::MethodLogger.screenshot)
|
34
|
+
result
|
35
|
+
rescue StandardError => exception
|
36
|
+
fin = ::Webdrone::MethodLogger.last_time = Time.new
|
37
|
+
@a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, nil, exception, ::Webdrone::MethodLogger.screenshot)
|
38
|
+
raise exception
|
39
|
+
end
|
40
|
+
else
|
41
|
+
original_method.bind(self).call(*args, &block)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
else
|
48
|
+
def included(base)
|
49
|
+
@methods ||= base.instance_methods(false)
|
50
|
+
method_list = @methods
|
51
|
+
base.class_eval do
|
52
|
+
method_list.each do |method_name|
|
53
|
+
original_method = instance_method(method_name)
|
54
|
+
define_method method_name do |*args, **kwargs, &block|
|
55
|
+
caller_location = Kernel.caller_locations[0]
|
56
|
+
cl_path = caller_location.path
|
57
|
+
cl_line = caller_location.lineno
|
58
|
+
if @a0.conf.logger && Gem.path.none? { |path| cl_path.include? path }
|
59
|
+
ini = ::Webdrone::MethodLogger.last_time ||= Time.new
|
60
|
+
::Webdrone::MethodLogger.screenshot = nil
|
61
|
+
args_log = [args, kwargs].compact.reject(&:empty?).map(&:to_s).join(' ')
|
62
|
+
begin
|
63
|
+
result = original_method.bind(self).call(*args, **kwargs, &block)
|
64
|
+
fin = ::Webdrone::MethodLogger.last_time = Time.new
|
65
|
+
@a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, result, nil, ::Webdrone::MethodLogger.screenshot)
|
66
|
+
result
|
67
|
+
rescue StandardError => exception
|
68
|
+
fin = ::Webdrone::MethodLogger.last_time = Time.new
|
69
|
+
@a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, nil, exception, ::Webdrone::MethodLogger.screenshot)
|
70
|
+
raise exception
|
71
|
+
end
|
72
|
+
else
|
73
|
+
original_method.bind(self).call(*args, **kwargs, &block)
|
38
74
|
end
|
39
|
-
else
|
40
|
-
original_method.bind(self).call(*args, **kwargs, &block)
|
41
75
|
end
|
42
76
|
end
|
43
77
|
end
|
data/lib/webdrone/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webdrone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aldrin Martoq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|