run_loop 2.1.1.pre5 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/run_loop/environment.rb +5 -0
- data/lib/run_loop/logging.rb +36 -40
- data/lib/run_loop/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39af0451c6719a47b9adafba2e10d2421633d379
|
4
|
+
data.tar.gz: 98a21653ec46a7c7d04732ea28a81f30b574a413
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac0327a5a25b1c76095520787c28aa4550474fbebcbf3d213737fd46fc89117dad93e7de1eb491af717627c56bdb932b44a771aed45ec8008d48d1d4d5df2955
|
7
|
+
data.tar.gz: 04541d16efd91c9f1889869db1e8fbac9364ce72371efb5cd6f1c66e13038a4410b8614ad1a7648da91dc5c56e67f9f2ad47080ed4be04d7fa37f619b7338a28
|
data/lib/run_loop/environment.rb
CHANGED
data/lib/run_loop/logging.rb
CHANGED
@@ -43,73 +43,69 @@ module RunLoop
|
|
43
43
|
# cyan
|
44
44
|
def self.log_unix_cmd(msg)
|
45
45
|
if RunLoop::Environment.debug?
|
46
|
-
puts
|
46
|
+
puts Color.cyan("EXEC: #{msg}") if msg
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
# blue
|
51
51
|
def self.log_warn(msg)
|
52
|
-
puts
|
52
|
+
puts Color.blue("WARN: #{msg}") if msg
|
53
53
|
end
|
54
54
|
|
55
55
|
# magenta
|
56
56
|
def self.log_debug(msg)
|
57
57
|
if RunLoop::Environment.debug?
|
58
|
-
puts
|
58
|
+
puts Color.magenta("DEBUG: #{msg}") if msg
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
62
|
# .log_info is already taken by the XTC logger. (>_O)
|
63
63
|
# green
|
64
64
|
def self.log_info2(msg)
|
65
|
-
puts
|
65
|
+
puts Color.green("INFO: #{msg}") if msg
|
66
66
|
end
|
67
67
|
|
68
68
|
# red
|
69
69
|
def self.log_error(msg)
|
70
|
-
puts
|
70
|
+
puts Color.red("ERROR: #{msg}") if msg
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
string
|
84
|
-
elsif RunLoop::Environment.xtc?
|
85
|
-
string
|
86
|
-
else
|
87
|
-
"\033[#{color}m#{string}\033[0m"
|
73
|
+
module Color
|
74
|
+
# @!visibility private
|
75
|
+
def self.colorize(string, color)
|
76
|
+
if RunLoop::Environment.windows_env?
|
77
|
+
string
|
78
|
+
elsif RunLoop::Environment.xtc?
|
79
|
+
string
|
80
|
+
else
|
81
|
+
"\033[#{color}m#{string}\033[0m"
|
82
|
+
end
|
88
83
|
end
|
89
|
-
end
|
90
84
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
85
|
+
# @!visibility private
|
86
|
+
def self.red(string)
|
87
|
+
colorize(string, 31)
|
88
|
+
end
|
95
89
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
90
|
+
# @!visibility private
|
91
|
+
def self.blue(string)
|
92
|
+
colorize(string, 34)
|
93
|
+
end
|
100
94
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
95
|
+
# @!visibility private
|
96
|
+
def self.magenta(string)
|
97
|
+
colorize(string, 35)
|
98
|
+
end
|
105
99
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
100
|
+
# @!visibility private
|
101
|
+
def self.cyan(string)
|
102
|
+
colorize(string, 36)
|
103
|
+
end
|
110
104
|
|
111
|
-
|
112
|
-
|
113
|
-
|
105
|
+
# @!visibility private
|
106
|
+
def self.green(string)
|
107
|
+
colorize(string, 32)
|
108
|
+
end
|
114
109
|
end
|
115
110
|
end
|
111
|
+
|
data/lib/run_loop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: run_loop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.1
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -362,9 +362,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
362
362
|
version: '2.0'
|
363
363
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
364
364
|
requirements:
|
365
|
-
- - "
|
365
|
+
- - ">="
|
366
366
|
- !ruby/object:Gem::Version
|
367
|
-
version:
|
367
|
+
version: '0'
|
368
368
|
requirements: []
|
369
369
|
rubyforge_project:
|
370
370
|
rubygems_version: 2.5.2
|