rulp 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/helpers/log.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWE1OGM4NzNhYjNkODZkZWNlZjJhMmYzMTgxZDQyOTFhZjViZWIyZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODQxYjk4YzE3MjRmNDFhODgyMDFiZTgxZjJiMzkyNzk1MjYzM2EwNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGNmNDU5NGU0NDhhZGE1ZWM2Mjc4MjIwYTNmNWU2N2Q1ZmE5NTc0NGI4YjJh
|
10
|
+
MzZkY2NjMWI0ZTQ5NDRhNTQ5ZmM5NmJlMWM2M2Q0ZGU5MTdhOTBkMzliNTc1
|
11
|
+
MzViNmYyYWVhZWNlODdiNDUzMTQxZmMxNWIxYmUwZWU3ODRlZjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzM4ZDhjNzZhNTFhOTMwZTAyNDViODM2Yjk5ZjY0NmY1NDk4MTk0ZDNjZjZk
|
14
|
+
ZGNlZDk4YzI2YzBlNGI0ODFlYjcyY2QzZjE4OWI5ZGIxMTlhM2JjZGQzNzBk
|
15
|
+
MWZhNmI1YmExYzIzZDVhYmY0Mzg3NGRmNWI4MWMyNzBkNDUwYzA=
|
data/lib/helpers/log.rb
CHANGED
@@ -36,7 +36,24 @@ module Rulp
|
|
36
36
|
|
37
37
|
def self.log(level, message)
|
38
38
|
if(LEVELS[level].to_i <= LEVELS[self.level])
|
39
|
-
puts("[#{level}] #{message}")
|
39
|
+
puts("[#{colorize(level)}] #{message}")
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.colorize(level)
|
44
|
+
if defined?(Pry) && Pry.color
|
45
|
+
case level.to_sym
|
46
|
+
when :debug
|
47
|
+
Pry::Helpers::Text.cyan(level)
|
48
|
+
when :info
|
49
|
+
Pry::Helpers::Text.green(level)
|
50
|
+
when :warn
|
51
|
+
Pry::Helpers::Text.magenta(level)
|
52
|
+
when :error
|
53
|
+
Pry::Helpers::Text.red(level)
|
54
|
+
end
|
55
|
+
else
|
56
|
+
level
|
40
57
|
end
|
41
58
|
end
|
42
59
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rulp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter Coppieters
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple Ruby LP description DSL
|
14
14
|
email: wc@pico.net.nz
|