automation_helpers 5.2.0 → 7.0
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/README.md +2 -2
- data/lib/automation_helpers/drivers/v4/browserstack.rb +4 -4
- data/lib/automation_helpers/drivers/v4/capabilities.rb +12 -14
- data/lib/automation_helpers/drivers/v4/local.rb +1 -2
- data/lib/automation_helpers/drivers/v4/options.rb +1 -2
- data/lib/automation_helpers/drivers.rb +0 -2
- data/lib/automation_helpers/extensions/capybara/node/element.rb +2 -2
- data/lib/automation_helpers/extensions/cucumber/core/test/case.rb +2 -2
- data/lib/automation_helpers/patches/base.rb +1 -3
- data/lib/automation_helpers/patches/{capybara.rb → capybara_safari.rb} +9 -1
- data/lib/automation_helpers/patches/capybara_window.rb +38 -0
- data/lib/automation_helpers/patches/selenium_logger.rb +2 -2
- data/lib/automation_helpers/patches.rb +2 -3
- data/lib/automation_helpers/version.rb +1 -1
- data/lib/automation_helpers.rb +0 -29
- metadata +19 -19
- data/lib/automation_helpers/logger.rb +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de65c70c0d33f66469440532cf8a4d49840e8b4e48cc653dca9fc2d20280c9ee
|
|
4
|
+
data.tar.gz: b79dfae24f4df076559ddb46270b32ef2ab5168f3e12b1f3565a060d5673fc3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0febf6c2eaba22e6bda884a435388e57967aea3f8556f68a7f445be96a1a9534ee980cf4e80fc0731694185e716f9734c714b9d6747f31e516ae2236446e196e
|
|
7
|
+
data.tar.gz: eda61bc6fb061175fa91d996661748143fa0ae962257b1bc9ead36827e0a469b75285bf77257c48e8f69e1779c01dee0776276acac51496e464f9a9b2cca0557
|
data/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ bundle
|
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
29
29
|
|
|
30
|
-
Either require all
|
|
30
|
+
Either require all the extensions required, or require the individual bits and pieces you need
|
|
31
31
|
|
|
32
32
|
```shell
|
|
33
33
|
# Require all of the drivers/patches/extensions code
|
|
@@ -57,5 +57,5 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/site-p
|
|
|
57
57
|
|
|
58
58
|
## Verbose Documentation
|
|
59
59
|
|
|
60
|
-
This will come in time. Meanwhile if you check the gem code most methods are
|
|
60
|
+
This will come in time. Meanwhile, if you check the gem code most methods are
|
|
61
61
|
documented. Also check the specs for more detailed information
|
|
@@ -25,9 +25,9 @@ module AutomationHelpers
|
|
|
25
25
|
# - :session_name (String) -> The session name to be stored on browserstack servers
|
|
26
26
|
# - :browserstack_debug_mode (Boolean) -> Set this to true to run in browserstack debug mode (Note this runs slower!)
|
|
27
27
|
# - :config (String) -> This is an underscore separated key that distils the granular running information
|
|
28
|
-
# i.e.
|
|
28
|
+
# i.e. Windows_7_115 means run on Windows Operating System, OS Version 7, Browser Version 115
|
|
29
29
|
# i.e. OSX_Mojave_12 means run on Mac Operating System, OS Version Mojave, Browser Version 12
|
|
30
|
-
# i.e.
|
|
30
|
+
# i.e. Windows_10_113 means run on Windows Operating System, OS Version 10, Browser Version 113
|
|
31
31
|
# - :username (String) -> The username for Browserstack
|
|
32
32
|
# - :api_key (String) -> The api key for Browserstack
|
|
33
33
|
# - **device_options** (optional) - A Hash of all device specific options that can customise your device
|
|
@@ -62,7 +62,7 @@ module AutomationHelpers
|
|
|
62
62
|
::Faraday::Utils.deep_merge(
|
|
63
63
|
# Browserstack Capabilities and General Capabilities are at different levels, so we merge first
|
|
64
64
|
browserstack_capabilities.merge(browser_version_capability),
|
|
65
|
-
# Then we deep
|
|
65
|
+
# Then we "deep-merge" with anything specifically passed into the driver registration (Which can be nested)
|
|
66
66
|
browser_specific_capabilities.as_json
|
|
67
67
|
)
|
|
68
68
|
)
|
|
@@ -89,7 +89,7 @@ module AutomationHelpers
|
|
|
89
89
|
{
|
|
90
90
|
'bstack:options' => {
|
|
91
91
|
'local' => 'false',
|
|
92
|
-
'seleniumVersion' => '4.
|
|
92
|
+
'seleniumVersion' => '4.39.0',
|
|
93
93
|
'consoleLogs' => 'verbose',
|
|
94
94
|
'networkLogs' => 'true',
|
|
95
95
|
'resolution' => '1920x1080'
|
|
@@ -61,9 +61,8 @@ module AutomationHelpers
|
|
|
61
61
|
'browserName' => 'internet explorer',
|
|
62
62
|
'bstack:options' => {
|
|
63
63
|
'ie' => {
|
|
64
|
-
# This
|
|
65
|
-
|
|
66
|
-
'driver' => '4.14.0.0',
|
|
64
|
+
# This appears to be the last maintained version and we will remove IE support in V8 of helpers
|
|
65
|
+
'driver' => '4.16.0.0',
|
|
67
66
|
'arch' => 'x32'
|
|
68
67
|
}
|
|
69
68
|
}
|
|
@@ -82,22 +81,21 @@ module AutomationHelpers
|
|
|
82
81
|
|
|
83
82
|
def android_appium_version(android_version)
|
|
84
83
|
case android_version.to_f
|
|
85
|
-
when
|
|
86
|
-
when
|
|
87
|
-
when
|
|
88
|
-
when
|
|
89
|
-
else raise ArgumentError, "Your Android Version is too low. Please don't use lower than Android
|
|
84
|
+
when 16..; then '3.1.0'
|
|
85
|
+
when 14..; then '2.19.0'
|
|
86
|
+
when 12..; then '2.15.0'
|
|
87
|
+
when 10..; then '2.0.1'
|
|
88
|
+
else raise ArgumentError, "Your Android Version is too low. Please don't use lower than Android Quince (10)."
|
|
90
89
|
end
|
|
91
90
|
end
|
|
92
91
|
|
|
93
92
|
def ios_appium_version(ios_version)
|
|
94
93
|
case ios_version.to_f
|
|
95
|
-
when
|
|
96
|
-
when
|
|
97
|
-
when
|
|
98
|
-
when
|
|
99
|
-
|
|
100
|
-
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 12."
|
|
94
|
+
when 17..; then '3.1.0'
|
|
95
|
+
when 16..; then '2.15.0'
|
|
96
|
+
when 15..; then '2.4.1'
|
|
97
|
+
when 14..; then '2.0.1'
|
|
98
|
+
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 14."
|
|
101
99
|
end
|
|
102
100
|
end
|
|
103
101
|
end
|
|
@@ -39,8 +39,7 @@ module AutomationHelpers
|
|
|
39
39
|
private
|
|
40
40
|
|
|
41
41
|
# This is required to make local drivers work with Safari TP
|
|
42
|
-
# This is required
|
|
43
|
-
# Safari V11/V12 is unsupported
|
|
42
|
+
# This is required for v13+ of Safari as the old(er), drivers are notoriously flaky
|
|
44
43
|
def service
|
|
45
44
|
return unless safari?
|
|
46
45
|
|
|
@@ -6,8 +6,7 @@ module AutomationHelpers
|
|
|
6
6
|
module Drivers
|
|
7
7
|
module V4
|
|
8
8
|
#
|
|
9
|
-
# The Options object
|
|
10
|
-
# are configuring
|
|
9
|
+
# The Options object for the relevant browser whose driver you are configuring
|
|
11
10
|
#
|
|
12
11
|
# #### Initial setup options
|
|
13
12
|
#
|
|
@@ -8,14 +8,14 @@ module Capybara
|
|
|
8
8
|
class Element
|
|
9
9
|
# @return [Integer]
|
|
10
10
|
#
|
|
11
|
-
# The Left-Most pixel's horizontal position in the DOM (From element.rect)
|
|
11
|
+
# The Left-Most pixel's horizontal position in the DOM (From `element.rect`)
|
|
12
12
|
def horizontal_position
|
|
13
13
|
native.rect.x.to_i
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# @return [Integer]
|
|
17
17
|
#
|
|
18
|
-
# The Left-Most pixel's vertical position in the DOM (From element.rect)
|
|
18
|
+
# The Left-Most pixel's vertical position in the DOM (From `element.rect`)
|
|
19
19
|
def vertical_position
|
|
20
20
|
native.rect.y.to_i
|
|
21
21
|
end
|
|
@@ -9,14 +9,14 @@ module Cucumber
|
|
|
9
9
|
class Case
|
|
10
10
|
# @return [String]
|
|
11
11
|
#
|
|
12
|
-
# The file name of the feature
|
|
12
|
+
# The file name of the feature that is running (Without the .feature extension)
|
|
13
13
|
def feature_file_name
|
|
14
14
|
feature_file_path.split('/').last&.split('.')&.first.to_s
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# @return [String]
|
|
18
18
|
#
|
|
19
|
-
# The fully qualified location of the feature
|
|
19
|
+
# The fully qualified location (filepath), of the feature file that is running
|
|
20
20
|
def feature_file_path
|
|
21
21
|
location.to_s
|
|
22
22
|
end
|
|
@@ -13,10 +13,8 @@ module AutomationHelpers
|
|
|
13
13
|
raise 'This is no longer supported' if prevent_usage?
|
|
14
14
|
|
|
15
15
|
Kernel.warn('This is now deprecated and should not be used') if deprecate?
|
|
16
|
-
|
|
17
|
-
AutomationHelpers.logger.info(description)
|
|
16
|
+
$stdout.puts("Adding patch: #{self.class}\n#{description}")
|
|
18
17
|
perform
|
|
19
|
-
AutomationHelpers.logger.info('Patch successfully added.')
|
|
20
18
|
end
|
|
21
19
|
|
|
22
20
|
private
|
|
@@ -5,7 +5,7 @@ module AutomationHelpers
|
|
|
5
5
|
#
|
|
6
6
|
# Fix the issue where the `#text` method doesn't normalize whitespace (Only the matchers do)
|
|
7
7
|
#
|
|
8
|
-
class
|
|
8
|
+
class CapybaraSafari < Base
|
|
9
9
|
private
|
|
10
10
|
|
|
11
11
|
def description
|
|
@@ -19,6 +19,14 @@ module AutomationHelpers
|
|
|
19
19
|
def perform
|
|
20
20
|
::Capybara::Node::Element.prepend SafariTextPatch
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def deprecate?
|
|
24
|
+
true
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def prevent_usage_date
|
|
28
|
+
Time.new(2027, 3, 30)
|
|
29
|
+
end
|
|
22
30
|
end
|
|
23
31
|
|
|
24
32
|
#
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AutomationHelpers
|
|
4
|
+
module Patches
|
|
5
|
+
#
|
|
6
|
+
# Fix the issue where you cannot close the first window in the handle array with `#close_window`
|
|
7
|
+
#
|
|
8
|
+
class CapybaraWindow < Base
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def description
|
|
12
|
+
<<~DESCRIPTION
|
|
13
|
+
The method `#close_window` in Capybara::Selenium::Driver (Base), does not permit closing of the first window in the handle array
|
|
14
|
+
|
|
15
|
+
This was introduced over a decade ago and given the propensity for new windows to be opened in the course of testing,
|
|
16
|
+
this is a significant issue for users of Capybara and Selenium.
|
|
17
|
+
|
|
18
|
+
See https://github.com/teamcapybara/capybara/issues/2834 for more details.
|
|
19
|
+
DESCRIPTION
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def perform
|
|
23
|
+
::Capybara::Selenium::Driver.prepend WindowPatch
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
#
|
|
28
|
+
# @api private
|
|
29
|
+
#
|
|
30
|
+
module WindowPatch
|
|
31
|
+
def close_window(handle)
|
|
32
|
+
within_given_window(handle) do
|
|
33
|
+
browser.close
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'automation_helpers/logger'
|
|
4
|
-
|
|
5
3
|
require 'automation_helpers/patches/base'
|
|
6
|
-
require 'automation_helpers/patches/
|
|
4
|
+
require 'automation_helpers/patches/capybara_safari'
|
|
5
|
+
require 'automation_helpers/patches/capybara_window'
|
|
7
6
|
require 'automation_helpers/patches/selenium_logger'
|
data/lib/automation_helpers.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require 'automation_helpers/drivers'
|
|
4
4
|
require 'automation_helpers/extensions'
|
|
5
|
-
require 'automation_helpers/logger'
|
|
6
5
|
require 'automation_helpers/patches'
|
|
7
6
|
require 'automation_helpers/version'
|
|
8
7
|
|
|
@@ -10,33 +9,5 @@ require 'automation_helpers/version'
|
|
|
10
9
|
module AutomationHelpers
|
|
11
10
|
class << self
|
|
12
11
|
attr_accessor :chrome_log_path
|
|
13
|
-
|
|
14
|
-
def configure
|
|
15
|
-
yield self
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# The Automation Helpers logger object - This is called automatically in several
|
|
19
|
-
# locations and will log messages according to the normal Ruby protocol
|
|
20
|
-
#
|
|
21
|
-
# This logger object can also be used to manually log messages
|
|
22
|
-
#
|
|
23
|
-
# To Manually log a message
|
|
24
|
-
# AutomationHelpers.logger.info('Information')
|
|
25
|
-
# AutomationHelpers.logger.debug('Input debug message')
|
|
26
|
-
#
|
|
27
|
-
# By default the logger will output all messages to $stdout, but can be
|
|
28
|
-
# altered to log to a file or another IO location by calling `.log_path=`
|
|
29
|
-
def logger
|
|
30
|
-
@logger ||= Logger.create
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# This writer method allows you to configure where you want the output of
|
|
34
|
-
# the automation_helpers logs to go (Default is $stdout)
|
|
35
|
-
#
|
|
36
|
-
# example: AutomationHelpers.log_path = 'automation_helpers.log' would save all
|
|
37
|
-
# log messages to `./automation_helpers.log`
|
|
38
|
-
def log_path=(logdev)
|
|
39
|
-
logger.reopen(logdev)
|
|
40
|
-
end
|
|
41
12
|
end
|
|
42
13
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: automation_helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: '7.0'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luke Hill
|
|
8
8
|
- Marcelo Nicolosi Santos
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-03-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: capybara
|
|
@@ -40,7 +40,7 @@ dependencies:
|
|
|
40
40
|
version: '7.0'
|
|
41
41
|
- - "<"
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: '
|
|
43
|
+
version: '11'
|
|
44
44
|
type: :development
|
|
45
45
|
prerelease: false
|
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -50,7 +50,7 @@ dependencies:
|
|
|
50
50
|
version: '7.0'
|
|
51
51
|
- - "<"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
53
|
+
version: '11'
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: faraday
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,56 +85,56 @@ dependencies:
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - "~>"
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 1.
|
|
88
|
+
version: 1.85.1
|
|
89
89
|
type: :development
|
|
90
90
|
prerelease: false
|
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 1.
|
|
95
|
+
version: 1.85.1
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: rubocop-performance
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 1.
|
|
102
|
+
version: 1.26.1
|
|
103
103
|
type: :development
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 1.
|
|
109
|
+
version: 1.26.1
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: rubocop-rspec
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - "~>"
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: 3.
|
|
116
|
+
version: 3.9.0
|
|
117
117
|
type: :development
|
|
118
118
|
prerelease: false
|
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - "~>"
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: 3.
|
|
123
|
+
version: 3.9.0
|
|
124
124
|
- !ruby/object:Gem::Dependency
|
|
125
125
|
name: selenium-webdriver
|
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
|
127
127
|
requirements:
|
|
128
128
|
- - "~>"
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '4.
|
|
130
|
+
version: '4.18'
|
|
131
131
|
type: :development
|
|
132
132
|
prerelease: false
|
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
134
134
|
requirements:
|
|
135
135
|
- - "~>"
|
|
136
136
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '4.
|
|
137
|
+
version: '4.18'
|
|
138
138
|
description: Automation Patches / Extensions that allow you to extend your Ruby-based
|
|
139
139
|
testing frameworks
|
|
140
140
|
email:
|
|
@@ -163,10 +163,10 @@ files:
|
|
|
163
163
|
- lib/automation_helpers/extensions/cucumber/core/test/case.rb
|
|
164
164
|
- lib/automation_helpers/extensions/selenium/webdriver/logs.rb
|
|
165
165
|
- lib/automation_helpers/extensions/string.rb
|
|
166
|
-
- lib/automation_helpers/logger.rb
|
|
167
166
|
- lib/automation_helpers/patches.rb
|
|
168
167
|
- lib/automation_helpers/patches/base.rb
|
|
169
|
-
- lib/automation_helpers/patches/
|
|
168
|
+
- lib/automation_helpers/patches/capybara_safari.rb
|
|
169
|
+
- lib/automation_helpers/patches/capybara_window.rb
|
|
170
170
|
- lib/automation_helpers/patches/selenium_logger.rb
|
|
171
171
|
- lib/automation_helpers/version.rb
|
|
172
172
|
homepage: https://www.github.com/site-prism/automation_helpers
|
|
@@ -176,7 +176,7 @@ metadata:
|
|
|
176
176
|
homepage_uri: https://www.github.com/site-prism/automation_helpers
|
|
177
177
|
source_code_uri: https://www.github.com/site-prism/automation_helpers
|
|
178
178
|
changelog_uri: https://www.github.com/site-prism/automation_helpers/blob/main/CHANGELOG.md
|
|
179
|
-
post_install_message:
|
|
179
|
+
post_install_message:
|
|
180
180
|
rdoc_options: []
|
|
181
181
|
require_paths:
|
|
182
182
|
- lib
|
|
@@ -184,15 +184,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
184
184
|
requirements:
|
|
185
185
|
- - ">="
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: '3.
|
|
187
|
+
version: '3.3'
|
|
188
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
requirements:
|
|
190
190
|
- - ">="
|
|
191
191
|
- !ruby/object:Gem::Version
|
|
192
|
-
version: 3.2.
|
|
192
|
+
version: 3.2.8
|
|
193
193
|
requirements: []
|
|
194
194
|
rubygems_version: 3.5.22
|
|
195
|
-
signing_key:
|
|
195
|
+
signing_key:
|
|
196
196
|
specification_version: 4
|
|
197
197
|
summary: Automation Helpers - Avoid writing the most common things in Ruby Automation
|
|
198
198
|
test_files: []
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'logger'
|
|
4
|
-
|
|
5
|
-
module AutomationHelpers
|
|
6
|
-
#
|
|
7
|
-
# @api private
|
|
8
|
-
#
|
|
9
|
-
class Logger
|
|
10
|
-
#
|
|
11
|
-
# Generate the Logger used in the gem
|
|
12
|
-
#
|
|
13
|
-
def self.create(output = $stdout)
|
|
14
|
-
logger = ::Logger.new(output)
|
|
15
|
-
logger.progname = 'Automation Helpers'
|
|
16
|
-
logger.level = :INFO
|
|
17
|
-
logger.formatter = proc do |severity, time, progname, msg|
|
|
18
|
-
"#{time.strftime('%F %T')} - #{severity} - #{progname} - #{msg}\n"
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
logger
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|