webdrone 1.18.0 → 1.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3280a123629a2b7fe840fe9bbecf008505491bd91ea26fca460d75bdcd1e0954
4
- data.tar.gz: 28cc5a4b420bbc4ddf6366770a026520226a57c43bd9d77f5ee637e1ba226a95
3
+ metadata.gz: 835b95e7d4d0fc1c897e509b8453275e6592995316e9d98a93731d1db66f6700
4
+ data.tar.gz: 5cf48bef62eb1c88a8b0d01f24353c96a4e49a77239bbdbd219ecbec72257dff
5
5
  SHA512:
6
- metadata.gz: 66a68b1424ae2b20c147737d1fb9d7558c25fef7ecfab9e246efd7c44783b2862774b6a69ab43f29e137a100bf2fcc9121299a37360a42ace9da8740cda1ae0c
7
- data.tar.gz: 931af4c68353750296c315a54fcffdda78447f5b0e2311372f233fd9131b6071c86986f8cf44083fb77a34d88373ea1c0cd9c3b67553e91907a6a797886bd9bd
6
+ metadata.gz: b45bf5023816225a22bdbf5f91edb5577d2c321af36db254004b3434bf848604088584da733212e7732ef6082df4a29a495cccc73de41580a2ea559b9f4a4ebe
7
+ data.tar.gz: 2e9fecee89b66cafd117c515edce83216dc20e6d64e83da11408371aaf97bf5d96353dbc5ae255081268c72c718d71e63afa109af595f784a9bfd9f8c98db9df
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ New features are summarized here.
4
4
 
5
5
 
6
6
 
7
+ ## v.1.18.2 - 2021-08-26
8
+ ### Fixed
9
+ - Getting back support for ruby 2.6
10
+
11
+
12
+
7
13
  ## v.1.18.0 - 2021-04-24
8
14
  ### Changed
9
15
  - Minimum Ruby version supported is now >= 2.6
data/lib/webdrone/logg.rb CHANGED
@@ -12,32 +12,66 @@ module Webdrone
12
12
  @methods = methods
13
13
  end
14
14
 
15
- def included(base)
16
- @methods ||= base.instance_methods(false)
17
- method_list = @methods
18
- base.class_eval do
19
- method_list.each do |method_name|
20
- original_method = instance_method(method_name)
21
- define_method method_name do |*args, **kwargs, &block|
22
- caller_location = Kernel.caller_locations[0]
23
- cl_path = caller_location.path
24
- cl_line = caller_location.lineno
25
- if @a0.conf.logger && Gem.path.none? { |path| cl_path.include? path }
26
- ini = ::Webdrone::MethodLogger.last_time ||= Time.new
27
- ::Webdrone::MethodLogger.screenshot = nil
28
- args_log = [args, kwargs].compact.reject(&:empty?).map(&:to_s).join(' ')
29
- begin
30
- result = original_method.bind(self).call(*args, **kwargs, &block)
31
- fin = ::Webdrone::MethodLogger.last_time = Time.new
32
- @a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, result, nil, ::Webdrone::MethodLogger.screenshot)
33
- result
34
- rescue StandardError => exception
35
- fin = ::Webdrone::MethodLogger.last_time = Time.new
36
- @a0.logs.trace(ini, fin, cl_path, cl_line, base, method_name, args_log, nil, exception, ::Webdrone::MethodLogger.screenshot)
37
- raise exception
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Webdrone
4
- VERSION = '1.18.0'
4
+ VERSION = '1.18.2'
5
5
  end
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.0
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-04-25 00:00:00.000000000 Z
11
+ date: 2021-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler