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: b62d871afa753f836d3c5313c2c51f6da3d6feab2434e4696f1e93b025bdfbe9
4
- data.tar.gz: 8770583ec5f3fad60a01ee72715a7d0f81fc754bb2a4985d4e109fe30712c4e2
3
+ metadata.gz: 4a5ea7b7c854fb4b7384eeb75a63ed196266fc8322bd36de75f7b70857f9fddd
4
+ data.tar.gz: 1519140ed4d45d3f60027048b95a163427c9168963c56c8ae64cd7adb7189cfe
5
5
  SHA512:
6
- metadata.gz: 692b3e0520111d9565f6745c10e045c418a6eca6c57b5fc895ded04da0426b3d1431bf1c55ab168f678d522b00fabe346b744c3f5491c586efedf2004f6c6142
7
- data.tar.gz: 50dd41e950dd90fa56745b6222f4c11da86e6dd884ab85d0e6b8070e4962b65935d0a57286454126959a5cdbe7cb9c1a695afd48673e742bcf28875e469d8478
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
@@ -4,5 +4,5 @@ module OnlyofficeLoggerHelper
4
4
  # @return [String] name of gem
5
5
  NAME = 'onlyoffice_logger_helper'
6
6
  # @return [String] version of gem
7
- VERSION = '1.1.0'
7
+ VERSION = '1.2.0'
8
8
  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.1.0
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: 2020-11-17 00:00:00.000000000 Z
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.1.4
190
+ rubygems_version: 3.2.26
191
191
  signing_key:
192
192
  specification_version: 4
193
193
  summary: Simple logging gem for ONLYOFFICE projects