autowow 0.8.0 → 0.8.1

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.
@@ -1,25 +1,25 @@
1
- require 'pastel'
2
-
3
- module Autowow
4
- class LogFormatter
5
- def self.beautify(severity, msg)
6
- log_msg = msg.to_s.end_with?($/) ? msg : "#{msg}#{$/}"
7
- log_msg = " $ #{log_msg}" if severity.eql?('DEBUG')
8
- color(severity, log_msg)
9
- end
10
-
11
- def self.color(severity, msg)
12
- pastel = Pastel.new
13
- case severity
14
- when 'DEBUG'
15
- pastel.yellow(msg)
16
- when 'WARN'
17
- pastel.red(msg)
18
- when 'ERROR'
19
- pastel.bright_red(msg)
20
- else
21
- msg
22
- end
23
- end
24
- end
25
- end
1
+ require "pastel"
2
+
3
+ module Autowow
4
+ class LogFormatter
5
+ def self.beautify(severity, msg)
6
+ log_msg = msg.to_s.end_with?($/) ? msg : "#{msg}#{$/}"
7
+ log_msg = " $ #{log_msg}" if severity.eql?("DEBUG")
8
+ color(severity, log_msg)
9
+ end
10
+
11
+ def self.color(severity, msg)
12
+ pastel = Pastel.new
13
+ case severity
14
+ when "DEBUG"
15
+ pastel.yellow(msg)
16
+ when "WARN"
17
+ pastel.red(msg)
18
+ when "ERROR"
19
+ pastel.bright_red(msg)
20
+ else
21
+ msg
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,29 +1,29 @@
1
- require 'time_difference'
2
-
3
- module RefinedTimeDifference
4
- refine(TimeDifference) do
5
- def humanize_higher_than(limit)
6
- limit_index = TimeDifference::TIME_COMPONENTS.index(limit)
7
-
8
- diff_parts = []
9
- in_general.each_with_index do |array, index|
10
- part, quantity = array
11
- next if quantity <= 0 or limit_index < index
12
- part = part.to_s.humanize
13
-
14
- if quantity <= 1
15
- part = part.singularize
16
- end
17
-
18
- diff_parts << "#{quantity} #{part}"
19
- end
20
-
21
- last_part = (diff_parts.pop or '')
22
- if diff_parts.empty?
23
- return last_part
24
- else
25
- return [diff_parts.join(', '), last_part].join(' and ')
26
- end
27
- end
28
- end
29
- end
1
+ require "time_difference"
2
+
3
+ module RefinedTimeDifference
4
+ refine(TimeDifference) do
5
+ def humanize_higher_than(limit)
6
+ limit_index = TimeDifference::TIME_COMPONENTS.index(limit)
7
+
8
+ diff_parts = []
9
+ in_general.each_with_index do |array, index|
10
+ part, quantity = array
11
+ next if (quantity <= 0) || (limit_index < index)
12
+ part = part.to_s.humanize
13
+
14
+ if quantity <= 1
15
+ part = part.singularize
16
+ end
17
+
18
+ diff_parts << "#{quantity} #{part}"
19
+ end
20
+
21
+ last_part = (diff_parts.pop or "")
22
+ if diff_parts.empty?
23
+ return last_part
24
+ else
25
+ return [diff_parts.join(", "), last_part].join(" and ")
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,3 +1,3 @@
1
- module Autowow
2
- VERSION = "0.8.0"
3
- end
1
+ module Autowow
2
+ VERSION = "0.8.1"
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autowow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thisismydesign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2018-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: easy_logging
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  version: '0'
294
294
  requirements: []
295
295
  rubyforge_project:
296
- rubygems_version: 2.5.1
296
+ rubygems_version: 2.7.3
297
297
  signing_key:
298
298
  specification_version: 4
299
299
  summary: Set of commands to AUTOmate Way Of Working