le 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LE.gemspec +1 -1
- data/lib/le/host.rb +10 -19
- metadata +2 -2
data/LE.gemspec
CHANGED
data/lib/le/host.rb
CHANGED
@@ -2,33 +2,24 @@ module Le
|
|
2
2
|
module Host
|
3
3
|
|
4
4
|
def self.new(token, local)
|
5
|
-
|
6
5
|
Le::Host::HTTP.new(token, local)
|
7
|
-
|
8
6
|
end
|
9
|
-
|
7
|
+
|
10
8
|
module InstanceMethods
|
11
9
|
def formatter
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
proc do |severity, datetime, _, msg|
|
11
|
+
message = "#{datetime} "
|
12
|
+
message << format_message(msg, severity)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
18
16
|
def format_message(message_in, severity)
|
19
|
-
|
17
|
+
message_in = message_in.inspect unless message_in.is_a?(String)
|
20
18
|
|
21
|
-
|
22
|
-
message_out = "severity=#{severity}, "
|
23
|
-
case message_in
|
24
|
-
when String
|
25
|
-
message_out << message_in
|
26
|
-
else
|
27
|
-
message_out << message_in.inspect
|
28
|
-
end
|
29
|
-
message_out
|
19
|
+
"severity=#{severity}, #{message_in.lstrip}"
|
30
20
|
end
|
31
21
|
end
|
22
|
+
|
32
23
|
end
|
33
24
|
end
|
34
25
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: le
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-31 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! '
|
15
15
|
|