onlyoffice_logger_helper 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5ea7b7c854fb4b7384eeb75a63ed196266fc8322bd36de75f7b70857f9fddd
|
4
|
+
data.tar.gz: 1519140ed4d45d3f60027048b95a163427c9168963c56c8ae64cd7adb7189cfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 711cdd59588011d03b0ed76119459db7fb58458e72a86c87249eb514cf3c1a9da87e77083b7c2448504bc6efcc732758a40ae9f6fb3c2ad8ce348c78c579696e
|
7
|
+
data.tar.gz: 70ecfe115742a096bad5d500aef2aac3c528d6c6a4a6cb465f19ed46e6689c93d62910fa5dc3379c6eecb8ebffdae29e6a65203d72afc3f461979bb2c3a01da7
|
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
# Module for output stuff in console
|
4
4
|
module OnlyofficeLoggerHelper
|
5
|
+
# Green color code
|
6
|
+
GREEN_COLOR_CODE = 32
|
7
|
+
# Red color code
|
8
|
+
RED_COLOR_CODE = 31
|
9
|
+
|
5
10
|
# Output log entry to terminal
|
6
11
|
# @param entry [String] line to output
|
7
12
|
# @param color_code [Integer] code of color
|
@@ -18,4 +23,18 @@ module OnlyofficeLoggerHelper
|
|
18
23
|
def self.colorize(text, color_code)
|
19
24
|
"\e[#{color_code}m#{text}\e[0m"
|
20
25
|
end
|
26
|
+
|
27
|
+
# Colorize log in green
|
28
|
+
# @param entry [String] line to output
|
29
|
+
# @return [void]
|
30
|
+
def self.green_log(entry)
|
31
|
+
log(entry, GREEN_COLOR_CODE)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Colorize log in red
|
35
|
+
# @param entry [String] line to output
|
36
|
+
# @return [void]
|
37
|
+
def self.red_log(entry)
|
38
|
+
log(entry, RED_COLOR_CODE)
|
39
|
+
end
|
21
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_logger_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: overcommit
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.2.26
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Simple logging gem for ONLYOFFICE projects
|